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 boolean
Disable fallback to default language if a key intranslationKeyPrefixes
is not found.protected boolean
Reserved - Find deleted terms too (currently not implemented).protected boolean
Return those terms too, that should be translated into other languages: e.g.protected String[]
Return the terms specified by elementterms
for which translations exist in this languages.protected int
Find terms of this priority level.protected String
Package 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()
int
getLevel()
String[]
getTerms()
String[]
boolean
boolean
boolean
void
setDisableFallback
(boolean disableTranslationKeyFallback) void
setInclDeleted
(boolean inclDeleted) void
setInclToBeTranslated
(boolean inclToBeTranslated) void
void
setLevel
(int level) void
setPackageName
(String packageName) void
void
setTranslationKeyPrefixes
(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. Iflangs
isnull
or empty, the terms are assumed to be in the system language. Set this element andtranslationKeyPrefixes
tonull
or empty, if all terms should be returned.The terms also act as prefixes for keys stored in property files used for translation. Alternatively, member
translationKeyPrefixes
can be used to search over property files. To get the entire content of this files, set this member ortranslationKeyPrefixes
toFindTranslateTermInfoC.ALL_TRANSLATIONS_FROM_PROPERY_FILES
.- See Also:
-
langs
Return the terms specified by elementterms
for 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 intranslationKeyPrefixes
is 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
-
-
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) -
toString
-