Module tvbrowser
Package util.i18n

Class PooledLocalizer


  • public class PooledLocalizer
    extends Localizer
    localizer using the String pool for all messages. You should use this instead of the standard localizer if your object will be instantiated many times with the same constant strings
    Author:
    bananeweizen
    • Method Detail

      • getLocalizerFor

        public static Localizer getLocalizerFor​(java.lang.Class<?> clazz)
      • msg

        public java.lang.String msg​(java.lang.String key,
                                    java.lang.String defaultMsg)
        Description copied from class: Localizer
        Gets a localized message.
        Overrides:
        msg in class Localizer
        Parameters:
        key - The key of the message.
        defaultMsg - The default message (English)
        Returns:
        a localized message.
      • msg

        public java.lang.String msg​(java.lang.String key,
                                    java.lang.String defaultMsg,
                                    boolean warn)
        Description copied from class: Localizer
        Gets a localized message.
        Overrides:
        msg in class Localizer
        Parameters:
        key - The key of the message.
        defaultMsg - The default message (English)
        warn - If warnings should be logged if key is not found.
        Returns:
        a localized message.
      • msg

        public java.lang.String msg​(java.lang.String key,
                                    java.lang.String defaultMsg,
                                    java.lang.Object... args)
        Description copied from class: Localizer
        Gets a localized message.
        Overrides:
        msg in class Localizer
        Parameters:
        key - The key of the message.
        defaultMsg - The default message. (English)
        args - The arguments that should replace the appropriate place holder. See MessageFormat for details.
        Returns:
        a localized message.