Overview | Namespace | Class | 索引 | Help |
PUBLIC MEMBERS: | CLASSES | STRUCTS | UNIONS | ENUMS | TYPEDEFS | METHODS | STATIC METHODS | DATA | STATIC DATA |
PRIVATE MEMBERS: | CLASSES | STRUCTS | UNIONS | ENUMS | TYPEDEFS | METHODS | STATIC METHODS | DATA | STATIC DATA |
:: rtl ::
class OLocale
- Base Classes
- 非,不,無.
- Known Derived Classes
- 非,不,無.
事実上の | abstract | interface | template |
NO | NO | NO | NO |
- Description
- A
OLocale
反対する 代表するs a 明確な/細部 geographical, political, or cultural 地域. An 操作/手術 that 要求するs aOLocale
to 成し遂げる its 仕事 is called 地元の-極度の慎重さを要する and uses theOLocale
to tailor (警察などへの)密告,告訴(状) for the 使用者. For example, 陳列する,発揮するing a number is a 地元の-極度の慎重さを要する 操作/手術--the number should be formatted によれば the customs/条約s of the 使用者's native country, 地域, or culture.You create a
OLocale
反対する using one of the two 建設者s in this class:OLocale(String language, String country) OLocale(String language, String country, String variant)
http://www.ics.uci.edu/pub/ietf/http/関係のある/iso639.txt
The second argument to both 建設者s is a valid ISO Country Code. These codes are the upper-事例/患者 two-letter codes as defined by ISO-3166. You can find a 十分な 名簿(に載せる)/表(にあげる) of these codes at a number of 場所/位置s, such as:
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
The second 建設者 要求するs a third argument--the Variant. The Variant codes are vendor and browser-明確な/細部. For example, use WIN for Windows, MAC for Macintosh, and POSIX for POSIX. Where there are two variants, separate them with an 強調する, and put the most important one first. For example, a 伝統的な Spanish collation might be 言及/関連d, with "ES", "ES", "Traditional_WIN".
Because a
OLocale
反対する is just an identifier for a 地域, no 有効性,効力 check is 成し遂げるd when you 建設する aOLocale
. If you want to see whether particular 資源s are 利用できる for theOLocale
you 建設する, you must query those 資源s. For example, ask theNumberFormat
for the 地元のs it supports using itsgetAvailableLocales
method.
公式文書,認める: When you ask for a 資源 for a particular 地元の, you get 支援する the best 利用できる match, not やむを得ず 正確に what you asked for. For more (警察などへの)密告,告訴(状), look atResourceBundle
.The
OLocale
class 供給するs a number of convenient constants that you can use to createOLocale
反対するs for 一般的に used 地元のs. For example, the に引き続いて creates aOLocale
反対する for the 部隊d 明言する/公表するs:OLocale.US
Once you've created a
OLocale
you can query it for (警察などへの)密告,告訴(状) about itself. UsegetCountry
to get the ISO Country Code andgetLanguage
to get the ISO Language Code. You can usegetDisplayCountry
to get the 指名する of the country suitable for 陳列する,発揮するing to the 使用者. 類似して, you can usegetDisplayLanguage
to get the 指名する of the language suitable for 陳列する,発揮するing to the 使用者. Interestingly, thegetDisplayXXX
methods are themselves 地元の-極度の慎重さを要する and have two 見解/翻訳/版s: one that uses the default 地元の and one that uses the 地元の 明示するd as an argument.The JDK 供給するs a number of classes that 成し遂げる 地元の-極度の慎重さを要する 操作/手術s. For example, the
NumberFormat
class 判型s numbers, 通貨, or 百分率s in a 地元の-極度の慎重さを要する manner. Classes such asNumberFormat
have a number of convenience methods for creating a default 反対する of that type. For example, theNumberFormat
class 供給するs these three convenience methods for creating a defaultNumberFormat
反対する:NumberFormat.getInstance() NumberFormat.getCurrencyInstance() NumberFormat.getPercentInstance()
NumberFormat.getInstance(myLocale) NumberFormat.getCurrencyInstance(myLocale) NumberFormat.getPercentInstance(myLocale)
OLocale
is the 機械装置 for identifying the 肉親,親類d of 反対する (NumberFormat
) that you would like to get. The 地元の is just a 機械装置 for identifying 反対するs, not a コンテナ for the 反対するs themselves.Each class that 成し遂げるs 地元の-極度の慎重さを要する 操作/手術s 許すs you to get all the 利用できる 反対するs of that type. You can 精査する through these 反対するs by language, country, or variant, and use the 陳列する,発揮する 指名するs to 現在の a menu to the 使用者. For example, you can create a menu of all the collation 反対するs suitable for a given language. Such classes must 器具/実施する these three class methods:
public static OLocale[] getAvailableLocales() public static String getDisplayName(OLocale objectLocale, OLocale displayLocale) public static final String getDisplayName(OLocale objectLocale) // getDisplayName will throw MissingResourceException if the 地元の // is not one of the 利用できる 地元のs.
- とじ込み/提出する
- 地元の.hxx
Public Members
-
Methods
OLocale( rtl_Locale * 地元の );
OLocale( const OLocale & obj );OLocale &
操作者=( const OLocale & obj );OUString
getLanguage( ) const;Getter for programmatic 指名する of field, an lowercased two-letter ISO-639 code. OUString
getCountry( ) const;Getter for programmatic 指名する of field, an uppercased two-letter ISO-3166 code. OUString
getVariant( ) const;Getter for programmatic 指名する of field. sal_Int32
hashCode( ) const;Returns the hash code of the 地元の This. sal_Bool
操作者==( const OLocale & obj ) const;rtl_Locale *
getData( ) const;
Static Methods
static OLocale
registerLocale( const OUString & language, const OUString & country, const OUString & variant );建設する a 地元の from language, country, variant. static OLocale
registerLocale( const OUString & language, const OUString & country );建設する a 地元の from language, country. static OLocale
getDefault( );static 無効の
setDefault( const OUString & language, const OUString & country, const OUString & variant );
私的な Members
-
Methods
OLocale( );
Data
rtl_Locale * pData; Must be the first member in this class. OUString 接近 this member with *(rtl_Locale **)&地元の.
Copyright © 2012, The Apache ソフトウェア 創立/基礎, Licensed under the Apache License, 見解/翻訳/版 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache ソフトウェア 創立/基礎. Other 指名するs may be trademarks of their 各々の owners.