|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NlsTemplate
This interface represents the template for an internationalized text that can
be translated to a given Locale.
There is no direct factory to create an 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.
NlsMessage,
NlsTemplateResolver,
NlsTemplateImpl| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||