Package de.elo.ix.client
Class FindTranslateTermInfo
java.lang.Object
de.elo.ix.client.FindTranslateTermInfo
- All Implemented Interfaces:
Serializable
This class is used to find translations of terms.
Localization information is stored in two kinds of storage: in the database and in property files
in the repository. The former kind use the database table
translations which has a
column for each language. This localization data can be modified or extended via API function
IXServicePortIF.checkinTranslateTerms(ClientInfo, TranslateTerm[], LockZ). The latter
kind stores localization as property files under /Administration/Localization. This data can only
be changed via checkin/out and takes effect only after Indexserver re-start.
Indexserver function
IXServicePortIF.findFirstTranslateTerms(ClientInfo, FindTranslateTermInfo, int) searches
over both localization sources and returns matches from both. The translations found in the
database are returned first.
EIX-2912: Since IX version 21.3, a language is specified as IETF language tag (lang). The
language part is from ISO 639-1. It is optionally followed by a country tag from ISO 3166-1
alpha-2. The parts are separated by hyphen. Examples: de-DE, de-CH, de-AT. The function tries to
find the translation for a given lang in the following order:
1. lang as defined, e.g. de-CH 2. lang without country, e.g. de 3. first lang with the same language tag, e.g. de-DE 4. first system language
- Since:
- 7.00.000.000
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDisable fallback to default language if a key intranslationKeyPrefixesis not found.protected booleanReserved - Find deleted terms too (currently not implemented).protected booleanReturn those terms too, that should be translated into other languages: e.g.protected booleanFind terms of lower or equal the level.protected String[]Return the terms specified by elementtermsfor which translations exist in this languages.protected intFind terms of this priority level.protected StringPackage GUID.protected String[]Terms for which translations should be selected.protected String[]Find terms by translation keys. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]getLangs()intgetLevel()String[]getTerms()String[]booleanbooleanbooleanbooleanvoidsetDisableFallback(boolean disableTranslationKeyFallback) voidsetInclDeleted(boolean inclDeleted) voidsetInclToBeTranslated(boolean inclToBeTranslated) voidsetIncludeAllLevels(boolean includeAllLevels) voidvoidsetLevel(int level) voidsetPackageName(String packageName) voidvoidsetTranslationKeyPrefixes(String[] translationKeyPrefixes) toString()
-
Field Details
-
terms
Terms for which translations should be selected.The given terms have to be in the language specified in
langs[0]object. Iflangsisnullor empty, the terms are assumed to be in the system language. Set this element andtranslationKeyPrefixestonullor empty, if all terms should be returned.The terms also act as prefixes for keys stored in property files used for translation. Alternatively, member
translationKeyPrefixescan be used to search over property files. To get the entire content of this files, set this member ortranslationKeyPrefixestoFindTranslateTermInfoC.ALL_TRANSLATIONS_FROM_PROPERY_FILES.- See Also:
-
langs
Return the terms specified by elementtermsfor which translations exist in this languages. If a term is not found in one of the languages, an empty string is returned. The languages must be given in ISO 639 2-letter codes, e.g. "en" for English. The language at the first index specifies the language of theterms. This element is corresponding toTranslateTerm.termLangs:termLangs[i]is in languagelangs[i]If this element isnull, terms in all available languages are returned.- See Also:
-
inclDeleted
protected boolean inclDeletedReserved - Find deleted terms too (currently not implemented). -
inclToBeTranslated
protected boolean inclToBeTranslatedReturn those terms too, that should be translated into other languages: e.g. Keywording form names (DocMask.name), index value lables (DocMaskLine.name) and Keywords.- Since:
- 7.00.000.031
-
translationKeyPrefixes
Find terms by translation keys. Collect the localized text for all keys with the given prefixes in the database or in the localization property files.- Since:
- 21.02.000.005
-
level
protected int levelFind terms of this priority level. If 0 (default), return the terms with the highest level.- Since:
- 21.02.000.005
-
packageName
Package GUID.- Since:
- 21.02.000.005
-
disableFallback
protected boolean disableFallbackDisable fallback to default language if a key intranslationKeyPrefixesis not found. If there is no translation term associated to a key for a language inlangs, an empty String is returned in the correspondingFindResult.translateTerms. EIX-3008- Since:
- 21.03.000.005
-
includeAllLevels
protected boolean includeAllLevelsFind terms of lower or equal the level.- Since:
- 23.02.000.012
-
-
Constructor Details
-
FindTranslateTermInfo
public FindTranslateTermInfo() -
FindTranslateTermInfo
-
-
Method Details
-
getTerms
-
setTerms
-
getLangs
-
setLangs
-
isInclDeleted
public boolean isInclDeleted() -
setInclDeleted
public void setInclDeleted(boolean inclDeleted) -
isInclToBeTranslated
public boolean isInclToBeTranslated() -
setInclToBeTranslated
public void setInclToBeTranslated(boolean inclToBeTranslated) -
getTranslationKeyPrefixes
-
setTranslationKeyPrefixes
-
getLevel
public int getLevel() -
setLevel
public void setLevel(int level) -
getPackageName
-
setPackageName
-
isDisableFallback
public boolean isDisableFallback() -
setDisableFallback
public void setDisableFallback(boolean disableTranslationKeyFallback) -
isIncludeAllLevels
public boolean isIncludeAllLevels() -
setIncludeAllLevels
public void setIncludeAllLevels(boolean includeAllLevels) -
toString
-