2

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?

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.