本文整理汇总了Java中com.ibm.icu.util.ULocale.forLocale方法的典型用法代码示例。如果您正苦于以下问题:Java ULocale.forLocale方法的具体用法?Java ULocale.forLocale怎么用?Java ULocale.forLocale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.icu.util.ULocale
的用法示例。
在下文中一共展示了ULocale.forLocale方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TimeUnitFormat
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Create TimeUnitFormat given a Locale and a formatting style.
* @deprecated ICU 53 use {@link MeasureFormat} instead.
*/
@Deprecated
public TimeUnitFormat(Locale locale, int style) {
this(ULocale.forLocale(locale), style);
}
示例2: getConverter
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
private ReportParameterConverter getConverter(String format)
{
com.ibm.icu.util.TimeZone icuTimeZone = com.ibm.icu.util.TimeZone.getTimeZone(CurrentTimeZone.get().getID());
return new ReportParameterConverter(format, ULocale.forLocale(CurrentLocale.getLocale()), icuTimeZone);
}
示例3: ChineseDateFormat
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Construct a ChineseDateFormat from a date format pattern and locale
* @param pattern the pattern
* @param locale the locale
* @deprecated ICU 50
*/
@Deprecated
public ChineseDateFormat(String pattern, Locale locale) {
this(pattern, ULocale.forLocale(locale));
}
示例4: DateIntervalInfo
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Construct DateIntervalInfo for the given {@link java.util.Locale}.
* @param locale the interval patterns are loaded from the appropriate
* calendar data (specified calendar or default calendar)
* in this locale.
* @stable ICU 54
*/
public DateIntervalInfo(Locale locale)
{
this(ULocale.forLocale(locale));
}
示例5: StringSearch
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Initializes the iterator to use the language-specific rules and
* break iterator rules defined in the argument locale to search for
* argument pattern in the argument target text.
* @param pattern text to look for.
* @param target target text to search for pattern.
* @param locale locale to use for language and break iterator rules
* @throws IllegalArgumentException thrown when argument target is null,
* or of length 0. ClassCastException thrown if the collator for
* the specified locale is not a RuleBasedCollator.
* @stable ICU 2.0
*/
public StringSearch(String pattern, CharacterIterator target, Locale locale) {
this(pattern, target, ULocale.forLocale(locale));
}
示例6: AlphabeticIndex
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Create the index object.
*
* @param locale
* The locale for the index.
* @stable ICU 4.8
*/
public AlphabeticIndex(Locale locale) {
this(ULocale.forLocale(locale), null);
}
示例7: RuleBasedNumberFormat
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Creates a RuleBasedNumberFormat that behaves according to the description
* passed in. The formatter uses the specified locale to determine the
* characters to use when formatting in numerals, and to define equivalences
* for lenient parsing.
* @param description A description of the formatter's desired behavior.
* See the class documentation for a complete explanation of the description
* syntax.
* @param locale A locale, which governs which characters are used for
* formatting values in numerals, and which characters are equivalent in
* lenient parsing.
* @stable ICU 2.0
*/
public RuleBasedNumberFormat(String description, Locale locale) {
this(description, ULocale.forLocale(locale));
}
示例8: DateFormatSymbols
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Constructs a DateFormatSymbols object by loading format data from
* resources for the given locale.
*
* @throws java.util.MissingResourceException if the resources for the specified
* locale cannot be found or cannot be loaded.
* @stable ICU 2.0
*/
public DateFormatSymbols(Locale locale)
{
this(ULocale.forLocale(locale));
}
示例9: ChineseDateFormatSymbols
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Construct a ChineseDateFormatSymbols for the provided locale.
* @param locale the locale
* @deprecated ICU 50
*/
@Deprecated
public ChineseDateFormatSymbols(Locale locale) {
super(ChineseCalendar.class, ULocale.forLocale(locale));
}
示例10: PluralFormat
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Creates a new cardinal-number <code>PluralFormat</code> for a given
* {@link java.util.Locale}.
* @param locale the <code>PluralFormat</code> will be configured with
* rules for this locale. This locale will also be used for standard
* number formatting.
* @stable ICU 54
*/
public PluralFormat(Locale locale) {
this(ULocale.forLocale(locale));
}
示例11: SimpleDateFormat
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Constructs a SimpleDateFormat using the given pattern and locale.
* <b>Note:</b> Not all locales support SimpleDateFormat; for full
* generality, use the factory methods in the DateFormat class.
* @stable ICU 2.0
*/
public SimpleDateFormat(String pattern, Locale loc)
{
this(pattern, null, null, null, ULocale.forLocale(loc), true, null);
}
示例12: getInstance
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Create a CompactDecimalFormat appropriate for a locale. The result may
* be affected by the number system in the locale, such as ar-u-nu-latn.
*
* @param locale the desired locale
* @param style the compact style
* @stable ICU 50
*/
public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) {
return new CompactDecimalFormat(ULocale.forLocale(locale), style);
}
示例13: MessageFormat
import com.ibm.icu.util.ULocale; //导入方法依赖的package包/类
/**
* Constructs a MessageFormat for the specified locale and
* pattern.
* Sets the locale and calls applyPattern(pattern).
*
* @param pattern the pattern for this message format
* @param locale the locale for this message format
* @exception IllegalArgumentException if the pattern is invalid
* @stable ICU 3.0
*/
public MessageFormat(String pattern, Locale locale) {
this(pattern, ULocale.forLocale(locale));
}