Localize tag/element name

Post here questions and problems related to oXygen frameworks/document types.
Posts: 6

Localize tag/element name

Thu Sep 07, 2017 3:47 pm


Currently it's possible to change (in cc_config.xml) the name of an element base on an attribute inside the document as described in "https://www.oxygenxml.com/doc/versions/19.0/ug-editor/topics/rendering-elements-cc-author.html" :

Code: Select all

           <render element="p" as="Paragraph"/>
           <render element="p" as="Paragraphe" xml:lang="fr"/>
           <render element="p" as="Absatz" xml:lang="de"/>

We are looking for a way to render the element name based on the language of the application as describded in "https://www.oxygenxml.com/doc/versions/19.0/ug-editor/changing-user-interface-language.html#changing-user-interface-language" and not based on an attribute of an element.

The final context is to be used in the Oxygen component.

Best regards.

Posts: 5996

Re: Localize tag/element name

Fri Sep 08, 2017 9:07 am

Hi Manuel,

This does work the way you want it to work.
So depending on the language defined for the Oxygen UI, Oxygen will pick up from the cc_config.xml the proper rendering if it has been tagged with the corresponding xml:lang value.
So for the example above, if Oxygen's UI is in German, "Absatz" will be used as a rendering for the paragraph.

Radu Coravu
<oXygen/> XML Editor

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests