public class ErrorMessages extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LANGUAGE
Default language.
|
Modifier and Type | Method and Description |
---|---|
static String |
getErrorMessage(ResultCode resultCode,
String language)
Get translation for error text.
|
static String |
getErrorMessage(ResultCode resultCode,
Terminal terminal)
Get translation for error text matching terminal language.
|
public static final String DEFAULT_LANGUAGE
public static String getErrorMessage(ResultCode resultCode, Terminal terminal)
resultCode
- Result code to get error message for.terminal
- Terminal to get language from. You have to call
Terminal.systemInformation()
or
Terminal.systemInformationAsync()
first to obtain the
terminal language. Otherwise the default language is used.public static String getErrorMessage(ResultCode resultCode, String language)
resultCode
- Result code to get error message for.language
- Language code to get error message for. If no entry for language
is found the default error message is returned. Use
ErrorMessages.DEFAULT_LANGUAGE
to get the default error message.