Perform this task to specify the runtime formatting of localized text in an application component.
You can provide fallback behavior for use if the appropriate message catalog is not available at formatting time.
import com.ibm.websphere.i18n.localizabletext.LocalizableException; import com.ibm.websphere.i18n.localizabletext.LocalizableTextFormatter; import java.util.Locale; public void drawAccountNumberGUI(String accountType){ ... LocalizableTextFormatter ltf = new LocalizableTextFormatter(); ... ltf.setFallBackString("Enter account number: "); try { msg = new Label(ltf.format(this.applicationLocale), Label.CENTER); } catch (LocalizableException le) { msg = new Label(ltf.getFallBackString(), Label.CENTER); } ... }
In this information ...Related tasks
Related reference
| IBM Redbooks, demos, education, and more |