The classes in the flash.globalization package provide language- and region- or country- specific functionality for string comparison and sorting, conversion of strings to upper and lower case, formatting of dates, times, numbers and currencies, and parsing of numbers and currencies. The classes provide this functionality using the services available on the user's operating system and will thus provide results that the user of the system or device is accustomed to. As a consequence of using the operating system services, the results may differ from one system to another or even from one user to another. If the operating system does not provide a particular service then fallback behavior is provided and a property indicating the status of the last operation is set to provide a warning describing the type of fallback taken.
Each of the main classes (Collator, CurrencyFormatter, DateTimeFormatter, NumberFormatter, StringTools) has a constructor with a parameter that specifies the language, region and other options that determine the behavior of the methods in the class. These items are specified using a locale ID name which uses the syntax defined by Unicode Technical Standard #35, http://unicode.org/reports/tr35/. If the operating system provides the functionality for the specified locale then it will be used. Otherwise a fallback locale will be used instead. It is also possible to use the default locale specified by the user's operating system when instantiating any of these classes.
Class | Description | |
---|---|---|
Collator | The Collator class provides locale-sensitive string comparison capabilities. | |
CollatorMode | The CollatorMode class enumerates constant values that govern the behavior of string comparisons performed by a Collator object. | |
CurrencyFormatter | The CurrencyFormatter class provides locale-sensitive formatting and parsing of currency values. | |
CurrencyParseResult | A data structure that represents a currency amount and currency symbol or string that were extracted by parsing a currency value. | |
DateTimeFormatter | The DateTimeFormatter class provides locale-sensitive formatting for Date objects and access to localized date field names. | |
DateTimeNameContext | The DateTimeNameContext class enumerates constant values representing the formatting context in which a month name or weekday name is used. | |
DateTimeNameStyle | The DateTimeNameStyle class enumerates constants that control the length of the month names and weekday names that are used when formatting dates. | |
DateTimeStyle | Enumerates constants that determine a locale-specific date and time formatting pattern. | |
LastOperationStatus | The LastOperationStatus class enumerates constant values that represent the status of the most recent globalization service operation. | |
LocaleID | The LocaleID class provides methods for parsing and using locale ID names. | |
NationalDigitsType | The NationalDigitsType class enumerates constants that indicate digit sets used by the NumberFormatter class. | |
NumberFormatter | The NumberFormatter class provides locale-sensitive formatting and parsing of numeric values. | |
NumberParseResult | A data structure that holds information about a number that was extracted by parsing a string. | |
StringTools | The StringTools class provides locale-sensitive case conversion methods. |
Mon Nov 28 2011, 07:42 AM -08:00