We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4673
    • 577 Posts
    Ok, move thread if location is not appropriate.

    I’m working on a multilingual site and have been wondering what kind of system is in the "thought zone" regarding this?

    To be honest, my first thoughts of doing this have changed quite a bit and have been thinking that maybe a multi-level approach might be good.

    core level
    This being the main files of Modx that should have language wordings moved to either an outside file or to the DB.

    code level
    This being the snippets, chunks, TVs
    I was thinking that some of these are going to be langauge specific and others not.

    site level
    This being the page side of the site.
    I’m starting to see the beauty of the system and have grown on Susan’s way of doing things.

    Like I mentioned, I’m rethinking my previous ideas, however, I’d like to hear what’s going or start a conversation in regards to what can/could be done.

    Codewise ModX is really the cats-pajamas. Thereby, coming up with a multilingual solution I’M POSITIVE ModX is going to go balistic!
      Tangent-Warrior smiley
      • 22303 MODX Staff
      • 10,725 Posts
      Carsten; I am addressing all of these in the 1.0 rewrite; in fact the two new major features for 1.0 will be multi-cultural content by content element (think chunk, snippet, TV, etc, anything that is a building block of a document), with full revisioning and rollback by culture, and with a new concept that will replace $_lang, called the MODx Lexicon. The Lexicon will feature a number of ways to persist and work with words, phrases, and the various translations of these, including using language files or using data in the db, or an aggregation of both with preference given to one or the other.

      Just a little more patience and everyone gets to see what I’m talking about, since I do tend to be a little on the technically dense side when discussing this stuff cool
        • 4673
        • 577 Posts
        cool smiley

        Just thought I’d bring up the subject.

        Thanks for the info!
          Tangent-Warrior smiley
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          My solution was a simple one that pretty much just works. I’ve been trying to follow the discussions of multilangauge/internationalization/locale support and it’s still going over my head. So I by no means would hold my method as "the one true way", just a way that I can do it if I have to!

          Along these lines, for "international" (non-English) sites I’ve started adding a set_locale(...) call to the config.inc.php file. Makes things like formatting dates (such as for the ditto snippet) much easier.

          http://il2.php.net/set_locale
            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
            • 4673
            • 577 Posts
            hehe, don’t worry it’s over my head too right now.

            I was pretty caught up in one method but after playing with your solution I’ve been trying to see how they can be integrated smiley
              Tangent-Warrior smiley