public abstract class I18nString extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
class |
I18nString.I18nStringParameters
Internal map implementation that transforms keys to the regexes.
|
Modifier and Type | Field and Description |
---|---|
protected String |
_key
key of the i18String
|
protected com.gentics.lib.i18n.LanguageProvider |
languageProvider
language provider (for translating the key depending on the currently
selected language)
|
Modifier | Constructor and Description |
---|---|
protected |
I18nString(String key,
com.gentics.lib.i18n.LanguageProvider languageProvider)
Create an instance of the I18nString.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected com.gentics.lib.i18n.LanguageProvider |
getLanguageProvider()
Method to get the current language provider
|
Map |
getParameters()
Get the parameters map
|
int |
hashCode() |
int |
length()
Get the length of the I18nString
|
void |
setParameter(String name,
Object value)
sets a variable parameter in the string.
|
void |
setParameters(Map parameters)
Set all parameters from the map to the string
|
String |
toString() |
protected String _key
protected transient com.gentics.lib.i18n.LanguageProvider languageProvider
protected I18nString(String key, com.gentics.lib.i18n.LanguageProvider languageProvider)
key
- the key of the i18n item.languageProvider
- the languageprovider to use, for fetching the
language during toString.protected com.gentics.lib.i18n.LanguageProvider getLanguageProvider()
public void setParameters(Map parameters)
parameters
- parameters as mappublic void setParameter(String name, Object value)
name
- name to replace in template, e.g. "name" for replacing $namevalue
- new value for variable. may also be an object with a
toString implementation.public int length()
public Map getParameters()
Copyright © 2016 Gentics Software GmbH. All Rights Reserved.