W dniu 2009-08-10 15:13, Kornel Lesiński pisze:
On 10-08-2009 at 13:29:27 Łukasz Palka <lukasz.pal...@gmail.com> wrote:

I don't know how to use i18n. I made a template, made two .mo files,
and I don't know how to set language. I have two versions: 'pl_PL' and
'en_GB', and pl_PL are always used. I don't know how to change
language to en_GB. I was trying some combinations on setLanguage() and
sometimes I got Exception (not supported language) and for some
combinations it is OK, but it is not translated. For example I can set
en-GB, en, english or eng, but I still have polish version. I can set
'polish' or nothing at all, but I can't set pl-PL.

There is quite a mess with language codes and encodings on different platforms. Try to play with setlocale, to get correct locale settings, try first with pspell functions (no restart needed).
Most common gotcha is that Apache with mod_php has to be restarted every time you change .mo files (there are no problems with other servers or FastCGI).
… restart Apache, or rename translation file.
It's easier to rename translation file (programatically) each time you change your .mo files,
than restarting apache each time.


PHPTAL mailing list

Reply via email to