当前位置: 首页>>代码示例>>Java>>正文


Java ULocale.forLocale方法代码示例

本文整理汇总了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);
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:9,代码来源:TimeUnitFormat.java

示例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);
}
 
开发者ID:equella,项目名称:Equella,代码行数:6,代码来源:TextBoxBirtType.java

示例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));
 }
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:11,代码来源:ChineseDateFormat.java

示例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));
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:12,代码来源:DateIntervalInfo.java

示例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));
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:16,代码来源:StringSearch.java

示例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);
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:11,代码来源:AlphabeticIndex.java

示例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));
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:17,代码来源:RuleBasedNumberFormat.java

示例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));
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:13,代码来源:DateFormatSymbols.java

示例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));
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:10,代码来源:ChineseDateFormatSymbols.java

示例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));
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:12,代码来源:PluralFormat.java

示例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);
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:11,代码来源:SimpleDateFormat.java

示例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);
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:12,代码来源:CompactDecimalFormat.java

示例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));
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:14,代码来源:MessageFormat.java


注:本文中的com.ibm.icu.util.ULocale.forLocale方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。