We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4356
    • 3 Posts
    What’s regarding MULTILINGUAL version? No news for at least 120 days grin.
    I’d propose a way. Just add 2 fields into modx_content table: ’doc_id’ (document ID) and ’language’ and reference all documents by this pair of parameters. Thus we will have several records in different languages, but all will have the seme doc_id Probably, some other tables should be modified. A create/edit forms must be changed to edit all language versions in a single place. I used this trick in a couple of projects, this works fine.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      This is easily dealt with with the TV I mentioned earlier. It can contain as many language references as needed. For example, the English page can have de:22 fr:46 it:78, so a snippet only needs to grab the TV’s value for that language and make the links. To programmatically determine what pages belong to what languages, simply find out what the ultimate parent of a given document is ($modx->getParents()) or find all the children of a given document ($modx->getChildren()).

      As far as workflow goes, the Document Tree makes it pretty easy; you have everything right there at the click of a mouse. The main language ID is very simply the ID of the parent document/container for each language grouping. To get an array of all your language IDs, just grab all the published documents with a parent of 0.

      The thing is, it’s much better to keep the core as simple as possible. I’ve had several clients who didn’t want the interliinking feature, so the TV wasn’t necessary. For those who do want it, it’s easy to add it. That’s the whole idea underlying TVs, modules and plugins. Add features to the front end or the back end without hacking the core. Because my feature is your nuisance, and doesn’t quite fit somebody else’s needs, you end up with hacks to the hacks, and a tangled mess that’s impossible to upgrade. I’ve been there, done that (cubecart, anybody?) and I am very grateful to Ryan, Jason, et al for giving me a tool to avoid that nightmare.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 19687
        • 5 Posts
        Hi, is there anything new on this? By now I use Joomla with Joom!Fish but Joomla can’t have different content types other than articles, and I need more flexibility on defining the content types (i.e. news, products with custom specific fields, gallery, catalog pages). ModX is perfect solution when it comes to flexibility in content. But so far I can’t find an acceptable solution of making multilingual sites. I need ONE page to have it’s corresponding alternatives in different languages - this is the way JoomFish works in Joomla. One ID, one button link, just different content based on user selected language. Is there a way of making this? And also to be easy editable from frontend by non techie people.

        I’m pretty new to ModX, so excuse me if I misundestood something, but so far I didn’t read a real multilingual solution.

        One more question - I read that ModX Revolution will have multilingual capabilities out of the box. Is that true?
          • 10449
          • 956 Posts
          That can be easily done; again by using TVs - one for each language (or keep the default content field for the main language, and only use TVs for the translations).

          Simply store the user-choice in a cookie or php session, and output the language (TV) you need.

          I think such a solution was already shown here in the past...
            • 8454
            • 55 Posts
            Is this documented somewhere in more detail? A walk-through, tutorial or examples w code?

            In sub-forum Internationalization I found a fairly straightforward tutorial on the "one-document-tree-per-lanuage"solution http://modxcms.com/forums/index.php/topic,29597.0.html.

            @ sottwell (et al) As i understand by sottwells post parallell document trees can easily be combined with dynamic language switching by the use of TV:s if that’s desired. How is this accomplished?

            Many thanks!

              • 28042 ☆ A M B ☆
              • 24,524 Posts
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org