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

Re: PHP with gettext



Youcef Rabah Rahal wrote:
Salam,

Arafat, you wanted some work ? Here's some serious work for ya ;-)

I've been trying to implement gettext within the website to have it translated to Arabic (and to any other language, that is, for example French, which should be considered seriously). I unfortunately did not succeed yet in my attempts.

I have been carefully following some tutorials directives (for ex, I verified that our PHP is indeed compiled with gettext support by looking at phpinfo()'s output). I tried to do this in an existing Arabeyes PHP file. Now that I think about it, maybe the right way would be to create a test.php file including only something like echo gettext('some string'); or print gettext('some string'); create the PO, translate it, create the MO and see if you have the correct output when you choose the correct language. The process is rather easy, but I couldn't manage to have anything displayed but the initial English string, which is strange.

This link would be useful (the first one is fine):
	
http://www.google.com/search?q=+php+gettext&btnG=Recherche+Google&hl=fr&ie=UTF-8&oe=UTF-8

If we get this working, the next task would be to wrap _every_ echo/print/printf functions in the code by a gettext() function, create the PO and give it to translators !

Regards,

Roger wilco. I'll start on it tomorrow soon as I get off work.