public class DefaultI18nInitializer extends I18nInitializer
I18nInitializer using the default i18n
implementation (one unique bundle with a definition properties file).| Modifier and Type | Field and Description |
|---|---|
static String |
BUNDLE_DEF_ENCODING |
static String |
BUNDLE_DEF_LOCALES |
static String |
BUNDLE_DEF_VERSION |
protected String |
bundleName
the name of the bundle.
|
static String |
BUNDLES_FOR_LOCALE |
static String |
DEFAULT_I18N_PATH |
protected URL |
definitionURL
location of the definition file.
|
protected String |
i18nPath
i18n path where to seek for resources (optional).
|
protected ClassLoader |
loader
class loader to use (optional).
|
static String |
UNIQUE_BUNDLE_DEF |
static String |
UNIQUE_BUNDLE_ENTRY |
encoding, messageFormatter, missingKeyReturnNull| Constructor and Description |
|---|
DefaultI18nInitializer(String bundleName) |
DefaultI18nInitializer(String bundleName,
ClassLoader loader) |
DefaultI18nInitializer(String bundleName,
ClassLoader loader,
String i18nPath) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBundleName() |
URL |
getDefinitionURL() |
String |
getI18nPath() |
ClassLoader |
getLoader() |
protected URL |
getResourceURL(String resource) |
I18nBundle[] |
resolvBundles()
Resolv the bundles.
|
String |
resolvDefinition(Properties properties) |
URL[] |
resolvURLs(String prefixURL,
Properties definition) |
protected void |
setI18nPath(String i18nPath) |
protected void |
setLoader(ClassLoader loader) |
getEncoding, getMessageFormatter, isMissingKeyReturnNull, resolvBundles, setEncoding, setMessageFormatter, setMissingKeyReturnNullpublic static String UNIQUE_BUNDLE_DEF
public static String UNIQUE_BUNDLE_ENTRY
public static String BUNDLE_DEF_LOCALES
public static String BUNDLE_DEF_VERSION
public static String BUNDLE_DEF_ENCODING
public static String BUNDLES_FOR_LOCALE
protected final String bundleName
protected ClassLoader loader
protected String i18nPath
protected URL definitionURL
public static final String DEFAULT_I18N_PATH
public DefaultI18nInitializer(String bundleName) throws NullPointerException
NullPointerExceptionpublic DefaultI18nInitializer(String bundleName, ClassLoader loader) throws NullPointerException
NullPointerExceptionpublic DefaultI18nInitializer(String bundleName, ClassLoader loader, String i18nPath) throws NullPointerException
NullPointerExceptionpublic String getBundleName()
public ClassLoader getLoader()
public String getI18nPath()
protected void setLoader(ClassLoader loader)
protected void setI18nPath(String i18nPath)
public String resolvDefinition(Properties properties) throws Exception
Exceptionpublic URL getDefinitionURL() throws NullPointerException
NullPointerExceptionpublic URL[] resolvURLs(String prefixURL, Properties definition) throws Exception
Exceptionpublic I18nBundle[] resolvBundles() throws Exception
I18nInitializerresolvBundles in class I18nInitializerException - if any pb while getting bundlesCopyright © 2004–2017 Ultreia.io. All rights reserved.