Resposive Help localize UI strings
Oxygen general issues.
Resposive Help localize UI strings
I refer to https://www.oxygenxml.com/doc/versions/ ... responsive
I need to add two languages for Webhelp Responsive UI localized label support (ES and FR-CA).
In step 3
Can we define multiple languages here?
And if so
In step 7 it states we need to localize strings-en-us.xml.
Here are my questions:
In step 7, it doesn't mention that we should rename strings-en-us.xml to signify the corresponding language.
So my question is if you can define multiple files in step 3 how does oxygen know what language strings-en-us.xml relate to?
Thank you
I need to add two languages for Webhelp Responsive UI localized label support (ES and FR-CA).
In step 3
Can we define multiple languages here?
And if so
In step 7 it states we need to localize strings-en-us.xml.
Here are my questions:
In step 7, it doesn't mention that we should rename strings-en-us.xml to signify the corresponding language.
So my question is if you can define multiple files in step 3 how does oxygen know what language strings-en-us.xml relate to?
Thank you
-
- Posts: 572
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Resposive Help localize UI strings
Post by julien_lacour »
Hello,
Yes, in step 3 you can define as many language as needed in webhelp-extension-strings.xml by simply adding a new <lang> element following the structure given in the example.
Step 7 mention that you need to "copy the common DITA-OT strings" not the file itself (it only gives its location). I took note of this and I will complete the step to make it easier to read.
Regards,
Julien
Yes, in step 3 you can define as many language as needed in webhelp-extension-strings.xml by simply adding a new <lang> element following the structure given in the example.
Step 7 mention that you need to "copy the common DITA-OT strings" not the file itself (it only gives its location). I took note of this and I will complete the step to make it easier to read.
Regards,
Julien
Re: Resposive Help localize UI strings
Thanks, Julien for your reply.
Now it makes a bit more sense.
Although there still appears to be an issue with the guidance, Step 7 states:
Copy the common DITA-OT strings defined in the DITA-OT-DIR/xsl/common/strings-en-us.xml file. It defines a set generated text available for HTML based transformations (such as note, fig, and table elements). Translate the content of each <str> element.
But the only folder I could find "Figure" was the language files in DITA-OT-DIR\plugins\org.dita.base\xsl\common. There I found the file strings-fr-ca.xml which contains localized strings I need to add to strings-fr-ca.xml in my ...\com.oxygenxml.webhelp.localization folder.
The only issue is that the file from DITA-OT-DIR\plugins\org.dita.base\xsl\common contains localized strings in the following format:
which is of a different format to the file in ...\com.oxygenxml.webhelp.localization folder, i.e.
Can the <variable id...> items be included in strings-fr-ca.xml, in my ...\com.oxygenxml.webhelp.localization folder?
Now it makes a bit more sense.
Although there still appears to be an issue with the guidance, Step 7 states:
Copy the common DITA-OT strings defined in the DITA-OT-DIR/xsl/common/strings-en-us.xml file. It defines a set generated text available for HTML based transformations (such as note, fig, and table elements). Translate the content of each <str> element.
But the only folder I could find "Figure" was the language files in DITA-OT-DIR\plugins\org.dita.base\xsl\common. There I found the file strings-fr-ca.xml which contains localized strings I need to add to strings-fr-ca.xml in my ...\com.oxygenxml.webhelp.localization folder.
The only issue is that the file from DITA-OT-DIR\plugins\org.dita.base\xsl\common contains localized strings in the following format:
Code: Select all
<variables>
<variable id="Figure">Figure</variable>
<variable id="Table">Tableau</variable>
<variable id="Next topic">Sujet suivant</variable>
...
Code: Select all
<str name="linkToThis" js="true" php="false">Fr-ca translated string</str>
<str name="ExpandAll" js="true" php="false">Fr-ca translated string</str>
<str name="printThisPage" js="true" php="false">Fr-ca translated string/str>
....
-
- Posts: 572
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Resposive Help localize UI strings
Post by julien_lacour »
Hello,
Sorry for the delayed answer, I did not get the notification for the previous post.
You can "convert" the <variable> elements into <str> in your com.oxygenxml.webhelp.localization plugin, you will get:
You don't need to set both js and php attributes for strings coming from org.dita.base.
Regards,
Julien
Sorry for the delayed answer, I did not get the notification for the previous post.
You can "convert" the <variable> elements into <str> in your com.oxygenxml.webhelp.localization plugin, you will get:
Code: Select all
<str name="Figure">Figure</str>
<str name="Table">Tableau</str>
<str name="Next topic">Sujet suivant</str>
Regards,
Julien
Re: Resposive Help localize UI strings
- oxy1.PNG (39.99 KiB) Viewed 550 times
It's almost all working now, except on the search page.
Please see the attachment.
I have translated strings in \DITA-OT\plugins\com.oxygenxml.webhelp.localization in:
- strings-es-es.xml
Note: I can see the localized strings in strings-es-es.xml, i.e.:
<str name="Results for:" js="true" php="false">documento(s) encontrado(s) para</str>
<str name="next.page" js="true" php="false">Siguiente</str>
<str name="prev.page" js="true" php="false">Anterior</str>
- webhelp-extension-strings.xml and plugin.xml are configured correctly
-
- Posts: 572
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Resposive Help localize UI strings
Post by julien_lacour »
Hello,
I tried on my side using <oXygen/> XML Editor 26.1, build 2024073008 and a simple DITA Map having xml:lang="es" attribute set.
I attached the plugin I'm using, I added your strings and a few more to test them too, the strings appear in my WebHelp output:
You should try to clean the output folder or set the 'clean.output' parameter in the transformation.
Other non translated strings should trigger a warning similar to this one:
Julien
I tried on my side using <oXygen/> XML Editor 26.1, build 2024073008 and a simple DITA Map having xml:lang="es" attribute set.
I attached the plugin I'm using, I added your strings and a few more to test them too, the strings appear in my WebHelp output:
- com.oxygenxml.webhelp.localization.zip
- (1.72 KiB) Downloaded 38 times
Other non translated strings should trigger a warning similar to this one:
Regards,[DOTX052W]: No string named 'jump.to.content' was found when creating generated text; using the value 'jump.to.content' in your output file.
Julien
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service