+

Search Tips   |   Advanced Search

Composing language-specific strings

Perform this task to complete the localization of strings in an application component.

  • Create message catalogs for the language-specific strings.

    1. In application code, create a LocalizableTextFormatter instance, passing in required localization values.

    2. Set other localization values as needed for more complex situations.

    3. Generate a properly formatted, language-specific string.


    What to do next

    When the application is finished, deploy the application. For more information, see Preparing the localizable-text package for deployment.


    Subtopics

    • Localization API support
      The com.ibm.websphere.i18n.localizabletext package contains classes and interfaces for localizing text.

    • LocalizableTextFormatter class
      The LocalizableTextFormatter class, found in the com.ibm.websphere.i18n.localizabletext package, is the primary programming interface for using the localizable-text package. Instances of this class contain the information needed to create language-specific strings from keys and resource bundles.

    • Create a formatter instance
      Perform this task to set localization values for strings in an application component.

    • Set 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.

    • Generating localized text
      Perform this task to specify the runtime formatting of localized text in an application component.