public class Translation extends Object implements ITranslation
| Constructor and Description |
|---|
Translation() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttributeTranslation(String attributeName)
Gets the translation associated to an attribute.
|
Map<String,String> |
getAttributeTranslations()
Gets all the attribute translations which have been registered.
|
String |
getLanguageCode()
Gets the language code which define the language associated to the translations.
|
void |
setAttributeTranslation(String attributeName,
String attributeValue)
Add a translated attribute or update an existing one.
|
void |
setLanguageCode(String languageCode)
Sets the language code which define the language associated to the translations.
|
public String getAttributeTranslation(String attributeName)
getAttributeTranslation in interface ITranslationattributeName - The name of the attribute for which one to get translations.public Map<String,String> getAttributeTranslations()
getAttributeTranslations in interface ITranslationpublic String getLanguageCode()
WARNING: The language code returned by this function is always expressed in uppercase even if you set it using a lower case syntax. The translation class always stores language codes using an upper case syntax.
getLanguageCode in interface ITranslationpublic void setAttributeTranslation(String attributeName, String attributeValue)
setAttributeTranslation in interface ITranslationattributeName - The name of the translated attribute.attributeValue - The value of the translated attribute, the language associated to this
value is defined by the `getLanguageCode()` and `setLanguageCode()` functions.public void setLanguageCode(String languageCode)
WARNING: The provided language code is not case sensitive, but, internally the language code which is used and stored is ALWAYS converted in uppercase.
setLanguageCode in interface ITranslationlanguageCode - The language code to set, this string must be compliant with the ISO639-1
standard.Copyright © 2017 GOMOOB. All rights reserved.