The Locale ID used for german I18n at the moment is
"de". This seems to be no longer supported on newer
systems - especially on SuSe Linux which is very much
in use in Germany. The call of setlocale(LC_ALL, "de")
from a PHP script returns false.
The correct name of the Locale is "de_DE", the name of
the language directorys "de" can remain unaffected.
Sollution:
- the 2 tables "lang" and "people" have to be altered
to allow a locale ID with more than 2 characters:
alter table lang change column id id char(5);
alter table people change column preflang preflang char(5);
- the table "lang" has to be updated with the new ID
for german:
update lang set id="de_DE", encoding="ISO-8859-15"
where name="German";
(note: this will also update the encoding to the new
ISO-8859-15 which is now in use in germany)
Then the values for pref. language have to be set again
by the users (or you just update them by hand in the
database).
Logged In: YES
user_id=768400
Sorry forgot one thing: The call to setlocale(LC_ALL,
$lang); is itself not so nice.
This is because LC_ALL also sets the number formatting to
the corresponding locale. In german numbers are with "," as
decimal separator in opposite to "." This in turn results in
many database errors whenever decimal numbers are involved,
because the numbers are internally transformed corresponding
to the locale and mySQL does not like "," as a decimal
separator :(
The quick fix is to replace setlocale(LC_ALL, $lang); with
setlocale(LC_MESSAGES, $lang);
setlocale(LC_CTYPE, $lang);
in include/general.php
The drawback is that all numbers will be displayed
unlocalized. The real sollution would be to provide a filter
at database acces to normalize all numbers to SQL standard.
For the whole setlocale stuff see also the discussion at:
http://de.php.net/gettext