22.214.171.124 g as in garden [g] and g as in resolution [ʒ]
The distinction between a voiced sound and an unvoiced sound should be seen, see 126.96.36.199. One should be able to distinguish between the unvoiced sh in words like chamar (to call) and the voiced version in words like gente (people), girar (to turn).
The g is pronounced as the g in words like garden if it is followed by a, o, u and it is pronounced as a voiced /sh/ like in emotion if followed by i or e.
g [g] pronounced as the g in garden
gabar (to praise)
g [ʒ] pronounced as voiced sh
If g is pronounced voiced english sh [ʒ] after i and e we have problem if there are words, where the g is followed by i / e, but the ge is to be pronounced as a g like in garden. That's for instance the case with guerra (war). The solution is the same in all roman languages. In this case the spelling is gu and not ge / gi. In this case the u is not pronounced and its only function is to avoid that the g becomes a voiced sh.
g in combination with gue or gui
Last not least in some few words the combination gu is to be pronounced, the g as well as the u. In former times the u got two points in this case as in the word bilingüe (bilingual), indicating this way that the u should be pronounced. (Something that is still done in Spanish, for instance in cigüeña (swan)). These two dots where eliminated in January 2009 in the last spelling reform. Today one must simply know how the word is to be pronounced. This author knows a lot of things that could be simplified, however the two dots made sense. What can we learn from that? If public employees do something, the result is always, without any exception, a catastrophe. All over the world.