/** * Looks up the supplied language code in the internally maintained table of * language codes. Returns a DateFormatSymbols object configured with * short month names corresponding to the code. If there is no corresponding * entry in the table, the object returned will be that for * <code>Locale.US</code> * @param languageCode See {@link #setServerLanguageCode(String) serverLanguageCode} * @return a DateFormatSymbols object configured with short month names * corresponding to the supplied code, or with month names for * <code>Locale.US</code> if there is no corresponding entry in the internal * table. */ public static DateFormatSymbols lookupDateFormatSymbols(String languageCode) { Object lang = LANGUAGE_CODE_MAP.get(languageCode); if (lang != null) { if (lang instanceof Locale) { return new DateFormatSymbols((Locale) lang); } else if (lang instanceof String){ return getDateFormatSymbols((String) lang); } } return new DateFormatSymbols(Locale.US); }
String shortmonths = config.getShortMonthNames(); if (shortmonths != null) { dfs = FTPClientConfig.getDateFormatSymbols(shortmonths); } else if (languageCode != null) { dfs = FTPClientConfig.lookupDateFormatSymbols(languageCode);
/** * Looks up the supplied language code in the internally maintained table of * language codes. Returns a DateFormatSymbols object configured with * short month names corresponding to the code. If there is no corresponding * entry in the table, the object returned will be that for * <code>Locale.US</code> * @param languageCode See {@link #setServerLanguageCode(String) serverLanguageCode} * @return a DateFormatSymbols object configured with short month names * corresponding to the supplied code, or with month names for * <code>Locale.US</code> if there is no corresponding entry in the internal * table. */ public static DateFormatSymbols lookupDateFormatSymbols(String languageCode) { Object lang = LANGUAGE_CODE_MAP.get(languageCode); if (lang != null) { if (lang instanceof Locale) { return new DateFormatSymbols((Locale) lang); } else if (lang instanceof String){ return getDateFormatSymbols((String) lang); } } return new DateFormatSymbols(Locale.US); }
/** * Looks up the supplied language code in the internally maintained table of * language codes. Returns a DateFormatSymbols object configured with * short month names corresponding to the code. If there is no corresponding * entry in the table, the object returned will be that for * <code>Locale.US</code> * @param languageCode See {@link #setServerLanguageCode(String) serverLanguageCode} * @return a DateFormatSymbols object configured with short month names * corresponding to the supplied code, or with month names for * <code>Locale.US</code> if there is no corresponding entry in the internal * table. */ public static DateFormatSymbols lookupDateFormatSymbols(String languageCode) { Object lang = LANGUAGE_CODE_MAP.get(languageCode); if (lang != null) { if (lang instanceof Locale) { return new DateFormatSymbols((Locale) lang); } else if (lang instanceof String){ return getDateFormatSymbols((String) lang); } } return new DateFormatSymbols(Locale.US); }
String shortmonths = config.getShortMonthNames(); if (shortmonths != null) { dfs = FTPClientConfig.getDateFormatSymbols(shortmonths); } else if (languageCode != null) { dfs = FTPClientConfig.lookupDateFormatSymbols(languageCode);
String shortmonths = config.getShortMonthNames(); if (shortmonths != null) { dfs = FTPClientConfig.getDateFormatSymbols(shortmonths); } else if (languageCode != null) { dfs = FTPClientConfig.lookupDateFormatSymbols(languageCode);