public class UserI18nInitializer extends DefaultI18nInitializer
userDirectory, then
use resources from this user directories.| Modifier and Type | Field and Description |
|---|---|
protected DefaultI18nInitializer |
delegate
the delegate initializer to obtain default i18n resources to put in user
directory.
|
protected File |
userDirectory
the user directory where to store the i18n resources.
|
BUNDLE_DEF_ENCODING, BUNDLE_DEF_LOCALES, BUNDLE_DEF_VERSION, bundleName, BUNDLES_FOR_LOCALE, DEFAULT_I18N_PATH, definitionURL, i18nPath, loader, UNIQUE_BUNDLE_DEF, UNIQUE_BUNDLE_ENTRYencoding, messageFormatter, missingKeyReturnNull| Constructor and Description |
|---|
UserI18nInitializer(File userDirectory,
DefaultI18nInitializer delegate) |
UserI18nInitializer(String i18nPath,
File userDirectory,
DefaultI18nInitializer delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createUserI18nLayout(File directory)
Creates the user i18n structure or fill it if required.
|
DefaultI18nInitializer |
getDelegate() |
Charset |
getEncoding()
Get the
Charset encoding used for i18n Properties file loading. |
I18nMessageFormatter |
getMessageFormatter()
Get the
I18nMessageFormatter to use on each i18n message
translation. |
File |
getUserDirectory() |
I18nBundle[] |
resolvBundles()
Resolv the bundles.
|
void |
setEncoding(Charset encoding)
Set
encoding to use for i18n Properties file loading. |
void |
setMessageFormatter(I18nMessageFormatter messageFormatter)
Set
messageFormatter to use on each i18n message translation. |
void |
updateUserI18nLayout(File directory,
I18nBundle[] bundles)
Hook to update the user i18n structure.
|
getBundleName, getDefinitionURL, getI18nPath, getLoader, getResourceURL, resolvDefinition, resolvURLs, setI18nPath, setLoaderisMissingKeyReturnNull, resolvBundles, setMissingKeyReturnNullprotected final File userDirectory
protected final DefaultI18nInitializer delegate
public UserI18nInitializer(File userDirectory, DefaultI18nInitializer delegate) throws NullPointerException
NullPointerExceptionpublic UserI18nInitializer(String i18nPath, File userDirectory, DefaultI18nInitializer delegate) throws NullPointerException
NullPointerExceptionpublic File getUserDirectory()
public DefaultI18nInitializer getDelegate()
public Charset getEncoding()
I18nInitializerCharset encoding used for i18n Properties file loading.getEncoding in class I18nInitializerpublic void setEncoding(Charset encoding)
I18nInitializerencoding to use for i18n Properties file loading.setEncoding in class I18nInitializerencoding - Charset encoding to usepublic I18nMessageFormatter getMessageFormatter()
I18nInitializerI18nMessageFormatter to use on each i18n message
translation.getMessageFormatter in class I18nInitializerpublic void setMessageFormatter(I18nMessageFormatter messageFormatter)
I18nInitializermessageFormatter to use on each i18n message translation.setMessageFormatter in class I18nInitializermessageFormatter - I18nMessageFormatter to usepublic I18nBundle[] resolvBundles() throws Exception
I18nInitializerresolvBundles in class DefaultI18nInitializerException - if any pb while getting bundlesprotected void createUserI18nLayout(File directory) throws Exception
directory - the directory where to export i18n resourcesException - if any pbpublic void updateUserI18nLayout(File directory, I18nBundle[] bundles)
directory - the user directory where are i18n resourcesbundles - the user i18n bundlesCopyright © 2004–2017 CodeLutin. All rights reserved.