|
||||||||||
| 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 java.lang.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(java.lang.String key,
com.gentics.lib.i18n.LanguageProvider languageProvider)
Create an instance of the I18nString. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
protected com.gentics.lib.i18n.LanguageProvider |
getLanguageProvider()
Method to get the current language provider |
java.util.Map |
getParameters()
Get the parameters map |
int |
hashCode()
|
int |
length()
Get the length of the I18nString |
void |
setParameter(java.lang.String name,
java.lang.Object value)
sets a variable parameter in the string. |
void |
setParameters(java.util.Map parameters)
Set all parameters from the map to the string |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String _key
protected transient com.gentics.lib.i18n.LanguageProvider languageProvider
| Constructor Detail |
|---|
protected I18nString(java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic void setParameters(java.util.Map parameters)
parameters - parameters as map
public void setParameter(java.lang.String name,
java.lang.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 java.util.Map getParameters()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||