We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9207 ☆ A M B ☆
    • 2,475 Posts
    How is MODx Revolution handling locales?

    Merely specifying a target language will not ensure a proper translation. For example "football" has a different meaning depending on whether or not you are in Britain or the United States. English is the language in both cases, but the _locale_ (Britain or the USA) adds an additional quantifier that ensures people know what you’re talking about. The Revo docs reference the IANA language codes:
    http://www.iana.org/assignments/language-subtag-registry

    But the support seems to be only for language, not for locale. So if I had a lexicon entry for "football", there might be some real difficulties translating it correctly.

    The lexicon topic can help guide this, but I think you really need 3 parameters to properly mark a message for translation: the language, the locale, and the context. For example "stoned" means one thing if we’re talking about biblical adulterers and another if we’re talking about the effects of drugs. I’m basing my comments off of the tried and true gettext framework.

    Is anyone else running into limitations with the current implementation?
      • 22303 MODX Staff
      • 10,725 Posts
      You can handle setting locales however you need to based on your site organization and i18n approach; this is likely not going to be a part of the core. The most logical place would probably be using a plugin OnInitCulture.