We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4971
    • 964 Posts
    I am going to start redesigning my website
    and it will be multilingual...

    Is there a solution using Revo or should I stick with Evo + YAMS at the
    moment?

    I would really wish I could go with Revo so I can learn how to work with
    it but proper and full multilingual support is vital for me!

    Does anybody has an example of a multilingual site using Revo?
      Website: www.mercologia.com
      MODX Revo Tutorials:  www.modxperience.com

      MODX Professional Partner
      • 10152
      • 156 Posts
      Hi Charliez,


      I’m not sure my method will be approved by the MODx team but it works.

      The thing mind-disturbing is that you may intuitively create only a document and fill it with lexicon tags, expecting modx to translate it automatically, but it’s not the right method.
      Don’t put all the languages on the same page, else there will be problems with the alias field that do not allow to convert lexicon tags.


      If you want real multilanguage document with subdomains, with english (en) as the main language and german (de) as the second language, try the following.

      Just set up subdomains, follow these instructions of the doc (replace "dev" by "de") :
      http://svn.modxcms.com/docs/display/revolution/Creating+a+Subdomain+from+a+Folder+using+Virtual+Hosts.

      Once subdomains are working , create a new context called "de" for german language.
      Then add a new context setting called "custom_language" for each context.

      Value for "current_language" context setting :
      "web" will be english => set "current_language"= "en" in the context settings
      "de" will be german => set "current_language"= "de" in the context settings

      Now create a new lexicon entry in english :

      namespace = custom_namespace
      topic = custom_topic
      language = en
      key = "logout_msg"
      value ="You are now unlogged, see you soon."


      Now create the same lexicon entry in german :

      namespace = custom_namespace
      topic = custom_topic
      language = de
      key = "logout_msg"
      value ="Du bist jetzt ausgelogged, bis nächstes mal mein Freund."


      Create a chunk called "logoutChunk". Content of the chunk :

      [[%logout_msg? &namespace=`custom_namespace` &topic=`custom_topic` &language=`[[++current_language]]`]]


      Save the chunk, create a document under each context (you need to create 1 document under the "web" context, and 1 other under the "de" context ), and call the same chunk on both documents :
      [[$logoutChunk]]


      It should be different languages for each subdomain now.
      http://mysite.com/  <= english
      http://de.mysite.com/ <= german


      NOTE : There is a value "cultureKey" included in modx, but due to the few informations for the moment, I don’t know how to use it.

      Sorry for my bad english wink
        • 28215
        • 4,149 Posts
        cultureKey can be set, in your example, with a Context Setting:

        key: cultureKey
        value: de (or whatever language)

        That will change the front-end language of that Context to de.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 4971
          • 964 Posts
          Thanks frenchfries,
          Interesting and dont worry at all about your English...

          With this method there are basically two sites,
          one in English and one in Deutch. So to maintain the
          site or add new content it has to be done in two places
          all the time? in two pages/docs/resources?

          I have to read more about contexts but doesn’t a context
          eliminated the need to make two domains?
            Website: www.mercologia.com
            MODX Revo Tutorials:  www.modxperience.com

            MODX Professional Partner
            • 10152
            • 156 Posts
            Yes, for each multilingual page, it has to be created as many resources as there are languages.

            web 
               home page (en)
            de
              start seite (de)
            fr
              page de départ (fr)
            

            It may be confusing first, but after all, it’s not worse that having a fat fat lexicon for storing all fields (menutitle, pagetitle, longtitle, ...). It quickly becomes unmanageable ( and even if it was, it wouldn’t translate the alias ).


            Once resources are in place for each language, the harder is done. Put the [[%lexicon]] tags in a chunk and call the chunk in each language document so it is easy to maintain. To update content, just edit the chunk.

            Im not sure I understood your last question.


              • 4971
              • 964 Posts
              Mmmm... that puts Multilingual Revo at the level of what
              Evo was before YAMS...

              I guess I would have to lean towards YAMS and hope and wait that
              something similar comes up in Revo soon...

              Thanks a lot
                Website: www.mercologia.com
                MODX Revo Tutorials:  www.modxperience.com

                MODX Professional Partner
                • 22303 MODX Staff
                • 10,725 Posts
                Quote from: charliez at Mar 10, 2010, 01:11 PM

                Mmmm... that puts Multilingual Revo at the level of what
                Evo was before YAMS...
                Not at all. You don’t need YAMS in either Evo or Revo to make multi-lingual sites. IMO, YAMS is only one possible way to approach the problem anyway, and one that I personally avoid and talk clients out of using when I can. But, that’s just my opinion, YMMV, and I’ll avoid ranting about it further.
                  • 4971
                  • 964 Posts
                  OK? Jason, so what do you suggest?
                  and remember that we are, well, I should not
                  speak for everybody, not rock-star developers
                  like you guys that can swing a super application
                  from your sleeves to solve any problem.

                  I think YAMS is good for the users, the web site
                  designers but is not optimal cause it is based on
                  using ManagerManager and hacking a solution out
                  of it... but I think it works fine for translations,
                  for content creation, for maintenance and mostly
                  for convenience with the tabbed interface and the
                  multilingual parsing...

                  But again, lets hear what you suggest...
                    Website: www.mercologia.com
                    MODX Revo Tutorials:  www.modxperience.com

                    MODX Professional Partner
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: charliez at Mar 10, 2010, 08:25 PM

                    OK? Jason, so what do you suggest?
                    and remember that we are, well, I should not
                    speak for everybody, not rock-star developers
                    like you guys that can swing a super application
                    from your sleeves to solve any problem.
                    I don’t know what that means; sounds like a cop-out to me. We build client-tailored solutions just like any other respectable web design/development group on the planet. I suggest that not every shape fits into a square hole. I’ve voiced my specific concerns with the approach before: that attaching all translations to a single Resource is horribly inefficient (doesn’t meet scalability requirements for me in many cases), and becomes exponentially so the more translations you have, and that rarely do localizations always fit neatly into the same templates, or even match the tree structure in another culture. Anyway, I could rant about this, but to me there is no shortcut to designing a CMS to specification; if YAMS meets your requirements, great, and thus why I said YMMV. My only point was that it does not have anything to do with the internationalization capabilities of the core by not having YAMS available (anyone is free to contribute an Extra based on it for Revo).
                      • 3749
                      • 24,544 Posts
                      OpenGeek, you must have a general strategy in mind for doing multilingual sites efficiently in Revolution. I’d like to see it too. If you’ve described it elsewhere can you point us to it? I couldn’t find anything.
                        Did I help you? Buy me a beer
                        Get my Book: MODX:The Official Guide
                        MODX info for everyone: http://bobsguides.com/modx.html
                        My MODX Extras
                        Bob's Guides is now hosted at A2 MODX Hosting