# Global.Intl

> Namespace providing JavaScript's standard internationalization APIs.

- Source: https://titaniumsdk.com/docs/sdk/12.6.3/Global.Intl
- Titanium SDK version: 12.6.3
- Kind: module
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK iPhone 6.0.0, iPad 6.0.0, Android 9.1.0, macOS 9.2.0

Provides support for localized number formatting, date/time formatting,
and language sensitive string comparisons.

For more detail, see the MDN website about
[Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl).

## Methods

### getCanonicalLocales

- Platforms: Android, iPhone, iPad, macOS
- Requires: iOS 11.2+

Gets canonical locale identifiers matching given BCP 47 locale identifiers.

``` js
// Will return ['en-US'].
Ti.API.info(Intl.getCanonicalLocales('EN-US'));

// Will return ['en-US', 'fr'].
Ti.API.info(Intl.getCanonicalLocales(['EN-US', 'Fr']));
```

Parameters:

- `locales` (String | Array<String>, optional): A string or array of strings providing BCP 47 locale identifiers to fetch the canoncial names of. Default: `undefined`.

Returns: Array<String> - Returns an array of canonical names matching given BCP 47 locale names. Duplicate locales will be removed.
Returns an empty array if argument is empty or undefined.

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

