How I can localize texts in ui javascript (frontend) [message #1816988] |
Wed, 13 November 2019 07:53  |
Eclipse User |
|
|
|
Hello.
I have classic Scout application where I localized all texts with Texts.nls. This operates only in content generated with Java code.
But the application contains other texts that are not translated. For example "... rows loaded", "Reload data", all texts in table customize, in standard dialog boxes etc. These texts are in my opinion generated by Javascript.
How (where) I can translate these texts?
Thank you for your advice.
|
|
|
Re: How I can localize texts in ui javascript (frontend) [message #1816989 is a reply to message #1816988] |
Wed, 13 November 2019 08:11   |
Eclipse User |
|
|
|
Hi Miloslav
Some texts in Scout are part of the framework, like the texts you mentioned in your post. Scout uses a resource bundle for these texts. Its located in the module "org.eclipse.scout.rt.ui.html" at this location on the class-path: "org\eclipse\scout\rt\ui\html\Texts.properties". Since Scout is developed in Switzerland we currently only provide English, German, French and Italian texts. However, when you provide a properties file for the Locale you're missing, Scout should use the texts from there, instead of the English texts (which are used by default, when no Locale matches).
For instance "Texts_es.properties" would add Spanish texts. Make sure the file is on the same location on the class-path like the other .properties files (see further above).
Btw: when you make a translation of these texts, please submit a pull request on GitHub, so Scout can support more languages out-of-the-box.
Cheers,
André
|
|
|
|
Powered by
FUDForum. Page generated in 0.28840 seconds