We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18654
    • 191 Posts
    I have a client in who lives in Stockholm, Sweden that would like a site developed in Swedish. Could someone direct me to resources / forum threads that would help me with this. I’m not sure what the best approach is.

    Do I install and develop in English and then change settings so all chunks / content are changed to Swedish? If so, what settings do I need to change?
    What do I use for MySql collation? Does it matter?
    The client mentioned charset issues because their language has three extra characters (åÅ, äÅ, and öÖ show up funky on the web pages) - any ideas on how to handle this?

    Any advice would be appreciated. Thanks!

    -matt
      God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
      • 20413
      • 2,877 Posts
      I use utf-8/utf8_general_ci and choose Svenska-utf8 as language in MODx. (EVO!!)
      Using the wrong "Svenska", without the "utf8" can cause "utf-8 boom" behaviours
      and data loss when saving(!).

      On a DB using collation utf8_swedish_ci I had to encode/decode utf-8 in SQL statements and experienced all kinds
      of problems with åäö.

      Then I start snippets and code with:
      setlocale(LC_ALL, 'sv_SE');
      date_default_timezone_set('Europe/Stockholm');


      And I use the common trans table in TransAlias plugin (EVO!!): Å, Ä as A and Ö as O.
      (But åäö seems to work in browsers nowadays...)

      Other than that... Or calendar weekdays start on Monday.
      A date like this 04/05/10; reads: day/month/year in Sweden. And instead of
      writing Feb 10, we would write 10 Feb. // 2010-12-31 is universal an works.
      We use Military time i.e. 22.00 for 10 pm.

      Swedish (shared) hosting SUCKS. Recommend your client UK or US hosting!
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 18654
        • 191 Posts
        Thanks for the response - a couple of follow-up questions:

        Quote from: mrhaw at Feb 27, 2010, 04:37 PM

        I use utf-8/utf8_general_ci and choose Svenska-utf8 as language in MODx. (EVO!!)
        Using the wrong "Svenska", without the "utf8" can cause "utf-8 boom" behaviours
        and data loss when saving(!).

        I’m doing this site in Revo (RC1 from SVN) and I noticed you specified "EVO" in a couple of places. Do I need to do something differently for Revo?

        What is "utf-8 boom"?

        Is choosing Svenska-utf8 as the language at install the only way to go? Can I install in english and keep the backend in english but still have all front-end in Swedish?

        Quote from: mrhaw at Feb 27, 2010, 04:37 PM

        On a DB using collation utf8_swedish_ci I had to encode/decode utf-8 in SQL statements and experienced all kinds
        of problems with åäö.

        So if I’m understanding you correctly you’re saying *don’t* use utf8_swedish_ci but instead use utf-8_general_ci for DB collation?

        Quote from: mrhaw at Feb 27, 2010, 04:37 PM

        And I use the common trans table in TransAlias plugin (EVO!!): Å, Ä as A and Ö as O.
        (But åäö seems to work in browsers nowadays...)

        What does this snippet do? Anything comparable in Revo?

        Quote from: mrhaw at Feb 27, 2010, 04:37 PM

        Swedish (shared) hosting SUCKS. Recommend your client UK or US hosting!
        I’m planning on going with bluehost - the client had a host in Sweden but opted to use mine instead. Maybe that’s why.

        -matt
          God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
          • 22303 MODX Staff
          • 10,725 Posts
          Currently, MODx Revolution is only confirmed to work with utf8 character sets/collations and UTF-8 encoding. Regardless though, I recommend always using utf8 collations with Revolution, no matter what language you are building for. As for which specific utf8 collation you would need for a Swedish-only site, that I don’t know.

          In Evo, language files came in UTF-8 encoding and additional varieties so you could match the output encoding of your site. In Revo, all language files are UTF-8 encoded and are not used directly anyway, so the database collation is what is important.

          My rule of thumb: always UTF-8/utf8