作者:QQ文科 | 来源:互联网 | 2024-10-18 13:06
本文整理了Java中java.text.MessageFormat.getLocale()
方法的一些代码示例,展示了MessageFormat.getLocale()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MessageFormat.getLocale()
方法的具体详情如下:
包路径:java.text.MessageFormat
类名称:MessageFormat
方法名:getLocale
[英]Returns the locale used when creating formats.
[中]返回创建格式时使用的区域设置。
代码示例
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base
/**
* Returns the locale that's used when creating or comparing subformats.
*
* @return the locale used when creating or comparing subformats
* @stable ICU 3.0
*/
public Locale getLocale() {
return messageFormat.getLocale();
}
代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base
/**
* Returns the locale that's used when creating or comparing subformats.
*
* @return the locale used when creating or comparing subformats
* @stable ICU 3.0
*/
public Locale getLocale() {
return messageFormat.getLocale();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors
/**
* If a class loader is not passed in, I will only be able to fetch ResourceBundles that
* are reachable from MY class loader. This is due to a bug in ResourceBundle that
* goes up the stack only 2 levels in order to find the appropriate class loader.
* Since I provide a level of indirection, I will ALWAYS be the callee, and therefore
* at the 2nd level.
* See source for ResourceBundle.getBundle() ResourceBundle.getLoader().
*
* @param baseName
*/
public void init(String baseName, ClassLoader classLoader) {
rb = ResourceBundle.getBundle(baseName, mf.getLocale(), classLoader);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-jsfsupport-designtime
/**
* If a class loader is not passed in, I will only be able to fetch ResourceBundles that
* are reachable from MY class loader. This is due to a bug in ResourceBundle that
* goes up the stack only 2 levels in order to find the appropriate class loader.
* Since I provide a level of indirection, I will ALWAYS be the callee, and therefore
* at the 2nd level.
* See source for ResourceBundle.getBundle() ResourceBundle.getLoader().
*
* @param baseName
*/
public void init(String baseName, ClassLoader classLoader) {
rb = ResourceBundle.getBundle(baseName, mf.getLocale(), classLoader);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors
/**
* If a class loader is not passed in, I will only be able to fetch ResourceBundles that
* are reachable from MY class loader. This is due to a bug in ResourceBundle that
* goes up the stack only 2 levels in order to find the appropriate class loader.
* Since I provide a level of indirection, I will ALWAYS be the callee, and therefore
* at the 2nd level.
* See source for ResourceBundle.getBundle() ResourceBundle.getLoader().
*
* @param baseName
*/
public void init(String baseName, ClassLoader classLoader) {
rb = ResourceBundle.getBundle(baseName, mf.getLocale(), classLoader);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base
/**
* {@icu} Returns the locale that's used when creating or comparing subformats.
*
* @return the locale used when creating or comparing subformats
* @stable ICU 3.2
*/
public ULocale getULocale() {
return ULocale.forLocale(messageFormat.getLocale());
}
代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base
/**
* {@icu} Returns the locale that's used when creating or comparing subformats.
*
* @return the locale used when creating or comparing subformats
* @stable ICU 3.2
*/
public ULocale getULocale() {
return ULocale.forLocale(messageFormat.getLocale());
}