public class ThreadResources
extends java.lang.Object
setThreadLocale
to set the locale for the thread, then calls the getMessage
methods.ResourceHandle
Constructor and Description |
---|
ThreadResources() |
Modifier and Type | Method and Description |
---|---|
static java.util.Locale |
getLocale()
Deprecated.
since 2.1
|
static java.lang.String |
getMessage(java.lang.String key)
Get a message given the message key.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.Object[] arguments)
Get a message that has placeholders.
|
static ULocale |
getULocale()
Get the locale of current user-thread.
|
static void |
setLocale(ULocale locale)
Set the locale of current user-thread.
|
public static void setLocale(ULocale locale)
locale
- Locale of the current thread.public static ULocale getULocale()
public static java.util.Locale getLocale()
public static java.lang.String getMessage(java.lang.String key)
key
- the message keyResourceBundle#getString( String )
,
ResourceHandle.getMessage( String )
public static java.lang.String getMessage(java.lang.String key, java.lang.Object[] arguments)
key
- the message keyarguments
- the set of arguments to be plugged into the messageResourceBundle#getString( String )
,
MessageFormat#format( String, Object[] )
,
ResourceHandle.getMessage( String, Object[] )
Copyright © 2014 OpenText Corp. All rights reserved.