WAS v8.5 > Develop applications > Develop Internationalization service > Tasks: Internationalizing interface strings (localizable-text API) > Compose language-specific stringsSet optional localization values
In addition to setting localization values required by the LocalizableTextFormatter interface, we can set a number of optional values in application code, either through the constructor or by calling any of several methods for that purpose.
With optional values, we can do the following actions:
- Compose complex strings from variable substrings
- Customize the formatting of strings, considering variables other than time zone and locale
- In application code, add the optional values into an array of type Object.
Object[] arg = {new String(getAccountNumber())};
- Pass the array into a LocalizableTextFormatter instance. We can pass the array through the appropriate constructor or call the setArguments(Object[]) method. For a usage example, see Compose complex strings.
Because the array is passed by value rather than by reference, any updates to the array variable after this point are not reflected in the LocalizableTextFormatter instance unless it is reset by calling the setArguments(Object[]) method.
Write code to generate the localized text.
Subtopics
- Compose complex strings
Perform this task to insert variable substrings into a localized string.- Compose complex strings
Perform this task to insert variable substrings into a localized string.
Related
Customize the behavior of a formatting method
Compose language-specific strings
Reference:
LocalizableTextFormatter class