Re: Re: languages and PHP
| From: | Per Jessen | Date: | Thu, 27 Sep 2007 18:44:08 +0000 |
| Subject: | Re: Re: languages and PHP | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-262537@lists.php.net to get a copy of this message | ||
Colin Guthrie wrote:
> Per Jessen wrote:
>> I work almost exclusively in UTF-8 (language irrelevant), but I've
>> never had to do any of the above. The mb_convert_encoding()
>> fromUTF-8 to UTF-8 doesn't seem to make much sense?
>
> I agree. Provided you HTML is dished out with UTF-8 in the doctype
> definiton etc. then all forms are automatically sent in UTF-8....
Quite so.
> Also for multilingual content (labels etc.) in PHP have a look at the
> gettext extension. This will let you code in your default language
> with a minimal wrapper and translate to other languages with catalog
> files.
I haven't done much with gettext yet - I use apache language content
negotiation, separate source-files per language, and try hard to keep
my PHP code language neutral.
/Per Jessen, Zürich