Package overit.geocall.lang
Class Lang
java.lang.Object
overit.geocall.lang.Lang
- All Implemented Interfaces:
Serializable
This class implements the Lang object, ie the object that defines a language that can be used in the
application; at each language must correspond a dictionary file, containing the translations of
the static and dynamic content.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected LangTypestatic final StringDefault string that defines the decimal format for the develop languagestatic final StringDefault string that defines the format used for currency by the develop languagestatic final StringDefault string that defines the currency format symbols for the develop languagestatic final StringDefault string that defines the decimal format symbols for the develop languagestatic final StringDefault string that defines the first day of week, that is (m)onday, for the develop languagestatic final LangDefault Langstatic final StringDefault format string used to format the Date by the develop languagestatic final StringDefault string that defines the format used to parse the Date by the develop languagestatic final StringDefault format string used to display hours using 24h or 12h formatprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringReturns the string itself, Null if is emptybooleanintReturns the size of the cache of the Langstatic StringgetCompanyDefaultLangName(Company company, String lang) Extract the name of the system default language starting by the accepted languages provided by the user-agentReturns the email address that will receive the translation hints from the user interaction with the collaborative translation manage pagesReturns the mail sender used to send the email, this will be the email address used to send the hints.Returns the mail service used to send the email, containing the translation hints, sended by the user that interact with the collaborative translation manage pagesReturns the attribute used to assign the IANA code to the LanggetIcon()Return the icon representing the flag of the state in which this language is used.getLabel()Returns the label associated to the LanggetName()Returns the name of the Lang, that corresponds to the name of the dictionary file used for the languagestatic StringgetSystemDefaultLangName(String agentLang) Extract the name of the system default language starting by the accepted languages provided by the user-agentReturns the attribute used to assign the values of each translation to the correct data model fieldgetType()static StringgetWebContextLangName(String agentLang, ServletContext sc) Deprecated, for removal: This API element is subject to removal in a future version.inthashCode()booleanChecks if the Lang is partial, ie if it will highlight with the square brackets the labels that don't have a translationprotected static final booleanlargeequality(Object o1, Object o2) toString()
-
Field Details
-
DEVELOP_LANG
Default Lang -
DEVELOP_SDF_PARSE
Default string that defines the format used to parse the Date by the develop language- See Also:
-
DEVELOP_SDF_FORMAT
Default format string used to format the Date by the develop language- See Also:
-
DEVELOP_TIME_HOUR_SYSTEM
Default format string used to display hours using 24h or 12h format- See Also:
-
DEVELOP_FIRST_DAY_OF_WEEK
Default string that defines the first day of week, that is (m)onday, for the develop language- See Also:
-
DEVELOP_DF
Default string that defines the decimal format for the develop language- See Also:
-
DEVELOP_DF_SYMBOLS
Default string that defines the decimal format symbols for the develop language- See Also:
-
DEVELOP_DF_CURRENCY
Default string that defines the format used for currency by the develop language- See Also:
-
DEVELOP_DF_CURRENCY_SYMBOLS
Default string that defines the currency format symbols for the develop language- See Also:
-
_label
-
_name
-
_ianaCode
-
_icon
-
_type
-
_hintsMailAddress
-
_hintsMailService
-
hintsMailSender
-
_cacheSize
protected int _cacheSize -
_tableSuffix
-
-
Constructor Details
-
Lang
Creates a Lang with the name and the label passed as parameters- Parameters:
name- The name of the lang, that must corresponds to the name of the dictionary file that you want to use for the languagelabel- The label associated to the lang
-
Lang
Creates a Lang starting from theGetterpassed as parameter- Parameters:
g- TheGetterthat stores the information of the language
-
Lang
-
-
Method Details
-
getWebContextLangName
@Deprecated(forRemoval=true) public static String getWebContextLangName(String agentLang, ServletContext sc) Deprecated, for removal: This API element is subject to removal in a future version.usegetSystemDefaultLangName(String)instead- Parameters:
agentLang- the accepted language provided by the browsersc- theServletContext- Returns:
- the name of the system language or null if no match has been found
-
getSystemDefaultLangName
Extract the name of the system default language starting by the accepted languages provided by the user-agent- Parameters:
agentLang- the accepted language provided by the browser- Returns:
- the name of the system language or null if no match has been found
-
getCompanyDefaultLangName
Extract the name of the system default language starting by the accepted languages provided by the user-agent- Parameters:
company- the reference companylang- the desired language- Returns:
- the name of the company language or null if no match has been found
-
deblank
Returns the string itself, Null if is empty- Parameters:
s- The string to investigate- Returns:
- The string itself, Null if is empty
-
getLabel
Returns the label associated to the Lang- Returns:
- The label associated to the Lang
-
getName
Returns the name of the Lang, that corresponds to the name of the dictionary file used for the language- Returns:
- The name of the Lang
-
getHintsMailAddress
Returns the email address that will receive the translation hints from the user interaction with the collaborative translation manage pages- Returns:
- The email address (usually refers to a language expert)
-
getHintsMailService
Returns the mail service used to send the email, containing the translation hints, sended by the user that interact with the collaborative translation manage pages- Returns:
- The mail service
-
getHintsMailSender
Returns the mail sender used to send the email, this will be the email address used to send the hints.- Returns:
- The mail sender used to send the email.
-
getTableSuffix
Returns the attribute used to assign the values of each translation to the correct data model field- Returns:
- The suffix used to point to the correct data model field
-
getCacheSize
public int getCacheSize()Returns the size of the cache of the Lang- Returns:
- The size of the cache (the default value is 600 entries)
-
getIanaCode
Returns the attribute used to assign the IANA code to the Lang- Returns:
- The IANA code of the Lang
-
getIcon
Return the icon representing the flag of the state in which this language is used.- Returns:
- the path of the icon.
-
getType
-
isPartial
public boolean isPartial()Checks if the Lang is partial, ie if it will highlight with the square brackets the labels that don't have a translation- Returns:
trueif the languaga is partial,nullotherwise
-
toString
-
equals
-
hashCode
public int hashCode() -
largeequality
-
getSystemDefaultLangName(String)instead