www.element4solution.com

e4s.translate
Interface E4Label_Intf

All Superinterfaces:
E4HtmlElement_Intf
All Known Implementing Classes:
E4Label, E4LabelApp, E4LabelData, E4LabelNone, E4LabelSys

public interface E4Label_Intf
extends E4HtmlElement_Intf

Interface for Strings (used as labels etc..) with a requirement for translations.

Since:
JDK 1.4
See Also:
E4LabelSys, E4LabelApp, Language

Method Summary
 java.lang.Object clone()
           
 int compareTo(Language dest_lang, E4Label_Intf val2)
          Compare the translated results with those of another label.
 java.lang.String getDest(Language dest_lang)
          Get the destination string for targeting the current running user language.
 java.lang.String getDest(Language dest_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.
 java.lang.String getSource()
          Get the source string used in the program code.
 int getType()
          Get the type for the translation.
 void setForceEncode()
          Force to explicit call E4Util._encodeHtml(String) before rendering the translated text.
 boolean shallHaveTranslation()
          Check, if this object shall have an translation.
 
Methods inherited from interface e4s.html.E4HtmlElement_Intf
addScript, addScript, addScript, collectScripts, collectStylesForEditing, collectTranslationsForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, toHtml, validate
 

Method Detail

getSource

java.lang.String getSource()
Get the source string used in the program code. If it is part of a text used in the program code, then this text is either in the language E4ModuleImplementation.getLanguage_Sys() if it is part of the core e4s funtionality, or it can be of type E4ModuleImplementation.getLanguage_App() when it is part of the application based on the system (this means a layer "above" the system).

See Also:
getDest(e4s.application.Language)

getDest

java.lang.String getDest(Language dest_lang)
Get the destination string for targeting the current running user language. The language of this string is always E4ServletImplementation.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 (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.

See Also:
getSource(), #getDest(boolean)

getDest

java.lang.String getDest(Language dest_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. The language of this string is always E4ServletImplementation.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 (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.

Parameters:
brakets_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
Returns:
the result translation, depending on the parmeter setting
See Also:
getSource(), getDest(e4s.application.Language)

shallHaveTranslation

boolean shallHaveTranslation()
Check, if this object shall have an translation. For example, there are objects not intended to have an translation in general such as E4LabelNone

Returns:
true if a translations is required in principal

getType

int getType()
Get the type for the translation.

Returns:
E4Label.TRANS_TYPE_SYS if this translations is part of the e4s core system or E4Label.TRANS_TYPE_APP if this translation is part of the application or E4Label.TRANS_TYPE_NONE if none of those.
See Also:
E4Label.TRANS_TYPE_APP, E4Label.TRANS_TYPE_SYS, E4Label.TRANS_TYPE_NONE

setForceEncode

void setForceEncode()
Force to explicit call E4Util._encodeHtml(String) before rendering the translated text.


compareTo

int compareTo(Language dest_lang,
              E4Label_Intf val2)
Compare the translated results with those of another label.

Returns:
the value 0 if the argument label is equal to this label; a value less than 0 if this label is lexicographically less than the label argument; and a value greater than 0 if this label is lexicographically greater than the label argument.

clone

java.lang.Object clone()

www.element4solution.com