Locale PHP bugs

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Acharis
Forum Newbie
Posts: 4
Joined: Sat Jan 16, 2010 2:16 pm

Locale PHP bugs

Post by Acharis »

Does anyone know of some list of all locale bugs? Or some tutorial how to use locales safely? Or maybe you know of some PHP version where locale actually works?

I'm trying to use gettext, which require locales but encountered like 4 PHP bugs so far...


The typical tutorial says something like that:

putenv("LC_ALL=$language");
setlocale(LC_ALL, $language);
bindtextdomain("messages", "./locale");
textdomain("messages");

But usage of LC_ALL is a suicide, if you try to use it with Turkish language all fuctions with "I" in the function name will become "non existant", like half languages will break all floats calculations (',' and '.' difference). GD library stops working with some locales, etc, etc.

Do you know by any chance of a minimal setting of locales, just enough to make gettext work?
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Locale PHP bugs

Post by Eric! »

Isn't this machine dependent and it depends on what locales are installed? You probably have to install the locales-all package...but this is just my guess I don't work with PHP locales.
Post Reply