Forums / Addon Language Packs / changing @setlocale -- no affect

changing @setlocale -- no affect

Locked
Results 1 to 5 of 5
This thread is locked. New replies are disabled.
12 Oct 2009, 12:18
#1
rayspike avatar

rayspike

New Zenner

Join Date:
Apr 2009
Posts:
25
Plugin Contributions:
0

changing @setlocale -- no affect

Hello,

I've got some troubles with the language date.

The date in orderhistory and email, can't be changed to another language.

Only english will shown, I use english and dutch

When I test this localy it works great. But when i do this on a live server it shows only the english date.

In a lot of threads, says it must be the @setlocale
So I try this at local testmachine (where it works great). I'll pick the dutch.php (from my template) and change the @setlocale to
@setlocale(LC_TIME, 'en_US.ISO_8859-1');

because locally works, so now for the dutch and english, the date should be in english. But not.....still english and dutch (long date)

What do I have to alter to get this work.

On the live server (where I am missing the dutch date) I've tried to get the dutch date
@setlocale(LC_TIME, 'nl_NL.ISO_8859-1');
@setlocale(LC_TIME, 'nl_NL');
@setlocale(LC_TIME, 'Dutch');
@setlocale(LC_TIME, 'dutch');
@setlocale(LC_TIME, 'nl');
@setlocale(LC_TIME, 'nl_NL.utf8');


Or is this an admin-switch or do I need to change another file?
12 Oct 2009, 13:25
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: changing @setlocale -- no affect

  @setlocale(LC_TIME, 'Dutch');
  define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
  define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
  define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
  define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

Try this and set other formats as required
12 Oct 2009, 13:33
#3
rayspike avatar

rayspike

New Zenner

Join Date:
Apr 2009
Posts:
25
Plugin Contributions:
0

Re: changing @setlocale -- no affect

Thnks for your reply,

But that was one of the options I tried and 5 others...so that didn't work. :(
12 Oct 2009, 13:38
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: changing @setlocale -- no affect

Back to basics then...
Post the information requested when one creates a post
12 Oct 2009, 15:33
#5
rayspike avatar

rayspike

New Zenner

Join Date:
Apr 2009
Posts:
25
Plugin Contributions:
0

Re: changing @setlocale -- no affect

after 20 edits, this was the solution
setlocale(LC_TIME, 'nl_NL.ISO8859-1');