Foros de discusión

Translate list in journal structure/template

jeff gerbracht, modificado hace 15 años.

Translate list in journal structure/template

Junior Member Mensajes: 65 Fecha de incorporación: 5/06/08 Mensajes recientes
I've added a list to an article structure I created.
  <dynamic-element name="IUCNStatus" type="list">
    <dynamic-element name="extinct" type="Extinct">  </dynamic-element>
    <dynamic-element name="extinctWild" type="Extinct in the wild">  </dynamic-element>
    <dynamic-element name="criticEndanger" type="Critically Endangered">  </dynamic-element>
    <dynamic-element name="endanger" type="Endangered">  </dynamic-element>
    <dynamic-element name="vulnerable" type="Vulnerable">  </dynamic-element>
    <dynamic-element name="nearThreat" type="Near Threatened">  </dynamic-element>
    <dynamic-element name="leastConcern" type="Least Concern">  </dynamic-element>
    <dynamic-element name="dataDef" type="Data Deficient">  </dynamic-element>
    <dynamic-element name="notEval" type="Not Evaluated">  </dynamic-element>
    <dynamic-element name="unk" type="Unknown"></dynamic-element>
  </dynamic-element>


I need to translate the strings shown to an article editor as well as the string which shows when I write the selection to the article using the template
$IUCNStatus.getData()


In the edit article, the editor sees the "type" text such as "Extinct in the wild" while the user viewing the article sees "extinctWild". In other words it seems I need to translate both the name value and the type value. Is that correct and if so, how????

Thanks
Jeff
jeff gerbracht, modificado hace 15 años.

RE: Translate list in journal structure/template

Junior Member Mensajes: 65 Fecha de incorporación: 5/06/08 Mensajes recientes
Any ideas?
jeff gerbracht, modificado hace 15 años.

RE: Translate list in journal structure/template

Junior Member Mensajes: 65 Fecha de incorporación: 5/06/08 Mensajes recientes
I've figured out how to translate what the end user sees ("name"), but not what the editor sees ("type").

To translate what the end user sees, which is the "name" in a multi-select, treat the name as a key for translations and add the necessary translations to the appropriate language file(s).

#foreach($selection in $Families.getOptions())
         $languageUtil.get($locale,$selection)
          <br>
#end