Class XLanguageUtils


  • public class XLanguageUtils
    extends Object
    Utility class for providing default languages
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getAvailableDefaultLanguages

        public static final Map<String,​String> getAvailableDefaultLanguages​(Locale displayLocale)
        Returns a map of language display names and their IETF BCP 47 language tag
        Parameters:
        displayLocale - Locale to be used for displaying the languages
        Returns:
        Map of language display names and their well-formed IETF BCP 47 language tag
      • parseLongOrNull

        public static Long parseLongOrNull​(String value)
        Parses the value as a long, if possible, or returns null if it cannot be parsed.
        Parameters:
        value - Value to parse.
        Returns:
        The long represented by the string, or null when the string does not represent a valid long.
      • parseIntOrNull

        public static Integer parseIntOrNull​(String value)
        Parses the value as an integer, if possible, or returns null if it cannot be parsed.
        Parameters:
        value - Value to parse.
        Returns:
        The integer represented by the string, or null when the string does not represent a valid integer.