public interface NlsTemplate extends Serializable
translated to a given Locale. NlsTemplate as an alternative implementation might take
totally different arguments for construction. If you want to use your own implementation of
NlsTemplate, you can either directly supply it when creating an NlsMessage or otherwise for localization via NlsTemplateResolver.NlsMessage,
NlsTemplateResolver,
NlsTemplateImpl| Modifier and Type | Method and Description |
|---|---|
String |
translate(Locale locale)
This method translates the represented string for the given
locale. |
boolean |
translate(Locale locale,
Map<String,Object> arguments,
Appendable buffer,
NlsTemplateResolver resolver,
NlsDependencies nlsDependencies)
This method behaves like
translate(Locale) but additionally fills the given
arguments into the translated message writing into the given buffer. |
String translate(Locale locale)
locale. ResourceBundle).locale - is the locale to translate to.locale).boolean translate(Locale locale, Map<String,Object> arguments, Appendable buffer, NlsTemplateResolver resolver, NlsDependencies nlsDependencies) throws IOException
translate(Locale) but additionally fills the given
arguments into the translated message writing into the given buffer.locale - is the locale to translate to.arguments - are the variable arguments to fill in the message.buffer - is the buffer where the translation will be appended to.resolver - is the NlsTemplateResolver.nlsDependencies - are the NlsDependencies.true if the (translated) message has been appended to the given
messageBuffer or false if the translation failed.IOException - if the given Appendable caused such exception.Copyright © 2001–2015 mmm-Team. All rights reserved.