* Translations:

- Use JVM language name if available
  - Correct Estonian language code from ee to et
This commit is contained in:
zzz
2013-01-29 13:44:36 +00:00
parent 95d0dc0419
commit 78dcfd830c
7 changed files with 41 additions and 5 deletions

View File

@@ -39,4 +39,17 @@ public class Messages extends Translate {
public static String getString(int n, String s, String p, I2PAppContext ctx) {
return Translate.getString(n, s, p, ctx, BUNDLE_NAME);
}
/**
* Return the "display language", e.g. "English" for the language specified
* by langCode, using the current language.
* Uses translation if available, then JVM Locale.getDisplayLanguage() if available, else default param.
*
* @param langCode two-letter lower-case
* @param dflt e.g. "English"
* @since 0.9.5
*/
public static String getDisplayLanguage(String langCode, String dflt, I2PAppContext ctx) {
return Translate.getDisplayLanguage(langCode, dflt, ctx, BUNDLE_NAME);
}
}