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.
Difference between revisions of "Scout/Concepts/Texts"
m (Category changed) |
|||
Line 1: | Line 1: | ||
{{ScoutPage|cat=Shared}} | {{ScoutPage|cat=Shared}} | ||
− | + | Texts is a class used for the localization of the texts in the user interface. | |
== Description == | == Description == | ||
{{note|TODO|Add a description}} | {{note|TODO|Add a description}} | ||
− | |||
<source lang="java"> | <source lang="java"> | ||
Line 11: | Line 10: | ||
</source> | </source> | ||
− | * | + | * TODO: explain the properties text files. |
− | + | ||
+ | It is possible to use some Parameters: | ||
+ | <source lang="java"> | ||
+ | String name = "Bob"; | ||
+ | int age = 13; | ||
+ | |||
+ | Texts.get("NameWithAge", name, age); | ||
+ | </source> | ||
+ | |||
+ | In this case, some placeholders for the parameters are needed in the translated text: | ||
+ | NameWithAge={0} is {1} years old; | ||
== See Also == | == See Also == | ||
* {{ScoutLink|Concepts|Shared Plug-In|Shared Plug-In}} | * {{ScoutLink|Concepts|Shared Plug-In|Shared Plug-In}} |
Revision as of 08:54, 31 January 2012
The Scout documentation has been moved to https://eclipsescout.github.io/.
Texts is a class used for the localization of the texts in the user interface.
Description
Texts.get("persons");
- TODO: explain the properties text files.
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;
See Also
- The Scout documentation has been moved to https://eclipsescout.github.io/.