473,395 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Installing locales for strftime()

Hi,

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.6.19.2 #2 SMP Wed Jan 17 17:49:26 CET 2007 x86_64
GNU/Linux

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

Thank you in advance, any idea?

Darko

May 8 '07 #1
2 3027
Darko wrote:
Hi,

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.6.19.2 #2 SMP Wed Jan 17 17:49:26 CET 2007 x86_64
GNU/Linux

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

Thank you in advance, any idea?
Hi Darko,

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

<http://de.php.net/manual/en/function.setlocale.php>
hth,
Roy
May 8 '07 #2
On May 8, 4:00 am, Darko <darko.maksimo...@gmail.comwrote:
Hi,

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)
Also may want to to check out gettext:

http://us2.php.net/gettext

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

http://www.gnu.org/software/gettext/gettext.html

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

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

Thank you in advance, any idea?

Darko

May 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Hunter | last post by:
>>> from datetime import date >>> dt = date(1005,1,1) >>> print dt.strftime('%Y') Traceback (most recent call last): File "<stdin>", line 1, in ? ValueError: year=1005 is before 1900; the...
5
by: Sheila King | last post by:
I have a web app that has been running just fine for several months under Python 2.2.2. We are preparing to upgrade the server to run Python 2.4.1. However, part of my web app is throwing an...
0
by: David List | last post by:
I seem to have a problem installing facets into locales explicitly. It is not clear to me whether the problem is my compiler, my environment or my code. I am trying out some code from...
4
by: Andy Leszczynski | last post by:
Python 2.2/Unix >>time.strftime("%T") '22:12:15' >>time.strftime("%X") '22:12:17' Python 2.3/Windows >>time.strftime("%X")
2
by: Mike Conmackie | last post by:
Greetings, Is there any way to force strftime() to ignore locale settings when formatting the resulting string? I have a requirement to create a specific date-time string format in UTC. ...
12
by: param | last post by:
Hi All, I want to use %x as directive to get the locale specific date representation. But, at the same time, i want to know the format of the output for interpreting it through program. Is there...
0
by: Darko | last post by:
Hi, I have problems implementing i18n on my site hosted on a FreeBSD server. While it was hosted on a Linux server, there were no problems, but once I transferred it to FreeBSD, gettext()...
2
by: Giovanni Bajo | last post by:
Hello, I am trying to find a good way to portably get the output of strftime() and put it onto a dialog (I'm using PyQt, but it doesn't really matter). The problem is that I need to decode the...
4
by: Gilles Ganault | last post by:
Hello What does it take to support locales? The following test code found on the PHP site doesn't work as planned: ======= setlocale(LC_TIME, "C"); echo strftime("%A"); setlocale(LC_TIME,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.