|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.i18n.init.I18nInitializer
org.nuiton.i18n.init.DefaultI18nInitializer
org.nuiton.i18n.init.UserI18nInitializer
public class UserI18nInitializer
Initializer which expose i18n resources in the userDirectory, then
use resources from this user directories.
| Field Summary | |
|---|---|
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. |
| Fields inherited from class org.nuiton.i18n.init.DefaultI18nInitializer |
|---|
BUNDLE_DEF_ENCODING, BUNDLE_DEF_LOCALES, BUNDLE_DEF_VERSION, bundleName, BUNDLES_FOR_LOCALE, DEFAULT_I18N_PATH, definitionURL, i18nPath, loader, UNIQUE_BUNDLE_DEF, UNIQUE_BUNDLE_ENTRY |
| Fields inherited from class org.nuiton.i18n.init.I18nInitializer |
|---|
encoding, messageFormatter, missingKeyReturnNull |
| Constructor Summary | |
|---|---|
UserI18nInitializer(File userDirectory,
DefaultI18nInitializer delegate)
|
|
UserI18nInitializer(String i18nPath,
File userDirectory,
DefaultI18nInitializer delegate)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.nuiton.i18n.init.DefaultI18nInitializer |
|---|
getBundleName, getDefinitionURL, getI18nPath, getLoader, getResourceURL, resolvDefinition, resolvURLs, setI18nPath, setLoader |
| Methods inherited from class org.nuiton.i18n.init.I18nInitializer |
|---|
isMissingKeyReturnNull, resolvBundles, setMissingKeyReturnNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final File userDirectory
protected final DefaultI18nInitializer delegate
| Constructor Detail |
|---|
public UserI18nInitializer(File userDirectory,
DefaultI18nInitializer delegate)
throws NullPointerException
NullPointerException
public UserI18nInitializer(String i18nPath,
File userDirectory,
DefaultI18nInitializer delegate)
throws NullPointerException
NullPointerException| Method Detail |
|---|
public 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 use
public I18nBundle[] resolvBundles()
throws Exception
I18nInitializer
resolvBundles in class DefaultI18nInitializerException - if any pb while getting bundles
protected void createUserI18nLayout(File directory)
throws Exception
directory - the directory where to export i18n resources
Exception - if any pb
public void updateUserI18nLayout(File directory,
I18nBundle[] bundles)
directory - the user directory where are i18n resourcesbundles - the user i18n bundles
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||