Localized Output

In IBM Cúram Social Program Management the client is responsible for converting the text of an exception into the language that a user has chosen. However certain situations do exist where the server must present data to the client for localization. To facilitate these situations the curam.util.exception.LocalisableString class has been introduced. This class is used in a similar manner to AppException as is shown in Localized Output.

Figure 1. Use of LocalisableString
curam.util.type.CodeTableItemIdentifier someIdentifier =
  new CodeTableItemIdentifier("someTable", "someCode");
curam.util.exception.LocalisableString e =
  new LocalisableString(EXAMPLE.ID_EXAMPLE_MESSAGE);
e.arg(someIdentifier);
return e.toClientFormattedText();

This string can be passed back to the client as an output parameter and will be localized by the client.