/** lang in routerconsole.lang property, else current locale */ public static String getString(String key, I2PAppContext ctx, String bun) { if (key == null) { (new NullPointerException("null translation string")).printStackTrace(); return ""; } String lang = getLanguage(ctx); if (lang.equals("en")) return key; else if (lang.equals(TEST_LANG)) return TEST_STRING; // shouldnt happen but dont dump the po headers if it does if (key.equals("")) return key; ResourceBundle bundle = findBundle(bun, lang, getCountry(ctx)); if (bundle == null) return key; try { return bundle.getString(key); } catch (MissingResourceException e) { return key; } }
ResourceBundle bundle = null; if (!lang.equals("en")) bundle = findBundle(bun, lang, getCountry(ctx)); String x; if (bundle == null)