Package com.iizix.text
Enum Class LocaleString
- All Implemented Interfaces:
- IEnumLocaleKString,- IEnumLocaleString,- Serializable,- Comparable<LocaleString>,- Constable
The LocaleString enum that hold strings in various languages. The strings are placed in predefined system text tables the predefined "builtin" project. When using these texts, they automatically search for these ID's defined in the user application's text tables that are flagged to also handle LocaleString's. This makes it possible to have custom text replacements and/or additional translations into other languages not provided in the system.
Other text IDs are also present in:
- PasswordPolicyResult,
- SigninResult,
- AuthenticationProvider,
- IPropReference.RefType,
- References.ReturnCode,
- EnvProps.ClientCapability.
- Messages.
The ID for each entry is prepended with "sys." for the text tables. These are the defined texts:
 Text ID                           Fallback English text
 --------------------------------  ---------------------------------
 
 General:
   sys.ValueConversionError_HTML   [b]Input error[/b][br]{}  (in HTML, "Input error: {}" for PLAIN).
   sys.ValueConversionError_PLAIN  Input error: {}
 Actions:
   sys.Action_OK                   OK
   sys.Action_Cancel               Cancel
   sys.Action_Close                Close
   sys.Action_Yes                  Yes
   sys.Action_No                   No
   sys.Action_Confirm              Confirm
   sys.Action_Continue             Continue
   sys.Action_Abort                Abort
 Time:
   sys.Time_short_now              now
   sys.Time_medium_now             now
   sys.Time_long_now               just now
   
   sys.Time_short_less_than_1_minute   < 1 m
   sys.Time_medium_less_than_1_minute  < 1 min
   sys.Time_long_less_than_1_minute    less than a minute
   sys.Time_short_less_than_1_hour     < 1 h
   sys.Time_medium_less_than_1_hour    < 1 hour
   sys.Time_long_less_than_1_hour      less than a minute
   sys.Time_short_less_than_1_day      < 1 d
   sys.Time_medium_less_than_1_day     < 1 day
   sys.Time_long_less_than_1_day       less than a day
   sys.Time_short_less_than_1_week     < 1 w
   sys.Time_medium_less_than_1_week    < 1 week
   sys.Time_long_less_than_1_week      less than a week
   sys.Time_short_less_than_1_year     < 1 y
   sys.Time_medium_less_than_1_year    < 1 year
   sys.Time_long_less_than_1_year      less than a year
  
   sys.Time_short_Second           s
   sys.Time_short_Seconds          s
   sys.Time_medium_Second          sec
   sys.Time_medium_Seconds         secs
   sys.Time_long_Second            second
   sys.Time_long_Second_1          one second
   sys.Time_long_Seconds           seconds
    
   sys.Time_short_Minute           m
   sys.Time_short_Minutes          m
   sys.Time_medium_Minute          min
   sys.Time_medium_Minutes         mins
   sys.Time_long_Minute            minute
   sys.Time_long_Minute_1          one minute
   sys.Time_long_Minutes           minutes
    
   sys.Time_short_Hour             h
   sys.Time_short_Hours            h
   sys.Time_medium_Hour            hour
   sys.Time_medium_Hours           hours
   sys.Time_long_Hour              hour
   sys.Time_long_Hour_1            one hour
   sys.Time_long_Hours             hours
    
   sys.Time_short_Day              d
   sys.Time_short_Days             d
   sys.Time_medium_Day             day
   sys.Time_medium_Days            days
   sys.Time_long_Day               day
   sys.Time_long_Day_1             one day
   sys.Time_long_Days              days
   
   sys.Time_short_Week             w
   sys.Time_short_Weeks            w
   sys.Time_medium_Week            week
   sys.Time_medium_Weeks           weeks
   sys.Time_long_Week              week
   sys.Time_long_Week_1            one week
   sys.Time_long_Weeks             weeks
   
   sys.Time_short_Week             y
   sys.Time_short_Weeks            y
   sys.Time_medium_Week            year
   sys.Time_medium_Weeks           years
   sys.Time_long_Week              year
   sys.Time_long_Week_1            one year
   sys.Time_long_Weeks             years
   
 Distance:
   sys.Distance_short_near         near
   sys.Distance_long_near          close by
   
   sys.Distance_short_meter        m
   sys.Distance_short_meters       m
   sys.Distance_long_meter         one meter
   sys.Distance_long_meters        meters
   
   sys.Distance_short_kilometer    m
   sys.Distance_short_kilometers   m
   sys.Distance_long_kilometer     one kilometer
   sys.Distance_long_kilometers    kilometers
 Device capabilities:
   devcap.Phone                    Phone capabilities (smart or feature phone)
   devcap.Battery                  Battery status capabilities
   devcap.Contacts                 Contacts database capabilities
   devcap.Compass                  Compass capabilities
   devcap.Camera                   Camera capabilities
   devcap.Geolocation              Geolocation capabilities
   devcap.GPS                      GPS capabilities
   devcap.Touch                    Touch capabilities
   devcap.Mouse                    Mouse capabilities (Desktop device)
   devcap.Pen                      Pen capabilities
   devcap.Motion                   Motion capabilities (accelerometer)
   devcap.Microphone               Microphone (sound capture) capabilities
   devcap.VideoCapture             Video capture capabilities
   devcap.Sound                    Play music or basic sounds capabilities
   devcap.SpeechSynthesis          Speech synthesis (speech output)
   devcap.SpeechRecognition        Speech recognition (for commands and text input)
   devcap.Vibration                Vibration capabilities
 - Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from class java.lang.Enum- Enum.EnumDesc<E extends Enum<E>>
- Enum Constant SummaryEnum ConstantsEnum ConstantDescription"Abort" text for actions."Cancel" text for actions."Close" text for actions."Confirm" text for actions."Continue" text for actions."No" text for actions."OK" text for actions."Yes" text for actions.The message for an invalid value conversion in HTML: "[b]Input error[/b][br]".The message for an invalid value conversion in plain text: "Input error: ".
- Field SummaryFields
- Method SummaryModifier and TypeMethodDescription- static KString- asKString- (SessionInfo sessionInfo, String textID) Looks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- static KString- asKString- (SessionInfo sessionInfo, String textID, KString fallback) Looks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- static KString- asKString- (ILocaleString localeString, String textID, KString fallback) Looks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- static KStringLooks up a text ID from the system tables.- static KStringLooks up a text ID from the system tables.- static String- asString- (SessionInfo sessionInfo, String textID) Looks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- static String- asString- (SessionInfo sessionInfo, String textID, String fallback) Looks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- static String- asString- (ILocaleString localeString, String textID, String fallback) Looks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- static StringLooks up a text ID from the system tables.- static StringLooks up a text ID from the system tables.Gets the fallback String.- getID()Gets the text ID.Gets the fallback KString.- static LocaleStringReturns the enum constant of this class with the specified name.- static LocaleString[]- values()Returns an array containing the constants of this enum class, in the order they are declared.- Methods inherited from class java.lang.Enum- clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf- Methods inherited from interface com.iizix.text.IEnumLocaleKString- asKString, asKString- Methods inherited from interface com.iizix.text.IEnumLocaleString- asString, asString, asString, name, ordinal, valuesList
- Enum Constant Details- ValueConversionError_HTMLThe message for an invalid value conversion in HTML: "[b]Input error[/b][br]".
- ValueConversionError_PLAINThe message for an invalid value conversion in plain text: "Input error: ".
- Action_OK"OK" text for actions.
- Action_Cancel"Cancel" text for actions.
- Action_Close"Close" text for actions.
- Action_Yes"Yes" text for actions.
- Action_No"No" text for actions.
- Action_Confirm"Confirm" text for actions.
- Action_Continue"Continue" text for actions.
- Action_Abort"Abort" text for actions.
- Time_short_now
- Time_medium_now
- Time_long_now
- Time_short_less_than_1_minute
- Time_medium_less_than_1_minute
- Time_long_less_than_1_minute
- Time_short_less_than_1_hour
- Time_medium_less_than_1_hour
- Time_long_less_than_1_hour
- Time_short_less_than_1_day
- Time_medium_less_than_1_day
- Time_long_less_than_1_day
- Time_short_less_than_1_week
- Time_medium_less_than_1_week
- Time_long_less_than_1_week
- Time_short_less_than_1_year
- Time_medium_less_than_1_year
- Time_long_less_than_1_year
- Time_short_Second
- Time_short_Seconds
- Time_medium_Second
- Time_medium_Seconds
- Time_long_Second
- Time_long_Second_1
- Time_long_Seconds
- Time_short_Minute
- Time_short_Minutes
- Time_medium_Minute
- Time_medium_Minutes
- Time_long_Minute
- Time_long_Minute_1
- Time_long_Minutes
- Time_short_Hour
- Time_short_Hours
- Time_medium_Hour
- Time_medium_Hours
- Time_long_Hour
- Time_long_Hour_1
- Time_long_Hours
- Time_short_Day
- Time_short_Days
- Time_medium_Day
- Time_medium_Days
- Time_long_Day
- Time_long_Day_1
- Time_long_Days
- Time_short_Week
- Time_short_Weeks
- Time_medium_Week
- Time_medium_Weeks
- Time_long_Week
- Time_long_Week_1
- Time_long_Weeks
- Time_short_Year
- Time_short_Years
- Time_medium_Year
- Time_medium_Years
- Time_long_Year
- Time_long_Year_1
- Time_long_Years
- Distance_short_near
- Distance_long_near
- Distance_short_less_than_1_kilometer
- Distance_long_less_than_1_kilometer
- Distance_short_meter
- Distance_short_meters
- Distance_long_meter
- Distance_long_meter_1
- Distance_long_meters
- Distance_short_kilometer
- Distance_short_kilometers
- Distance_long_kilometer
- Distance_long_kilometer_1
- Distance_long_kilometers
 
- Field Details- fallbackThe fallback text.
- idThe ID for the item to use when looking up the item in a text table.
 
- Method Details- valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- getIDGets the text ID.- Specified by:
- getIDin interface- IEnumLocaleString
- Returns:
- The text ID string.
 
- getFallbackGets the fallback String.- Specified by:
- getFallbackin interface- IEnumLocaleString
- Returns:
- The fallback string.
 
- getKStringFallbackGets the fallback KString.- Specified by:
- getKStringFallbackin interface- IEnumLocaleKString
- Returns:
- The fallback KString.
 
- asStringLooks up a text ID from the system tables. The session information is looked up from the current thread if possible, otherwise the text will not be found.- Parameters:
- textID- The text ID to look-up.
- Returns:
- The potentially localized string or textID "textID" not foundif none is found.
 
- asStringLooks up a text ID from the system tables. The session information is looked up from the current thread if possible, otherwise the text will not be found.- Parameters:
- textID- The text ID to look-up.
- Returns:
- The potentially localized string or the fallbackString, ortextID "textID" not foundif none is found andfallbackisnull.
 
- asStringLooks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- Parameters:
- sessionInfo- The session information, or- nullif not available. if- nullthe system will attempt to look up the current client or application session from the current thread.
- textID- The text ID to look-up.
- Returns:
- The potentially localized string or the fallbackString, ortextID "textID" not foundif none is found.
 
- asStringLooks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- Parameters:
- sessionInfo- The session information, or- nullif not available. if- nullthe system will attempt to look up the current client or application session from the current thread.
- textID- The text ID to look-up.
- fallback- The fallback text, or- nullfor none.
- Returns:
- The potentially localized string or the fallbackString, ortextID "textID" not foundif none is found andfallbackisnull.
 
- asStringLooks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- Parameters:
- localeString- The- localeStringinstance to used for localization, or- nullfor- fallbackreturn value if text ID is not found.
- textID- The text ID to look-up.
- fallback- The fallback string or- nullfor none.
- Returns:
- The potentially localized string or the fallbackString, ortextID "textID" not foundif none is found andfallbackisnull.
 
- asKStringLooks up a text ID from the system tables. The session information is looked up from the current thread if possible, otherwise the text will not be found.- Parameters:
- textID- The text ID to look-up.
- Returns:
- The potentially localized KString or textID "textID" not foundif none is found.
 
- asKStringLooks up a text ID from the system tables. The session information is looked up from the current thread if possible, otherwise the text will not be found.- Parameters:
- textID- The text ID to look-up.
- Returns:
- The potentially localized KString or the fallbackKString, ortextID "textID" not foundif none is found andfallbackisnull.
 
- asKStringLooks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- Parameters:
- sessionInfo- The session information, or- nullif not available. if- nullthe system will attempt to look up the current client or application session from the current thread.
- textID- The text ID to look-up.
- Returns:
- The potentially localized KString or the fallbackKString, ortextID "textID" not foundif none is found.
 
- asKStringLooks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- Parameters:
- sessionInfo- The session information, or- nullif not available. if- nullthe system will attempt to look up the current client or application session from the current thread.
- textID- The text ID to look-up.
- fallback- The fallback text, or- nullfor none.
- Returns:
- The potentially localized KString or the fallbackKString, ortextID "textID" not foundif none is found andfallbackisnull.
 
- asKStringLooks up a text ID from the system tables with an optional- sessionInfoparameter that can be non-null to define the locale, otherwise it is looked up.- Parameters:
- localeString- The- localeStringinstance to used for localization, or- nullfor- fallbackreturn value if text ID is not found.
- textID- The text ID to look-up.
- fallback- The fallback KString or- nullfor none.
- Returns:
- The potentially localized KString or the fallbackKString, ortextID "textID" not foundif none is found andfallbackisnull.