[Phpug] l10n and i18n
AJ McKee
aj.mckee at druid-dns.com
Thu Jan 17 22:56:01 GMT 2008
Joe,
If your app is not already using a framework, you may find it a tad
harder to start again. In that case use gettext.
E.G.
<?php
| setlocale(LC_ALL, 'fr_FR');|
echo __("Hello");
?>
The nice thing about using gettext is you can write in your native
language and let the translators work it out. Great for status messages
etc, but not when pulling paragraphs etc out of the DB.
Another handy tool, unless you are translating yourself is POEdit.
This raises a question for me though if anyone with better expeirnce
could help answer. When the locale is set for a use session, does it
affect the Apache child serving the request, or would it be okay. I
can't remember where I heard this one from, but its always in the back
of my mind and it may well be complete tripe. If someone can clarify for
me that would be great.
AJ
More information about the Phpug
mailing list