Class I18nConstants

  • Direct Known Subclasses:
    I18nUtil

    public abstract class I18nConstants
    extends java.lang.Object
    Constants used in JCMS internationalization.
    Since:
    jcms-8.0.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String LANGUAGE_PROPERTIES_FILENAME_REGEX
      Regular expression suitable to match valid language properties filename.
      static java.util.ResourceBundle.Control PROPERTIES_ONLY_NO_FALLBACK_CONTROL
      ResourceBundle.Control instance ensuring that bundle search is performed only in Properties file and that the system default locale is not used during Bundle search as a fallback.
    • Constructor Summary

      Constructors 
      Constructor Description
      I18nConstants()  
    • Method Summary

      • Methods inherited from class java.lang.Object

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

      • LANGUAGE_PROPERTIES_FILENAME_REGEX

        public static final java.lang.String LANGUAGE_PROPERTIES_FILENAME_REGEX
        Regular expression suitable to match valid language properties filename.

        Example of use :

         File[] langPropFiles = langDir.listFiles(new FilenameFilter() {
           public boolean accept(File dir, String name) {
             return name.matches(I18nConstants.LANGUAGE_PROPERTIES_FILENAME_REGEX);
           }
         });
         
        Since:
        jcms-8.0.1
        See Also:
        Constant Field Values
      • PROPERTIES_ONLY_NO_FALLBACK_CONTROL

        public static final java.util.ResourceBundle.Control PROPERTIES_ONLY_NO_FALLBACK_CONTROL
        ResourceBundle.Control instance ensuring that bundle search is performed only in Properties file and that the system default locale is not used during Bundle search as a fallback.
          ResourceBundle bundle = ResourceBundle.getBundle("Messages", locale, 
                                                           I18nConstants.PROPERTIES_ONLY_NO_FALLBACK_CONTROL);
         
        Since:
        jcms-8.0.1
        See Also:
        ResourceBundle.getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
    • Constructor Detail

      • I18nConstants

        public I18nConstants()