Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2006
    Location
    Göteborg
    Posts
    3
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Apr 2006
    Location
    Göteborg
    Posts
    126
    Plugin Contributions
    0

    Default 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

  3. #3
    Join Date
    Oct 2005
    Location
    Finland
    Posts
    158
    Plugin Contributions
    1

    Default 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:

    Code:
    @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..
    Last edited by rued; 10 May 2006 at 09:43 PM.

  4. #4
    Join Date
    Apr 2006
    Location
    Göteborg
    Posts
    3
    Plugin Contributions
    0

    Default 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

  5. #5
    Join Date
    Oct 2005
    Location
    Finland
    Posts
    158
    Plugin Contributions
    1

    Default 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:
    Code:
    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

  6. #6
    Join Date
    May 2005
    Location
    Sweden
    Posts
    151
    Plugin Contributions
    0

    Default Re: Swedish language pack and name of months?

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

  7. #7
    Join Date
    Oct 2005
    Location
    Finland
    Posts
    158
    Plugin Contributions
    1

    Default Re: Swedish language pack and name of months?

    Quote Originally Posted by 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. ;)

  8. #8
    Join Date
    May 2006
    Location
    Sweden
    Posts
    5
    Plugin Contributions
    0

    Default Re: Swedish language pack and name of months?

    Quote Originally Posted by 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)

  9. #9
    Join Date
    May 2010
    Location
    Cyberspace
    Posts
    387
    Plugin Contributions
    0

    Default 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

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •