Forums / Addon Language Packs / Swedish language pack and name of months?

Swedish language pack and name of months?

Locked

Views: 11,620

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
10 May 2006, 5:23 AM
#1
falkon avatar

falkon

New Zenner

Join Date:
Apr 2006
Location:
Göteborg
Posts:
3
Plugin Contributions:
0

Swedish language pack and name of months?

Hi!
I am setting up a site where you should be able to switch languages between swedish and english.
I am trying to fix this as there isn´t any swedish pack for the newest zencart version.
I am running into small problems all the time doing this, but now Iam stuck.
My problem is the definition of the names of the months..
On the first page it states "New products for MAY", but when I change language I also want the swedish translation of the month of MAY.
What I can see there isn´t any file in the languagepack that controls this, hence it lies in the "ordinary" code?
Now it mixes Swedish and English in the same sentance as the word MAY isn´t translated to swedish.
Please advice me.

Best regards Mattias

10 May 2006, 8:45 AM
#2
wils avatar

wils

Zen Follower

Join Date:
Apr 2006
Location:
Göteborg
Posts:
124
Plugin Contributions:
0

Re: Swedish language pack and name of months?

Hi,

Not being an php expert, I would look for

setlocale(LC_ALL, 'en_EN'); or similar, and try

setlocale(LC_ALL, 'swedish'); (or sv_SV)

I'm surprised, however, that it's not done automagically.

/Anders

10 May 2006, 8:38 PM
#3
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Swedish language pack and name of months?

Filling out all known country locals in the language packs you release is a nice thing to do, so people don't have to think about this so often.

Like in the Norwegian pack I'm putting in:

@setlocale(LC_ALL, 'no_NO.ISO8859-1', 'nb_NO.ISO-8859-1', 'no', 'nb', 'nob-NO', 'no_NO', 'nb_NO', 'nor', 'norwegian', 'bokmal');

You can do the same in the Swedish just by changing nb_NO to sv_SE etc..

10 May 2006, 8:49 PM
#4
falkon avatar

falkon

New Zenner

Join Date:
Apr 2006
Location:
Göteborg
Posts:
3
Plugin Contributions:
0

Re: Swedish language pack and name of months?

I do not fully understand what your suggestion does, my code in swedish.php was looking like this :@setlocale(LC_TIME, 'sv_SE.ISO_8859-1');
When I change it according to :@setlocale(LC_ALL, 'sv_SE.ISO_8859-1', 'sv_SE'),
my problem with MAY showing up in english, now turns up in swedish...
Problem solved, sorry to say I cannot fully understand why this fixes the problem...
If possible please explain to me.
Regards Mattias

11 May 2006, 4:16 PM
#5
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Swedish language pack and name of months?

The "problem" is that the servers around the world is not configured the same way, and it's also different between windows and nix servers.

When putting in all known country locals in the language file the server has something to "chose" from, like in your case the server is not set up with country local sv_SE.ISO_8859-1 so it's choosing the one it knows - sv_SE

Hope this made it clearer. :)

PS! I see that the Swedish translation team for Joomla is using the following country locals for the upcoming Joomla 1.5:

sv_SE, sv_SE.ISO8859-1, sv_SE.ISO8859-15, sv_SE.iso88591, sv_SE.iso885915, swedish, sv_FI, sv_FI@euro, sv_FI.iso88591, sv_FI.iso885915@euro, swedish_finland
11 May 2006, 6:18 PM
#6
svanis avatar

svanis

Zen Follower

Join Date:
May 2005
Location:
Sweden
Posts:
145
Plugin Contributions:
0

Re: Swedish language pack and name of months?

For me personally the only thing that has ever worked is using "swedish"..

11 May 2006, 6:28 PM
#7
rued avatar

rued

Zen Follower

Join Date:
Oct 2005
Location:
Finland
Posts:
186
Plugin Contributions:
0

Re: Swedish language pack and name of months?

Svanis:

For me personally the only thing that has ever worked is using "swedish"..

Sounds like you like being on Windows servers then.. ;)

But anyway with my solution listing all country locals, the language files will work on most servers without having to change anything, also on your Windows server. ;)

15 May 2006, 4:58 PM
#8
minelle avatar

minelle

New Zenner

Join Date:
May 2006
Location:
Sweden
Posts:
5
Plugin Contributions:
0

Re: Swedish language pack and name of months?

falkon:

I do not fully understand what your suggestion does, my code in swedish.php was looking like this :@setlocale(LC_TIME, 'sv_SE.ISO_8859-1');
When I change it according to :@setlocale(LC_ALL, 'sv_SE.ISO_8859-1', 'sv_SE'),
my problem with MAY showing up in english, now turns up in swedish...
Problem solved, sorry to say I cannot fully understand why this fixes the problem...
If possible please explain to me.
Regards Mattias

Tack! (Thanks)

13 Jul 2010, 6:41 PM
#9
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Swedish language pack and name of months?

Thanks for the thread, and specially to you 'rued'. This solved a long time problem of mine... Great!

Thanks!
Jacob