We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8454
    • 55 Posts
    Does anyone have an idea of how to assign a css class of "active" (or "current" or the like) to the chosen language, much like how its done in Wayfinder with the &hereClass parameter?
    It would be nice to be able to hilite the current language.
      • 1611
      • 591 Posts
      Quote from: AHHP at Feb 06, 2009, 05:36 PM

      EasyLingual ONLY converts [% %] tags in Templates, Page content and page Introtext. NOT in TVs and CHUNKs!

      Hi, AHHP. Why don’n make EasyLingual working on all fields? Are there some thin problems? As I see It’s only needed to clone str_replace blocks to other fields.

      upd:
      Ok... May be not chunks, but all document fields and it’s TVs.
        • 33992 ☆ A M B ☆
        • 455 Posts
        The problem with Chunks and TVs is processing their data after running plugins. When the plugin invoked, document tags has not yet recognized for MODx.
        The plugin can not invoked after traslating tags because chunks and tvs can have nested tags that after translating, it’s not possible to access to last-level data.

        Doing that is possible by some hacks in MODx DocumentParser.
          God loves me. 【ツ】


          MODX.ir (Persian Support)

          Boplo.ir/modx/ (Persian)
          • 8454
          • 55 Posts
          Sorry for my last post, that language highlighting was an obvious one embarrassed
          I just made one chunk per language, e.g. "deLangSwitch" called with
          {{[%LANG%]LangSwitch}}
          Css class assigned to correct language in the chunk html.
            • 36805
            • 354 Posts
            Thanks for coding and sharing this extra with the community.

            I have a question about its usage. Assume some documents are available 2 languages and some only in the default language. It would be cool to have Easylingual fallback to the default language.

            Say I add a checkbox so set a document language active or inactive. Could I use the plugin to detect this and fall back to default?