Class L10n


  • public final class L10n
    extends Object
    This class provider methods for localization (L10n) services.
    • Method Detail

      • getInstance

        public static L10n getInstance()
        Get instance of L10n using contextual locale.
        Returns:
        L10n instance for the context
      • getInstance

        public static L10n getInstance​(Locale locale)
        Get instance of L10n for the given locale.
        Parameters:
        locale - the locale instance
        Returns:
        L10n instance for the given locale
      • format

        public String format​(Number value)
        Format the number value.
        Parameters:
        value - the value to format
        Returns:
        value as formated string
      • format

        public String format​(Number value,
                             boolean grouping)
        Format the number value.
        Parameters:
        value - the value to format
        grouping - whether to use grouping in format
        Returns:
        value as formated string
      • format

        public String format​(LocalDate value)
        Format the date value.
        Parameters:
        value - the value to format
        Returns:
        value as formated string
      • format

        public String format​(LocalTime value)
        Format the time value.
        Parameters:
        value - the value to format
        Returns:
        value as formated string
      • format

        public String format​(LocalDateTime value)
        Format the date time value.
        Parameters:
        value - the value to format
        Returns:
        value as formated string
      • format

        public String format​(ZonedDateTime value)
        Format the date time value.
        Parameters:
        value - the value to format
        Returns:
        value as formated string