Recently I heard native speakers pronouncing 'gender' with a soft 'g', almost sounding like 'jan' from 'January'. I've instantly looked it up at dict.cc and YouTube: seems like this is the correct pronunciation.
However, I'm wondering why the 'g' isn't a hard 'g'. I mean 'get' or 'git' (the software), 'goal' and many more have a hard 'g', thus not sounding like a 'j' at all.
Is there any rule of thumb for the pronunciation of a 'g'? How can I ascertain whether a word should be pronounced with a soft or hard 'g'?