We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26083
    • 32 Posts
    Hi,

    I know that i18n-l10n issues will be solved in next version. But as many of you, I need some kind of multi-language support now.

    My main problem is to avoid rewriting chunks and snippets in each different language. So having used the Apache Cocoon project since a long time, I’am wondering if reflecting the i18n transformer (see http://cocoon.apache.org/2.1/userdocs/i18nTransformer.html) could be a simple and direct solution to many use case.

    In the ModX world, it will be something as:


    • Tagging i18n content, for example: [{i18n:ToBeTranslatedKey}]
    • Using a plugin to transform all of this tagged content with the correct translation

    Retrieving the correct language could come from another snippet.
    Translation can simply be files... as already done by sottwell (I thought).

    I’am Java developer, not really PHP, but with a little help from the community, and if any interest, I can go one with this.
      • 25663 MODX Staff
      • 12,272 Posts
      That’s a very interesting idea that sounds like it has merit. Anyone?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 32963
        • 1,732 Posts
        Sounds like a wonderful idea to me. I would say go for!

        For on-the-fly translation I use WorldLingo.
        Hint: Some on-the-fly translation features are on the list of things to do. Your plugin could even help to make things much easier
          xWisdom
          www.xwisdomhtml.com
          The fear of the Lord is the beginning of wisdom:
          MODx Co-Founder - Create and do more with less.
          • 26083
          • 32 Posts
          OK, some question here

          Is the OnWebPagePrerender the event to be used ? Or any other ? Where to learn about that ?
          Also what if we have many listener on the same event, can we specify an order ? Suppose I will use the TinyButStrong plugin and the i18n plugin, how can I ensure to run one before the other ?


          Are they any recommandation for the variable delimitters. TBS choose [{variable}]. In fact it will nice to have something as [{i18n:keyToBeTranslated}], [{tbs:var.x}] to avoid conflict !!!

          Thanks



            • 4195
            • 398 Posts
            as creator of the TBS plugin I can say that I have 2 variables in the plugin itself that form the delimitter, if you edit them you can avoid conflict smiley
            just change the start delimitter to: "[{tbs:"
              Armand Pondman
              MODx Coding Team
              :: Jot :: PHx
              • 33337
              • 3,975 Posts
              Auto Translation?? woot!

              That would be great!
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link