|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gentics.api.lib.i18n.I18nString
public abstract class I18nString
Localized string. Is localized automaticaly into a string during rendering by .toString(), usually in template engine.
Nested Class Summary | |
---|---|
class |
I18nString.I18nStringParameters
Internal map implementation that transforms keys to the regexes. |
Field Summary | |
---|---|
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) |
Constructor Summary | |
---|---|
protected |
I18nString(String key,
com.gentics.lib.i18n.LanguageProvider languageProvider)
Create an instance of the I18nString. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String _key
protected transient com.gentics.lib.i18n.LanguageProvider languageProvider
Constructor Detail |
---|
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.Method Detail |
---|
protected com.gentics.lib.i18n.LanguageProvider getLanguageProvider()
public String toString()
toString
in class Object
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()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |