Package org.javlo.helper
Class I18NHelper
- java.lang.Object
-
- org.javlo.helper.I18NHelper
-
public class I18NHelper extends Object
- Author:
- pvandermaesen help to translate array and other object structure
-
-
Constructor Summary
Constructors Constructor Description I18NHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[][]
translateArray(GlobalContext globalContext, javax.servlet.http.HttpSession session, String[] keys, String prefix)
translate a array to a double arraystatic String[][]
translateArrayInView(GlobalContext globalContext, javax.servlet.http.HttpSession session, String[] keys, String prefix)
translate a array to a double array
-
-
-
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 keysprefix
- 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 websitesession
- user sessionkeys
- a list of keysprefix
- 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
-
-