private static String getRecommendedFontName() { String fontName = null; String language = ApplicationSettings.getLanguage(); if (language != null) { if (language.startsWith("ja")) { // Meiryo for Japanese fontName = "Meiryo"; } else if (language.startsWith("ko")) { // Malgun Gothic for Korean fontName = "Malgun Gothic"; } else if (language.startsWith("zh")) { // Microsoft JhengHei for Chinese (Traditional) // Microsoft YaHei for Chinese (Simplified) fontName = "Microsoft JhengHei"; } else if (language.startsWith("he")) { // Gisha for Hebrew fontName = "Gisha"; } else if (language.startsWith("th")) { // Leelawadee for Thai fontName = "Leelawadee"; } } return fontName; }
/* * Examples of when this returns true * given == lang in app * es_ve == es_ve * es == es_ve * * == es_ve */ private boolean isMessageEligibleForMyLang(String lang) { if (lang == null || lang.equals("*")) return true; String langinapp = ApplicationSettings.getLanguage().toLowerCase(); if (lang.length() == 2) return langinapp.toLowerCase().startsWith(lang.toLowerCase()); return lang.equalsIgnoreCase(langinapp); }