We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19534
    • 183 Posts
    Hey all!

    After talking with saerni I started reengineering his great Babel Extra. The usage for normal users is fairly the same but the logic behind has changed a little bit.

    Here are some basic changes:

    * build script to easily generate packages and updates for the Babel extra
    * Babel itself has multilanguage support.
    * Easier but more powerfull configuration:
    * installation routine and setup-options: You don’t have to configure any settings or properties after package installation: it’s included into the setup routine.
    * you don’t have to specify the context (or better language) names any more (but you can change them via the MODx Lexicon management)
    * there is no main context anymore: you can translate your resources from every context you’d like do.
    * you can define context groups (see this post: http://modxcms.com/forums/index.php/topic,57291.msg330775.html#msg330775)
    * CSS has been moved to the correct folder (as suggested by the MODx best practice)
    * Fixed issue with primary key validation errors when linking the Babel TV to templates
    * ...

    There are a lot of other changes which I don’t have in mind currently. Here are some features which I will add within the next days:

    * Clean babel TV after removal of resources
    * Possibilty to remove existing translation links
    * Possibilty to add translation links to existing resource (instead of creating new resources)
    * Use POST instead of GET variable to handle Babel actions or even better: use Ajax

    I’m currently talking with saerni how we will proceed with making my version available via http://modxcms.com/extras/ because the new version is not backward compatible.

    I will keep you posted!

    Cheers,
    Jakob
      Add-On to easily manage your multilingual sites: Babel
      • 21635
      • 81 Posts
      wow! great to see this developing. thanks!
        • 21838
        • 284 Posts
        That’s cool news!

        A few questions:

        - will it be still available via GitHub for devs?
        - does it support translations of chunks etc.?
          MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
          • 19534
          • 183 Posts
          Quote from: smooth-graphics at Dec 16, 2010, 04:43 AM

          That’s cool news!

          A few questions:

          - will it be still available via GitHub for devs?
          - does it support translations of chunks etc.?

          Question1: Yes

          Question2:

          Hmm, maybe i got you wrong but why do you want to translate chunks? I realized ML-support by using the MODx built-in lexicon (-> in chunks I’m useing language tags [[[%]])

          For example in the chunk for displaying the language links to other translated resources I use this tag to get the language name:
          [[%babel.language_[[+cultureKey]]? &topic=`default` &namespace=`babel`]]


          Is this what you are asking for?

          Cheers,
          Jakob
            Add-On to easily manage your multilingual sites: Babel
            • 21838
            • 284 Posts
            Quote from: Jakob at Dec 16, 2010, 05:01 AM

            Hmm, maybe i got you wrong but why do you want to translate chunks? I realized ML-support by using the MODx built-in lexicon (-> in chunks I’m useing language tags [[[%]])

            For example in the chunk for displaying the language links to other translated resources I use this tag to get the language name:
            [[%babel.language_[[+cultureKey]]? &topic=`default` &namespace=`babel`]]


            Is this what you are asking for?

            No, not exactly. Think of what could(!) be in a »chunk«. It’s thought for html and content storage for further availability in resources or MODx snippets.
            And, for example, you can give a editor the possibility to drag & drop a chunk in their content. This chunk contains somehow a written word in a specific language (it also could be a img wit an alt description or nearly anything else). When I want to display a multi-lanugage-website I have to duplicate all my chunks (currently) to get this working.

            In my thought I’d think of the same handling of a chunk as a resource to translate in backend.

            If you’ve got any further questions about that, please feel free to ask me
              MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
              • 19534
              • 183 Posts
              Hmm, sorry, but I think your way of handling multilingual site/chunks is not best practice.

              You should handle this issue like it is done in the whole MODx system: use the lexicon. Where ever you have some kind of text in your snippets or chunks which should be tranlated to the currenct language you should use the lexicon. I think this is a best pratice approach which is used in MODx and several extras (SimpleSearch, Quip, FormIt,... they all use the lexicon).

              Here an example: Assuming you have a two-lingual site (en, de) and you have this (very simple) chunks:

              For your English site:
              <h1>Welcome</h1>


              For your German site:
              <h1>Willkommen</h1>


              That’s not very good! You will always have to duplicate all your chunks and snippets. When you want to change one of them you have to go through all the duplicates... not that cool!

              Instead of offering your users these two different chunks you would simple offer them only one chunk which uses the lexicon:
              <h1>[[%welcome? &topic=`any_topic` &namespace=`your_namespace`]]</h1>

              And now your users can drag n’ drop this chunk where ever they want the welcome message. They don’t have to care about the language.

              Or did I miss you? wink

              Cheers,

              Jakob
                Add-On to easily manage your multilingual sites: Babel
                • 25910
                • 26 Posts
                Hi everyone,

                Babel 1.x is dead, welcome to Babel 2.0.0 !

                Big thanks to Jakob, who made this new version from scratch, Babel runs now with a solid, cute and professional code:) If you can’t wait the official validation from the modx team, go to GitHub have a look:

                https://github.com/mikrobi/babel

                The old version still exists here:
                https://github.com/enzyms/babel

                à bientôt!
                  • 21838
                  • 284 Posts
                  Sorry, you’re maybe right. Thought not wide enough when I wrote it. wink

                  EDIT: how can i test the new version out?
                    MODX Free Template Base: MODX-Boilerplate | my blog (lots of MODX stuff) | my gitHub (translations) | MODX User Groups Germany (Facebook)
                    • 19534
                    • 183 Posts
                    Hey all!

                    As saerni already announced: It’s time for Babel 2.0.0

                    You can review my code at GitHub: https://github.com/mikrobi/babel

                    I’m just on my way to make Babel 2.0 available via http://modxcms.com/extras/

                    I’ll keep you posted.

                    Cheers,

                    Jakob
                      Add-On to easily manage your multilingual sites: Babel
                      • 19534
                      • 183 Posts
                      The Babel-2.0.0-beta package is now available at http://modxcms.com/extras/package/781.

                      This is the first beta version. I’m still working on some new features.

                      Here is the thread for the current release: http://modxcms.com/forums/index.php?action=post;topic=58646.0
                        Add-On to easily manage your multilingual sites: Babel