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?
Have a look at this page: http://php.net/manual/en/function.gettext.php, the example shows which initialization to do before the
gettext()
or_()
functions actually translate text.