[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

php and locales



Hi,
I am packaging a PHP4 application.
This software has been localized so there are
lines like:

<? echo gettext ("Hello world");?>

instead of:

<? echo "Hello world";?>

I was able to generate the po file with xgettext
and the mo file with msgfmt. 
I have always been in troubles with locales, so
here are my questions:

1) has the original gettext source code to be written in english?
   The software I am working on is not in english and so
   it will generate a po in another language (italian).
   I can manage to make the english po file (translating it) but I am sure
   that it would be much more easy to translate this software
   in russian starting from the english version rather than
   from the italian one. But you know, the upstream version
   is in italian so HAS it to be in english or not?
   Has the upstream author the need to change all the code in english
   or would it be a "good suggestion"?

2) I know that it should be automatic, but would it be 
   stupid to put a php code to ask for the user's language
   and then export the relative LC_ALL? (with the setenv
   php command)

3) I have in /etc/enviroment "LANG=it_IT", all my consoles
   are "localized" and everything seems to work quite well. 
   The question is: Why PHP tells me that
   the LANG variable is "C" instead of "it_IT"? (I read the
   value with getenv php command). Where should php look for?
   Have I forgot something in declaring my "localization"?

thanks a lot

Gaetano


-- 
Gaetano Paolone GnuPG:69A5 548C 4145 1116 8CA9  2CB5 9448 3FA3 54DB 33D3
  Debian developer - bigpaul@debian.org.  Home: http://www.bigpaul.org
         http://www.linuxfaq.it: LDR Linux Domande e Risposte.
http://www.gnutemberg.org - Linuxlinks: http://www.linuxlinks.it by robk



Reply to: