热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

java.text.MessageFormat.getLocale()方法的使用及代码示例

本文整理了Java中java.text.MessageFormat.getLocale()方法的一些代码示例,展示了MessageFormat.getLoc

本文整理了Java中java.text.MessageFormat.getLocale()方法的一些代码示例,展示了MessageFormat.getLocale()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MessageFormat.getLocale()方法的具体详情如下:
包路径:java.text.MessageFormat
类名称:MessageFormat
方法名:getLocale

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());
}

推荐阅读
author-avatar
QQ文科
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有