Internationalisation
Bundled Plugins API
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:
1
local region = require("cp.i18n.region")
2
print(region[1]) -- table for "Afghanistan"
3
print(lang.FR) -- table for "France"
4
print(lang.France) -- same table for "France"
Copied!
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

Last modified 1mo ago
Export as PDF
Copy link