[Phpug] l10n and i18n
Pádraic Brady
padraic.brady at yahoo.com
Thu Jan 17 23:08:55 GMT 2008
Hi AJ,
In the grand scheme of PHP, any Locale change during a user's request only lasts for that request and effects no others. The exception would be if Locale settings (e.g. for mbstring) were set globally in php.ini.
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com
OpenID Europe Foundation Member-Subscriber
----- Original Message ----
From: AJ McKee <aj.mckee at druid-dns.com>
To: Irish PHP User Group <phpug at lists.iephpug.org>
Sent: Thursday, January 17, 2008 10:56:01 PM
Subject: Re: [Phpug] l10n and i18n
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
_______________________________________________
Phpug mailing list
Phpug at lists.iephpug.org
http://lists.iephpug.org/mailman/listinfo/phpug
Member Map http://www.frappr.com/irishphpusersgroup/
Membership Planner Calendar: http://tinyurl.com/opjd5
More information about the Phpug
mailing list