Package graphql.i18n

Class I18n


  • public class I18n
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  I18n.BundleType
      This enum is a type safe way to control what resource bundle to load from
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected I18n​(I18n.BundleType bundleType, java.util.Locale locale)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Locale getLocale()  
      java.util.ResourceBundle getResourceBundle()  
      static I18n i18n​(I18n.BundleType bundleType, java.util.Locale locale)  
      java.lang.String msg​(java.lang.String msgKey, java.lang.Object... msgArgs)
      Creates an I18N message using the key and arguments
      java.lang.String msg​(java.lang.String msgKey, java.util.List<java.lang.Object> msgArgs)
      Creates an I18N message using the key and arguments
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • I18n

        protected I18n​(I18n.BundleType bundleType,
                       java.util.Locale locale)
    • Method Detail

      • getLocale

        public java.util.Locale getLocale()
      • getResourceBundle

        public java.util.ResourceBundle getResourceBundle()
      • msg

        public java.lang.String msg​(java.lang.String msgKey,
                                    java.lang.Object... msgArgs)
        Creates an I18N message using the key and arguments
        Parameters:
        msgKey - the key in the underlying message bundle
        msgArgs - the message arguments
        Returns:
        the formatted I18N message
      • msg

        public java.lang.String msg​(java.lang.String msgKey,
                                    java.util.List<java.lang.Object> msgArgs)
        Creates an I18N message using the key and arguments
        Parameters:
        msgKey - the key in the underlying message bundle
        msgArgs - the message arguments
        Returns:
        the formatted I18N message