[Solved] Locale problems - partly solved
-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
[Solved] Locale problems - partly solved
Hey guys,
I'm running into a locale problem.
Using the latest (1.5.1) CMSMS, and some modules (which don't influence the locale settings), I am not able to get the locale correct. I even tried setting the locale in config.php, but it still doesn't work.
So all the dates show up in English, instead of Dutch. And I can't seem to find the problem, and it really annoys me, since it needs to be Dutch, because the site is completely Dutch.
Anyone familiar with the problems or know a workaround?
P.S. I already tried using a UDT with setlocale, but that doesn't work either!
I'm running into a locale problem.
Using the latest (1.5.1) CMSMS, and some modules (which don't influence the locale settings), I am not able to get the locale correct. I even tried setting the locale in config.php, but it still doesn't work.
So all the dates show up in English, instead of Dutch. And I can't seem to find the problem, and it really annoys me, since it needs to be Dutch, because the site is completely Dutch.
Anyone familiar with the problems or know a workaround?
P.S. I already tried using a UDT with setlocale, but that doesn't work either!
Last edited by christiaans on Thu Jan 08, 2009 4:48 pm, edited 1 time in total.
Re: Locale problems
Did you try setting the dateformat in the GlobalSettings. Or are you talking about the name of the month.....
Ronny
Ronny
-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: Locale problems
I am indeed talking about the name of the month and weekday (I want it to be: Maandag 5 januari 2009, but instead it outputs: Monday 5 january 2009)...
Re: Locale problems
Have you set the lang. any where...
Re: Locale problems
What hosting are you using? Are you using a dutch or english host? Foreign hosts may not always have all locales installed on their systems. I found my server having the same problems until I installed more locales.
If you have control over the server, ssh login and do a sudo dpkg-reconfigure locales and select dutch (or any other cmsms supported language) from the list. If not, beg at your host.
If you have control over the server, ssh login and do a sudo dpkg-reconfigure locales and select dutch (or any other cmsms supported language) from the list. If not, beg at your host.
-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: Locale problems
I never changed anything within cmsms. However, I think I will set up another test, and let you guys know..
thanks for the tip JD
.
thanks for the tip JD

-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: Locale problems
Hey guys, so now I set up a testsite, and it still doesn't work. I am now; however, a bit confused how the "locale" variable in the config.php needs to be defined..?
I tried using: nl_NL or nl, both didn't work.
P.S. You can find the date string below the searchbox!
I tried using: nl_NL or nl, both didn't work.
P.S. You can find the date string below the searchbox!
Last edited by christiaans on Thu Jan 08, 2009 12:22 pm, edited 1 time in total.
Re: Locale problems
Have you tried nl-NL?...
-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: Locale problems
Yep, and it doesn't work either.. How is this possible, is my host overriding cmsms or something??
update: I tried testing with a UDT with the following:
And it just displays:
update: I tried testing with a UDT with the following:
Code: Select all
setlocale(LC_TIME, "C");
echo strftime("%A");
setlocale(LC_TIME, "fi_FI");
echo strftime(" in Finnish is %A,");
setlocale(LC_TIME, "fr_FR");
echo strftime(" in French %A and");
setlocale(LC_TIME, "de_DE");
echo strftime(" in German %A.\n");
So it seems my host overrides all locale settings or so..?Thursday in Finnish is Thursday, in French Thursday and in German Thursday.
Last edited by christiaans on Thu Jan 08, 2009 9:33 am, edited 1 time in total.
-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: Locale problems
Okay, so I visited the forum of my hosting company, and it turns out you need to use: nl_NL.UTF-8..
However, if I fill that in in the config file, it still doesn't work. I made a UDT with setlocale, and that works, but now I have to remember to insert the UDT everywhere in the pages..
However, if I fill that in in the config file, it still doesn't work. I made a UDT with setlocale, and that works, but now I have to remember to insert the UDT everywhere in the pages..
Re: Locale problems
i had the same problem.
I have put es_ES in the locate field in config.php and the date changed to spanish.
I have put es_ES in the locate field in config.php and the date changed to spanish.
Last edited by per on Thu Jan 08, 2009 12:40 pm, edited 1 time in total.
-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: Locale problems
Hmm, sadly that doesn't work for me (as stated).. I think I'll be doomed to use the UDT.. 

Re: [Solved] Locale problems - partly solved
Are you trying to get every page to show this way? if so why not put UDT in the template/s...
-
- Power Poster
- Posts: 300
- Joined: Tue Mar 04, 2008 10:37 am
Re: [Solved] Locale problems - partly solved
That is what I am doing now. However, I have a X number of templates, and if I add a new template, I have to remember to insert the UDT, so it's something extra. But it works, so it's all goodmark wrote: Are you trying to get every page to show this way? if so why not put UDT in the template/s...

Re: [Solved] Locale problems - partly solved
You might want to try this little hack. Put this somewhere on your index.php (line 35 seems like a suitable place)
Code: Select all
setlocale(LC_ALL, "nl_NL.UTF8");