We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17895
    • 209 Posts
    I mean, there are two main topics about multi-cultural websites:
    - the first is multi-language (cultural) content, and it deals with the content (cool! :-D)
    - the second is the translation of all output of all snippets... i think that this is a solved issue in modx, since I see a lot of language files in the snippets directory, but how does it work? I mean: you could set the language in the manager (settings) and see the right translation in the back- and in the front-end, but how can I switch programmatically among languages in the front-end? is there a variable or something like this? i.e. who and when loads the $_lang[] array?
      Daniele "MadMage" Calisi
      • 19638
      • 39 Posts
      As i know thre is not default rules and it’s depend of the snippet programing. Some of them manage langages, some not :-/

      1) Case one : Snipnets with a language parameter
      For a good example see the Ditto snipnet who have the &language parameter. In my case i use it like this :
      [!Ditto? &startID=`2` &total=`1` &sortBy=`pub_date` &displayArchive=`0` &language=`francais-utf8` &tpl=`LazNewsBlock'!]

      But by default is in english not in the manager language.

      2) Case two : Snipnets with parameter to translate
      For example AjaxSearch snipnet have an easy translating language section. But you have to duplicate/edit the snipnet to translate it (and of course he will not use the manager language).

      3) Case three : Snipnets with "hardcoded" languages
      It’s the the worst case. You have to translate/review all the snipnet to look for the text to translate. NewsPublisher is in this case for his fews alerts messages.