I have to translate the text in english to germany.For that I have done the folllownig I have used gettext and working on Ubuntu 11.10 os...
created a text.php
Through Poedit created messages.po and messages.mo(automatically created).
Both .po and .mo file reside in "locale/de_DE/LC_MESSAGES."
Then created the localization.php in the same location where the file text.php resides.
But still When I tested the file text.php it gave output as untranslated string....
Why was it so? Have done any mistake or left something else......?
Could anybody help me out?
Gettext is not magic. It doesn't translate output on its own when localization files exist; you have to explicitly call the
gettext()function whenever you want it to translate a string.