Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/Texts"

m (update link)
Line 1: Line 1:
 
{{ScoutPage|cat=Shared}}
 
{{ScoutPage|cat=Shared}}
  
{{ScoutJavadoc|TEXTS|C}} is a convenience class to access the {{ScoutLink|Concepts|Text Provider Services}} used for the localization of the texts in the user interface.
+
{{ScoutJavadoc|TEXTS|C}} is a convenience class to access the default {{ScoutLink|Concepts|Text Provider Service}} used for the localization of the texts in the user interface.
  
 
== Description ==
 
== Description ==
Line 33: Line 33:
  
 
== See Also ==
 
== See Also ==
* {{ScoutLink|Concepts|Text Provider Services}}
+
* {{ScoutLink|Concepts|Text Provider Service}}
 
* {{ScoutLink|Concepts|Shared Plug-In|Shared Plug-In}}
 
* {{ScoutLink|Concepts|Shared Plug-In|Shared Plug-In}}
 
* {{ScoutLink|SDK|NLS Editor}}
 
* {{ScoutLink|SDK|NLS Editor}}

Revision as of 05:04, 16 July 2014

The Scout documentation has been moved to https://eclipsescout.github.io/.

The Scout documentation has been moved to https://eclipsescout.github.io/. is a convenience class to access the default The Scout documentation has been moved to https://eclipsescout.github.io/. used for the localization of the texts in the user interface.

Description

Note.png
TODO
Add a description


TEXTS.get("persons");

It is possible to use some Parameters:

String name = "Bob";
int age = 13;
 
TEXTS.get("NameWithAge", name, age);

In this case, some placeholders for the parameters are needed in the translated text:

 NameWithAge={0} is {1} years old;

properties files

Scout uses the java.util.ResourceBundle mechanism for native language support. So whatever language files you have in your <project-prefix>.shared/resources/texts/*.properties are taken as translation base.

Example setup:

  • <project-prefix>.shared/resources/texts/Texts.properties
  • <project-prefix>.shared/resources/texts/Texts_fr.properties

If your application starts with the -vmargs -Duser.language=fr or eclipse.exe -nl=fr the translations in Texts_fr.properties are considered. In case of any other user language the translations in Texts.properties are considered.

It is possible to edit these files in the Eclipse Scout SDK with the The Scout documentation has been moved to https://eclipsescout.github.io/..

See Also

Back to the top