Re: setLocale() function
| From: | Olivier Mascia | Date: | Fri, 04 Jan 2002 15:42:18 +0000 |
| Subject: | Re: setLocale() function | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11298@lists.php.net to get a copy of this message | ||
Hello,
RoelS wrote:
R> could someone tell me if it's possible to change the locale on the system.
R> I tried the following code (which is from the manual):
R>
R> setlocale ("LC_TIME", "C");
R> print (strftime ("%A in Finnish is "));
R> setlocale ("LC_TIME", "fi_FI");
R> print (strftime ("%A, in French "));
R> setlocale ("LC_TIME", "fr_FR");
R> print (strftime ("%A and in German "));
R> setlocale ("LC_TIME", "de_DE");
R> print (strftime ("%A.\n"));
R>
R> all %A are in the same language.
<? setlocale(LC_TIME, "fr"); echo strftime("%H heures %M, le %d %B %Y") ?>
Works ok for me.
Note : setlocale(LC_TIME, ...) and not setlocale("LC_TIME", ...)
--
Olivier Mascia <om@mascia.biz>