Setting optional localization values

In addition to setting localization values that are required by the LocalizableTextFormatter interface, you can set a number of optional values in application code, either through the constructor or by calling any of several methods for that purpose.

About this task

With optional values, you can do the following actions:
  • Compose complex strings from variable substrings
  • Customize the formatting of strings, considering variables other than time zone and locale

Procedure

  1. In application code, add the optional values into an array of type Object.
    Object[] arg = {new String(getAccountNumber())};
  2. Pass the array into a LocalizableTextFormatter instance. You can pass the array through the appropriate constructor or call the setArguments(Object[]) method. For a usage example, see Composing 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.


指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:15
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tin_slocv
檔名:tin_slocv.html