Hi,
I noticed that date/time related strings, like days of week, name of months, are listed in js/messages.php, using gettext. It seems a bit strange that these should be translated, as these translations are already done and available. (using strftime(), f.e.).
Why is it done this way in js/messages.php?
Le 2011-02-06 07:47, Dieter Adriaenssens a écrit :
Hi,
I noticed that date/time related strings, like days of week, name of months, are listed in js/messages.php, using gettext. It seems a bit strange that these should be translated, as these translations are already done and available. (using strftime(), f.e.).
Why is it done this way in js/messages.php?
To avoid problems in case the server has a faulty / not correctly set up locale?
Hi
Dne Sun, 6 Feb 2011 13:47:08 +0100 Dieter Adriaenssens dieter.adriaenssens@gmail.com napsal(a):
I noticed that date/time related strings, like days of week, name of months, are listed in js/messages.php, using gettext. It seems a bit strange that these should be translated, as these translations are already done and available. (using strftime(), f.e.).
Why is it done this way in js/messages.php?
We need to get all names and feed it into javascript code. We could do it with some tricks using strftime as well, but I think it's more readable this way.
Also I'm afraid of strftime() and setlocale support on various platforms like Windows.