We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46630
    • 40 Posts
    I need to put language in html tag in my template. The problem is that I have multilingual website, so the tab should change within the language.

    <html lang="bg_BG">
    <html lang="en_US">
    <html lang="tr_TR">
    


    The
    [[*context_key]]
    variable doesn't do the job because I can't rename the default context from web to bg_BG.

    Could someone help me with that?

    This question has been answered by Bruno17. See the first response.

    • discuss.answer
      • 4172
      • 5,888 Posts
      if you have a context for each language, you could create a context-setting for example with key 'language_code'

      then you can use

      <html lang="[[++language_code]]">


      or you could add a lexicon-string into the MODX-lexicon and use it like that:

      <html lang="[[%language_code]]">

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 46630
        • 40 Posts
        Bruno17 You are a life savior!