public class NlsTemplateImpl extends AbstractNlsTemplate
NlsTemplate interface. It uses
ResourceBundles for localization.| Modifier and Type | Field and Description |
|---|---|
private String |
key |
private String |
name |
private static long |
serialVersionUID |
| Modifier | Constructor and Description |
|---|---|
protected |
NlsTemplateImpl()
The constructor for de-serialization in GWT.
|
|
NlsTemplateImpl(String name,
String key)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getKey()
|
String |
getName()
This method gets the
base-name used to lookup
the bundle (typically a ResourceBundle). |
String |
toString() |
String |
translate(Locale locale)
This method translates the represented string for the given
locale. |
protected String |
translateFallback(Exception e)
Called from
translate(Locale) if localization failed. |
protected String |
translateFallback(String messageId) |
createFormatter, translategetLoggerprivate static final long serialVersionUID
private String name
private String key
protected NlsTemplateImpl()
public String getName()
base-name used to lookup
the bundle (typically a ResourceBundle).public String getKey()
key of the string to lookup from the
bundle. The key is a technical UID like (ERR_VALUE_OUT_OF_RANGE).public String translate(Locale locale)
NlsTemplatelocale. ResourceBundle).locale - is the locale to translate to.locale).protected String translateFallback(Exception e)
translate(Locale) if localization failed.e - is the Exception.protected String translateFallback(String messageId)
messageId - is the ID of the message composed out of bundle base name and key.translateFallback(Exception)Copyright © 2001–2016 mmm-Team. All rights reserved.