public abstract class I18nInitializer extends Object
I18nBundle and prepare initialization of
I18n.| Modifier and Type | Field and Description |
|---|---|
protected Charset |
encoding
Encoding used to load i18n bundles.
|
protected I18nMessageFormatter |
messageFormatter
Message formatter used in
I18n to produce final translated
messages. |
protected boolean |
missingKeyReturnNull
Used to know if the I18nLanguage has to return null when a key is not
found.
|
| Modifier | Constructor and Description |
|---|---|
protected |
I18nInitializer() |
| Modifier and Type | Method and Description |
|---|---|
Charset |
getEncoding()
Get the
Charset encoding used for i18n Properties file loading. |
I18nMessageFormatter |
getMessageFormatter()
Get the
I18nMessageFormatter to use on each i18n message
translation. |
boolean |
isMissingKeyReturnNull()
Get the
missingKeyReturnNull to use on missing key |
abstract I18nBundle[] |
resolvBundles()
Resolv the bundles.
|
I18nBundle[] |
resolvBundles(URL... urls) |
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 |
setMissingKeyReturnNull(boolean missingKeyReturnNull)
Get the
missingKeyReturnNull to use on missing key |
protected Charset encoding
protected I18nMessageFormatter messageFormatter
I18n to produce final translated
messages.protected boolean missingKeyReturnNull
public abstract I18nBundle[] resolvBundles() throws Exception
Exception - if any pb while getting bundlespublic I18nBundle[] resolvBundles(URL... urls) throws Exception
Exceptionpublic Charset getEncoding()
Charset encoding used for i18n Properties file loading.public void setEncoding(Charset encoding) throws NullPointerException
encoding to use for i18n Properties file loading.encoding - Charset encoding to useNullPointerException - if encoding is nullpublic I18nMessageFormatter getMessageFormatter()
I18nMessageFormatter to use on each i18n message
translation.public void setMessageFormatter(I18nMessageFormatter messageFormatter) throws NullPointerException
messageFormatter to use on each i18n message translation.messageFormatter - I18nMessageFormatter to useNullPointerException - if messageFormatter is nullpublic boolean isMissingKeyReturnNull()
missingKeyReturnNull to use on missing keypublic void setMissingKeyReturnNull(boolean missingKeyReturnNull)
missingKeyReturnNull to use on missing keymissingKeyReturnNull - missingKeyReturnNull to useCopyright © 2004–2014 CodeLutin. All rights reserved.