public interface ErrorTranslator
Modifier and Type | Method and Description |
---|---|
boolean |
IsDynamicVariable(String strMessage)
returns true if the specified strMessage is in the format: "$variable-name variable-value", false otherwise.
|
List<String> |
ResolveMessages(List<String> translatedMessages)
Replacing variables ('${...}') within translatedMessages with their values ('$key value') that are also within
translatedMessages.
|
List<String> |
TranslateErrorText(List<String> errorMsg)
Translates and resolves errors from error types.
|
List<String> |
TranslateErrorText(List<String> errorMsg,
boolean changeIfNotFound)
Translate errors from error types.
|
List<String> |
TranslateErrorText(List<String> errorMsg,
Locale locale)
Translates and resolves errors from error types.
|
String |
TranslateErrorTextSingle(String errorMsg)
Translates a single error message.
|
String |
TranslateErrorTextSingle(String errorMsg,
boolean changeIfNotFound)
Translates a single error message.
|
String |
TranslateErrorTextSingle(String errorMsg,
Locale locale)
Translates a single error message.
|
List<String> |
TranslateMessages(List<String> errorMsg,
boolean changeIfNotFound) |
List<String> TranslateErrorText(List<String> errorMsg, boolean changeIfNotFound)
errorMsg
- messages to be translatedchangeIfNotFound
- If true: if message key is not found in the resource, return a beautified key. If false, returned
unfound key as is.List<String> TranslateErrorText(List<String> errorMsg)
errorMsg
- messages to be translatedList<String> TranslateErrorText(List<String> errorMsg, Locale locale)
errorMsg
- messages to be translatedlocale
- the locale to translate intoboolean IsDynamicVariable(String strMessage)
strMessage
- the string that may be a dynamic variable.String TranslateErrorTextSingle(String errorMsg, boolean changeIfNotFound)
errorMsg
- the message to be translatedchangeIfNotFound
- If true: if message key is not found in the resource, return a beautified key. If false, returned
unfound key as is.String TranslateErrorTextSingle(String errorMsg)
errorMsg
- the message to translateString TranslateErrorTextSingle(String errorMsg, Locale locale)
errorMsg
- the message to translatelocale
- the locale to translate intoCopyright © 2012. All Rights Reserved.