We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1764
    • 680 Posts
    Stored in the database and cached in a file. Sounds good to me! And the language stuff is centralized enought that it would probably be a really easy change.
      • 6726
      • 7,075 Posts
      To all those who are interrested in multilingual website management, check madmage post :
      http://modxcms.com/forums/index.php/topic,1957.0.html
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 30287
        • 2 Posts
        I’d like to raise an issue you didn’t discuss here -
        Multilanguage sites with Right-to-left languages like Hebrew, Arabic, Thai etc.
        (or in another words Bi-Di support).

        A multilanguage site with European language + one of these languages requires not only to change the content of the text, but will have to add right-to-left attributes to paragraph tags (dir=rtl or style=direction:rtl), and, depends on the site’s layout, to change the template to a mirror template (right collumn becomes left collumn etc.).

        I think that even though it’s a little out of this discussion’s scope, any multilingual solution you will implement into MODx should take into consideration future support of bi-di languages without having to do the same work you are doing now all over again.
          • 25663 MODX Staff
          • 12,272 Posts
          Very good point tom. Considering the only Thai I can speak includes "basil" or "noodle" or "curry", I just don’t think about them frequently. I think a plugin could be written to inser that attribute in all P tags. Please if you could file a feature request on the bugtracker. Thanks!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 33372
            • 1,611 Posts
            Hello all -

            I’m about to recreate a billingual (English/Spanish) article-based site in MODx and I’m wondering how best to go about it. Then later I will be creating a new multilingual portal/forum-type site which will probably be much more challenging. I’m wondering what y’all recommend for each project.

            For the billingual site, here are my guidelines:

            • We will never add any other language, and all documents should be available in both languages (so I’m thinking that for this site we should create separate English and Spanish documents rather than two content fields in the same document)
            • I don’t mind duplicating templates and snippets if that will simplify management and make sure that the content is always just right
            • On each page I want a simple link saying "View in English" or "Ver en español" that takes you to the corresponding document in the other language (I think I’ll use the menu index field for this)
            • I would like to save the selected language into a cookie and automatically forward to the correct home page on return
            • On pages with user comments, I would like to show comments from both languages but allow users to separate them or view only one language (so for example the comments area would have three tabs - English, Spanish, and All - and it would pull the comments from the corresponding page and combine them in this way)
            • We don’t need to switch languages in the Manager

            The multilingual site presents some other issues:

            • We may add more languages as the site grows, and most pages will not be translated into all languages (but will always be available in Spanish, so we can default to this content with the menus in the chosen language)
            • Given this infinte expandability, perhaps we should add content fields to single documents and pass a language variable that changes menus, etc. (is Susan’s method the best way to do this?)
            • It seems like duplicating templates and snippets won’t work in this case, and this site will also be co-maintained by non-coders so that would probably cause grief anyway
            • We would like to note the document’s original language on each page (and a link to view it in that language, e.g. "Click here to view original in Spanish") as well as solicit translations when none is available in a particular language ("This article is not yet available in English. Click here if you would like to contribute a translation of it")
            • Ideally we would like to interact with BabelFish or some other language-mangling automatic translation software when no translation is provided (is there a snippet for this?)
            • We would still like to save the selected language into a cookie and automatically show the correct user language menus, etc. on return
            • On pages with user comments, we should always show comments from all languages (it’s easier that way)
            • We will definitely be integrating SMF forums into this site, so perhaps comments could be handled in it instead
            • We might want the ability to switch languages in the Manager at some point

            I know that’s a lot to deal with in one post, but I’d be interested to hear about others’ experiences and I’ll definitely take any pointers that come out of that experience.

            It seems to me as if these are two very different types of multilingual sites. One is limited in scope and presents a coherent billingual face to the world, whereas the other is a smorgasbord of languages contained within an interface that’s in your selected language and inviting more user participation in creating it. They seem to me to call for radically different design/scripting approaches, and I’m wondering if folks here agree.

            Thanks in advance for your replies.

            EDIT: I just looked over Theo’s method posted earlier in this thread and it’s a very clever solution. I wonder if that might be the best structure for the billingual site I mention above. One question though is how does having an unpublished menu folder affect FURLs with folders in them (I would like to use folder names in the FURLs of this site if possible)?
              "Things are not what they appear to be; nor are they otherwise." - Buddha

              "Well, gee, Buddha - that wasn't very helpful..." - ZAP

              Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
              • 7455
              • 2,204 Posts
              I think that there must be an option to set more than one language per document element. like this:

              if we have two languages: lang1 and lang2

              title must be availible for lang1 and lang2
              so must be all relevant "standard fields" like longtitle description content.
              And then tv’s can be assign to a language or be bilingual if its an image or whatever you only need once.

              then snippets could look at a session/cookie in what language the user is watching or add &sitelang=lang1 to the url.

              that way the right set of fields will be returned and all is still the same document and if there is no language is selected have a default language setting.

              and switching from one to another language will be easy no searching just grabbing other fields for the same id.

              and for SEO we could even crate an alias for each language like home_lang1 and home_lang2 that way google could browse all languages the flags/links to another language on the same page wil be nice seo links with an alias for that language.

              all snippets can use the available language parameter to use for creating output selecting chunks etc.


              Just some ideas i had that could work.
                follow me on twitter: @dimmy01
                • 20289
                • 958 Posts
                Its quite historical topic!... i know its possible to do anything that comes to mind with the flexibility that MODx dance with, specially when it comes to localized ideas!, exept when it comes to back-end there is some limitations thats not quite related to MODx but the availability of what Dimmy says make sense if we go for a real multi cultural support of MODx!.
                ZAP, did you have done the things you wanted to do for your sites?, if so, could you share the steps?
                  [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                  [td][Wiki] [Persian support forum]
                  [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                  [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
                  • 33372
                  • 1,611 Posts
                  I’ve just used a variation of the Subsites/Subdomains plugin:
                  http://modxcms.com/forums/index.php/topic,1445.msg53790.html#msg53790

                  And I have an otherLanguageID TV into which I enter the docID of the page in the opposite language (I’ve only done bilingual sites so far). Then I have a snippet that generates a link to the page in the other language when the TV is not blank. I also use that TV to grab the content from the opposite language page when the content is blank in the page that’s being viewed so that I can show a "Sorry! This page is not yet translated, but here’s the content in English." message when necessary.

                  And for navigation all I do is to make a container for each language and use different WayFinder calls and templates for each (I also use a different page template for each language, which I find is easier than trying to get one template to work for both).

                  I actually haven’t found bilingual sites to be all that difficult to pull off in MODx. Sure, it might be nice if documents could have multiple languages embedded in them, but I don’t mind creating a document for each page (and actually most of the sites that I’ve done haven’t had the exact same pages in both languages anyway). I usually build the whole site in one language and then just duplicate the container so then I have all of the pages in the other language ready to be edited.

                  I believe that 0.9.7 will integrate a lot of the ideas for making the MODx structure more multilingual-friendly, so that should make it even easier.
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                    • 20289
                    • 958 Posts
                    ZAP, The idea of having OtherlangPageID TV and the pluging to shift over subdomains is smart enough... Thanks for sharing smiley
                      [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                      [td][Wiki] [Persian support forum]
                      [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                      [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]