Code example for PropertyResourceBundle

0
     */ 
    private static PropertyResourceBundle bundle;
 
    static { 
        try { 
            bundle = new PropertyResourceBundle(new InputStreamReader(new FileInputStream(
                    String.format("config/%s.properties", Config.DEFAULT.getString("lang", "pl"))),
                    "UTF8")); 
        } catch (IOException e) {
            throw new RuntimeException(e);
        } 
    } 
 
    /** 
     * Alias dla metody translate. 
     * @see I18n#translate 
     */ 
    public static String t(String key, Object... params) {
        return translate(key, params);
    }