[dev] [Patch] Localization problems with strftime
Jan Schneider
jan@horde.org
Tue, 6 Aug 2002 11:11:52 +0200
Zitat von Thierry Thomas <thierry@pompo.net>:
> Le 06/08/2002 à 05:53:42 +0200, Chuck Hagenbuch <chuck@horde.org>
> écrivait :
> > > On some platforms (e.g. FreeBSD), strftime is not localized if
> setlocale
> > > is not set. For example IMP, Kronolith, Nag, etc. show un-localized
> > > dates.
> >
> > We already call setlocale() from NLS::setLang().
>
> OK, but it'is not sufficient (at least on FreeBSD): if I replace my
> previous patch by
>
> --- base.php.orig Sat Jul 27 22:07:21 2002
> +++ base.php Tue Aug 6 09:58:33 2002
> @@ -42,4 +42,6 @@
> $notification = &Notification::singleton();
> $notification->attach('status');
>
> +NLS::setLang();
> +
> ?>
>
> it does nothing. In setLang(), $lang = "fr_FR" (or "de_DE", etc.), and
> setlocale (LC_TIME, xx) requires something like "fr_FR.ISO8859-15" (or
> "de_DE.ISO8859-1", etc.).
>
> With NLS::setLang(), strftime returns the value for locale set to "C",
> with strings and format in english.
Then you probably don't have an alias set from fr_FR to fr_FR.ISO8859-15.
There are more systems out there that have locales installed without charset
variants than systems that have locales with variants and no locales without.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft