Trying to get a date in Swedish, but this won't work:
$unix_time = strtotime($dt_created);
setlocale(LC_TIME, 'sv', 'sve', 'swe', 'sv_SE');
$time = strftime('%A den %d %B', $unix_time);
No matter what I put in setlocale(), I get English weekdays and months.
I'm using PHP 4.3.8 on a UNIX computer, but I'm not in control of the
installation.
Gustaf 5 8376
.oO(Gustaf Liljegren) Trying to get a date in Swedish, but this won't work:
$unix_time = strtotime($dt_created); setlocale(LC_TIME, 'sv', 'sve', 'swe', 'sv_SE'); $time = strftime('%A den %d %B', $unix_time);
No matter what I put in setlocale(), I get English weekdays and months. I'm using PHP 4.3.8 on a UNIX computer, but I'm not in control of the installation.
Is a Swedish locale installed on that machine?
Micha
Michael Fesser wrote: Is a Swedish locale installed on that machine?
I'm not sure about that, and frankly, I don't know how to find out. Can
I see it in phpinfo()? Thanks for helping.
Gustaf
"Gustaf Liljegren" <gu*****@algonet.se> wrote in message
news:cf**********@green.tninet.se... Michael Fesser wrote:
Is a Swedish locale installed on that machine?
I'm not sure about that, and frankly, I don't know how to find out. Can I see it in phpinfo()? Thanks for helping.
Gustaf
The fact that setlocale() doesn't work seems to indicate that it wasn't.
In general it's best to avoid using setlocale() since it's very system
dependent.
steve wrote: If no answers, the function can be easily written.
Yes, I did. Problem solved. :-) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: transam |
last post by:
Hi,
I use Mandrake linux 10 with German setup, Hungarian Keyboard.
My Python is python 2.3.3.
The following program fails:
---------------------------------------------------------
import...
|
by: Ksenia Marasanova |
last post by:
Hi,
I have some problems with locale module.
On my workstation, changing locale doesn't have effect:
Python 2.3 (#1, Sep 13 2003, 00:49:11)
on darwin
Type "help", "copyright", "credits" or...
|
by: David Patow |
last post by:
Can anyone explain why neither ASP Session.LCID nor
VBScript SetLocale() effect the locale of a VB6-based COM
object that is instantiated via Server.CreateObject()?
If I set Session.LCID, then...
|
by: Damien Elmes |
last post by:
Hi folks,
I've got a module + C extension which provides on screen display
support in X, via libxosd (http://repose.cx/pyosd). I've recently had
a report of trouble where a Russian user was...
|
by: J Trauntvein |
last post by:
I was working with a co-worker the other day to work through the
process of formatting numeric values by imbueing C++ iostreams with
locales. His program's initialisation code had a call to...
|
by: Schraalhans Keukenmeester |
last post by:
Hi,
I run Apache 1.3.33 and PHP 5.0.4 on my Suse9.2 Linux box.
If I try any of the following:
setlocale (LC_TIME,'nl');
setlocale (LC_TIME,'nl_NL'); //example php.net site
setlocale...
|
by: Paul Lautman |
last post by:
Last night I had a web site. This morning it was returning nothing. I traced
it to a call to setlocale(). It appears that something has happened that
means that any call to setlocale completely...
|
by: Steven Woody |
last post by:
Hi,
I am in Linux writing a program using setlocale(3). But I found, only
the first invocation of setlocale(3) can be success, any subsequent
calling of this function will fail $B!J(B return...
|
by: yogeshmk |
last post by:
I'm writing an application which is required to function with many
languages and also compile on Linux & windows. Here's how I find the
locale ..
# include <stdio.h>
# include <locale.h>
int...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
| |