|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.html.E4HtmlObject
e4s.html.E4HtmlElementGeneral
e4s.translate.E4Label
public abstract class E4Label
Basic translation object.
E4LabelApp,
E4LabelSys,
Language| Field Summary | |
|---|---|
protected java.lang.String |
m_destination
|
protected java.lang.String[] |
m_params
|
protected java.lang.String |
m_source
|
static int |
TRANS_TYPE_APP
Application type, to be used within the application development. |
static int |
TRANS_TYPE_DATA
Application type, to be used within the application development. |
static int |
TRANS_TYPE_NONE
Used for translation types, which do not have translation capabilities, such as E4LabelNone. |
static int |
TRANS_TYPE_SYS
Core system translation types, to be used only within the e4s development, not intended to be used for application development. |
| Fields inherited from class e4s.html.E4HtmlElementGeneral |
|---|
m_elements, m_needed_scripts |
| Fields inherited from class e4s.html.E4HtmlObject |
|---|
m_parent_e4sID |
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Constructor Summary | |
|---|---|
E4Label(E4String s)
|
|
E4Label(E4String s,
java.lang.String[] params)
|
|
E4Label(E4String s,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3)
|
|
E4Label(java.lang.String s)
|
|
E4Label(java.lang.String s,
java.lang.String param1)
|
|
E4Label(java.lang.String s,
java.lang.String[] params)
|
|
E4Label(java.lang.String s,
java.lang.String param1,
java.lang.String param2)
|
|
E4Label(java.lang.String s,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3)
|
|
E4Label(java.lang.String s,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3,
java.lang.String param4)
|
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
Get version info string from subversion. |
abstract java.lang.Object |
clone()
|
void |
collectTranslationsForEditing(E4TranslationsVec translations,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with translation texts used so far during display of this page. |
int |
compareTo(Language dest_lang,
E4Label_Intf val2)
Compare the translated results with those of another label. |
java.lang.String |
getDest(Language user_lang)
Get the destination string for targeting the current running user language. |
java.lang.String |
getDest(Language user_lang,
boolean brakets_if_not_translated)
Get the destination string for targeting the current running user language, but set the result in brackets [] if not available if required. |
boolean |
getForceEncode()
|
java.lang.String |
getSource()
Get the source string, this is equivalent the String that is used during construction of the object and is used in the program code. |
abstract int |
getType()
Get the type of the translation. |
static java.lang.String |
replaceTranslations(java.lang.String str,
java.lang.String[] params)
Replacement of '#' characters to elements provided in the array. |
protected boolean |
requiresTranslation()
Check, if String is some spacial character sequence, e.g. empty strings or E4Object.NBSP, which requires
no translation at all. |
void |
setDest(Language user_lang,
java.lang.String dest,
E4User user)
|
void |
setForceEncode()
Force to explicit call E4Util._encodeHtml(String) before rendering the translated text. |
abstract boolean |
shallHaveTranslation()
Check, if this object shall have an translation. |
abstract boolean |
showUntranslatedInBrackets()
Retrieve the current state for the display behavior for non-translated items. |
abstract void |
showUntranslatedInBrackets(boolean mode)
Change the current display behavior for non-translated items. |
void |
toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
Create the HTML output for this element. |
java.lang.String |
toString()
Debug capabilities only - do not use except debugging and tracing. |
| Methods inherited from class e4s.html.E4HtmlObject |
|---|
E4ID, E4ID, set_e4sID |
| Methods inherited from class e4s.util.E4Object |
|---|
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String m_source
protected java.lang.String m_destination
protected java.lang.String[] m_params
public static final int TRANS_TYPE_NONE
E4LabelNone.
E4LabelNone,
E4Label_Intf.getType(),
TRANS_TYPE_SYS,
TRANS_TYPE_APP,
Constant Field Valuespublic static final int TRANS_TYPE_SYS
E4LabelSys,
E4Label_Intf.getType(),
TRANS_TYPE_NONE,
TRANS_TYPE_APP,
TRANS_TYPE_DATA,
Constant Field Valuespublic static final int TRANS_TYPE_APP
E4LabelApp,
E4Label_Intf.getType(),
TRANS_TYPE_NONE,
TRANS_TYPE_SYS,
TRANS_TYPE_DATA,
Constant Field Valuespublic static final int TRANS_TYPE_DATA
E4LabelData,
E4Label_Intf.getType(),
TRANS_TYPE_NONE,
TRANS_TYPE_SYS,
TRANS_TYPE_APP,
Constant Field Values| Constructor Detail |
|---|
public E4Label(java.lang.String s)
public E4Label(java.lang.String s,
java.lang.String param1)
public E4Label(java.lang.String s,
java.lang.String param1,
java.lang.String param2)
public E4Label(java.lang.String s,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3)
public E4Label(java.lang.String s,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3,
java.lang.String param4)
public E4Label(java.lang.String s,
java.lang.String[] params)
public E4Label(E4String s,
java.lang.String param1,
java.lang.String param2,
java.lang.String param3)
public E4Label(E4String s)
public E4Label(E4String s,
java.lang.String[] params)
| Method Detail |
|---|
public void setDest(Language user_lang,
java.lang.String dest,
E4User user)
public java.lang.String getDest(Language user_lang)
E4Label_IntfE4ServletImplementation.getLanguage().
E4Label: It will not be ensured, that each String has a valida translation so far. It is intended to
use the module E4ModuleTranslationsEditing for translation of the
source String (E4Label_Intf.getSource(). If no translation is available, usually the source string will
be returned within brackets [ ] to indicate the user that a translation is missing.
E4String: This interface is also implemented for compatibility reasons in E4String but it
is not intended that a E4String holds any translation information, so this classes
would always return the same String as defined as source.
getDest in interface E4Label_IntfE4Label_Intf.getSource(),
#getDest(boolean)
public java.lang.String getDest(Language user_lang,
boolean brakets_if_not_translated)
E4Label_IntfE4ServletImplementation.getLanguage().
E4Label: It will not be ensured, that each String has a valida translation so far. It is intended to
use the module E4ModuleTranslationsEditing for translation of the
source String (E4Label_Intf.getSource(). If no translation is available, usually the source string will
be returned within brackets [ ] to indicate the user that a translation is missing.
E4String: This interface is also implemented for compatibility reasons in E4String but it
is not intended that a E4String holds any translation information, so this classes
would always return the same String as defined as source.
getDest in interface E4Label_Intfbrakets_if_not_translated - a value of true sets the result value in brackets [] to indicate, that
no translation is available and to avoid having null or blank values,
a value of false treats the result as it is
E4Label_Intf.getSource(),
E4Label_Intf.getDest(e4s.application.Language)protected boolean requiresTranslation()
E4Object.NBSP, which requires
no translation at all.
getSource() is null, is empty,
has a length of 1 or equals E4Object.NBSPpublic java.lang.String getSource()
getSource in interface E4Label_IntfgetDest(e4s.application.Language),
#getDest(boolean)public java.lang.String toString()
toString in class E4Object
public void toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
E4HtmlElement_IntfE4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function to generate output of those
objects which becomes appended. Normally, there is no need to call this function anyway,
and this also might result in side effects of too-early relasing of objects in some cases.
This function is called by E4ServletImplementation_Intf.write(e4s.html.E4HtmlElement)
on the top level HTML element (common this is a HTML
or BODY element) and branches down to all child elements.
toHtml in interface E4HtmlElement_IntftoHtml in class E4HtmlElementGeneralservlet - the servlet environment currently running in
java.lang.Exception
public void collectTranslationsForEditing(E4TranslationsVec translations,
E4ServletImplementation_Intf servlet)
E4HtmlElementGeneralE4Label.
collectTranslationsForEditing in interface E4HtmlElement_IntfcollectTranslationsForEditing in class E4HtmlElementGeneraltranslations - the Vector where the styles will be collected, may not be nullservlet - the current servlet instanceE4Label_Intfpublic abstract int getType()
TRANS_TYPE_SYS,
TRANS_TYPE_APP or TRANS_TYPE_NONE
(but not for this case).
getType in interface E4Label_IntfTRANS_TYPE_APP or TRANS_TYPE_SYSTRANS_TYPE_SYS,
TRANS_TYPE_APP,
TRANS_TYPE_NONEpublic abstract boolean shallHaveTranslation()
E4Label_IntfE4LabelNone
shallHaveTranslation in interface E4Label_Intf
public int compareTo(Language dest_lang,
E4Label_Intf val2)
compareTo in interface E4Label_Intf
public static java.lang.String replaceTranslations(java.lang.String str,
java.lang.String[] params)
replaceTranslations("My name is # and i am # years old",new String[] {"Robert","66"})
would return a value of "My name is Robert and i am 66 years old"
str - the basic String where replacements shall take placeparams - an array of possible parameters to be replaced, one by one, in the
order and position of the '#' character withn the String
public abstract boolean showUntranslatedInBrackets()
showUntranslatedInBrackets(boolean)public abstract void showUntranslatedInBrackets(boolean mode)
mode - true = show un-translated text in brackets (default), false = no bracketsshowUntranslatedInBrackets()public void setForceEncode()
E4Label_IntfE4Util._encodeHtml(String) before rendering the translated text.
setForceEncode in interface E4Label_Intfpublic boolean getForceEncode()
public abstract java.lang.Object clone()
clone in interface E4Label_Intfclone in class java.lang.Objectpublic static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||