Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
28 lines (20 loc) · 872 Bytes

cp.i18n.region.md

File metadata and controls

28 lines (20 loc) · 872 Bytes

docs » cp.i18n.region


Provides the set of ISO 3166-1 region codes and names. The return value can be iterated as a list, or you can find a specific region by either its upper-case two-character code (alpha2), three-character numeric code (numeric3), or English name (name).

For example:

local region = require("cp.i18n.region")
print(region[1])    -- table for "Afghanistan"
print(lang.FR)      -- table for "France"
print(lang.France)  -- same table for "France"

This will return a table containing the following:

  • alpha2 - The 2-character region code, upper-case (eg. "AU", "FR").
  • name - The name in English (eg. "Australia", "France").

Note: This data was adapted from the datahub.io list released under a Public Domain license.

API Overview

API Documentation