Magento Localization – Translate CDATA Strings in system.xml

localisationsystem.xml

I have a system.xml file in which I add some fields to admin configuration. This is one of my group/section/fields:

<config>
  <sections>
    <notifier translate="label" module="notifier">
      ...
      <groups>
        <general translate="label comment" module="notifier">
          ...
          <fields>
            <allow>
              <label>Enabled</label>
              ...
              <comment><![CDATA[
            Some HTML here:<br>
              - sth,<br>
              - sth,<br>
              - sth,<br>
              - sth.
          ]]></comment>
            </allow>
          </fields>
        <general>
      <groups>
    <notifier>
  <sections>
<config>

I can translate the label easily. I put this line into my csv file:

"Enabled":"Enabled"

But how can I translate the comment part?

Best Answer

Just copy the text as it is. In your case , when you have new lines in the text it should be something like this:

"
            Some HTML here:<br>
              - sth,<br>
              - sth,<br>
              - sth,<br>
              - sth.
          ","
            Some HTML here:<br>
              - sth,<br>
              - sth,<br>
              - sth,<br>
              - sth.
          "

Yes. I know it looks ugly, but it should work. if you want you can put the text in one line in system.xml and then it should look nicer.

Related Topic