Class LanguageMatch

java.lang.Object
com.iizix.selector.LanguageMatch

public class LanguageMatch extends Object
Language match class.
Author:
Christopher Mindus
  • Field Details

    • countryNames

      public static final Map<String,String> countryNames
      Read-only map with upper case valid country codes 2 letters, mapped to country name.
  • Constructor Details

    • LanguageMatch

      public LanguageMatch()
  • Method Details

    • match

      public static boolean match(EnvProps envProps, String match)
      Matches a language.
      Parameters:
      envProps - The Client environment properties.
      match - The match string.
      Returns:
      true for match, false otherwise.
    • exists

      public static boolean exists(String match)
      Checks if the match string exists.
      Parameters:
      match - The match string is case insensitive.
      Returns:
      true if it exists, false otherwise.
    • getDescription

      public static String getDescription(String match)
      Gets the language description for a string. This method is typically used in the Designer.
      Parameters:
      match - The match string is case insensitive.
      Returns:
      The description of the language matching, null for none.
    • getMap

      public static Map<String,String> getMap()
      Gets the map of languages that can match with this class.
      Returns:
      An unmodifiable map with the string match as keys and descriptions as values, sorted by keys. Please note that the map is using CASE SENSITIVE Language Codes. Use the method getMapLowerCase() to get the language codes in lower case.
    • getMapLowerCase

      public static Map<String,String> getMapLowerCase()
      Gets the map of languages with the Language Codes in its proper character case.
      Returns:
      An unmodifiable map with the string match as keys and descriptions as values, sorted by keys. Please note that the map is using LOWER CASE Language Codes. Use the method getMap() to get the map using real case of the language codes.
    • getSimpleMap

      public static Map<String,String> getSimpleMap()
      Gets the map of simple languages with the Language Codes in its proper character case.
      Returns:
      An unmodifiable map with the string match as keys and descriptions as values, sorted by keys. Please note that the map is using CASE SENSITIVE Language Codes. Use the method getSimpleMapLowerCase() to get the language codes in lower case.
    • getSimpleMapLowerCase

      public static Map<String,String> getSimpleMapLowerCase()
      Gets the map of simple languages with the Language Codes in LOWER CASE.
      Returns:
      An unmodifiable map with the string match IN LOWER CASE as keys and descriptions as values, sorted by keys. Please note that the map is using LOWER CASE Language Codes. Use the method getSimpleMap() to get the map using real case of the language codes.