Managing NLS

About this task

The toolkit manages National Language Support (NLS) using a special hidden field named dse_locale. This field contains a string (such as "en_US") which represents the locale used by the toolkit. When the toolkit starts, the locale in the request sets the locale for the toolkit. If any subsequent request contains the dse_locale hidden field, the toolkit replaces the current locale with the one in the request.

The locale is per session. The dse_locale field is used by the infrastructure to render both translated error messages received during the validation process (the validator associated with the typed data elements leaves key messages inside the ErrorInfo objects that are associated with each data element), and the translated messages configured in the corresponding JSP tags.

Use the JSP input in the following example to change the locale:

<INPUT type=hidden name=dse_locale value=en_US>