套件 | mx.resources |
類別 | public class Locale |
繼承 | Locale Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
"en_US_MAC"
into its three parts: a language code, a country code, and a variant.
The localization APIs in the IResourceManager and IResourceBundle interfaces use locale Strings rather than Locale instances, so this class is seldom used in an application.
相關 API 元素
公用屬性
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
country : String [唯讀]
The country code of this Locale instance. | Locale | ||
language : String [唯讀]
The language code of this Locale instance. | Locale | ||
variant : String [唯讀]
The variant part of this Locale instance. | Locale |
公用方法
方法 | 定義自 | ||
---|---|---|---|
Constructor. | Locale | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
Returns the locale String that was used to construct
this Locale instance. | Locale | ||
會傳回指定之物件的基本值。 | Object |
屬性詳細資訊
country | 屬性 |
language | 屬性 |
variant | 屬性 |
建構函式詳細資料
Locale | () | 建構函式 |
public function Locale(localeString:String)
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor.
參數localeString:String — A 1-, 2-, or 3-part locale String,
such as "en" , "en_US" , or "en_US_MAC" .
The parts are separated by underscore characters.
The first part is a two-letter lowercase language code
as defined by ISO-639, such as "en" for English.
The second part is a two-letter uppercase country code
as defined by ISO-3166, such as "US" for the United States.
The third part is a variant String, which can be used
to optionally distinguish multiple locales for the same language and country.
It is sometimes used to indicate the operating system
that the locale should be used with, such as "MAC" , "WIN" , or "UNIX" .
|
方法詳細資訊
toString | () | 方法 |
public function toString():String
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Returns the locale String that was used to construct this Locale instance. For example:
var locale:Locale = new Locale("en_US_MAC"); trace(locale.toString()); // outputs "en_US_MAC"傳回值
String — Returns the locale String that was used to
construct this Locale instance.
|
Tue Jun 12 2018, 03:47 PM Z