Re: [PHP] Re: languages and PHP



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
.



Relevant Pages

  • Re: LC_CTYPE=UTF-8 in ksh
    ... And the idea of UTF-8 is to be language independent, ... The "UTF-8" encoding is language ... shall define character classification, case conversion, and other ...
    (comp.unix.shell)
  • IIS 6.0 / UTF-8 Include File Issue
    ... All the language is included in variables in UTF-8 include files. ... IIS seems to implicitly think the page is UTF for text inputs. ... Just making all the pages UTF-8 causes is other display problems as IIS 6.0 ...
    (microsoft.public.inetserver.iis)
  • Re: Attention: European C/C++/C#/Java Programmers-Call for Input
    ... For any language using a Latin ... script for identifiers, the effective string length is 1.0x or rare ... The new programming language supports fonts, ... predates UNICODE and UTF-8 BTW) Additional ...
    (comp.arch.embedded)
  • Re: languages and PHP
    ... I work almost exclusively in UTF-8 (language irrelevant), ... Be careful about breaking strings tho' as the xgettext crawler file will ... name of the gettext function which is quite common). ...
    (php.general)
  • Re: Setting dynamically the Greek charset in Firefox ?
    ... And why can't you use UTF-8 and forget about all this encoding-switching? ... Greek users often have their browser's encoding set to ... Does inline frames inherit the language from ... The wizard (i.e. the inner frame making DHTML with Javascript) is the ...
    (comp.lang.javascript)