We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Is there a way to have the language menu generated by BabelLinks have each item in its own language, rather than having all of them in the language being viewed?
      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
      • 17403 ☆ A M B ☆
      • 183 Posts
      I have several sites using Babel. But I didn't understand what do you mean?

      *) sorry for my English
        zaenal.lokamaya
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If I'm viewing the French section, all of the language links are in French. If I'm viewing in the English, all of the language links are in English.

        What I want is for the link to English always be in English, the link to French always be in French, etc.

        For example, if I have French, English and Hebrew, it would always be

        Français, English, עברית

        instead of

        Français, Anglais, Hébreu
        French, English, Hebrew

        I've figured out two ways to do it; use images instead of text for the buttons, or use Babel lexicon files - either edit the existing default, or create a new one just for this.
          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
          • 17403 ☆ A M B ☆
          • 183 Posts
          Understood smiley
            zaenal.lokamaya
            • 17403 ☆ A M B ☆
            • 183 Posts
            BabelLink only have 4 placeholders: [[+cultureKey]], [[+url]], [[+active]], and [[+id]].

            I think the fastest ways is by creating new system setting. For example:

            babel_language_en = "English"
            babel_language_fr = "Français"
            babel_language_iw = "עברית"

            Then in your babel tpl, this can be used in this way:

            [[++babel_language_[[+culturKey]]]]


              zaenal.lokamaya
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ah, yes! I keep forgetting about context settings! Thank you.
                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
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Oops... when you said "system setting" you meant "system setting", not context setting! Now I have a better understanding of the settings hierarchy - I knew about it in theory, now know it in practice.
                  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