We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    maybe migxMultiLang could be something for you?
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 40748
      • 55 Posts
      Hi Bruno!

      Of course I know all your solutions!
      I will try migxMultiLang in my next project.

      But for this site I'd like to go directly and code everything myself. It seems like I have more and better control for all.
        Cheap and ready landing pages: http://real-portal.biz
        Start selling fast, good for dropshipping
        • 30585
        • 833 Posts
        @mixa_ru Enabling Friendly URL and Friendly Alias Path should turn the following link:
        http://website.com/yakuza/index.php?id=5&lang=rus

        Into this: http://website.com/yakuza/item-alias.html&lang=rus

        On your start page, if you're using getResources to list your items, one way you can bulk translate them would be to dynamically change the call based on the lang parameter supplied in in the URL. Let me explain:

        Suppose you have 3 tpl chunks (one for each language): estLangTpl, ruLangTpl and enLangTpl, you can switch the active language by changing your getResource call to this:

        [[!getResources? 
        &parents=`[[*id]]` 
        &limit=`5` 
        &tpl=`
          [[!getUrlParam? &name=`lang` &default=`est`]]LangTpl
        ` 
        &includeContent=`1`
        ]]
        

        Your tpl chunks could look like this:
        <div class="mystyle">
        <h4>Item name in English/Russian/Estonian </h4>
        ...
        </div>

        The trick here is to change the tpl property. By doing so, you're effectively changing the translation language. I'm using getUrlParam, but you can use whatever snippet you see fit to grab the URL parameter.

        [[!getUrlParam? &name=`lang` &default=`est`]]LangTpl will be changd to enLangTpl if your URL looks like this: http://website.com/yakuza/?&lang=en . enLangTpl happens to be the tpl chunk that holds your English item information. I hope you see where I'm going with this.

        As Bruno suggested, you might be better off with migxMultiLang.

        By the way, if the only translation you're doing is changing the item's name, you shouldn't worry too much about SEO as long as you specify the lang attribute:

        For example:
        <h4 lang="en">Item name in English</h4>
        <h4 lang="ru">Item name in Russian</h4>
        
          A MODx Fanatic
          • 40748
          • 55 Posts
          @treigh,

          ok, thanks!

          I got the point.
          And you are right- next time I will use migxMultiLang. I feel like that it can take a lot of work for switching language strings with more easy way.
            Cheap and ready landing pages: http://real-portal.biz
            Start selling fast, good for dropshipping