Ticket #597 (new Task)

Opened 4 months ago

Last modified 4 months ago

Replace our own translation system with PHP's gettext()

Reported by: Didactylos Assigned to: davea
Priority: Minor Milestone: Undetermined
Component: Web - Project Version:
Keywords: translation PHP Cc:

Description

Replace our own translation system with PHP's gettext()

Source: DevProjects

Change History

04/06/08 15:05:52 changed by Nicolas

I have read arguments against using gettext in PHP. Biggest problem being that you need to set an environment variable to change the language. Environment variables are per-process, so gettext is not thread safe. That would make BOINC unsafe to use in a threaded webserver.

You have to be quite careful when changing the locale too. If, for example, you change the number formatting rules (decimal point and thousands separator to match user locale), you may get surprises like UPDATE user SET total_credit=2,31;. So you have to use number_format with an explicit '.' decimal point when constructing SQL. And wait for the next unexpected surprise.


If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.