Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-202

Problem with i18n keys in JavaScript variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • 2.8.4
    • 1.1.2
    • None
    • None

      Its is currently impossible to put an i18n key in a javascript variable because the script must be surrounded by a <comment> tag like :

      <script type="text/javascript">
        <xsl:comment>
          var i18nVariable = "<i18n:text i18n:key="THE_KEY" />";
        </xsl:comment>
      </script>
      

      This is impossible because the <i18n> tag can't be inside the the <comment> tag.

      And sometimes this kind of variables is the only way to translate a text (especially if the text is in a js file in the skin because there is no resources_dynamic directory).

            Unassigned Unassigned
            nesteso Nicolas Esteso (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: