Installing locales for strftime()

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

by definition, strftime() uses the previous setlocale() calls to
determine which language to use in returning strings such as week days
or month names, depending on the given format.

Now, my system seems not to have the necessary packages installed,
since I always get "Monday" and "March" etc. whichever language I
specify. (No help needed for specifying languages, since gettext()
works without problems, which means setlocale() went fine).

I tried installing some packages from the Internet, but these are only
for KDE language support, and they seem not to have impact on apache,
php etc.

My questions are:
 - what does this depend on - Apache configuration, PHP configuration,
kernel configuration, some independent package installation?
 - where do I find these packages (I use slamd64 - Slackware AMD64)
 - how do I install these (if you help me find them, since google-ing
until now didn't help much)

If my configuration specification necessary, here it is:
PHP: 5.2.0
Apache: 2.2.4
Kernel info: Linux #2 SMP Wed Jan 17 17:49:26 CET 2007 x86_64

I need support for more than one language, eg. German, French,
Serbian, Swedish, Russian, etc. No need for far-east languages at the

Thank you in advance, any idea?


Re: Installing locales for strftime()

Darko wrote:
Quoted text here. Click to load it

Hi Darko,

checkout setlocale() at the PHP manual. There is also an example.



Re: Installing locales for strftime()

Quoted text here. Click to load it
Also may want to to check out gettext:

You have to compile in the GNU gettext lib, however:


Quoted text here. Click to load it

Site Timeline