Lines Matching full:encoding
72 * Returns an array of strings containing the locale encoding (e.g. 'en_US', 'de', etc.)
74 * which unique translation of resource bundle items are possible. If a locale encoding is
146 * Given a locale encoding, returns the language portion of that encoding.
151 public static String getLanguage(String encoding) { in getLanguage() argument
152 if (encoding == null) return null; in getLanguage()
153 if (encoding.indexOf("_") < 0) return encoding.trim(); in getLanguage()
154 return encoding.substring(0, encoding.indexOf("_")); in getLanguage()
158 * Given a locale encoding, returns the country portion of that encoding.
165 public static String getCountry(String encoding) { in getCountry() argument
166 if (encoding == null) return null; in getCountry()
167 if (encoding.indexOf("_") < 0) return null; in getCountry()
168 String result = encoding.substring(encoding.indexOf("_")+1, encoding.length()); in getCountry()
170 return result.substring(0, encoding.indexOf("_")); in getCountry()
174 * Given a locale encoding, returns the variant portion of that encoding.
181 public static String getVariant(String encoding) { in getVariant() argument
182 RBManagerGUI.debugMsg(encoding); in getVariant()
183 if (encoding == null) return null; in getVariant()
184 if (encoding.indexOf("_") < 0) return null; in getVariant()
185 String result = encoding.substring(encoding.indexOf("_")+1, encoding.length()); in getVariant()