de.rowa.posps.client
Class I18N

java.lang.Object
  extended by de.rowa.posps.client.I18N

public class I18N
extends java.lang.Object

Internationalization helper, which loads localized resources from the messages properties bundle.

Author:
Michael Koch

Method Summary
static java.util.Locale getLocale()
          Returns the locale active for this session.
static java.lang.String getString(java.lang.String key, java.lang.Object... params)
          Looks up the given key in the resource bundle and returns its associated message in the configured language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static java.lang.String getString(java.lang.String key,
                                         java.lang.Object... params)
Looks up the given key in the resource bundle and returns its associated message in the configured language.

Parameters:
key - Key to look up in the resource bundle.
params - If not null, the message found in the resource bundle will be interpreted as a format string for java.text.MessageFormat and the params will be passed to MessageFormat.format.

getLocale

public static java.util.Locale getLocale()
Returns the locale active for this session. This is the preferred locale sent in the request by the browser. If the browser has not sent a preferred locale, the system default locale is returned.

Returns:
The locale active for this session.


Copyright © 2007-2016 Becton Dickinson. All Rights Reserved.