As per Apple's documentation, a language ID
is a code which identifies either a language used across multiple regions, a dialect from a specific region, or a script used in multiple regions. See the parse function for details.
When you parse a code with the forCode function, it will result in a table that contains a reference to the approprate cp.i18n.language
table, and up to one of either the matching cp.i18n.region
or cp.i18n.script
tables. These contain the full details for each language/regin/script, as appropriate.
You can also convert the resulting table back to the code via tostring
, or the code method.
Constructors - API calls which return an object, typically one that offers API methods
​forCode​
​forLocaleID​
​forParts​
Methods - API calls which can only be made on an object returned by a constructor
​toLocaleID​
Signature |
|
Type | Function |
Description | Checks if the |
Parameters | ​ |
Returns | ​ |
Signature |
|
Type | Function |
Description | Parses a |
Parameters | ​ |
Returns | ​ |
Signature |
|
Type | Constructor |
Description | Creates, or retrieves from the cache, a |
Parameters | ​ |
Returns | ​ |
Signature |
|
Type | Constructor |
Description | Creates, or retrieves from the cache, a |
Parameters | ​ |
Returns | ​ |
Signature |
|
Type | Constructor |
Description | Returns a |
Parameters | ​ |
Returns | ​ |
Signature |
|
Type | Field |
Description | The language ID code. |
Signature |
|
Type | Field |
Description | The matching |
Signature |
|
Type | Field |
Description | The matching |
Signature |
|
Type | Field |
Description | The matching |
Signature |
|
Type | Method |
Description | Returns the |
Parameters | ​ |
Returns | ​ |