Lines Matching refs: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) {
152 if (encoding == null) return null;
153 if (encoding.indexOf("_") < 0) return encoding.trim();
154 return encoding.substring(0, encoding.indexOf("_"));
158 * Given a locale encoding, returns the country portion of that encoding.
165 public static String getCountry(String encoding) {
166 if (encoding == null) return null;
167 if (encoding.indexOf("_") < 0) return null;
168 String result = encoding.substring(encoding.indexOf("_")+1, encoding.length());
170 return result.substring(0, encoding.indexOf("_"));
174 * Given a locale encoding, returns the variant portion of that encoding.
181 public static String getVariant(String encoding) {
182 RBManagerGUI.debugMsg(encoding);
183 if (encoding == null) return null;
184 if (encoding.indexOf("_") < 0) return null;
185 String result = encoding.substring(encoding.indexOf("_")+1, encoding.length());