Class I18NHelper


  • public class I18NHelper
    extends Object
    Author:
    pvandermaesen help to translate array and other object structure
    • Constructor Detail

      • I18NHelper

        public I18NHelper()
    • Method Detail

      • translateArray

        public static final String[][] translateArray​(GlobalContext globalContext,
                                                      javax.servlet.http.HttpSession session,
                                                      String[] keys,
                                                      String prefix)
                                               throws FileNotFoundException,
                                                      IOException
        translate a array to a double array
        Parameters:
        keys - a list of keys
        prefix - the prefix of the translation key ( sp. : content.web )
        request - the current request for resource access
        Returns:
        a dbl tab with key in first index and translation in the second index.
        Throws:
        IOException
        FileNotFoundException
      • translateArrayInView

        public static final String[][] translateArrayInView​(GlobalContext globalContext,
                                                            javax.servlet.http.HttpSession session,
                                                            String[] keys,
                                                            String prefix)
                                                     throws FileNotFoundException,
                                                            IOException
        translate a array to a double array
        Parameters:
        globalContext - the context of current website
        session - user session
        keys - a list of keys
        prefix - the prefix of the translation key ( sp. : content.web )
        Returns:
        a dbl tab with key in first index and translation in the second index.
        Throws:
        IOException
        FileNotFoundException