มอดูล:place/shared-data

จาก วิกิพจนานุกรม พจนานุกรมเสรี
local export = {}
--[=[
This module contains data shared between [[Module:place/data]] and [[Module:category tree/topic cat/data/Places]].
You must load this module using require(), not using mw.loadData().
]=]

local m_table = require("Module:table")
local topic_cat_utilities_module = "Module:category tree/topic cat/utilities"

-----------------------------------------------------------------------------------
--                              Placetype Tables                                 --
-----------------------------------------------------------------------------------

-- Recognized political and misc. subdivisions. The key is the plural subdivision and the value is the equivalent
-- description, with links. A value of true means to use the default linking algorithm in link_label() in
-- [[Module:category tree/topic cat]]. A value of "w" is similar but links to Wikipedia.
export.political_subdivisions = {
	["administrative atolls"] = "[[administrative]] [[atoll]]s",
	["ภูมิภาคปกครอง"] = "[[administrative]] [[region]]s", --administrative regions ใช้ ภูมิภาค ให้เหมือน regions
	["พื้นที่"] = "[[พื้นที่]]", --areas
	["arrondissements"] = "[[arrondissement]]s",
	["atolls"] = "[[atoll]]s",
	["ชุมชนปกครองตนเอง"] = "[[ชุมชนปกครองตนเอง]]", --autonomous communities
	["autonomous islands"] = "[[autonomous]] [[island]]s",
	["autonomous oblasts"] = "[[autonomous oblast]]s",
	["autonomous okrugs"] = "[[autonomous okrug]]s",
	["ภูมิภาคปกครองตนเอง"] = "[[ภูมิภาคปกครองตนเอง]]", --autonomous regions ใช้ ภูมิภาค ให้เหมือน regions
	["สาธารณรัฐปกครองตนเอง"] = "[[สาธารณรัฐปกครองตนเอง]]", --autonomous republics
	["เขตเลือกตั้ง"] = "[[เขตเลือกตั้ง]]", --boroughs
	["borough seats"] = "[[borough seat]]s",
	["cantons"] = "[[canton]]s",
	["census divisions"] = "[[w:census division|census division]]s",
	["cercles"] = "[[cercle]]s",
	["civil parishes"] = "[[civil parish]]es",
	["collectivities"] = "[[collectivity|collectivities]]",
	["communes"] = "[[commune]]s",
	["constituencies"] = "[[constituency|constituencies]]",
	["ประเทศองค์ประกอบ"] = "[[ประเทศองค์ประกอบ]]", --constituent countries
	["council areas"] = "[[council area]]s",
	["เทศมณฑล"] = "[[เทศมณฑล]]", --counties
	["เขตเลือกตั้งเทศมณฑล"] = "[[เขตเลือกตั้งเทศมณฑล]]", --county boroughs
	["county seats"] = "[[county seat]]s",
	["ประเทศ"] = "[[ประเทศ]]", --countries
	["คณะผู้แทน"] = "[[คณะผู้แทน]]", --delegations
	["departments"] = "[[department]]s",
	["ดินแดนพึ่งพิง"] = "[[ดินแดนพึ่งพิง]]", --dependent territories; ไม่ใช้ ดินแดนในภาวะพึ่งพิง เพราะมี ใน เป็นตัวแบ่ง
	["เขต"] = "[[เขต]]", --districts; Th. also uses อำเภอ
	["districts and autonomous regions"] = "[[district]]s and [[autonomous region]]s",
	["divisions"] = "[[division]]s",
	["เอมิเรต"] = "[[เอมิเรต]]",
	["entities"] = "[[entity|entities]]",
	["ethnographic regions"] = "[[ethnographic]] [[region]]s",
	["federal cities"] = "[[federal]] [[city|cities]]",
	["federal territories"] = "[[federal]] [[territory|territories]]",
	["gewogs"] = "[[gewog]]s",
	["governorates"] = "[[governorate]]s",
	["krais"] = "[[krai]]s",
	["local councils"] = "[[w:local council|local council]]s",
	["local government areas"] = "[[w:local government area|local government area]]s",
	["metropolitan cities"] = "[[metropolitan city|metropolitan cities]]",
	["mukims"] = "[[mukim]]s",
	["municipal districts"] = "[[w:municipal district|municipal district]]s",
	["เทศบาล"] = "[[เทศบาล]]", --municipalities
	["โอบลาสต์"] = "[[โอบลาสต์]]",
	["parishes"] = "[[parish]]es",
	["parish seats"] = "[[parish seat]]s",
	["จังหวัด"] = "[[จังหวัด]]", --prefectures
	["มณฑล"] = "[[มณฑล]]", --provinces; but Th. and somewhere use จังหวัด instead
	["ย่าน"] = "[[ย่าน]]", --quarters
	["raions"] = "[[raion]]s",
	["regencies"] = "[[regency|regencies]]",
	["regional county municipalities"] = "[[w:regional county municipality|regional county municipalities]]",
	["regional districts"] = "[[w:regional district|regional district]]s",
	["regional municipalities"] = "[[w:regional municipality|regional municipalities]]",
	["ภูมิภาค"] = "[[ภูมิภาค]]", --regions
	["regional units"] = "[[regional unit]]s",
	["สาธารณรัฐ"] = "[[สาธารณรัฐ]]", --republics
	["rural municipalities"] = "[[w:rural municipality|rural municipalities]]",
	["self-administered divisions"] = "[[w:self-administered division|self-administered division]]s",
	["self-administered zones"] = "[[w:self-administered zone|self-administered zone]]s",
	["special administrative regions"] = "[[w:Special administrative regions of China|special administrative regions]]",
	["special wards"] = "[[special ward]]s",
	["รัฐ"] = "[[รัฐ]]", --states
	["อำเภอ"] = "[[อำเภอ]]", --subprefecture
	["ภูมิภาคย่อย"] = "[[ภูมิภาคย่อย]]", --subregions
	["territorial authorities"] = "[[w:territorial authority|territorial authorities]]",
	["ดินแดน"] = "[[ดินแดน]]", --territories
	["traditional counties"] = "[[w:traditional county|traditional counties]]",
	["unincorporated areas"] = "[[w:unincorporated area|unincorporated area]]s",
	["ดินแดนสหภาพ"] = "[[ดินแดนสหภาพ]]", --union territories
	["วอยโวดชิป"] = "[[วอยโวดชิป]]",
	["โซน"] = "[[โซน]]", --zones
	["แขวง"] = "[[แขวง]]", --subdistricts; Th. also uses ตำบล
	["ตำบล"] = "[[ตำบล]]", --subdistricts
}

-- Place types for which categories can be constructed for all the places listed below other than cities. The key should
-- be the plural place type and the value should be the description.
export.generic_place_types = {
	["เมืองใหญ่"] = "[[เมืองใหญ่]]", --cities ไม่ใช้ นคร เพื่อให้เข้ากับ เมืองหลวง
	["เมืองร้าง"] = "[[เมืองร้าง]]", --ghost towns
	["เมือง"] = "[[เมือง]]", --towns
	["คอมมูน"] = "[[คอมมูน]]", --communes
	["หมู่บ้าน"] = "[[หมู่บ้าน]]", --villages
	["neighborhoods"] = "[[neighborhood]]s, [[district]]s and other subportions of cities",
	["neighbourhoods"] = "[[neighbourhood]]s, [[district]]s and other subportions of cities",
	["ชานเมือง"] = "[[ชานเมือง]]", --suburbs
	["แม่น้ำ"] = "[[แม่น้ำ]]", --rivers
	["census-designated places"] = "[[census-designated place]]s",
	["unincorporated communities"] = "[[w:unincorporated community|unincorporated communities]]",
	["สถานที่"] = "[[สถานที่]]", --places
}

-- Place types for which categories can be constructed for cities listed below.
-- The key should be the plural place type and the value should be the description.
export.generic_place_types_for_cities = {
	["neighborhoods"] = "[[neighborhood]]s, [[district]]s and other subportions of cities",
	["neighbourhoods"] = "[[neighbourhood]]s, [[district]]s and other subportions of cities",
	["ชานเมือง"] = "[[ชานเมือง]]", --suburbs
	["สถานที่"] = "[[สถานที่]]", --places
}

export.placetype_to_capital_cat = {
	["ชุมชนปกครองตนเอง"] = "เมืองหลวงประจำชุมชนปกครองตนเอง", --autonomous community capitals
	["canton"] = "เมืองหลวงประจำcanton", --cantonal capitals
	["ประเทศ"] = "เมืองหลวงประจำประเทศ", --national capitals
	["department"] = "เมืองหลวงประจำdepartment", --departmental capitals
	["เขต"] = "เมืองหลวงประจำเขต", --district capitals
	["เอมิเรต"] = "เมืองหลวงประจำเอมิเรต", --emirate capitals
	["จังหวัด"] = "เมืองหลวงประจำจังหวัด", --prefectural capitals
	["มณฑล"] = "เมืองหลวงประจำมณฑล", --provincial capitals
	["ภูมิภาค"] = "เมืองหลวงประจำภูมิภาค", --regional capitals
	["สาธารณรัฐ"] = "เมืองหลวงประจำสาธารณรัฐ", --republic capitals
	["รัฐ"] = "เมืองหลวงประจำรัฐ", --state capitals
	["ดินแดน"] = "เมืองหลวงประจำดินแดน", --territorial capitals
	["วอยโวดชิป"] = "เมืองหลวงประจำวอยโวดชิป", --voivodeship capitals
}

export.capital_cat_to_placetype = {}
for placetype, capital_cat in pairs(export.placetype_to_capital_cat) do
	export.capital_cat_to_placetype[capital_cat] = placetype
end

-----------------------------------------------------------------------------------
--                              Placename Tables                                 --
-----------------------------------------------------------------------------------

--[=[
Each of the following tables specifies a group of polities with common properties (e.g. the states of the US). Each
table is associated with a polity "group" (an entry in `export.polities`), which contains handlers specifying how to
process the data tables and also a pointer to the relevant table. The data is used as follows:

1. To generate the text of the bare topical categories directly associated with each polity, such as
   [[:Category:Netherlands]], [[:Category:Alabama, USA]] or [[:Category:Amazonas, Brazil]], and per-language
   variants such as [[:Category:de:Netherlands]], [[:Category:es:Alabama, USA]] or [[:Category:pt:Amazonas, Brazil]].
   These categories (and all placename categories) are found in the ''topic cat subsystem'' of the category system;
   see [[Module:category tree/topic cat/data]] for more information.
2. To generate the text of topical categories for cities/towns/rivers/etc. in a given polity, e.g.
   [[:Category:Cities in Alabama, USA]] for cities in Alabama, and per-language variants such as
   [[:Category:fr:Cities in Alabama, USA]] for French terms for cities in Alabama.
3. To generate the text of topical categories for political subdivisions of a given polity, e.g.
   [[:Category:Provinces of the Netherlands]], [[:Category:Counties of Alabama]] or
   [[:Category:Municipalities of Amazonas, Brazil]], along with per-language variants such as
   [[:Category:de:Provinces of the Netherlands]], [[:Category:es:Counties of Alabama]] or
   [[:Category:pt:Municipalities of Amazonas, Brazil]].
4. To add pages to all the above types of categories when a call to {{place}} on that page
   references the polity, such as by a template call {{place|en|city|state/Alabama}} (which will
   add the page to [[:Category:en:Cities in Alabama, USA]]).

Uses #1, #2 and #3 are controlled by [[Module:category tree/topic cat/data/Places]].
Use #4 is controlled by [[Module:place/data]].

The keys of each table are the polity names in the form they will appear in a category like
[[:Category:de:Provinces of the Netherlands]] or [[:Category:fr:Cities in Alabama, USA]] (hence, they should include
prefixes such as "the" and suffixes such as ", USA"). Transforming these keys to the form that appears in the bare
topical category (e.g. [[:Category:de:Netherlands]]), in category parents and/or in descriptions can be done using the
`bare_label_setter` and `value_transformer` keys (see `export.polities` below).
	 
The value of an item in each table is itself a table. This table contains properties describing the polity in question.
Note that before being used (e.g. to generate the contents of a category page like [[:Category:en:Cities in Ireland]]
or [[:Category:de:Provinces of the Netherlands]] of to specify how to add the relevant categories to a page with a call
to {{place}}), the table is passed through the associated polity group's `value_transformer` function (see
`export.polities`). That function generally augments the property table with additional properties that are common to
the group or derivable from group-specific properties. The following are the properties most commonly specified
(additional properties are sometimes attached to entries in specific groups):

- `divtype`: String specifying the type of polity or subpolity (e.g. "country", "state", province"). This can also be a
  table of such types; in this case, the first listed type is the canonical type that will be used in descriptions, but
  the polity will be recognized (e.g. in {{place}} arguments) when tagged with any of the specified types. This value
  overrides the group-level `default_divtype` value, and only needs to be specified if it disagrees with that value.

- `poldiv`: List of recognized political subdivisions; e.g. for the Netherlands, a specification of the form
  'poldiv = {"provinces", "municipalities"}' will allow categories such as [[:Category:de:Provinces of the Netherlands]]
  and [[:Category:pt:Municipalities of the Netherlands]] to be created. These categories have a primary parent
  [[:Category:LANGCODE:Political subdivisions]] (i.e. this is the parent that appears in the breadcrumbs at the top of
  the category page), and have the containing polity, if any (see `containing_polity` below) as an additional parent.
  Any political subdivision that appears here must also be listed in the `political_subdivisions` list, which tells how
  to convert the pluralized political subdivision into the equivalent linked description. (If not listed, an error
  occurs.)

- `miscdiv`: List of recognized historical/popular subdivisions; e.g. for Ireland, a specification of the form
  'miscdiv = {"provinces"}' will allow categories such as [[:Category:pl:Provinces of Ireland]] to be created. These
  categories differ from political subdivision categories in that their primary parent is the country name rather than
  [[:Category:LANGCODE:Political subdivisions]].

- `is_city`: If 'true', don't recognize or generate categories such as [[:Category:en:Cities in Monaco]] (specifically,
  for place types in `generic_place_types` but not in `generic_place_types_for_cities`).

- `is_former_place`: If 'true', don't recognize or generate categories such as
  [[:Category:fr:Rivers in the Soviet Union]] (specifically, for any place type in `generic_place_types` other than
  "places"). NOTE: This key may be added automatically by the `value_transformer` function.
  
- `keydesc`: String directly specifying a description of the polity, for use in generating the contents of category
  pages related to the polity. descriptions. This property is only rarely present, and is normally generated
  automatically by the `value_transformer` function from the key and (for subpolities) the value of `divtype`.

- `parents`: List of parents of the bare topical category. For example, if 'parents = {"Europe", "Asia"}' is specified
  for "Turkey", bare topical categories such as [[:Category:en:Turkey]] will have parent categories
  [[:Category:en:Europe]] and [[:Category:en:Asia]]. The first listed category is used for the primary parent (i.e. this
  is the parent that appears in the breadcrumbs at the top of the category page). In this case, for example, "Europe"
  (not "Asia") is used as the breadcrumb. This property only needs to be specified for top-level polities (countries and
  such), not for subpolities (states, provinces, etc.), which use the value of `containing_polity` (see below) as the
  parent.

- `bare_category_desc`: String specifying the description used in the bare topical category. If not given, a default
  description is constructed by the `bare_label_setter` function.

- `containing_polity`: This property does not need to be specified explicitly. It is automatically added by the
  `value_transformer` function for subpolities, and left off for top-level polities. It specifies the larger polity in
  which the subpolity is contained, and is used to construct the primary parent of 'Cities in ...', 'Rivers in ...' and
  similar categories. For example, the subpolity Guangdong (a province of China) will have "China" as the
  `containing_polity`, so that a category of the form [[:Category:en:Cities in Guangdong]] will have its primary parent
  (i.e. the parent that appears in the breadcrumbs at the top of the category page) as [[:Category:en:Cities in China]].
  If `containing_polity` is omitted, as in top-level polities, the primary parent will simply be e.g.
  [[:Category:en:Cities]] (or "Towns", "Rivers", etc. as appropriate).
]=]

export.countries = {
	["อัฟกานิสถาน"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เขต"}, miscdiv = {"ภูมิภาค"}},
	["แอลเบเนีย"] = {parents = {"ยุโรป"}, poldiv = {"เทศมณฑล", "เทศบาล"}, british_spelling = true},
	["แอลจีเรีย"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "คอมมูน", "เขต", "เทศบาล"}},
	["อันดอร์รา"] = {parents = {"ยุโรป"}, poldiv = {"parishes"}, british_spelling = true},
	["แองโกลา"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เทศบาล"}},
	["แอนทีกาและบาร์บิวดา"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"มณฑล"}, british_spelling = true},
	["อาร์เจนตินา"] = {parents = {"อเมริกาใต้"}, poldiv = {"มณฑล", "departments", "เทศบาล"}},
	["อาร์มีเนีย"] = {parents = {"ยุโรป", "เอเชีย"}, poldiv = {"ภูมิภาค", "มณฑล"}, british_spelling = true},
	-- Both a country and continent
	["ออสเตรเลีย"] = {parents = {"โลก", "โอเชียเนีย"}, poldiv = {"รัฐ", "ดินแดน", "local government areas"}, british_spelling = true},
	["ออสเตรีย"] = {parents = {"ยุโรป"}, poldiv = {"รัฐ", "เขต", "เทศบาล"}, british_spelling = true},
	["อาเซอร์ไบจาน"] = {parents = {"ยุโรป", "เอเชีย"}, poldiv = {"เขต", "เทศบาล"}, british_spelling = true},
	["บาฮามาส"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"เขต"}, british_spelling = true},
	["บาห์เรน"] = {parents = {"เอเชีย"}, poldiv = {"governorates"}},
	["บังกลาเทศ"] = {parents = {"เอเชีย"}, poldiv = {"divisions", "เขต", "เทศบาล"}, british_spelling = true},
	["บาร์เบโดส"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"parishes"}, british_spelling = true},
	["เบลารุส"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "เขต"}, british_spelling = true},
	["เบลเยียม"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "มณฑล", "เทศบาล"}, british_spelling = true},
	["เบลีซ"] = {parents = {"อเมริกากลาง"}, poldiv = {"เขต"}, british_spelling = true},
	["เบนิน"] = {parents = {"แอฟริกา"}, poldiv = {"departments", "คอมมูน"}},
	["ภูฏาน"] = {parents = {"เอเชีย"}, poldiv = {"เขต", "gewogs"}},
	["โบลิเวีย"] = {parents = {"อเมริกาใต้"}, poldiv = {"มณฑล", "departments", "เทศบาล"}},
	["บอสเนียและเฮอร์เซโกวีนา"] = {parents = {"ยุโรป"}, poldiv = {"entities", "cantons", "เทศบาล"}, british_spelling = true},
	["บอตสวานา"] = {parents = {"แอฟริกา"}, poldiv = {"เขต", "แขวง"}, british_spelling = true},
	["บราซิล"] = {parents = {"อเมริกาใต้"}, poldiv = {"รัฐ", "เทศบาล"}, miscdiv = {"ภูมิภาค"}},
	["บรูไน"] = {parents = {"เอเชีย"}, poldiv = {"เขต", "mukims"}, british_spelling = true},
	["บัลแกเรีย"] = {parents = {"ยุโรป"}, poldiv = {"มณฑล", "เทศบาล"}, british_spelling = true},
	["บูร์กินาฟาโซ"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "departments", "มณฑล"}},
	["พม่า"] = {parents = {"เอเชีย"}, poldiv = {"ภูมิภาค", "รัฐ", "ดินแดนสหภาพ", "self-administered zones", "self-administered divisions", "เขต"}},
	["บุรุนดี"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "คอมมูน"}},
	["กัมพูชา"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เขต"}},
	["แคเมอรูน"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "departments"}},
	["แคนาดา"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"มณฑล", "ดินแดน", "เทศมณฑล", "เขต", "เทศบาล"},
		miscdiv = {"ภูมิภาค", "census divisions"}, british_spelling = true},
	["กาบูเวร์ดี"] = {parents = {"แอฟริกา"}, poldiv = {"เทศบาล", "parishes"}},
	["สาธารณรัฐแอฟริกากลาง"] = {parents = {"แอฟริกา"}, poldiv = {"จังหวัด", "อำเภอ"}},
	["ชาด"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "departments"}},
	["ชิลี"] = {parents = {"อเมริกาใต้"}, poldiv = {"ภูมิภาค", "มณฑล"}},
	["จีน"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "ภูมิภาคปกครองตนเอง",
		"special administrative regions", "จังหวัด", "เทศมณฑล", "เขต", "เทศบาล"},
		miscdiv = {"ภูมิภาค"}},
	["โคลอมเบีย"] = {parents = {"อเมริกาใต้"}, poldiv = {"departments", "เทศบาล"}},
	["คอโมโรส"] = {parents = {"แอฟริกา"}, poldiv = {"autonomous islands"}},
	["คอสตาริกา"] = {parents = {"อเมริกากลาง"}, poldiv = {"มณฑล", "cantons"}},
	["โครเอเชีย"] = {parents = {"ยุโรป"}, poldiv = {"เทศมณฑล", "เทศบาล"}, british_spelling = true},
	["คิวบา"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"มณฑล", "เทศบาล"}},
	["ไซปรัส"] = {parents = {"ยุโรป", "เอเชีย"}, poldiv = {"เขต"}, british_spelling = true},
	["สาธารณรัฐเช็ก"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "เขต", "เทศบาล"}, british_spelling = true},
	["สาธารณรัฐประชาธิปไตยคองโก"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "ดินแดน"}},
	["เดนมาร์ก"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "เทศบาล", "ดินแดน"}, british_spelling = true},
	["จิบูตี"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "เขต"}},
	["ดอมินีกา"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"parishes"}, british_spelling = true},
	["สาธารณรัฐโดมินิกัน"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"มณฑล", "เทศบาล"},
		keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
	["ติมอร์-เลสเต"] = {parents = {"เอเชีย"}, poldiv = {"เทศบาล"}},
	["เอกวาดอร์"] = {parents = {"อเมริกาใต้"}, poldiv = {"มณฑล", "cantons"}},
	["อียิปต์"] = {parents = {"แอฟริกา"}, poldiv = {"governorates", "ภูมิภาค"}},
	["เอลซัลวาดอร์"] = {parents = {"อเมริกากลาง"}, poldiv = {"departments", "เทศบาล"}},
	["อิเควทอเรียลกินี"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล"}},
	["เอริเทรีย"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "ภูมิภาคย่อย"}},
	["เอสโตเนีย"] = {parents = {"ยุโรป"}, poldiv = {"เทศมณฑล", "เทศบาล"}, british_spelling = true},
	["เอสวาตินี"] = {parents = {"แอฟริกา"}, british_spelling = true},
	["เอธิโอเปีย"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "โซน"}},
	["สหพันธรัฐไมโครนีเชีย"] = {parents = {"ไมโครนีเชีย"}, poldiv = {"รัฐ"}},
	["ฟีจี"] = {parents = {"เมลานีเชีย"}, poldiv = {"divisions", "มณฑล"}, british_spelling = true},
	["ฟินแลนด์"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "เทศบาล"}, british_spelling = true},
	["ฝรั่งเศส"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "departments", "collectivities", "เทศบาล",
		"ดินแดนพึ่งพิง", "ดินแดน"}, miscdiv = {"มณฑล"}, british_spelling = true},
	["กาบอง"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "departments"}},
	["แกมเบีย"] = {parents = {"แอฟริกา"}, poldiv = {"divisions", "เขต"}, british_spelling = true},
	["จอร์เจีย"] = {parents = {"ยุโรป", "เอเชีย"}, poldiv = {"ภูมิภาค", "เขต"}, keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true},
	["เยอรมนี"] = {parents = {"ยุโรป"}, poldiv = {"รัฐ", "เทศบาล", "เขต"}, british_spelling = true},
	["กานา"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "เขต"}, british_spelling = true},
	["กรีซ"] = {parents = {"ยุโรป"}, poldiv = {"regional units", "เทศบาล"}, british_spelling = true},
	["กรีเนดา"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"parishes"}, british_spelling = true},
	["กัวเตมาลา"] = {parents = {"อเมริกากลาง"}, poldiv = {"departments", "เทศบาล"}},
	["กินี"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "จังหวัด"}},
	["กินี-บิสเซา"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค"}},
	["กายอานา"] = {parents = {"อเมริกาใต้"}, poldiv = {"ภูมิภาค"}, british_spelling = true},
	["เฮติ"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"departments", "arrondissements"}},
	["ฮอนดูรัส"] = {parents = {"อเมริกากลาง"}, poldiv = {"departments", "เทศบาล"}},
	["ฮังการี"] = {parents = {"ยุโรป"}, poldiv = {"เทศมณฑล", "เขต"}, british_spelling = true},
	["ไอซ์แลนด์"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "เทศบาล", "เทศมณฑล"}, british_spelling = true},
	["อินเดีย"] = {parents = {"เอเชีย"}, poldiv = {"รัฐ", "ดินแดนสหภาพ", "divisions", "เขต", "เทศบาล"}, british_spelling = true},
	["อินโดนีเซีย"] = {parents = {"เอเชีย"}, poldiv = {"regencies", "มณฑล"}},
	["อิหร่าน"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เทศมณฑล"}},
	["อิรัก"] = {parents = {"เอเชีย"}, poldiv = {"governorates", "เขต"}},
	["ไอร์แลนด์"] = {parents = {"ยุโรป", "British Isles"}, poldiv = {"เทศมณฑล", "เขต"}, miscdiv = {"มณฑล"}, british_spelling = true},
	["อิสราเอล"] = {parents = {"เอเชีย"}, poldiv = {"เขต"}},
	["อิตาลี"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "มณฑล", "metropolitan cities"}, miscdiv = {"ภูมิภาค"}, british_spelling = true},
	["โกตดิวัวร์"] = {parents = {"แอฟริกา"}, poldiv = {"เขต", "ภูมิภาค"}},
	["จาเมกา"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"parishes"}, british_spelling = true},
	["ญี่ปุ่น"] = {parents = {"เอเชีย"}, poldiv = {"จังหวัด", "อำเภอ", "เทศบาล"}},
	["จอร์แดน"] = {parents = {"เอเชีย"}, poldiv = {"governorates"}},
	["คาซัคสถาน"] = {parents = {"เอเชีย", "ยุโรป"}, poldiv = {"ภูมิภาค", "เขต"}},
	["เคนยา"] = {parents = {"แอฟริกา"}, poldiv = {"เทศมณฑล"}, british_spelling = true},
	["คิริบาส"] = {parents = {"ไมโครนีเชีย"}, british_spelling = true},
	["คอซอวอ"] = {parents = {"ยุโรป"}, british_spelling = true},
	["คูเวต"] = {parents = {"เอเชีย"}, poldiv = {"governorates", "พื้นที่"}},
	["คีร์กีซสถาน"] = {parents = {"เอเชีย"}, poldiv = {"ภูมิภาค", "เขต"}},
	["ลาว"] = {parents = {"เอเชีย"}, poldiv = {"แขวง", "เมือง"}},
	["ลัตเวีย"] = {parents = {"ยุโรป"}, poldiv = {"เทศบาล"}, miscdiv = {"ภูมิภาค"}, british_spelling = true},
	["เลบานอน"] = {parents = {"เอเชีย"}, poldiv = {"governorates", "เขต"}},
	["เลโซโท"] = {parents = {"แอฟริกา"}, poldiv = {"เขต"}, british_spelling = true},
	["ไลบีเรีย"] = {parents = {"แอฟริกา"}, poldiv = {"เทศมณฑล", "เขต"}},
	["ลิเบีย"] = {parents = {"แอฟริกา"}, poldiv = {"เขต", "เทศบาล"}},
	["ลีชเทินชไตน์"] = {parents = {"ยุโรป"}, poldiv = {"เทศบาล"}, british_spelling = true},
	["ลิทัวเนีย"] = {parents = {"ยุโรป"}, poldiv = {"เทศมณฑล", "เทศบาล"},
		miscdiv = {"ethnographic regions"}, british_spelling = true},
	["ลักเซมเบิร์ก"] = {parents = {"ยุโรป"}, poldiv = {"cantons"}, miscdiv = {"เขต"}, british_spelling = true},
	["มาดากัสการ์"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "เขต"}},
	["มาลาวี"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "เขต"}, british_spelling = true},
	["มาเลเซีย"] = {parents = {"เอเชีย"}, poldiv = {"รัฐ", "federal territories", "เขต"}, british_spelling = true},
	["มัลดีฟส์"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "administrative atolls"}, british_spelling = true},
	["มาลี"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "cercles"}},
	["มอลตา"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "local councils"}, british_spelling = true},
	["หมู่เกาะมาร์แชลล์"] = {parents = {"ไมโครนีเชีย"}, poldiv = {"เทศบาล"}},
	["มอริเตเนีย"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "departments"}},
	["มอริเชียส"] = {parents = {"แอฟริกา"}, poldiv = {"เขต"}, british_spelling = true},
	["เม็กซิโก"] = {parents = {"อเมริกาเหนือ", "อเมริกากลาง"}, poldiv = {"รัฐ", "เทศบาล"}},
	["มอลโดวา"] = {parents = {"ยุโรป"}, poldiv = {"เขต", "เทศบาล"}, british_spelling = true},
	["โมนาโก"] = {parents = {"ยุโรป"}, is_city = true, british_spelling = true},
	["มองโกเลีย"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เขต"}},
	["มอนเตเนโกร"] = {parents = {"ยุโรป"}, poldiv = {"เทศบาล"}},
	["โมร็อกโก"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "จังหวัด", "มณฑล"}},
	["โมซัมบิก"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เขต"}},
	["นามิเบีย"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "constituencies"}, british_spelling = true},
	["นาอูรู"] = {parents = {"ไมโครนีเชีย"}, poldiv = {"เขต"}, british_spelling = true},
	["เนปาล"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เขต"}},
	["เนเธอร์แลนด์"] = {parents = {"ยุโรป"}, poldiv = {"มณฑล", "เทศบาล", "ดินแดนพึ่งพิง"}, british_spelling = true},
	["นิวซีแลนด์"] = {parents = {"พอลินีเชีย"}, poldiv = {"ภูมิภาค", "ดินแดนพึ่งพิง", "territorial authorities"}, british_spelling = true},
	["นิการากัว"] = {parents = {"อเมริกากลาง"}, poldiv = {"departments", "เทศบาล"}},
	["ไนเจอร์"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "departments"}},
	["ไนจีเรีย"] = {parents = {"แอฟริกา"}, poldiv = {"รัฐ", "local government areas"}, british_spelling = true},
	["เกาหลีเหนือ"] = {parents = {"เอเชีย", "เกาหลี"}, poldiv = {"มณฑล", "เทศมณฑล"}},
	["นอร์ทมาซิโดเนีย"] = {parents = {"ยุโรป"}, poldiv = {"เทศบาล"}, british_spelling = true},
	["นอร์เวย์"] = {parents = {"ยุโรป"}, poldiv = {"เทศมณฑล", "เทศบาล", "dependencies"},
		miscdiv = {"เขต", "unincorporated areas"}, british_spelling = true},
	["โอมาน"] = {parents = {"เอเชีย"}, poldiv = {"governorates", "มณฑล"}},
	["ปากีสถาน"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
	["ปาเลสไตน์"] = {parents = {"เอเชีย"}},
	["ปาเลา"] = {parents = {"ไมโครนีเชีย"}, poldiv = {"รัฐ"}},
	["ปานามา"] = {parents = {"อเมริกากลาง"}, poldiv = {"มณฑล", "เขต"}},
	["ปาปัวนิวกินี"] = {parents = {"เมลานีเชีย"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
	["ปารากวัย"] = {parents = {"อเมริกาใต้"}, poldiv = {"departments", "เขต"}},
	["เปรู"] = {parents = {"อเมริกาใต้"}, poldiv = {"ภูมิภาค", "มณฑล", "เขต"}},
	["ฟิลิปปินส์"] = {parents = {"เอเชีย"}, poldiv = {"ภูมิภาค", "มณฑล", "เขต", "เทศบาล"}},
	["โปแลนด์"] = {poldiv = {"วอยโวดชิป", "เทศมณฑล"}, parents = {"ยุโรป"}, british_spelling = true},
	["โปรตุเกส"] = {parents = {"ยุโรป"}, poldiv = {"districts and autonomous regions", "มณฑล", "เทศบาล"}, british_spelling = true},
	["กาตาร์"] = {parents = {"เอเชีย"}, poldiv = {"เทศบาล", "โซน"}},
	["สาธารณรัฐคองโก"] = {parents = {"แอฟริกา"}, poldiv = {"departments", "เขต"}},
	["โรมาเนีย"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "เทศมณฑล"}, british_spelling = true},
	["รัสเซีย"] = {parents = {"ยุโรป", "เอเชีย"}, poldiv = {"สาธารณรัฐ", "autonomous oblasts", "autonomous okrugs", "โอบลาสต์", "krais", "federal cities", "เขต"}, british_spelling = true},
	["รวันดา"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เขต"}},
	["เซนต์คิตส์และเนวิส"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"parishes"}, british_spelling = true},
	["เซนต์ลูเชีย"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"ย่าน"}, british_spelling = true},
	["เซนต์วินเซนต์และเกรนาดีนส์"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"parishes"}, british_spelling = true},
	["ซามัว"] = {parents = {"พอลินีเชีย"}, poldiv = {"เขต"}, british_spelling = true},
	["ซานมารีโน"] = {parents = {"ยุโรป"}, poldiv = {"เทศบาล"}, british_spelling = true},
	["เซาตูแมอีปริงซีป"] = {parents = {"แอฟริกา"}, poldiv = {"เขต"}},
	["ซาอุดีอาระเบีย"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "governorates"}},
	["เซเนกัล"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "departments"}},
	["เซอร์เบีย"] = {parents = {"ยุโรป"}, poldiv = {"เขต", "เทศบาล"}}, 
	["เซเชลส์"] = {parents = {"แอฟริกา"}, poldiv = {"เขต"}, british_spelling = true},
	["เซียร์ราลีโอน"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
	["สิงคโปร์"] = {parents = {"เอเชีย"}, poldiv = {"เขต"}, british_spelling = true},
	["สโลวาเกีย"] = {parents = {"ยุโรป"}, poldiv = {"ภูมิภาค", "เขต"}, british_spelling = true},
	["สโลวีเนีย"] = {parents = {"ยุโรป"}, poldiv = {"เทศบาล"}, british_spelling = true},
	-- Note: the official name does not include "the" at the beginning, but it sounds strange in
	-- English to leave it out and it's commonly included, so we include it.
	["หมู่เกาะโซโลมอน"] = {parents = {"เมลานีเชีย"}, poldiv = {"มณฑล"}, british_spelling = true},
	["โซมาเลีย"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "เขต"}},
	["เซาท์แอฟริกา"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
	["เกาหลีใต้"] = {parents = {"เอเชีย", "เกาหลี"}, poldiv = {"มณฑล", "เทศมณฑล", "เขต"}},
	["เซาท์ซูดาน"] = {parents = {"แอฟริกา"}, poldiv = {"ภูมิภาค", "รัฐ", "เทศมณฑล"}, british_spelling = true},
	["สเปน"] = {parents = {"ยุโรป"}, poldiv = {"ชุมชนปกครองตนเอง", "มณฑล", "เทศบาล"}, british_spelling = true},
	["ศรีลังกา"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
	["ซูดาน"] = {parents = {"แอฟริกา"}, poldiv = {"รัฐ", "เขต"}, british_spelling = true},
	["ซูรินาม"] = {parents = {"อเมริกาใต้"}, poldiv = {"เขต"}},
	["เอสวาตินี"] = {parents = {"แอฟริกา"}, british_spelling = true},
	["สวีเดน"] = {parents = {"ยุโรป"}, poldiv = {"มณฑล", "เทศมณฑล", "เทศบาล"}, british_spelling = true},
	["สวิตเซอร์แลนด์"] = {parents = {"ยุโรป"}, poldiv = {"cantons", "เทศบาล", "เขต"}, british_spelling = true},
	["ซีเรีย"] = {parents = {"เอเชีย"}, poldiv = {"governorates", "เขต"}},
	["ไต้หวัน"] = {parents = {"เอเชีย"}, poldiv = {"เทศมณฑล", "เขต"}},
	["ทาจิกิสถาน"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล"}, miscdiv = {"ภูมิภาค", "เขต"}},
	["แทนซาเนีย"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
	["ไทย"] = {parents = {"เอเชีย"}, poldiv = {"จังหวัด", "อำเภอ", "ตำบล", "เขต", "แขวง", "เทศบาล"}},
	["โตโก"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "จังหวัด"}},
	["ตองงา"] = {parents = {"พอลินีเชีย"}, poldiv = {"divisions"}, british_spelling = true},
	["ตรินิแดดและโตเบโก"] = {parents = {"อเมริกาเหนือ"}, poldiv = {"ภูมิภาค", "เทศบาล"}, british_spelling = true},
	["ตูนิเซีย"] = {parents = {"แอฟริกา"}, poldiv = {"governorates", "delegations"}},
	["ตุรกี"] = {parents = {"ยุโรป", "เอเชีย"}, poldiv = {"มณฑล", "เขต"}},
	["เติร์กเมนิสถาน"] = {parents = {"เอเชีย"}, poldiv = {"ภูมิภาค", "เขต"}},
	["ตูวาลู"] = {parents = {"พอลินีเชีย"}, poldiv = {"atolls"}, british_spelling = true},
	["ยูกันดา"] = {parents = {"แอฟริกา"}, poldiv = {"เขต", "เทศมณฑล"}, british_spelling = true},
	["ยูเครน"] = {parents = {"ยุโรป"}, poldiv = {"โอบลาสต์", "เทศบาล", "raions"}, british_spelling = true},
	["สหรัฐอาหรับเอมิเรตส์"] = {parents = {"เอเชีย"}, poldiv = {"เอมิเรต"}},
	["สหราชอาณาจักร"] = {parents = {"ยุโรป", "British Isles"},
		poldiv = {"ประเทศ", "ดินแดน", "ดินแดนพึ่งพิง"},
		keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
	["สหรัฐอเมริกา"] = {parents = {"อเมริกาเหนือ"},
		poldiv = {"เทศมณฑล", "county seats", "รัฐ", "ดินแดน", "ดินแดนพึ่งพิง",
			"เทศบาล", -- these exist politically at least in Colorado and Connecticut
		}, miscdiv = {"ภูมิภาค"}},
	["อุรุกวัย"] = {parents = {"อเมริกาใต้"}, poldiv = {"departments", "เทศบาล"}},
	["อุซเบกิสถาน"] = {parents = {"เอเชีย"}, poldiv = {"ภูมิภาค", "เขต"}},
	["วานูวาตู"] = {parents = {"เมลานีเชีย"}, poldiv = {"มณฑล"}, british_spelling = true},
	["นครรัฐวาติกัน"] = {parents = {"ยุโรป", "โรม"}, is_city = true, british_spelling = true},
	["เวเนซุเอลา"] = {parents = {"อเมริกาใต้"}, poldiv = {"รัฐ", "เทศบาล"}},
	["เวียดนาม"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล", "เขต", "เทศบาล"}},
	["เวสเทิร์นสะฮารา"] = {parents = {"แอฟริกา"}},
	["เยเมน"] = {parents = {"เอเชีย"}, poldiv = {"governorates", "เขต"}},
	["แซมเบีย"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
	["ซิมบับเว"] = {parents = {"แอฟริกา"}, poldiv = {"มณฑล", "เขต"}, british_spelling = true},
}

export.pseudo_countries = {
	-- British Overseas Territory
	["Akrotiri and Dhekelia"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"ไซปรัส", "ยุโรป", "สหราชอาณาจักร"}, british_spelling = true},
	-- unincorporated territory of the United States
	["American Samoa"] = {divtype = {"unincorporated territory", "ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"พอลินีเชีย", "สหรัฐอเมริกา"}},
	["United States Minor Outlying Islands"] = {divtype = {"unincorporated territory", "ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"Islands", "ไมโครนีเชีย", "พอลินีเชีย", "สหรัฐอเมริกา"}},
	-- British Overseas Territory
	["Anguilla"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"อเมริกาเหนือ", "สหราชอาณาจักร"}, british_spelling = true},
	-- de-facto independent state, internationally recognized as part of Georgia
	["Abkhazia"] = {divtype = {"unrecognized state", "ประเทศ"}, parents = {"จอร์เจีย", "ยุโรป", "เอเชีย"},
		poldiv = {"เขต"},
		keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]"},
	-- de-facto independent state of Armenian ethnicity, internationally recognized as part of Azerbaijan
	-- (also known as Nagorno-Karabakh)
	-- NOTE: Formerly listed Armenia as a parent; this seems politically non-neutral
	-- so I've taken it out.
	["Artsakh"] = {divtype = {"unrecognized state", "ประเทศ"}, parents = {"Azerbaijan", "ยุโรป", "เอเชีย"},
		keydesc = "the de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]", british_spelling = true},
	-- British Overseas Territory
	["Ascension Island"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "Atlantic Ocean"}, british_spelling = true},
	-- constituent country of the Netherlands
	["Aruba"] = {divtype = {"ประเทศองค์ประกอบ", "ประเทศ"}, parents = {"เนเธอร์แลนด์", "อเมริกาเหนือ"}},
	-- British Overseas Territory
	["เบอร์มิวดา"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาเหนือ"}, british_spelling = true},
	-- British Overseas Territory
	["the British Indian Ocean Territory"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาเหนือ"}, british_spelling = true},
	-- British Overseas Territory
	["the British Virgin Islands"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาเหนือ"}, british_spelling = true},
	-- British Overseas Territory
	["the Cayman Islands"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาเหนือ"}, british_spelling = true},
	-- Australian external territory
	["Christmas Island"] = {divtype = {"external territory", "ดินแดน"}, parents = {"ออสเตรเลีย", "เอเชีย"}, british_spelling = true},
	-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
	["the Cocos Islands"] = {divtype = {"external territory", "ดินแดน"}, parents = {"ออสเตรเลีย", "เอเชีย"}, british_spelling = true},
	-- self-governing but in free association with New Zealand
	["the Cook Islands"] = {divtype = {"ประเทศ"}, parents = {"พอลินีเชีย", "นิวซีแลนด์"}, british_spelling = true},
	-- constituent country of the Netherlands
	["Curaçao"] = {divtype = {"ประเทศองค์ประกอบ", "ประเทศ"}, parents = {"เนเธอร์แลนด์", "อเมริกาเหนือ"}},
	-- special territory of Chile
	["Easter Island"] = {divtype = {"special territory", "ดินแดน"}, parents = {"ชิลี", "พอลินีเชีย"}},
	-- British Overseas Territory
	["the Falkland Islands"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาใต้"}, british_spelling = true},
	-- autonomous territory of Denmark
	["the Faroe Islands"] = {divtype = {"autonomous territory", "ดินแดน"}, parents = {"เดนมาร์ก", "ยุโรป"}},
	-- overseas department of France
	["French Guiana"] = {divtype = {"overseas department", "department"}, parents = {"ฝรั่งเศส", "อเมริกาใต้"}},
	-- overseas collectivity of France
	["French Polynesia"] = {divtype = {"overseas collectivity", "collectivity"}, parents = {"ฝรั่งเศส", "พอลินีเชีย"}},
	-- British Overseas Territory
	["Gibraltar"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาเหนือ"}, british_spelling = true},
	-- autonomous territory of Denmark
	["กรีนแลนด์"] = {divtype = {"autonomous territory", "ดินแดน"}, parents = {"เดนมาร์ก", "อเมริกาเหนือ"}, poldiv = {"เทศบาล"}},
	-- overseas department of France
	["Guadeloupe"] = {divtype = {"overseas department", "department"}, parents = {"ฝรั่งเศส", "อเมริกาเหนือ"}},
	-- unincorporated territory of the United States
	["กวม"] = {divtype = {"unincorporated territory", "ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหรัฐอเมริกา", "ไมโครนีเชีย"}},
	-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
	["Guernsey"] = {divtype = {"crown dependency", "dependency", "ดินแดนพึ่งพิง", "bailiwick", "ดินแดน"}, parents = {"British Isles", "ยุโรป"}, british_spelling = true},
	-- special administrative region of China
	["ฮ่องกง"] = {divtype = "special administrative region", parents = {"จีน"}},
	-- self-governing British Crown dependency
	["the Isle of Man"] = {divtype = {"crown dependency", "dependency", "ดินแดนพึ่งพิง", "ดินแดน"}, parents = {"British Isles", "ยุโรป"}, british_spelling = true},
	-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
	["Jersey"] = {divtype = {"crown dependency", "dependency", "ดินแดนพึ่งพิง", "bailiwick", "ดินแดน"}, parents = {"British Isles", "ยุโรป"}, british_spelling = true},
	-- special administrative region of China
	["มาเก๊า"] = {divtype = "special administrative region", parents = {"จีน"}},
	-- overseas department of France
	["Martinique"] = {divtype = {"overseas department", "department"}, parents = {"ฝรั่งเศส", "อเมริกาเหนือ"}},
	-- British Overseas Territory
	["Montserrat"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาเหนือ"}, british_spelling = true},
	-- special collectivity of France
	["New Caledonia"] = {divtype = {"special collectivity", "collectivity"}, parents = {"ฝรั่งเศส", "เมลานีเชีย"}},
	-- self-governing but in free association with New Zealand
	["นีวเว"] = {divtype = {"ประเทศ"}, parents = {"พอลินีเชีย", "นิวซีแลนด์"}, british_spelling = true},
	-- Australian external territory
	["Norfolk Island"] = {divtype = {"external territory", "ดินแดน"}, parents = {"ออสเตรเลีย", "พอลินีเชีย"}, british_spelling = true},
	-- commonwealth, unincorporated territory of the United States
	["the Northern Mariana Islands"] = {divtype = {"commonwealth", "unincorporated territory", "ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหรัฐอเมริกา", "ไมโครนีเชีย"}},
	-- British Overseas Territory
	["the Pitcairn Islands"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "พอลินีเชีย"}, british_spelling = true},
	-- commonwealth of the United States
	["Puerto Rico"] = {divtype = {"commonwealth", "ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหรัฐอเมริกา", "อเมริกาเหนือ"}},
	-- overseas collectivity of France
	["Saint Barthélemy"] = {divtype = {"overseas collectivity", "collectivity"}, parents = {"ฝรั่งเศส", "อเมริกาเหนือ"}},
	-- British Overseas Territory
	["Saint Helena"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "Atlantic Ocean"}, british_spelling = true},
	-- overseas collectivity of France
	["Saint Martin"] = {divtype = {"overseas collectivity", "collectivity"}, parents = {"ฝรั่งเศส", "อเมริกาเหนือ"}},
	-- overseas collectivity of France
	["Saint Pierre and Miquelon"] = {divtype = {"overseas collectivity", "collectivity"}, parents = {"ฝรั่งเศส", "อเมริกาเหนือ"}},
	-- de-facto independent state, internationally recognized as part of Georgia
	["South Ossetia"] = {divtype = {"unrecognized state", "ประเทศ"}, parents = {"จอร์เจีย", "ยุโรป", "เอเชีย"},
		keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]", british_spelling = true},
	-- constituent country of the Netherlands
	["Sint Maarten"] = {divtype = {"ประเทศองค์ประกอบ", "ประเทศ"}, parents = {"เนเธอร์แลนด์", "อเมริกาเหนือ"}},
	-- British Overseas Territory
	["South Georgia"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "Atlantic Ocean"}, british_spelling = true},
	-- British Overseas Territory
	["the South Sandwich Islands"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "Atlantic Ocean"}, british_spelling = true},
	-- dependent territory of New Zealnd
	["Tokelau"] = {divtype = {"ดินแดนพึ่งพิง", "ดินแดน"}, parents = {"นิวซีแลนด์", "พอลินีเชีย"}, british_spelling = true},
	-- de-facto independent state, internationally recognized as part of Moldova
	["Transnistria"] = {divtype = {"unrecognized state", "ประเทศ"}, parents = {"มอลโดวา", "ยุโรป"},
		keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]", british_spelling = true},
	-- British Overseas Territory
	["Tristan da Cunha"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "Atlantic Ocean"}, british_spelling = true},
	-- British Overseas Territory
	["the Turks and Caicos Islands"] = {divtype = {"ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหราชอาณาจักร", "อเมริกาเหนือ"}, british_spelling = true},
	-- unincorporated territory of the United States
	["the United States Virgin Islands"] = {divtype = {"unincorporated territory", "ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหรัฐอเมริกา", "อเมริกาเหนือ"}},
	-- unincorporated territory of the United States
	["Wake Island"] = {divtype = {"unincorporated territory", "ดินแดนโพ้นทะเล", "ดินแดน"}, parents = {"สหรัฐอเมริกา", "อเมริกาเหนือ"}},
	-- overseas collectivity of France
	["Wallis and Futuna"] = {divtype = {"overseas collectivity", "collectivity"}, parents = {"ฝรั่งเศส", "พอลินีเชีย"}},
}

export.former_countries = {
	["เชโกสโลวาเกีย"] = {parents = {"ยุโรป"}, british_spelling = true},
	["เยอรมนีตะวันออก"] = {parents = {"ยุโรป", "เยอรมนี"}, british_spelling = true},
	["เวียดนามเหนือ"] = {parents = {"เอเชีย", "Vietnam"}},
	["เปอร์เซีย"] = {parents = {"เอเชีย"}, poldiv = {"มณฑล"}},
	["the Roman Empire"] = {divtype = {"จักรวรรดิ", "ประเทศ"}, parents = {"ยุโรป", "แอฟริกา", "เอเชีย", "โรม"}, poldiv = {"มณฑล"}},
	["เวียดนามใต้"] = {parents = {"เอเชีย", "Vietnam"}},
	["สหภาพโซเวียต"] = {parents = {"ยุโรป", "เอเชีย"}, poldiv = {"สาธารณรัฐ", "สาธารณรัฐปกครองตนเอง"}, british_spelling = true},
	["เยอรมนีตะวันตก"] = {parents = {"ยุโรป", "เยอรมนี"}, british_spelling = true},
	["ยูโกสลาเวีย"] = {parents = {"ยุโรป"}, poldiv = {"เขต"},
		keydesc = "the former [[Kingdom of Yugoslavia]] (1918-1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943-1992)", british_spelling = true},
}

export.australian_states_and_territories = {
	["the Australian Capital Territory"] = {divtype = "ดินแดน"},
	["New South Wales"] = {},
	["the Northern Territory"] = {divtype = "ดินแดน"},
	["Queensland"] = {},
	["South Australia"] = {},
	["Tasmania"] = {},
	["Victoria"] = {},
	["Western Australia"] = {},
}

export.austrian_states = {
	["Vienna"] = {},
	["Lower Austria"] = {},
	["Upper Austria"] = {},
	["Styria"] = {},
	["Tyrol"] = {},
	["Carinthia"] = {},
	["Salzburg"] = {},
	["Vorarlberg"] = {},
	["Burgenland"] = {},
}

export.bangladeshi_divisions = {
	["Barisal Division"] = {},
	["Chittagong Division"] = {},
	["Dhaka Division"] = {},
	["Khulna Division"] = {},
	["Mymensingh Division"] = {},
	["Rajshahi Division"] = {},
	["Rangpur Division"] = {},
	["Sylhet Division"] = {},
}

export.brazilian_states = {
	["Acre, บราซิล"] = {},
	["Alagoas, บราซิล"] = {},
	["Amapá, บราซิล"] = {},
	["Amazonas, บราซิล"] = {},
	["Bahia, บราซิล"] = {},
	["Ceará, บราซิล"] = {},
	["Distrito Federal, บราซิล"] = {},
	["Espírito Santo, บราซิล"] = {},
	["Goiás, บราซิล"] = {},
	["Maranhão, บราซิล"] = {},
	["Mato Grosso, บราซิล"] = {},
	["Mato Grosso do Sul, บราซิล"] = {},
	["Minas Gerais, บราซิล"] = {},
	["Pará, บราซิล"] = {},
	["Paraíba, บราซิล"] = {},
	["Paraná, บราซิล"] = {},
	["Pernambuco, บราซิล"] = {},
	["Piauí, บราซิล"] = {},
	["Rio de Janeiro, บราซิล"] = {},
	["Rio Grande do Norte, บราซิล"] = {},
	["Rio Grande do Sul, บราซิล"] = {},
	["Rondônia, บราซิล"] = {},
	["Roraima, บราซิล"] = {},
	["Santa Catarina, บราซิล"] = {},
	["São Paulo, บราซิล"] = {},
	["Sergipe, บราซิล"] = {},
	["Tocantins, บราซิล"] = {},
}

local rural_municipalities = {"rural municipalities", parent="rural municipalities"}
local canadian_counties = {"เทศมณฑล", parent="counties of Canada"}
export.canadian_provinces_and_territories = {
	["Alberta"] = {poldiv = {"municipal districts"}},
	["British Columbia"] = {poldiv = {"regional districts", "regional municipalities"}},
	["Manitoba"] = {poldiv = {rural_municipalities}},
	["New Brunswick"] = {poldiv = {canadian_counties}},
	["Newfoundland and Labrador"] = {},
	["the Northwest Territories"] = {divtype = "ดินแดน"},
	["Nova Scotia"] = {poldiv = {canadian_counties, "regional municipalities"}},
	["Nunavut"] = {divtype = "ดินแดน"},
	["Ontario"] = {poldiv = {canadian_counties, "regional municipalities"}},
	["Prince Edward Island"] = {poldiv = {canadian_counties, rural_municipalities}},
	["Saskatchewan"] = {poldiv = {rural_municipalities}},
	["Quebec"] = {poldiv = {canadian_counties, "regional county municipalities"}},
	["Yukon"] = {divtype = "ดินแดน"},
}

-- table of Chinese provinces and autonomous regions; interpolated into the main 'places' table, but also needed separately
export.chinese_provinces_and_autonomous_regions = {
	["Anhui"] = {},
	["Fujian"] = {},
	["Gansu"] = {},
	["Guangdong"] = {},
	["Guangxi"] = {divtype = "ภูมิภาคปกครองตนเอง"},
	["Guizhou"] = {},
	["Hainan"] = {},
	["Hebei"] = {},
	["Heilongjiang"] = {},
	["Henan"] = {},
	["Hubei"] = {},
	["Hunan"] = {},
	["Inner Mongolia"] = {divtype = "ภูมิภาคปกครองตนเอง"},
	["Jiangsu"] = {},
	["Jiangxi"] = {},
	["Jilin"] = {},
	["Liaoning"] = {},
	["Ningxia"] = {divtype = "ภูมิภาคปกครองตนเอง"},
	["Qinghai"] = {},
	["Shaanxi"] = {},
	["Shandong"] = {},
	["Shanxi"] = {},
	["Sichuan"] = {},
	["ทิเบต"] = {divtype = "ภูมิภาคปกครองตนเอง"},
	["Xinjiang"] = {divtype = "ภูมิภาคปกครองตนเอง"},
	["Yunnan"] = {},
	["Zhejiang"] = {},
}

export.finnish_regions = {
	["Lapland, ฟินแลนด์"] = {},
	["North Ostrobothnia, ฟินแลนด์"] = {},
	["Kainuu, ฟินแลนด์"] = {},
	["North Karelia, ฟินแลนด์"] = {},
	["Northern Savonia, ฟินแลนด์"] = {},
	["Southern Savonia, ฟินแลนด์"] = {},
	["South Karelia, ฟินแลนด์"] = {},
	["Central Finland, ฟินแลนด์"] = {},
	["South Ostrobothnia, ฟินแลนด์"] = {},
	["Ostrobothnia, ฟินแลนด์"] = {},
	["Central Ostrobothnia, ฟินแลนด์"] = {},
	["Pirkanmaa, ฟินแลนด์"] = {},
	["Satakunta, ฟินแลนด์"] = {},
	["Päijänne Tavastia, ฟินแลนด์"] = {},
	["Tavastia Proper, ฟินแลนด์"] = {},
	["Kymenlaakso, ฟินแลนด์"] = {},
	["Uusimaa, ฟินแลนด์"] = {},
	["Southwest Finland, ฟินแลนด์"] = {},
	["the Åland Islands, ฟินแลนด์"] = {},
}

export.french_administrative_regions = {
	["Auvergne-Rhône-Alpes"] = {},
	["Bourgogne-Franche-Comté"] = {},
	["Brittany"] = {},
	["Centre-Val de Loire"] = {},
	["Corsica"] = {},
	["French Guiana"] = {},
	["Grand Est"] = {},
	["Guadeloupe"] = {},
	["Hauts-de-France"] = {},
	["Île-de-France"] = {},
	["Martinique"] = {},
	["Mayotte"] = {},
	["Normandy"] = {},
	["Nouvelle-Aquitaine"] = {},
	["Occitanie"] = {},
	["Pays de la Loire"] = {},
	["Provence-Alpes-Côte d'Azur"] = {},
	["Réunion"] = {},
}

export.german_states = {
	["Baden-Württemberg"] = {},
	["Bavaria"] = {},
	["Berlin"] = {},
	["Brandenburg"] = {},
	["Bremen"] = {},
	["Hamburg"] = {},
	["Hesse"] = {},
	["Lower Saxony"] = {},
	["Mecklenburg-Vorpommern"] = {},
	["North Rhine-Westphalia"] = {},
	["Rhineland-Palatinate"] = {},
	["Saarland"] = {},
	["Saxony"] = {},
	["Saxony-Anhalt"] = {},
	["Schleswig-Holstein"] = {},
	["Thuringia"] = {},
}

-- Indian states and union territories. Only some of them are divided into
-- divisions.
export.indian_states_and_union_territories = {
	["Andaman and Nicobar Islands"] = {divtype = "union territory"},
	["Andhra Pradesh"] = {},
	["Arunachal Pradesh"] = {poldiv = {"divisions"}},
	["Assam"] = {poldiv = {"divisions"}},
	["Bihar"] = {poldiv = {"divisions"}},
	["Chandigarh"] = {divtype = "union territory"},
	["Chhattisgarh"] = {poldiv = {"divisions"}},
	["Dadra and Nagar Haveli"] = {divtype = "union territory"},
	["Daman and Diu"] = {divtype = "union territory"},
	["Delhi"] = {divtype = "union territory", poldiv = {"divisions"}},
	["Goa"] = {},
	["Gujarat"] = {},
	["Haryana"] = {poldiv = {"divisions"}},
	["Himachal Pradesh"] = {poldiv = {"divisions"}},
	["Jammu and Kashmir"] = {divtype = "union territory", poldiv = {"divisions"}},
	["Jharkhand"] = {poldiv = {"divisions"}},
	["Karnataka"] = {poldiv = {"divisions"}},
	["Kerala"] = {},
	["Ladakh"] = {divtype = "union territory", poldiv = {"divisions"}},
	["Lakshadweep"] = {divtype = "union territory"},
	["Madhya Pradesh"] = {poldiv = {"divisions"}},
	["Maharashtra"] = {poldiv = {"divisions"}},
	["Manipur"] = {},
	["Meghalaya"] = {poldiv = {"divisions"}},
	["Mizoram"] = {},
	["Nagaland"] = {poldiv = {"divisions"}},
	["Odisha"] = {poldiv = {"divisions"}},
	["Puducherry"] = {divtype = "union territory"},
	["Punjab"] = {poldiv = {"divisions"}},
	["Rajasthan"] = {poldiv = {"divisions"}},
	["Sikkim"] = {},
	["Tamil Nadu"] = {},
	["Telangana"] = {},
	["Tripura"] = {},
	["Uttar Pradesh"] = {poldiv = {"divisions"}},
	["Uttarakhand"] = {poldiv = {"divisions"}},
	["West Bengal"] = {poldiv = {"divisions"}},
}

export.indonesian_provinces = {
	["Aceh"] = {},
	["Bali"] = {},
	["Bangka Belitung Islands"] = {},
	["Banten"] = {},
	["Bengkulu"] = {},
	["Central Java"] = {},
	["Central Kalimantan"] = {},
	["Central Sulawesi"] = {},
	["East Java"] = {},
	["East Kalimantan"] = {},
	["East Nusa Tenggara"] = {},
	["Gorontalo"] = {},
	["Special Capital Region of Jakarta"] = {},
	["Jambi"] = {},
	["Lampung"] = {},
	["Maluku"] = {},
	["North Kalimantan"] = {},
	["North Maluku"] = {},
	["North Sulawesi"] = {},
	["North Sumatra"] = {},
	["Papua"] = {},
	["Riau"] = {},
	["Riau Islands"] = {},
	["Southeast Sulawesi"] = {},
	["South Kalimantan"] = {},
	["South Sulawesi"] = {},
	["South Sumatra"] = {},
	["West Java"] = {},
	["West Kalimantan"] = {},
	["West Nusa Tenggara"] = {},
	["West Papua"] = {},
	["West Sulawesi"] = {},
	["West Sumatra"] = {},
	["Special Region of Yogyakarta"] = {},
}

export.irish_counties = {
	["County Carlow, ไอร์แลนด์"] = {},
	["County Cavan, ไอร์แลนด์"] = {},
	["County Clare, ไอร์แลนด์"] = {},
	["County Cork, ไอร์แลนด์"] = {},
	["County Donegal, ไอร์แลนด์"] = {},
	["County Dublin, ไอร์แลนด์"] = {},
	["County Galway, ไอร์แลนด์"] = {},
	["County Kerry, ไอร์แลนด์"] = {},
	["County Kildare, ไอร์แลนด์"] = {},
	["County Kilkenny, ไอร์แลนด์"] = {},
	["County Laois, ไอร์แลนด์"] = {},
	["County Leitrim, ไอร์แลนด์"] = {},
	["County Limerick, ไอร์แลนด์"] = {},
	["County Longford, ไอร์แลนด์"] = {},
	["County Louth, ไอร์แลนด์"] = {},
	["County Mayo, ไอร์แลนด์"] = {},
	["County Meath, ไอร์แลนด์"] = {},
	["County Monaghan, ไอร์แลนด์"] = {},
	["County Offaly, ไอร์แลนด์"] = {},
	["County Roscommon, ไอร์แลนด์"] = {},
	["County Sligo, ไอร์แลนด์"] = {},
	["County Tipperary, ไอร์แลนด์"] = {},
	["County Waterford, ไอร์แลนด์"] = {},
	["County Westmeath, ไอร์แลนด์"] = {},
	["County Wexford, ไอร์แลนด์"] = {},
	["County Wicklow, ไอร์แลนด์"] = {},
}

export.italian_administrative_regions = {
	["Abruzzo"] = {},
	["Aosta Valley"] = {divtype = {"ภูมิภาคปกครองตนเอง", "ภูมิภาค"}},
	["Apulia"] = {},
	["Basilicata"] = {},
	["Calabria"] = {},
	["Campania"] = {},
	["Emilia-Romagna"] = {},
	["Friuli-Venezia Giulia"] = {divtype = {"ภูมิภาคปกครองตนเอง", "ภูมิภาค"}},
	["Lazio"] = {},
	["Liguria"] = {},
	["Lombardy"] = {},
	["Marche"] = {},
	["Molise"] = {},
	["Piedmont"] = {},
	["Sardinia"] = {divtype = {"ภูมิภาคปกครองตนเอง", "ภูมิภาค"}},
	["Sicily"] = {divtype = {"ภูมิภาคปกครองตนเอง", "ภูมิภาค"}},
	["Trentino-Alto Adige"] = {divtype = {"ภูมิภาคปกครองตนเอง", "ภูมิภาค"}},
	["Tuscany"] = {},
	["Umbria"] = {},
	["Veneto"] = {},
}

-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japanese_prefectures = {
	["Aichi Prefecture"] = {},
	["Akita Prefecture"] = {},
	["Aomori Prefecture"] = {},
	["Chiba Prefecture"] = {},
	["Ehime Prefecture"] = {},
	["Fukui Prefecture"] = {},
	["Fukuoka Prefecture"] = {},
	["Fukushima Prefecture"] = {},
	["Gifu Prefecture"] = {},
	["Gunma Prefecture"] = {},
	["Hiroshima Prefecture"] = {},
	["Hokkaido"] = {poldiv = {{"อำเภอ", parent="subprefectures of Japan"}}}, -- just "Hokkaido" not "Hokkaido Prefecture"
	["Hyōgo Prefecture"] = {},
	["Ibaraki Prefecture"] = {},
	["Ishikawa Prefecture"] = {},
	["Iwate Prefecture"] = {},
	["Kagawa Prefecture"] = {},
	["Kagoshima Prefecture"] = {},
	["Kanagawa Prefecture"] = {},
	["Kōchi Prefecture"] = {},
	["Kumamoto Prefecture"] = {},
	["Kyoto Prefecture"] = {},
	["Mie Prefecture"] = {},
	["Miyagi Prefecture"] = {},
	["Miyazaki Prefecture"] = {},
	["Nagano Prefecture"] = {},
	["Nagasaki Prefecture"] = {},
	["Nara Prefecture"] = {},
	["Niigata Prefecture"] = {},
	["Ōita Prefecture"] = {},
	["Okayama Prefecture"] = {},
	["Okinawa Prefecture"] = {},
	["Osaka Prefecture"] = {},
	["Saga Prefecture"] = {},
	["Saitama Prefecture"] = {},
	["Shiga Prefecture"] = {},
	["Shimane Prefecture"] = {},
	["Shizuoka Prefecture"] = {},
	["Tochigi Prefecture"] = {},
	["Tokushima Prefecture"] = {},
	["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis", poldiv = {"special wards", {"อำเภอ", parent="subprefectures of Japan"}}}, -- just "Tokyo" not "Tokyo Prefecture" or "Tokyo Metropolis"
	["Tottori Prefecture"] = {},
	["Toyama Prefecture"] = {},
	["Wakayama Prefecture"] = {},
	["Yamagata Prefecture"] = {},
	["Yamaguchi Prefecture"] = {},
	["Yamanashi Prefecture"] = {},
}

local function japanese_placename_to_key(placename)
	if placename == "Hokkaido" or placename == "Tokyo" then
		return placename
	end
	return placename .. " Prefecture"
end

export.laotian_provinces = {
	["Attapeu province, Laos"] = {},
	["Bokeo province, Laos"] = {},
	["Bolikhamxai province, Laos"] = {},
	["Champasak province, Laos"] = {},
	["Houaphanh province, Laos"] = {},
	["Khammouane province, Laos"] = {},
	["Luang Namtha province, Laos"] = {},
	["Luang Prabang province, Laos"] = {},
	["Oudomxay province, Laos"] = {},
	["Phongsaly province, Laos"] = {},
	["Salavan province, Laos"] = {},
	["Savannakhet province, Laos"] = {},
	["Vientiane province, Laos"] = {},
	["Vientiane Prefecture, Laos"] = {divtype = "prefecture"},
	["Sainyabuli province, Laos"] = {},
	["Sekong province, Laos"] = {},
	["Xaisomboun province, Laos"] = {},
	["Xiangkhouang province, Laos"] = {},
}

local function laos_key_to_placename(key)
	key = key:gsub(", Laos$", "")
	local bare_key = key:gsub(" province$", "")
	if key == bare_key then
		return key
	else
		return {key, bare_key}
	end
end

local function laos_placename_to_key(placename)
	if placename == "Vientiane Prefecture" then
		return placename .. ", Laos"
	end
	return placename .. " province, Laos"
end

export.maltese_regions = {
	["Central Region, มอลตา"] = {},
	["Gozo Region, มอลตา"] = {},
	["Northern Region, มอลตา"] = {},
	["South Eastern Region, มอลตา"] = {},
	["Southern Region, มอลตา"] = {},
}

export.mexican_states = {
	["Aguascalientes"] = {},
	["Baja California Norte"] = {},
	["Baja California Sur"] = {},
	["Campeche"] = {},
	["Chiapas"] = {},
	["Mexico City"] = {},
	["Chihuahua"] = {},
	["Coahuila"] = {},
	["Colima"] = {},
	["Durango"] = {},
	["Guanajuato"] = {},
	["Guerrero"] = {},
	["Hidalgo"] = {},
	["Jalisco"] = {},
	["the State of Mexico"] = {},
	["Michoacán"] = {},
	["Morelos"] = {},
	["Nayarit"] = {},
	["Nuevo León"] = {},
	["Oaxaca"] = {},
	["Puebla"] = {},
	["Querétaro"] = {},
	["Quintana Roo"] = {},
	["San Luis Potosí"] = {},
	["Sinaloa"] = {},
	["Sonora"] = {},
	["Tabasco"] = {},
	["Tamaulipas"] = {},
	["Tlaxcala"] = {},
	["Veracruz"] = {},
	["Yucatán"] = {},
	["Zacatecas"] = {},
}
		
export.moroccan_regions = {
	["Tangier-Tetouan-Al Hoceima"] = {},
	["Oriental"] = {},
	["Fez-Meknes"] = {},
	["Rabat-Sale-Kenitra"] = {},
	["Beni Mellal-Khenifra"] = {},
	["Casablanca-Settat"] = {},
	["Marrakesh-Safi"] = {},
	["Draa-Tafilalet"] = {},
	["Souss-Massa"] = {},
	["Guelmim-Oued Noun"] = {},
	["Laayoune-Sakia El Hamra"] = {},
	["Dakhla-Oued Ed-Dahab"] = {},
}

export.netherlands_provinces = {
	["Drenthe, เนเธอร์แลนด์"] = {},
	["Flevoland, เนเธอร์แลนด์"] = {},
	["Friesland, เนเธอร์แลนด์"] = {},
	["Gelderland, เนเธอร์แลนด์"] = {},
	["Groningen, เนเธอร์แลนด์"] = {},
	["Limburg, เนเธอร์แลนด์"] = {},
	["North Brabant, เนเธอร์แลนด์"] = {},
	["North Holland, เนเธอร์แลนด์"] = {},
	["Overijssel, เนเธอร์แลนด์"] = {},
	["South Holland, เนเธอร์แลนด์"] = {},
	["Utrecht, เนเธอร์แลนด์"] = {},
	["Zeeland, เนเธอร์แลนด์"] = {},
}

export.norwegian_counties = {
	["Østfold"] = {},
	["Akershus"] = {},
	["Oslo"] = {},
	["Hedmark"] = {},
	["Oppland"] = {},
	["Buskerud"] = {},
	["Vestfold"] = {},
	["Telemark"] = {},
	["Aust-Agder"] = {},
	["Vest-Agder"] = {},
	["Rogaland"] = {},
	["Hordaland"] = {},
	["Sogn og Fjordane"] = {},
	["Møre og Romsdal"] = {},
	["Nordland"] = {},
	["Troms"] = {},
	["Finnmark"] = {},
	["Trøndelag"] = {},
}

export.philippine_provinces = {
	["Abra, ฟิลิปปินส์"] = {},
	["Agusan del Norte, ฟิลิปปินส์"] = {},
	["Agusan del Sur, ฟิลิปปินส์"] = {},
	["Aklan, ฟิลิปปินส์"] = {},
	["Albay, ฟิลิปปินส์"] = {},
	["Antique, ฟิลิปปินส์"] = {},
	["Apayao, ฟิลิปปินส์"] = {},
	["Aurora, ฟิลิปปินส์"] = {},
	["Basilan, ฟิลิปปินส์"] = {},
	["Bataan, ฟิลิปปินส์"] = {},
	["Batanes, ฟิลิปปินส์"] = {},
	["Batangas, ฟิลิปปินส์"] = {},
	["Benguet, ฟิลิปปินส์"] = {},
	["Biliran, ฟิลิปปินส์"] = {},
	["Bohol, ฟิลิปปินส์"] = {},
	["Bukidnon, ฟิลิปปินส์"] = {},
	["Bulacan, ฟิลิปปินส์"] = {},
	["Cagayan, ฟิลิปปินส์"] = {},
	["Camarines Norte, ฟิลิปปินส์"] = {},
	["Camarines Sur, ฟิลิปปินส์"] = {},
	["Camiguin, ฟิลิปปินส์"] = {},
	["Capiz, ฟิลิปปินส์"] = {},
	["Catanduanes, ฟิลิปปินส์"] = {},
	["Cavite, ฟิลิปปินส์"] = {},
	["Cebu, ฟิลิปปินส์"] = {},
	["Cotabato, ฟิลิปปินส์"] = {},
	["Davao de Oro, ฟิลิปปินส์"] = {},
	["Davao del Norte, ฟิลิปปินส์"] = {},
	["Davao del Sur, ฟิลิปปินส์"] = {},
	["Davao Occidental, ฟิลิปปินส์"] = {},
	["Davao Oriental, ฟิลิปปินส์"] = {},
	["Dinagat Islands, ฟิลิปปินส์"] = {},
	["Eastern Samar, ฟิลิปปินส์"] = {},
	["Guimaras, ฟิลิปปินส์"] = {},
	["Ifugao, ฟิลิปปินส์"] = {},
	["Ilocos Norte, ฟิลิปปินส์"] = {},
	["Ilocos Sur, ฟิลิปปินส์"] = {},
	["Iloilo, ฟิลิปปินส์"] = {},
	["Isabela, ฟิลิปปินส์"] = {},
	["Kalinga, ฟิลิปปินส์"] = {},
	["La Union, ฟิลิปปินส์"] = {},
	["Laguna, ฟิลิปปินส์"] = {},
	["Lanao del Norte, ฟิลิปปินส์"] = {},
	["Lanao del Sur, ฟิลิปปินส์"] = {},
	["Leyte, ฟิลิปปินส์"] = {},
	["Maguindanao, ฟิลิปปินส์"] = {},
	["Marinduque, ฟิลิปปินส์"] = {},
	["Masbate, ฟิลิปปินส์"] = {},
	["Misamis Occidental, ฟิลิปปินส์"] = {},
	["Misamis Oriental, ฟิลิปปินส์"] = {},
	["Mountain Province, ฟิลิปปินส์"] = {},
	["Negros Occidental, ฟิลิปปินส์"] = {},
	["Negros Oriental, ฟิลิปปินส์"] = {},
	["Northern Samar, ฟิลิปปินส์"] = {},
	["Nueva Ecija, ฟิลิปปินส์"] = {},
	["Nueva Vizcaya, ฟิลิปปินส์"] = {},
	["Occidental Mindoro, ฟิลิปปินส์"] = {},
	["Oriental Mindoro, ฟิลิปปินส์"] = {},
	["Palawan, ฟิลิปปินส์"] = {},
	["Pampanga, ฟิลิปปินส์"] = {},
	["Pangasinan, ฟิลิปปินส์"] = {},
	["Quezon, ฟิลิปปินส์"] = {},
	["Quirino, ฟิลิปปินส์"] = {},
	["Rizal, ฟิลิปปินส์"] = {},
	["Romblon, ฟิลิปปินส์"] = {},
	["Samar, ฟิลิปปินส์"] = {},
	["Sarangani, ฟิลิปปินส์"] = {},
	["Siquijor, ฟิลิปปินส์"] = {},
	["Sorsogon, ฟิลิปปินส์"] = {},
	["South Cotabato, ฟิลิปปินส์"] = {},
	["Southern Leyte, ฟิลิปปินส์"] = {},
	["Sultan Kudarat, ฟิลิปปินส์"] = {},
	["Sulu, ฟิลิปปินส์"] = {},
	["Surigao del Norte, ฟิลิปปินส์"] = {},
	["Surigao del Sur, ฟิลิปปินส์"] = {},
	["Tarlac, ฟิลิปปินส์"] = {},
	["Tawi-Tawi, ฟิลิปปินส์"] = {},
	["Zambales, ฟิลิปปินส์"] = {},
	["Zamboanga del Norte, ฟิลิปปินส์"] = {},
	["Zamboanga del Sur, ฟิลิปปินส์"] = {},
	["Zamboanga Sibugay, ฟิลิปปินส์"] = {},
	["Metro Manila, ฟิลิปปินส์"] = {},
}

export.russian_federal_subjects = {
	-- autonomous oblasts
	["the Jewish Autonomous Oblast"] = {divtype = {"autonomous oblast", "โอบลาสต์"}},
	-- autonomous okrugs
	["Chukotka Autonomous Okrug"] = {divtype = "autonomous okrug"},
	["Khanty-Mansi Autonomous Okrug"] = {divtype = "autonomous okrug"},
	["Nenets Autonomous Okrug"] = {divtype = "autonomous okrug"},
	["Yamalo-Nenets Autonomous Okrug"] = {divtype = "autonomous okrug"},
	-- krais
	["Altai Krai"] = {divtype = "krai"},
	["Kamchatka Krai"] = {divtype = "krai"},
	["Khabarovsk Krai"] = {divtype = "krai"},
	["Krasnodar Krai"] = {divtype = "krai"},
	["Krasnoyarsk Krai"] = {divtype = "krai"},
	["Perm Krai"] = {divtype = "krai"},
	["Primorsky Krai"] = {divtype = "krai"},
	["Stavropol Krai"] = {divtype = "krai"},
	["Zabaykalsky Krai"] = {divtype = "krai"},
	-- oblasts
	["Amur Oblast"] = {},
	["Arkhangelsk Oblast"] = {},
	["Astrakhan Oblast"] = {},
	["Belgorod Oblast"] = {},
	["Bryansk Oblast"] = {},
	["Chelyabinsk Oblast"] = {},
	["Irkutsk Oblast"] = {},
	["Ivanovo Oblast"] = {},
	["Kaliningrad Oblast"] = {},
	["Kaluga Oblast"] = {},
	["Kemerovo Oblast"] = {},
	["Kirov Oblast"] = {},
	["Kostroma Oblast"] = {},
	["Kurgan Oblast"] = {},
	["Kursk Oblast"] = {},
	["Leningrad Oblast"] = {},
	["Lipetsk Oblast"] = {},
	["Magadan Oblast"] = {},
	["Moscow Oblast"] = {},
	["Murmansk Oblast"] = {},
	["Nizhny Novgorod Oblast"] = {},
	["Novgorod Oblast"] = {},
	["Novosibirsk Oblast"] = {},
	["Omsk Oblast"] = {},
	["Orenburg Oblast"] = {},
	["Oryol Oblast"] = {},
	["Penza Oblast"] = {},
	["Pskov Oblast"] = {},
	["Rostov Oblast"] = {},
	["Ryazan Oblast"] = {},
	["Sakhalin Oblast"] = {},
	["Samara Oblast"] = {},
	["Saratov Oblast"] = {},
	["Smolensk Oblast"] = {},
	["Sverdlovsk Oblast"] = {},
	["Tambov Oblast"] = {},
	["Tomsk Oblast"] = {},
	["Tula Oblast"] = {},
	["Tver Oblast"] = {},
	["Tyumen Oblast"] = {},
	["Ulyanovsk Oblast"] = {},
	["Vladimir Oblast"] = {},
	["Volgograd Oblast"] = {},
	["Vologda Oblast"] = {},
	["Voronezh Oblast"] = {},
	["Yaroslavl Oblast"] = {},
	-- republics
	["the Republic of Adygea"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Bashkortostan"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Buryatia"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Dagestan"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Ingushetia"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Kalmykia"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Karelia"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Khakassia"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Mordovia"] = {divtype = "สาธารณรัฐ"},
	["the Republic of North Ossetia-Alania"] = {divtype = "สาธารณรัฐ"},
	["the Republic of Tatarstan"] = {divtype = "สาธารณรัฐ"},
	["the Altai Republic"] = {divtype = "สาธารณรัฐ"},
	["the Chechen Republic"] = {divtype = "สาธารณรัฐ"},
	["the Chuvash Republic"] = {divtype = "สาธารณรัฐ"},
	["the Kabardino-Balkar Republic"] = {divtype = "สาธารณรัฐ"},
	["the Karachay-Cherkess Republic"] = {divtype = "สาธารณรัฐ"},
	["the Komi Republic"] = {divtype = "สาธารณรัฐ"},
	["the Mari El Republic"] = {divtype = "สาธารณรัฐ"},
	["the Sakha Republic"] = {divtype = "สาธารณรัฐ"},
	["the Tuva Republic"] = {divtype = "สาธารณรัฐ"},
	["the Udmurt Republic"] = {divtype = "สาธารณรัฐ"},
	-- Not sure what to do about this one from a neutrality perspective
	-- ["the Republic of Crimea"] = {divtype = "สาธารณรัฐ"},
	-- There are also federal cities (not included because they're cities):
	-- Moscow, Saint Petersburg, Sevastopol (not sure what to do about the
	-- last one if we were to include federal cities, see "Republic of Crimea"
	-- above)
}

local function russian_placename_to_key(placename)
	-- We allow the user to say e.g. "obl/Samara" and "rep/Tatarstan" in place of
	-- "obl/Samara Oblast" and "rep/Republic of Tatarstan".
	if export.russian_federal_subjects[placename] or export.russian_federal_subjects["the " .. placename] then
		return placename
	end
	for _, suffix in ipairs({"Autonomous Okrug", "Krai", "โอบลาสต์"}) do
		local suffixed_placename = placename .. " " .. suffix
		if export.russian_federal_subjects[suffixed_placename] then
			return suffixed_placename
		end
	end
	local republic_placename = "Republic of " .. placename
	if export.russian_federal_subjects["the " .. republic_placename] then
		return republic_placename
	end
	local republic_placename = placename .. " Republic"
	if export.russian_federal_subjects["the " .. republic_placename] then
		return republic_placename
	end
	return placename
end

export.spanish_autonomous_communities = {
	["Andalusia"] = {},
	["Aragon"] = {},
	["Asturias"] = {},
	["the Balearic Islands"] = {},
	["the Basque Country"] = {},
	["the Canary Islands"] = {},
	["Cantabria"] = {},
	["Castile and León"] = {},
	["Castilla-La Mancha"] = {},
	["Catalonia"] = {},
	["the Community of Madrid"] = {},
	["Extremadura"] = {},
	["Galicia"] = {},
	["La Rioja"] = {},
	["Murcia"] = {},
	["Navarre"] = {},
	["Valencia"] = {},
}

export.uk_constituent_countries = {
	["อังกฤษ"] = {poldiv = {"ภูมิภาค", "เทศมณฑล", "เขต", "civil parishes"}},
	["นอร์เทิร์นไอร์แลนด์"] = {divtype = "มณฑล", parents = {"สหราชอาณาจักร", "ไอร์แลนด์"},
		poldiv = {"เขต"}, miscdiv = {"traditional counties"}},
	["สกอตแลนด์"] = {poldiv = {"council areas"}, miscdiv = {"ภูมิภาค", "เขต", "traditional counties"}},
	["เวลส์"] = {poldiv = {"เทศมณฑล", "เขตเลือกตั้งเทศมณฑล"}},
}

-- table of US states; interpolated into the main 'places' table, but also needed separately
export.us_states = {
	["Alabama, สหรัฐอเมริกา"] = {},
	["Alaska, สหรัฐอเมริกา"] = {poldiv = {
		{"เขตเลือกตั้ง", parent="counties of the United States"},
		{"borough seats", parent="county seats of the United States"},
	}},
	["Arizona, สหรัฐอเมริกา"] = {},
	["Arkansas, สหรัฐอเมริกา"] = {},
	["California, สหรัฐอเมริกา"] = {},
	["Colorado, สหรัฐอเมริกา"] = {},
	["Connecticut, สหรัฐอเมริกา"] = {},
	["Delaware, สหรัฐอเมริกา"] = {},
	["Florida, สหรัฐอเมริกา"] = {},
	["Georgia, สหรัฐอเมริกา"] = {},
	["Hawaii, สหรัฐอเมริกา"] = {parents = {"สหรัฐอเมริกา", "พอลินีเชีย"}},
	["Idaho, สหรัฐอเมริกา"] = {},
	["Illinois, สหรัฐอเมริกา"] = {},
	["Indiana, สหรัฐอเมริกา"] = {},
	["Iowa, สหรัฐอเมริกา"] = {},
	["Kansas, สหรัฐอเมริกา"] = {},
	["Kentucky, สหรัฐอเมริกา"] = {},
	["Louisiana, สหรัฐอเมริกา"] = {poldiv = {
		{"parishes", parent="counties of the United States"},
		{"parish seats", parent="county seats of the United States"},
	}},
	["Maine, สหรัฐอเมริกา"] = {},
	["Maryland, สหรัฐอเมริกา"] = {},
	["Massachusetts, สหรัฐอเมริกา"] = {},
	["Michigan, สหรัฐอเมริกา"] = {},
	["Minnesota, สหรัฐอเมริกา"] = {},
	["Mississippi, สหรัฐอเมริกา"] = {},
	["Missouri, สหรัฐอเมริกา"] = {},
	["Montana, สหรัฐอเมริกา"] = {},
	["Nebraska, สหรัฐอเมริกา"] = {},
	["Nevada, สหรัฐอเมริกา"] = {},
	["New Hampshire, สหรัฐอเมริกา"] = {},
	["New Jersey, สหรัฐอเมริกา"] = {},
	["New Mexico, สหรัฐอเมริกา"] = {},
	["New York, สหรัฐอเมริกา"] = {},
	["North Carolina, สหรัฐอเมริกา"] = {},
	["North Dakota, สหรัฐอเมริกา"] = {},
	["Ohio, สหรัฐอเมริกา"] = {},
	["Oklahoma, สหรัฐอเมริกา"] = {},
	["Oregon, สหรัฐอเมริกา"] = {},
	["Pennsylvania, สหรัฐอเมริกา"] = {},
	["Rhode Island, สหรัฐอเมริกา"] = {},
	["South Carolina, สหรัฐอเมริกา"] = {},
	["South Dakota, สหรัฐอเมริกา"] = {},
	["Tennessee, สหรัฐอเมริกา"] = {},
	["Texas, สหรัฐอเมริกา"] = {},
	["Utah, สหรัฐอเมริกา"] = {},
	["Vermont, สหรัฐอเมริกา"] = {},
	["Virginia, สหรัฐอเมริกา"] = {},
	["Washington, สหรัฐอเมริกา"] = {},
	["West Virginia, สหรัฐอเมริกา"] = {},
	["Wisconsin, สหรัฐอเมริกา"] = {},
	["Wyoming, สหรัฐอเมริกา"] = {},
}

export.english_counties = {
	-- ["Avon, อังกฤษ"] = {}, -- no longer
	["Bedfordshire, อังกฤษ"] = {},
	["Berkshire, อังกฤษ"] = {},
	-- ["Brighton and Hove, อังกฤษ"] = {}, -- city
	-- ["Bristol, อังกฤษ"] = {}, -- city
	["Buckinghamshire, อังกฤษ"] = {},
	["Cambridgeshire, อังกฤษ"] = {},
	-- ["Cambridgeshire and Isle of Ely, อังกฤษ"] = {}, -- no longer
	["Cheshire, อังกฤษ"] = {},
	-- ["Cleveland, อังกฤษ"] = {}, -- no longer
	["Cornwall, อังกฤษ"] = {},
	-- ["Cumberland, อังกฤษ"] = {}, -- no longer
	["Cumbria, อังกฤษ"] = {},
	["Derbyshire, อังกฤษ"] = {},
	["Devon, อังกฤษ"] = {},
	["Dorset, อังกฤษ"] = {},
	["County Durham, อังกฤษ"] = {},
	-- ["East Suffolk, อังกฤษ"] = {}, -- no longer
	["East Sussex, อังกฤษ"] = {},
	["Essex, อังกฤษ"] = {},
	["Gloucestershire, อังกฤษ"] = {},
	["Greater London, อังกฤษ"] = {},
	["Greater Manchester, อังกฤษ"] = {},
	["Hampshire, อังกฤษ"] = {},
	-- ["Hereford and Worcester, อังกฤษ"] = {}, -- no longer
	["Herefordshire, อังกฤษ"] = {}, 
	["Hertfordshire, อังกฤษ"] = {},
	-- ["Humberside, อังกฤษ"] = {}, -- no longer
	-- ["Huntingdon and Peterborough, อังกฤษ"] = {}, -- no longer
	-- ["Huntingdonshire, อังกฤษ"] = {}, -- no longer
	-- ["the Isle of Ely, อังกฤษ"] = {}, -- no longer
	["the Isle of Wight, อังกฤษ"] = {},
	["Kent, อังกฤษ"] = {},
	["Lancashire, อังกฤษ"] = {},
	["Leicestershire, อังกฤษ"] = {},
	["Lincolnshire, อังกฤษ"] = {},
	-- ["the County of London, อังกฤษ"] = {}, -- no longer
	["Merseyside, อังกฤษ"] = {},
	-- ["Middlesex, อังกฤษ"] = {}, -- no longer
	["Norfolk, อังกฤษ"] = {},
	["Northamptonshire, อังกฤษ"] = {},
	["Northumberland, อังกฤษ"] = {},
	-- ["North Humberside, อังกฤษ"] = {}, -- no longer
	["North Yorkshire, อังกฤษ"] = {},
	["Nottinghamshire, อังกฤษ"] = {},
	["Oxfordshire, อังกฤษ"] = {},
	-- ["the Soke of Peterborough, อังกฤษ"] = {}, -- no longer
	["Rutland, อังกฤษ"] = {},
	["Shropshire, อังกฤษ"] = {},
	["Somerset, อังกฤษ"] = {},
	["South Humberside, อังกฤษ"] = {},
	["South Yorkshire, อังกฤษ"] = {},
	["Staffordshire, อังกฤษ"] = {},
	["Suffolk, อังกฤษ"] = {},
	["Surrey, อังกฤษ"] = {},
	-- ["Sussex, อังกฤษ"] = {}, -- no longer
	["Tyne and Wear, อังกฤษ"] = {},
	["Warwickshire, อังกฤษ"] = {},
	["the West Midlands, อังกฤษ"] = {},
	-- ["Westmorland, อังกฤษ"] = {}, -- no longer
	-- ["West Suffolk, อังกฤษ"] = {}, -- no longer
	["West Sussex, อังกฤษ"] = {},
	["West Yorkshire, อังกฤษ"] = {},
	["Wiltshire, อังกฤษ"] = {},
	["Worcestershire, อังกฤษ"] = {},
	-- ["Yorkshire, อังกฤษ"] = {}, -- no longer
	["the East Riding of Yorkshire, อังกฤษ"] = {},
	-- ["the North Riding of Yorkshire, อังกฤษ"] = {}, -- no longer
	-- ["the West Riding of Yorkshire, อังกฤษ"] = {}, -- no longer
}

export.northern_irish_counties = {
	["County Antrim, นอร์เทิร์นไอร์แลนด์"] = {},
	["County Armagh, นอร์เทิร์นไอร์แลนด์"] = {},
	["the City of Belfast, นอร์เทิร์นไอร์แลนด์"] = {is_city = true},
	["County Down, นอร์เทิร์นไอร์แลนด์"] = {},
	["County Fermanagh, นอร์เทิร์นไอร์แลนด์"] = {},
	["County Londonderry, นอร์เทิร์นไอร์แลนด์"] = {},
	["the City of Derry, นอร์เทิร์นไอร์แลนด์"] = {is_city = true},
	["County Tyrone, นอร์เทิร์นไอร์แลนด์"] = {},
}

export.romanian_counties = {
	["Alba County, โรมาเนีย"] = {},
	["Arad County, โรมาเนีย"] = {},
	["Argeș County, โรมาเนีย"] = {},
	["Bacău County, โรมาเนีย"] = {},
	["Bihor County, โรมาเนีย"] = {},
	["Bistrița-Năsăud County, โรมาเนีย"] = {},
	["Botoșani County, โรมาเนีย"] = {},
	["Brașov County, โรมาเนีย"] = {},
	["Brăila County, โรมาเนีย"] = {},
	["Buzău County, โรมาเนีย"] = {},
	["Caraș-Severin County, โรมาเนีย"] = {},
	["Cluj County, โรมาเนีย"] = {},
	["Constanța County, โรมาเนีย"] = {},
	["Covasna County, โรมาเนีย"] = {},
	["Călărași County, โรมาเนีย"] = {},
	["Dolj County, โรมาเนีย"] = {},
	["Dâmbovița County, โรมาเนีย"] = {},
	["Galați County, โรมาเนีย"] = {},
	["Giurgiu County, โรมาเนีย"] = {},
	["Gorj County, โรมาเนีย"] = {},
	["Harghita County, โรมาเนีย"] = {},
	["Hunedoara County, โรมาเนีย"] = {},
	["Ialomița County, โรมาเนีย"] = {},
	["Iași County, โรมาเนีย"] = {},
	["Ilfov County, โรมาเนีย"] = {},
	["Maramureș County, โรมาเนีย"] = {},
	["Mehedinți County, โรมาเนีย"] = {},
	["Mureș County, โรมาเนีย"] = {},
	["Neamț County, โรมาเนีย"] = {},
	["Olt County, โรมาเนีย"] = {},
	["Prahova County, โรมาเนีย"] = {},
	["Satu Mare County, โรมาเนีย"] = {},
	["Sibiu County, โรมาเนีย"] = {},
	["Suceava County, โรมาเนีย"] = {},
	["Sălaj County, โรมาเนีย"] = {},
	["Teleorman County, โรมาเนีย"] = {},
	["Timiș County, โรมาเนีย"] = {},
	["Tulcea County, โรมาเนีย"] = {},
	["Vaslui County, โรมาเนีย"] = {},
	["Vrancea County, โรมาเนีย"] = {},
	["Vâlcea County, โรมาเนีย"] = {},
}

export.scottish_council_areas = {
	["the City of Glasgow, สกอตแลนด์"] = {},
	["the City of Edinburgh, สกอตแลนด์"] = {},
	["Fife, สกอตแลนด์"] = {},
	["North Lanarkshire, สกอตแลนด์"] = {},
	["South Lanarkshire, สกอตแลนด์"] = {},
	["Aberdeenshire, สกอตแลนด์"] = {},
	["Highland, สกอตแลนด์"] = {},
	["the City of Aberdeen, สกอตแลนด์"] = {},
	["West Lothian, สกอตแลนด์"] = {},
	["Renfrewshire, สกอตแลนด์"] = {},
	["Falkirk, สกอตแลนด์"] = {},
	["Perth and Kinross, สกอตแลนด์"] = {},
	["Dumfries and Galloway, สกอตแลนด์"] = {},
	["the City of Dundee, สกอตแลนด์"] = {},
	["North Ayrshire, สกอตแลนด์"] = {},
	["East Ayrshire, สกอตแลนด์"] = {},
	["Angus, สกอตแลนด์"] = {},
	["the Scottish Borders, สกอตแลนด์"] = {},
	["South Ayrshire, สกอตแลนด์"] = {},
	["East Dunbartonshire, สกอตแลนด์"] = {},
	["East Lothian, สกอตแลนด์"] = {},
	["Moray, สกอตแลนด์"] = {},
	["East Renfrewshire, สกอตแลนด์"] = {},
	["Stirling, สกอตแลนด์"] = {},
	["Midlothian, สกอตแลนด์"] = {},
	["West Dunbartonshire, สกอตแลนด์"] = {},
	["Argyll and Bute, สกอตแลนด์"] = {},
	["Inverclyde, สกอตแลนด์"] = {},
	["Clackmannanshire, สกอตแลนด์"] = {},
	["Na h-Eileanan Siar, สกอตแลนด์"] = {},
	["the Shetland Islands, สกอตแลนด์"] = {},
	["the Orkney Islands, สกอตแลนด์"] = {},
}

export.welsh_principal_areas = {
	["Blaenau Gwent, เวลส์"] = {},
	["Bridgend, เวลส์"] = {},
	["Caerphilly, เวลส์"] = {},
	-- ["Cardiff, เวลส์"] = {divtype = "เมืองใหญ่"},
	["Carmarthenshire, เวลส์"] = {divtype = "เทศมณฑล"},
	["Ceredigion, เวลส์"] = {divtype = "เทศมณฑล"},
	["Conwy, เวลส์"] = {},
	["Denbighshire, เวลส์"] = {divtype = "เทศมณฑล"},
	["Flintshire, เวลส์"] = {divtype = "เทศมณฑล"},
	["Gwynedd, เวลส์"] = {divtype = "เทศมณฑล"},
	["the Isle of Anglesey, เวลส์"] = {divtype = "เทศมณฑล"},
	["Merthyr Tydfil, เวลส์"] = {},
	["Monmouthshire, เวลส์"] = {divtype = "เทศมณฑล"},
	["Neath Port Talbot, เวลส์"] = {},
	-- ["Newport, เวลส์"] = {divtype = "เมืองใหญ่"},
	["Pembrokeshire, เวลส์"] = {divtype = "เทศมณฑล"},
	["Powys, เวลส์"] = {divtype = "เทศมณฑล"},
	["Rhondda Cynon Taf, เวลส์"] = {},
	-- ["Swansea, เวลส์"] = {divtype = "เมืองใหญ่"},
	["Torfaen, เวลส์"] = {},
	["the Vale of Glamorgan, เวลส์"] = {},
	["Wrexham, เวลส์"] = {},
}

export.new_york_boroughs = {
	["Bronx"] = true,
	["Brooklyn"] = true,
	["Manhattan"] = true,
	["Queens"] = true,
	["Staten Island"] = true,
}

export.cities = {
	{
		default_divtype = "รัฐ",
		containing_polities = {"ออสเตรเลีย", divtype="ประเทศ"},
		data = {
			["Sydney"] = {"New South Wales"},
			["Melbourne"] = {"Victoria"},
			["Brisbane"] = {"Queensland"},
			["Perth"] = {"Western Australia"},
			["Adelaide"] = {"South Australia"},
		},
	},
	{
		default_divtype = "รัฐ",
		containing_polities = {"บราซิล", divtype="ประเทศ"},
		data = {
			-- This only lists cities, not metro areas, over 1,000,000 inhabitants.
			["São Paulo"] = {"São Paulo"},
			["Rio de Janeiro"] = {"Rio de Janeiro"},
			["Brasília"] = {"Distrito Federal"},
			["Brasilia"] = {alias_of="Brasília"},
			["Salvador"] = {"Bahia", wp="%c, %d", commonscat="%c (%d)"},
			["Fortaleza"] = {"Ceará"},
			["Belo Horizonte"] = {"Minas Gerais"},
			["Manaus"] = {"Amazonas"},
			["Curitiba"] = {"Paraná"},
			["Recife"] = {"Pernambuco"},
			["Goiânia"] = {"Goiás"},
			["Goiania"] = {alias_of="Goiânia"},
			["Belém"] = {"Pará"},
			["Belem"] = {alias_of="Belém"},
			["Porto Alegre"] = {"Rio Grande do Sul"},
			["Guarulhos"] = {"São Paulo"},
			["Campinas"] = {"São Paulo"},
		},
	},
	{
		default_divtype = "มณฑล",
		containing_polities = {"แคนาดา", divtype="ประเทศ"},
		data = {
			["Toronto"] = {"Ontario"},
			["Montreal"] = {"Quebec"},
			["Vancouver"] = {"British Columbia"},
			["Calgary"] = {"Alberta"},
			["Edmonton"] = {"Alberta"},
			["Ottawa"] = {"Ontario"},
			["Winnipeg"] = {"Manitoba"},
			["Quebec City"] = {"Quebec"},
			["Hamilton"] = {"Ontario", wp="%c, %d"},
			["Kitchener"] = {"Ontario", wp="%c, %d"},
		},
	},
	{
		default_divtype = "มณฑล",
		containing_polities = {"จีน", divtype="ประเทศ"},
		data = {
			-- This only lists the top 50. Per [[w:List of cities in China by population]], there
			-- are 102 cities over 1,000,000 inhabitants, not to mention metro areas. Our coverage
			-- of China is fairly sparse; when it increases, add to this list.
			["Shanghai"] = {},
			["Beijing"] = {},
			["Guangzhou"] = {"Guangdong"},
			["Shenzhen"] = {"Guangdong"},
			["Tianjin"] = {},
			["Wuhan"] = {"Hubei"},
			["Dongguan"] = {"Guangdong"},
			["Chengdu"] = {"Sichuan"},
			["Foshan"] = {"Guangdong"},
			["Chongqing"] = {},
			["Nanjing"] = {"Jiangsu"},
			["Shenyang"] = {"Liaoning"},
			["Hangzhou"] = {"Zhejiang"},
			["Xi'an"] = {"Shaanxi"},
			["Harbin"] = {"Heilongjiang"},
			["Suzhou"] = {"Jiangsu"},
			["Qingdao"] = {"Shandong"},
			["Dalian"] = {"Liaoning"},
			["Zhengzhou"] = {"Henan"},
			["Shantou"] = {"Guangdong"},
			["Jinan"] = {"Shandong"},
			["Changchun"] = {"Jilin"},
			["Kunming"] = {"Yunnan"},
			["Changsha"] = {"Hunan"},
			["Taiyuan"] = {"Shanxi"},
			["Xiamen"] = {"Fujian"},
			["Hefei"] = {"Anhui"},
			["Shijiazhuang"] = {"Hebei"},
			["Ürümqi"] = {"Xinjiang", divtype="ภูมิภาคปกครองตนเอง"},
			["Urumqi"] = {alias_of="Ürümqi"},
			["Fuzhou"] = {"Fujian"},
			["Wuxi"] = {"Jiangsu"},
			["Zhongshan"] = {"Guangdong"},
			["Wenzhou"] = {"Zhejiang"},
			["Nanning"] = {"Guangxi", divtype="ภูมิภาคปกครองตนเอง"},
			["Nanchang"] = {"Jiangxi"},
			["Ningbo"] = {"Zhejiang"},
			["Guiyang"] = {"Guizhou"},
			["Lanzhou"] = {"Gansu"},
			["Zibo"] = {"Shandong"},
			["Changzhou"] = {"Jiangsu"},
			["Xuzhou"] = {"Jiangsu"},
			["Tangshan"] = {"Hebei"},
			["Baotou"] = {"Inner Mongolia", divtype="ภูมิภาคปกครองตนเอง"},
			["Huizhou"] = {"Guangdong"},
			["Yantai"] = {"Shandong"},
			["Shaoxing"] = {"Zhejiang"},
			["Liuzhou"] = {"Guangxi", divtype="ภูมิภาคปกครองตนเอง"},
			["Nantong"] = {"Jiangsu"},
			["Luoyang"] = {"Henan"},
			["Yangzhou"] = {"Jiangsu"},
		},
	},
	{
		default_divtype = "ภูมิภาค",
		containing_polities = {"ฝรั่งเศส", divtype="ประเทศ"},
		data = {
			["Paris"] = {"Île-de-France"},
			["Lyon"] = {"Auvergne-Rhône-Alpes"},
			["Lyons"] = {alias_of="Lyon"},
			["Marseille"] = {"Provence-Alpes-Côte d'Azur"},
			["Marseilles"] = {alias_of="Marseille"},
			["Toulouse"] = {"Occitanie"},
			["Lille"] = {"Hauts-de-France"},
			["Bordeaux"] = {"Nouvelle-Aquitaine"},
			["Nice"] = {"Provence-Alpes-Côte d'Azur"},
			["Nantes"] = {"Pays de la Loire"},
			["Strasbourg"] = {"Grand Est"},
			["Rennes"] = {"Brittany"},
		},
	},
	{
		default_divtype = "รัฐ",
		containing_polities = {"เยอรมนี", divtype="ประเทศ"},
		data = {
			["Berlin"] = {},
			["Dortmund"] = {"North Rhine-Westphalia"},
			["Essen"] = {"North Rhine-Westphalia"},
			["Duisberg"] = {"North Rhine-Westphalia"},
			["Hamburg"] = {},
			["Munich"] = {"Bavaria"},
			["Stuttgart"] = {"Baden-Württemberg"},
			["Frankfurt"] = {"Hesse"},
			["Cologne"] = {"North Rhine-Westphalia"},
			["Düsseldorf"] = {"North Rhine-Westphalia"},
			["Dusseldorf"] = {alias_of="Düsseldorf"},
			["Nuremberg"] = {"Bavaria"},
			["Bremen"] = {},
		},
	},
	{
		default_divtype = "รัฐ",
		containing_polities = {"อินเดีย", divtype="ประเทศ"},
		data = {
			-- This only lists the top 20. Per [[w:List of cities in India by population]], there
			-- are 46 cities over 1,000,000 inhabitants, not to mention metro areas. Our coverage
			-- of India is fairly sparse; when it increases, add to this list.
			["Mumbai"] = {"Maharashtra"},
			["Delhi"] = {},
			["Bangalore"] = {"Karnataka"},
			["Hyderabad"] = {"Telangana"},
			["Ahmedabad"] = {"Gujarat"},
			["Chennai"] = {"Tamil Nadu"},
			["Kolkata"] = {"West Bengal"},
			["Surat"] = {"Gujarat"},
			["Pune"] = {"Maharashtra"},
			["Jaipur"] = {"Rajasthan"},
			["Lucknow"] = {"Uttar Pradesh"},
			["Kanpur"] = {"Uttar Pradesh"},
			["Nagpur"] = {"Maharashtra"},
			["Indore"] = {"Madhya Pradesh"},
			["Thane"] = {"Maharashtra"},
			["Bhopal"] = {"Madhya Pradesh"},
			["Visakhapatnam"] = {"Andhra Pradesh"},
			["Pimpri-Chinchwad"] = {"Maharashtra"},
			["Patna"] = {"Bihar"},
			["Vadodara"] = {"Gujarat"},
		},
	},
	{
		default_divtype = "จังหวัด",
		containing_polities = {"ญี่ปุ่น", divtype="ประเทศ"},
		data = {
			-- Population figures from [[w:List of cities in Japan]]. Metro areas from
			-- [[w:List of metropolitan areas in Japan]].
			["Tokyo"] = {}, -- no single figure given for Tokyo as a whole.
			["Yokohama"] = {"Kanagawa"}, -- 3,697,894
			["Osaka"] = {"Osaka"}, -- 2,668,586
			["Nagoya"] = {"Aichi"}, -- 2,283,289
			-- FIXME, Hokkaido is handled specially.
			["Sapporo"] = {}, -- {"Hokkaido"}, -- 1,918,096
			["Fukuoka"] = {"Fukuoka"}, -- 1,581,527
			["Kobe"] = {"Hyōgo"}, -- 1,530,847
			["Kyoto"] = {"Kyoto"}, -- 1,474,570
			["Kawasaki"] = {"Kanagawa", wp="%c, %d"}, -- 1,373,630
			["Saitama"] = {"Saitama", wp="%c (city)", commonscat="%c, %d"}, -- 1,192,418
			["Hiroshima"] = {"Hiroshima"}, -- 1,163,806
			["Sendai"] = {"Miyagi"}, -- 1,029,552
			-- the remaining cities are considered "central cities" in a 1,000,000+ metro area
			-- (sometimes there is more than one central city in the area).
			["Kitakyushu"] = {"Fukuoka"}, -- 986,998
			["Chiba"] = {"Chiba", wp="%c (city)", commonscat="%c, %d"}, -- 938,695
			["Sakai"] = {"Osaka"}, -- 835,333
			["Niigata"] = {"Niigata", wp="%c (city)", commonscat="%c, %d"}, -- 813,053
			["Hamamatsu"] = {"Shizuoka"}, -- 811,431
			["Shizuoka"] = {"Shizuoka", wp="%c (city)", commonscat="%c, %d"}, -- 710,944
			["Sagamihara"] = {"Kanagawa"}, -- 706,342
			["Okayama"] = {"Okayama"}, -- 701,293
			["Kumamoto"] = {"Kumamoto"}, -- 670,348
			["Kagoshima"] = {"Kagoshima"}, -- 605,196
			-- skipped 6 cities (Funabashi, Hachiōji, Kawaguchi, Himeji, Matsuyama, Higashiōsaka)
			-- with population in the range 509k - 587k because not central cities in any
			-- 1,000,000+ metro area.
			["Utsunomiya"] = {"Tochigi"}, -- 507,833
		},
	},
	{
		default_divtype = "โอบลาสต์",
		containing_polities = {"รัสเซีย", divtype="ประเทศ"},
		data = {
			-- This only lists cities, not metro areas, over 1,000,000 inhabitants.
			["Moscow"] = {},
			["Saint Petersburg"] = {},
			["Novosibirsk"] = {"Novosibirsk Oblast"},
			["Yekaterinburg"] = {"Sverdlovsk Oblast"},
			["Nizhny Novgorod"] = {"Nizhny Novgorod Oblast"},
			["Kazan"] = {"the Republic of Tatarstan", divtype="สาธารณรัฐ"},
			["Chelyabinsk"] = {"Chelyabinsk Oblast"},
			["Omsk"] = {"Omsk Oblast"},
			["Samara"] = {"Samara Oblast"},
			["Ufa"] = {"the Republic of Bashkortostan", divtype="สาธารณรัฐ"},
			["Rostov-on-Don"] = {"Rostov Oblast"},
			["Rostov-na-Donu"] = {alias_of="Rostov-on-Don"},
			["Krasnoyarsk"] = {"Krasnoyarsk Krai", divtype="krai"},
			["Voronezh"] = {"Voronezh Oblast"},
			["Perm"] = {"Perm Krai", divtype="krai", wp="Perm, Russia"},
			["Volgograd"] = {"Volgograd Oblast"},
			["Krasnodar"] = {"Krasnodar Krai", divtype="krai"},
		},
	},
	{
		default_divtype = "ชุมชนปกครองตนเอง",
		containing_polities = {"สเปน", divtype="ประเทศ"},
		data = {
			["Madrid"] = {"the Community of Madrid"},
			["Barcelona"] = {"Catalonia"},
			-- this causes recursion errors.
			-- ["Valencia"] = {"Valencia"},
			["Seville"] = {"Andalusia"},
			["Bilbao"] = {"the Basque Country"},
		},
	},
	{
		default_divtype = "เทศมณฑล",
		containing_polities = {"สหราชอาณาจักร", divtype="ประเทศ"},
		data = {
			["London"] = {{"Greater London"}, {"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Manchester"] = {{"Greater Manchester"}, {"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Birmingham"] = {{"the West Midlands"}, {"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Liverpool"] = {{"Merseyside"}, {"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Glasgow"] = {{"the City of Glasgow", divtype="council area"}, {"สกอตแลนด์", divtype="ประเทศองค์ประกอบ"}},
			["Leeds"] = {{"West Yorkshire"}, {"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Newcastle upon Tyne"] = {{"Tyne and Wear"}, {"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Newcastle"] = {alias_of="Newcastle upon Tyne"},
			["Bristol"] = {{"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Cardiff"] = {{"เวลส์", divtype="ประเทศองค์ประกอบ"}},
			["Portsmouth"] = {{"Hampshire"}, {"อังกฤษ", divtype="ประเทศองค์ประกอบ"}},
			["Edinburgh"] = {{"the City of Edinburgh", divtype="council area"}, {"สกอตแลนด์", divtype="ประเทศองค์ประกอบ"}},
			-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
			["Swansea"] = {{"เวลส์", divtype="ประเทศองค์ประกอบ"}},
			["Newport"] = {{"เวลส์", divtype="ประเทศองค์ประกอบ"}},
		},
	},
	-- cities in the US
	{
		default_divtype = "รัฐ",
		containing_polities = {"สหรัฐอเมริกา", divtype="ประเทศ"},
		wp = "%c, %d",
		data = {
			-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
			["New York City"] = {"New York", wp="%c"},
			["Newark"] = {"New Jersey"},
			["Los Angeles"] = {"California", wp="%c"},
			["Long Beach"] = {"California"},
			["Riverside"] = {"California"},
			["Chicago"] = {"Illinois", wp="%c"},
			["Washington, D.C."] = {wp="%c"},
			["Baltimore"] = {"Maryland", wp="%c"},
			["San Jose"] = {"California"},
			["San Francisco"] = {"California", wp="%c"},
			["Oakland"] = {"California"},
			["Boston"] = {"Massachusetts", wp="%c"},
			["Providence"] = {"Rhode Island"},
			["Dallas"] = {"Texas", wp="%c", commonscat="%c, %d"},
			["Fort Worth"] = {"Texas"},
			["Philadelphia"] = {"Pennsylvania", wp="%c"},
			["Houston"] = {"Texas", wp="%c"},
			["Miami"] = {"Florida", wp="%c", commonscat="%c, %d"},
			["Atlanta"] = {"Georgia", wp="%c"},
			["Detroit"] = {"Michigan", wp="%c"},
			["Phoenix"] = {"Arizona", wp="%c", commonscat="%c, %d"},
			["Mesa"] = {"Arizona"},
			["Seattle"] = {"Washington", wp="%c"},
			["Orlando"] = {"Florida"},
			["Minneapolis"] = {"Minnesota", wp="%c"},
			["Cleveland"] = {"Ohio", wp="%c", commonscat="%c, %d"},
			["Denver"] = {"Colorado", wp="%c", commonscat="%c, %d"},
			["San Diego"] = {"California", wp="%c", commonscat="%c, %d"},
			["Portland"] = {"Oregon"},
			["Tampa"] = {"Florida"},
			["St. Louis"] = {"Missouri", wp="%c", commonscat="%c, %d"},
			["Charlotte"] = {"North Carolina"},
			["Sacramento"] = {"California"},
			["Pittsburgh"] = {"Pennsylvania", wp="%c"},
			["Salt Lake City"] = {"Utah", wp="%c"},
			["San Antonio"] = {"Texas", wp="%c", commonscat="%c, %d"},
			["Columbus"] = {"Ohio"},
			["Kansas City"] = {"Missouri", wp="%c metropolitan area", commonscat="%c, %d"},
			["Indianapolis"] = {"Indiana", wp="%c"},
			["Las Vegas"] = {"Nevada", wp="%c"},
			["Cincinnati"] = {"Ohio", wp="%c", commonscat="%c, %d"},
			["Austin"] = {"Texas"},
			["Milwaukee"] = {"Wisconsin", wp="%c", commonscat="%c, %d"},
			["Raleigh"] = {"North Carolina"},
			["Nashville"] = {"Tennessee"},
			["Virginia Beach"] = {"Virginia"},
			["Norfolk"] = {"Virginia"},
			["Greensboro"] = {"North Carolina"},
			["Winston-Salem"] = {"North Carolina"},
			["Jacksonville"] = {"Florida"},
			["New Orleans"] = {"Louisiana", wp="%c"},
			["Louisville"] = {"Kentucky"},
			["Greenville"] = {"South Carolina"},
			["Hartford"] = {"Connecticut"},
			["Oklahoma City"] = {"Oklahoma", wp="%c"},
			["Grand Rapids"] = {"Michigan"},
			["Memphis"] = {"Tennessee"},
			["Birmingham"] = {"Alabama"},
			["Fresno"] = {"California"},
			["Richmond"] = {"Virginia"},
			["Harrisburg"] = {"Pennsylvania"},
			-- any major city of top 50 MSA's that's missed by previous
			["Buffalo"] = {"New York"},
			-- any of the top 50 city by city population that's missed by previous
			["El Paso"] = {"Texas"},
			["Albuquerque"] = {"New Mexico"},
			["Tucson"] = {"Arizona"},
			["Colorado Springs"] = {"Colorado"},
			["Omaha"] = {"Nebraska"},
			["Tulsa"] = {"Oklahoma"},
			-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
		}
	},
	{
		default_divtype = "ประเทศ",
		containing_polities = {},
		data = {
			["Yerevan"] = {"อาร์มีเนีย"},
			["Vienna"] = {"ออสเตรีย"},
			["Minsk"] = {"เบลารุส"},
			["Brussels"] = {"เบลเยียม"},
			["Antwerp"] = {"เบลเยียม"},
			["Sofia"] = {"บัลแกเรีย"},
			["Zagreb"] = {"โครเอเชีย"},
			["Prague"] = {"สาธารณรัฐเช็ก"},
			["Olomouc"] = {"สาธารณรัฐเช็ก"},
			["Copenhagen"] = {"เดนมาร์ก"},
			["Helsinki"] = {{"Uusimaa", divtype="ภูมิภาค"}, {"ฟินแลนด์"}},
			["Athens"] = {"กรีซ"},
			["Thessaloniki"] = {"กรีซ"},
			["Budapest"] = {"ฮังการี"},
			-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
			["Dublin"] = {{"Dublin", divtype="เทศมณฑล"}, {"ไอร์แลนด์"}},
			["Venice"] = {{"Veneto", divtype="ภูมิภาคปกครอง"}, {"อิตาลี"}},
			["โรม"] = {{"Lazio", divtype="ภูมิภาคปกครอง"}, {"อิตาลี"}},
			["Milan"] = {{"Lombardy", divtype="ภูมิภาคปกครอง"}, {"อิตาลี"}},
			["Naples"] = {{"Campania", divtype="ภูมิภาคปกครอง"}, {"อิตาลี"}},
			["Turin"] = {{"Piedmont", divtype="ภูมิภาคปกครอง"}, {"อิตาลี"}},
			["Riga"] = {"ลัตเวีย"},
			["Amsterdam"] = {"เนเธอร์แลนด์"},
			["Rotterdam"] = {"เนเธอร์แลนด์"},
			["The Hague"] = {"เนเธอร์แลนด์"},
			["Oslo"] = {"นอร์เวย์"},
			["Warsaw"] = {"โปแลนด์"},
			["Katowice"] = {"โปแลนด์"},
			["Kraków"] = {"โปแลนด์"},
			["Krakow"] = {alias_of="Kraków"},
			["Gdańsk"] = {"โปแลนด์"},
			["Gdansk"] = {alias_of="Gdańsk"},
			["Poznań"] = {"โปแลนด์"},
			["Poznan"] = {alias_of="Poznań"},
			["Łódź"] = {"โปแลนด์"},
			["Lodz"] = {alias_of="Łódź"},
			["Lisbon"] = {"โปรตุเกส"},
			["Porto"] = {"โปรตุเกส"},
			["Bucharest"] = {"โรมาเนีย"},
			["Belgrade"] = {"เซอร์เบีย"},
			["Seoul"] = {"เกาหลีใต้"},
			["Stockholm"] = {"สวีเดน"},
			["Zürich"] = {"สวิตเซอร์แลนด์"},
			["Zurich"] = {alias_of="Zürich"},
			["Istanbul"] = {"ตุรกี"},
			["Kyiv"] = {"ยูเครน"},
			["Kiev"] = {alias_of="Kyiv"},
			["Kharkiv"] = {"ยูเครน"},
			["Odessa"] = {"ยูเครน", wp="Odesa"},
			["Odesa"] = {alias_of="Odessa"},
		},
	},
}

-----------------------------------------------------------------------------------
--                              Helper functions                                 --
-----------------------------------------------------------------------------------

local function ucfirst(label)
	return mw.getContentLanguage():ucfirst(label)
end

local function add_indefinite_article(label)
	if label:find("^[aeiouAEIOU]") then
		return "an " .. label
	else
		return "a " .. label
	end
end

-- Format a description that can have the special value of 'true' or 'nil' (use link_label() in
-- [[Module:category tree/topic cat]]) or "w" (use link_label(..., "wikify")). Any other value is returned as-is.
function export.format_description(desc, label)
	if desc == nil then
		desc = true
	end
	if desc == true then
		desc = require(topic_cat_utilities_module).link_label(label)
	elseif desc == "w" then
		desc = require(topic_cat_utilities_module).link_label(label, nil, "wikify")
	end
	return desc
end

function export.construct_bare_and_linked_version(key)
	local bare_key = key:match("^the (.*)$")
	local linked_key
	if bare_key then
		linked_key = "the [[" .. bare_key .. "]]"
	else
		linked_key = "[[" .. key .. "]]"
		bare_key = key
	end
	return bare_key, linked_key
end

local function simple_polity_bare_label_setter()
	return function(labels, group, key, value)
		local bare_key, linked_key = export.construct_bare_and_linked_version(key)
		local keydesc = value.keydesc or linked_key
		-- wp= defaults to true (Wikipedia article matches bare key = label)
		local wp = value.wp
		if wp == nil then
			wp = true
		end
		-- wpcat= defaults to wp= (if Wikipedia article has its own name, Wikipedia category and Commons category generally follow)
		local wpcat = value.wpcat
		if wpcat == nil then
			wpcat = wp
		end
		-- commonscat= defaults to wpcat= (if Wikipedia category has its own name, Commons category generally follows)
		local commonscat = value.commonscat
		if commonscat == nil then
			commonscat = wpcat
		end
		labels[bare_key] = {
			type = "topic",
			description = value.bare_category_desc or "{{{langname}}} terms related to the people, culture, or territory of " .. keydesc .. ".",
			parents = value.parents,
			wp = wp,
			wpcat = wpcat,
			commonscat = commonscat,
		}
	end
end

local function subpolity_keydesc(key, value, containing_polity, default_divtype)
	local divtype = value.divtype or default_divtype
	divtype = type(divtype) == "table" and divtype[1] or divtype
	divtype = add_indefinite_article(divtype)
	local bare_key, linked_key = export.construct_bare_and_linked_version(key)
	local bare_containing_polity, linked_containing_polity = export.construct_bare_and_linked_version(containing_polity)
	return value.keydesc or linked_key .. ", " .. divtype .. " of " .. linked_containing_polity
end

function export.call_key_to_placename(group, key)
	local placename = key
	if group.key_to_placename then
		placename = group.key_to_placename(key)
		if type(placename) == "table" then
			placename = placename[1]
		end
	end
	return placename
end

-- Return whether `list_or_element` (a list of strings, or a single string) "contains" `item` (a string). If
-- `list_or_element` is a list, this returns true if `item` is in the list; otherwise it returns true if `item`
-- equals `list_or_element`.
local function list_or_element_contains(list_or_element, item)
	if type(list_or_element) == "table" then
		return m_table.contains(list_or_element, item)
	else
		return list_or_element == item
	end
end

local function subpolity_bare_label_setter(containing_polity)
	return function(labels, group, key, value)
		local placename = export.call_key_to_placename(group, key)
		local keydesc = subpolity_keydesc(placename, value, containing_polity, group.default_divtype)
		local bare_key, linked_key = export.construct_bare_and_linked_version(key)
		local bare_containing_polity, linked_containing_polity = export.construct_bare_and_linked_version(containing_polity)
		labels[bare_key] = {
			type = "topic",
			description = value.bare_category_desc or "{{{langname}}} terms related to the people, culture, or territory of " .. keydesc .. ".",
			parents = value.parents or {bare_containing_polity},
		}
	end
end

local function subpolity_value_transformer(containing_polity)
	local containing_polity_type = "ประเทศ"
	if type(containing_polity) == "table" then
		containing_polity_type, containing_polity = containing_polity[1], containing_polity[2]
	end
	return function(group, key, value)
		local placename = export.call_key_to_placename(group, key)
		value.keydesc = subpolity_keydesc(placename, value, containing_polity, group.default_divtype)
		value.containing_polity = containing_polity
		value.containing_polity_type = containing_polity_type
		value.poldiv = value.poldiv or group.default_poldiv
		value.british_spelling = value.british_spelling or group.british_spelling
		value.no_containing_polity_cat = value.no_containing_polity_cat or group.no_containing_polity_cat
		return value
	end
end

-- See the documentation for `place_cat_handler` above the definition of `export.polities` below.
function export.default_place_cat_handler(group, placetypes, placename)
	if group.placename_to_key then
		placename = group.placename_to_key(placename)
	end
	local spec = group.data[placename]
	local article = ""
	local bare_placename = placename
	if not spec then
		placename = "the " .. placename
		spec = group.data[placename]
	end
	if not spec then
		return nil
	end
	local divtype = spec.divtype or group.default_divtype
	if type(divtype) == "table" then
		for _, dt in ipairs(divtype) do
			if list_or_element_contains(placetypes, dt) then
				return placename, bare_placename
			end
		end
		return nil
	elseif list_or_element_contains(placetypes, divtype) then
		return placename, bare_placename
	else
		return nil
	end
end

-- This is typically used to define key_to_placename. It generates a function that chops off
-- part of a string using the regex TO_CHOP. To chop at the end, add $ at the end of the regex;
-- to chop at the beginning, add ^ at the beginning. It is normally used for subpolities (e.g.
-- states of the US or counties of England) when the placename of the polity as found in
-- categories includes the larger containing polity in it (e.g. "Georgia, USA" or
-- "Hampshire, England"). Typical usage is like this:
--
-- ...
-- key_to_placename = chop(", England$"),
-- ...
local function chop(to_chop)
	return function(key) return key:gsub(to_chop, "") end
end

-- This is typically used to define placename_to_key. It generates a function that appends a
-- string to the end of a given string. It does the opposite operation of chop() and is used
-- along with that function. It is normally used for subpolities (e.g. states of the US or
-- counties of England) when the placename of the polity as found in categories includes the
-- larger containing polity in it (e.g. "Georgia, USA" or "Hampshire, England"). Typical usage
-- is like this:
--
-- ...
-- placename_to_key = append(", England"),
-- ...
local function append(to_append)
	return function(placename) return placename .. to_append end
end

local function construct_russian_federal_subject_keydesc(linked_key, divtype)
	if divtype == "โอบลาสต์" then
		-- Hack: Oblasts generally don't have entries under "Foo Oblast"
		-- but just under "Foo", so fix the linked key appropriately;
		-- doesn't apply to the Jewish Autonomous Oblast
		linked_key = linked_key:gsub(" Oblast%]%]", "%]%] Oblast")
	end
	return linked_key .. ", a federal subject ([[" .. divtype .. "]]) of [[Russia]]"
end

local function northern_ireland_key_to_placename(key)
	key = key:gsub(", นอร์เทิร์นไอร์แลนด์$", "")
	local bare_key = key:gsub("^County ", "")
	if key == bare_key then
		return key
	else
		return {key, bare_key}
	end
end

local function northern_ireland_placename_to_key(placename)
	if not placename:find("^County ") and not placename:find("^City ") then
		placename = "County " .. placename
	end
	return placename .. ", นอร์เทิร์นไอร์แลนด์"
end

local function ireland_key_to_placename(key)
	key = key:gsub(", ไอร์แลนด์$", "")
	local bare_key = key:gsub("^County ", "")
	if key == bare_key then
		return key
	else
		return {key, bare_key}
	end
end

local function ireland_placename_to_key(placename)
	if not placename:find("^County ") and not placename:find("^City ") then
		placename = "County " .. placename
	end
	return placename .. ", ไอร์แลนด์"
end

function export.get_city_containing_polities(group, key, value)
	local containing_polities = group.containing_polities
	if type(containing_polities[1]) == "string" then
		containing_polities = {containing_polities}
	elseif value[1] then
		containing_polities = m_table.shallowcopy(containing_polities)
	end
	local this_containing_polities = value
	if type(value[1]) == "string" then
		this_containing_polities = {this_containing_polities}
	end
	for n, polity in ipairs(this_containing_polities) do
		table.insert(containing_polities, n, polity)
	end
	return containing_polities
end

-- Given a containing polity of a city, possibly with preceding "the" removed,
-- find the group and key in 'export.polities'.
function export.city_containing_polity_to_group_and_key(polity)
	for _, polity_group in ipairs(export.polities) do
		local key_polity = polity
		if polity_group.placename_to_key then
			key_polity = polity_group.placename_to_key(key_polity)
		end
		if polity_group.data[key_polity] then
			return polity_group, key_polity
		end
		key_polity = "the " .. key_polity
		if polity_group.data[key_polity] then
			return polity_group, key_polity
		end
	end
	return nil
end

-----------------------------------------------------------------------------------
--                                  Polities                                     --
-----------------------------------------------------------------------------------

--[=[

The following table specifies the known polities and their properties, where a polity is either a top-level political
division (e.g. a country) or a subpolity (political subdivision of a top-level polity). Polities are gathered into
''groups'', each of which contains several items (places) that are handled similarly. Each group contains a list of all
the places contained in that group along with their properties, as well as group-specific handlers that specify common
properties of all items in the group. These items are used to construct the category description objects (i.e. the
objects that describe how to format the display of a category page, as documented in
[[Module:category tree/topic cat/data/documentation]]) for the following types of categories:

1. A bare topical category, e.g. [[:Category:en:Netherlands]]. Category description objects for these are created by the
   `bare_label_setter` handler of a given group. (The term "label" is used here because the category system internally
   refers to the category name, without any language prefix, as a "label", and the corresponding per-label category
   description objects are stored in the `labels` table in a `topic cat` submodule, notably
   [[Module:category tree/topic cat/data/Places]].)
2. Normally, several categories of the form [[:Category:fr:Cities in the Netherlands]],
   [[:Category:es:Rivers in New Mexico, USA]], etc., for the place types listed above in `generic_place_types`.
   There is a top-level handler that will automatically create category description objects for such categories. It can
   be disabled for all place types in `generic_place_types` that aren't in `generic_place_types_for_cities` by
   specifying `is_city = true` in the data for a given item. (This is used for city-states such as Monaco and
   Vatican City.) It can also be disabled for all place types in `generic_place_types` other than "places" by specifying
   `is_former_place = true` in the data for a given item. (The group below for former countries and empires has a
   handler that specifies `is_former_place = true` for all items in the group. The reason for this is that former states
   such as Persia, East Germany, the Soviet Union and the Roman Empire should have their cities, towns, rivers and such
   listed under the current entities occupying the same area.)
3. Optionally, one or more categories of the form [[:Category:de:Provinces of the Netherlands]],
   [[:Category:pt:Counties of Wales]], etc. These are for political subdivisions, and for historic/popular subdivisions
   that have no current political significance (e.g. [[:Category:nl:Provinces of Ireland]],
   [[:Category:zh:Regions of the United States]]). These are controlled by the `poldiv` (for political subdivisions) and
   `miscdiv` (for historic/popular subdivisions) keys in the data for a given item.

NOTE: Second-level political subdivisions (e.g. counties of states of the US) could be handled here but normally aren't.
Instead, there are special handlers below for US counties and Brazilian and Philippine municipalities, and
manually-created labels for certain other countries (e.g. Canadian counties). The reason for this is that all political
and historic/popular subdivisions handled here have a category like [[:Category:en:Political subdivisions]] as their
primary parent, whereas we often want a different primary parent for second-level political subdivisions, such as
[[:Category:en:Counties of the United States]] for US counties. FIXME: We should allow the parents to be specified for
political subdivisions. This will probably necessitate another type of group-specific handler, similar to
`value_transformer` and `bare_label_setter` (see below).

NOTE: Some of the above categories are added automatically to pages that use the {{place}} template with the appropriate
values. Currently, whether or not such categories are added is controlled by [[Module:place/data]], which is independent
of the data here but in many ways duplicates it. FIXME: The two should be merged.

NOTE: There is also some duplication in [[Module:category tree/topic cat/data/Earth]], particularly for continents and
supranational regions (e.g. "the British Isles"). FIXME: Consolidate the data there into here.

Each group consists of a table with the following keys:

* `data`: This is a table listing the polities in the group. The keys are polities in the form that they appear in a
  category like [[:Category:de:Provinces of the Netherlands]] or [[:Category:fr:Cities in Alabama, USA]] (hence, they
  should include prefixes such as "the" and suffixes such as ", USA"). The value of a key is a property table. Its
  format is described above under "Placename Tables". Note that the property table is transformed using the group's
  `value_transformer` handler before being used.

* `value_transformer`: This function is used to transform the value of an item in `data` (an object containing
  properties of a place; see above) to the final form used by the handlers in
  [[Module:category tree/topic cat/data/Places]] that handle city-type and political-subdivision-type categories. It is
  passed three arguments (the group and the key and value of the data item). Its normal purpose is to add extra
  properties to the data item value, such as `containing_polity` (see above) and `keydesc` (the appropriate description
  of the place, which often includes the type of division and the country).  Some groups (in particular, the one for
  former polities, such as Persia and the Roman Empire) also add `is_former_place = true`. The reason these extra
  properties are added by a function like this instead of included directly is that they are typically the same or
  similar for all items in a group, and including them directly would be duplicative. Note that there is a
  preconstructed function subpolity_bare_label_setter() (for subpolities of top-level polities) to help.

* `bare_label_setter`: This function adds an entry in the `labels` table for
  [[Module:category tree/topic cat/data/Places]] for bare topical categories such as [[:Category:en:Netherlands]],
  [[:Category:fr:Alabama, USA]] or [[:Category:ru:Republic of Tatarstan]]. It is passed four arguments (the `labels`
  table, the group and the key and value of the data item). There are preconstructed functions to help here, such as
  simple_polity_bare_label_setter() (for top-level polities) and subpolity_bare_label_setter() (for subpolities of
  top-level polities). This function often makes use of the `parents` and/or `description` keys in the data item's
  value (see above).

* `place_cat_handler`: Used in conjunction with {{place}} to properly categorize placenames. It is passed three
  arguments: GROUP, the spec for a given group; PLACETYPES, the placetype of a place or a list of such placetypes;
  and PLACENAME, the corresponding placename as found in a holonym, i.e. without any preceding "the". If a place
  matching PLACENAME is found in GROUP, and the place's placetype is compatible with PLACETYPE, return two arguments:
  the form of PLACENAME to be used in categories that include a preceding article (usually "the"), and the bare form
  of PLACENAME, without a preceding article. Otherwise, return nil. Here, "compatible" means that any of the
  placetypes in PLACETYPES is equal to any of the known placetypes of PLACENAME. (Most placenames in most groups have
  a single associated placetype, but some have more than one, e.g. Wales, which is associated with both
  "constituent country" and "country", and will be recognized for categorization purposes if either placetype is used.)
  For example, given the placename "Bashkortostan", placetype "republic", and group data associated with Russian
  federal subjects, the first return value will be "the Republic of Bashkortostan" and the second return value will be
  "Republic of Bashkortostan". Note that the first value is always equal to the key in `group.data` that describes the
  placename. (Both return values are needed because some categories contain the article, e.g. [[:Category:Places in the
  Republic of Bashkortostan]], and some don't, in particular the bare topical category
  [[:Category:Republic of Bashkortostan]].) If omitted, the function default_place_cat_handler() is used.

* `default_divtype`: The default entity type for entities in this group, if not overidden at the entity level. See
  `divtype` above under "Placename Tables".
]=]

export.polities = {
	-- countries
	{
		bare_label_setter = simple_polity_bare_label_setter(),
		value_transformer = function(group, key, value)
			value.british_spelling = value.british_spelling or group.british_spelling
			return value
		end,
		default_divtype = "ประเทศ",
		data = export.countries,
	},

	-- pseudo-countries: typically overseas territories or de-facto independent countries, which in both cases
	-- are not internationally recognized as sovereign nations but which we treat similarly to countries.
	{
		bare_label_setter = simple_polity_bare_label_setter(),
		value_transformer = function(group, key, value)
			value.british_spelling = value.british_spelling or group.british_spelling
			return value
		end,
		default_divtype = "ประเทศ",
		data = export.pseudo_countries,
	},

	-- former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
	{
		bare_label_setter = simple_polity_bare_label_setter(),
		value_transformer = function(group, key, value)
			value.british_spelling = value.british_spelling or group.british_spelling
			value.is_former_place = true
			return value
		end,
		default_divtype = "ประเทศ",
		data = export.former_countries,
	},

	-- states and territories of Australia
	{
		bare_label_setter = subpolity_bare_label_setter("ออสเตรเลีย"),
		value_transformer = subpolity_value_transformer("ออสเตรเลีย"),
		default_divtype = "รัฐ",
		british_spelling = true,
		data = export.australian_states_and_territories,
	},

	-- states of Austria
	{
		bare_label_setter = subpolity_bare_label_setter("ออสเตรีย"),
		value_transformer = subpolity_value_transformer("ออสเตรีย"),
		default_divtype = "รัฐ",
		british_spelling = true,
		default_poldiv = {{"เทศบาล", parent="municipalities of Austria"}},
		data = export.austrian_states,
	},

	-- divisions of Bangladesh
	{
		key_to_placename = chop(" Division$"),
		placename_to_key = append(" Division"),
		bare_label_setter = subpolity_bare_label_setter("Bangladesh"),
		value_transformer = subpolity_value_transformer("Bangladesh"),
		default_divtype = "division",
		british_spelling = true,
		default_poldiv = {{"districts", parent="districts of Bangladesh"}},
		data = export.bangladeshi_divisions,
	},

	-- states of Brazil
	{
		key_to_placename = chop(", บราซิล$"),
		placename_to_key = append(", บราซิล"),
		bare_label_setter = subpolity_bare_label_setter("บราซิล"),
		value_transformer = subpolity_value_transformer("บราซิล"),
		default_divtype = "รัฐ",
		default_poldiv = {{"เทศบาล", parent="municipalities of Brazil"}},
		data = export.brazilian_states,
	},

	-- provinces and territories of Canada
	{
		bare_label_setter = subpolity_bare_label_setter("แคนาดา"),
		value_transformer = subpolity_value_transformer("แคนาดา"),
		default_divtype = "มณฑล",
		british_spelling = true,
		data = export.canadian_provinces_and_territories,
	},

	-- provinces and autonomous regions of China
	{
		bare_label_setter = subpolity_bare_label_setter("จีน"),
		value_transformer = subpolity_value_transformer("จีน"),
		default_divtype = "มณฑล",
		data = export.chinese_provinces_and_autonomous_regions,
	},

	-- regions of Finland
	{
		key_to_placename = chop(", ฟินแลนด์$"),
		placename_to_key = append(", ฟินแลนด์"),
		bare_label_setter = subpolity_bare_label_setter("ฟินแลนด์"),
		value_transformer = subpolity_value_transformer("ฟินแลนด์"),
		default_divtype = "ภูมิภาค",
		default_poldiv = {{"เทศบาล", parent="municipalities of Finland"}},
		british_spelling = true,
		data = export.finnish_regions,
	},

	-- administrative regions of France
	{
		bare_label_setter = subpolity_bare_label_setter("ฝรั่งเศส"),
		value_transformer = subpolity_value_transformer("ฝรั่งเศส"),
		-- Canonically these are 'administrative regions' but also categorize if identified as a 'region'.
		default_divtype = {"ภูมิภาคปกครอง", "ภูมิภาค"},
		british_spelling = true,
		data = export.french_administrative_regions,
	},

	-- states of Germany
	{
		bare_label_setter = subpolity_bare_label_setter("เยอรมนี"),
		value_transformer = subpolity_value_transformer("เยอรมนี"),
		default_divtype = "รัฐ",
		british_spelling = true,
		data = export.german_states,
	},

	-- states and union territories of India
	{
		bare_label_setter = subpolity_bare_label_setter("อินเดีย"),
		value_transformer = subpolity_value_transformer("อินเดีย"),
		default_divtype = "รัฐ",
		british_spelling = true,
		data = export.indian_states_and_union_territories,
	},

	-- provinces of Indonesia
	{
		bare_label_setter = subpolity_bare_label_setter("อินโดนีเซีย"),
		value_transformer = subpolity_value_transformer("อินโดนีเซีย"),
		default_divtype = "มณฑล",
		british_spelling = true,
		data = export.indonesian_provinces,
	},

	-- counties of Ireland
	{
		key_to_placename = ireland_key_to_placename,
		placename_to_key = ireland_placename_to_key,
		bare_label_setter = subpolity_bare_label_setter("ไอร์แลนด์"),
		value_transformer = subpolity_value_transformer("ไอร์แลนด์"),
		default_divtype = "เทศมณฑล",
		british_spelling = true,
		data = export.irish_counties,
	},

	-- administrative regions of Italy
	{
		bare_label_setter = subpolity_bare_label_setter("อิตาลี"),
		value_transformer = subpolity_value_transformer("อิตาลี"),
		default_divtype = {"ภูมิภาคปกครอง", "ภูมิภาค"},
		british_spelling = true,
		data = export.italian_administrative_regions,
	},

	-- prefectures of Japan
	{
		key_to_placename = chop(" Prefecture$"),
		placename_to_key = japanese_placename_to_key,
		-- We can't use the normal subpolity_bare_label_setter() because we set a special parent
		-- (normally the parent would just be "Japan"). FIXME: Do we want this difference?
		-- Or do we want e.g. provinces in China to have a parent "Provinces of China" instead of
		-- just "China"?
		bare_label_setter = function(labels, group, key, value)
			labels[key] = {
				type = "topic",
				description = "{{{langname}}} terms related to [[" .. key:gsub(" Prefecture$", "") .. "]], a [[prefecture]] of [[Japan]].",
				parents = {"Prefectures of Japan"},
			}
		end,
		value_transformer = subpolity_value_transformer("ญี่ปุ่น"),
		default_divtype = "จังหวัด",
		data = export.japanese_prefectures,
	},
	
	-- provinces of Laos
	{
		key_to_placename = laos_key_to_placename,
		placename_to_key = laos_placename_to_key,
		bare_label_setter = subpolity_bare_label_setter("Laos"),
		value_transformer = subpolity_value_transformer("Laos"),
		default_divtype = "province",
		data = export.laotian_provinces,
	},

	-- regions of Malta
	{
		key_to_placename = chop(", มอลตา$"),
		placename_to_key = append(", มอลตา"),
		bare_label_setter = subpolity_bare_label_setter("มอลตา"),
		value_transformer = subpolity_value_transformer("มอลตา"),
		default_divtype = "ภูมิภาค",
		british_spelling = true,
		-- The regions are too generic in name. For example, "Central Region" exists elsewhere, e.g. in South Africa.
		no_containing_polity_cat = true,
		data = export.maltese_regions,
	},


	-- Mexican states
	{
		bare_label_setter = subpolity_bare_label_setter("เม็กซิโก"),
		value_transformer = subpolity_value_transformer("เม็กซิโก"),
		default_divtype = "รัฐ",
		data = export.mexican_states,
	},

	-- regions of Morocco
	{
		bare_label_setter = subpolity_bare_label_setter("โมร็อกโก"),
		value_transformer = subpolity_value_transformer("โมร็อกโก"),
		default_divtype = "ภูมิภาค",
		british_spelling = true,
		data = export.moroccan_regions,
	},

	-- provinces of the Netherlands
	{
		key_to_placename = chop(", เนเธอร์แลนด์$"),
		placename_to_key = append(", เนเธอร์แลนด์"),
		bare_label_setter = subpolity_bare_label_setter("เนเธอร์แลนด์"),
		value_transformer = subpolity_value_transformer("เนเธอร์แลนด์"),
		default_divtype = "มณฑล",
		default_poldiv = {{"เทศบาล", parent="municipalities of the Netherlands"}},
		british_spelling = true,
		data = export.netherlands_provinces,
	},

	-- counties of Norway
	{
		bare_label_setter = subpolity_bare_label_setter("นอร์เวย์"),
		value_transformer = subpolity_value_transformer("นอร์เวย์"),
		default_divtype = "เทศมณฑล",
		british_spelling = true,
		data = export.norwegian_counties,
	},

	-- provinces of the Philippines
	{
		key_to_placename = chop(", ฟิลิปปินส์$"),
		placename_to_key = append(", ฟิลิปปินส์"),
		bare_label_setter = subpolity_bare_label_setter("ฟิลิปปินส์"),
		value_transformer = subpolity_value_transformer("ฟิลิปปินส์"),
		default_divtype = "มณฑล",
		default_poldiv = {{"เทศบาล", parent="municipalities of the Philippines"}},
		data = export.philippine_provinces,
	},

	-- counties of Romania
	{
		key_to_placename = chop(" County, โรมาเนีย$"),
		placename_to_key = append(" County, โรมาเนีย"),
		bare_label_setter = subpolity_bare_label_setter("โรมาเนีย"),
		value_transformer = subpolity_value_transformer("โรมาเนีย"),
		default_divtype = "เทศมณฑล",
		british_spelling = true,
		data = export.romanian_counties,
	},

	-- federal subjects of Russia
	{
		-- No current need for key_to_placename because it's only used in subpolity_bare_label_setter
		-- and subpolity_value_transformer, and we override both handlers.
		placename_to_key = russian_placename_to_key,
		bare_label_setter = function(labels, group, key, value)
			local divtype = value.divtype or group.default_divtype
			if type(divtype) == "table" then
				divtype = divtype[1]
			end
			local bare_key, linked_key = export.construct_bare_and_linked_version(key)
			labels[bare_key] = {
				type = "topic",
				description = "{{{langname}}} terms related to " .. construct_russian_federal_subject_keydesc(linked_key, divtype) .. ".",
				parents = {ucfirst(divtype) .. "s of Russia"},
			}
		end,
		value_transformer = function(group, key, value)
			value.containing_polity = "รัสเซีย"
			local divtype = value.divtype or group.default_divtype
			if type(divtype) == "table" then
				divtype = divtype[1]
			end
			local bare_key, linked_key = export.construct_bare_and_linked_version(key)
			value.keydesc = construct_russian_federal_subject_keydesc(linked_key, divtype)
			return value
		end,
		default_divtype = "โอบลาสต์",
		british_spelling = true,
		data = export.russian_federal_subjects,
	},

	-- autonomous communities of Spain
	{
		bare_label_setter = subpolity_bare_label_setter("สเปน"),
		value_transformer = subpolity_value_transformer("สเปน"),
		default_divtype = "ชุมชนปกครองตนเอง",
		british_spelling = true,
		data = export.spanish_autonomous_communities,
	},

	-- states of the United States
	{
		key_to_placename = chop(", สหรัฐอเมริกา$"),
		placename_to_key = append(", สหรัฐอเมริกา"),
		bare_label_setter = subpolity_bare_label_setter("สหรัฐอเมริกา"),
		value_transformer = subpolity_value_transformer("สหรัฐอเมริกา"),
		default_divtype = "รัฐ",
		default_poldiv = {
			{"เทศมณฑล", parent="counties of the United States"},
			{"county seats", parent="county seats of the United States"},
		},
		data = export.us_states,
	},

	-- constituent countries and provinces of the United Kingdom
	{
		bare_label_setter = subpolity_bare_label_setter("สหราชอาณาจักร"),
		value_transformer = subpolity_value_transformer("สหราชอาณาจักร"),
		default_divtype = {"ประเทศองค์ประกอบ", "ประเทศ"},
		british_spelling = true,
		-- Don't create categories like 'Category:en:Towns in the United Kingdom'
		-- or 'Category:en:Places in the United Kingdom'.
		no_containing_polity_cat = true,
		data = export.uk_constituent_countries,
	},

	-- counties of England
	{
		key_to_placename = chop(", อังกฤษ$"),
		placename_to_key = append(", อังกฤษ"),
		bare_label_setter = subpolity_bare_label_setter("อังกฤษ"),
		value_transformer = subpolity_value_transformer({"ประเทศองค์ประกอบ", "อังกฤษ"}),
		default_divtype = "เทศมณฑล",
		default_poldiv = {{"เขต", parent="districts of England"}},
		british_spelling = true,
		data = export.english_counties,
	},

	-- counties of Northern Ireland
	{
		key_to_placename = northern_ireland_key_to_placename,
		placename_to_key = northern_ireland_placename_to_key,
		bare_label_setter = subpolity_bare_label_setter("นอร์เทิร์นไอร์แลนด์"),
		value_transformer = subpolity_value_transformer({"ประเทศองค์ประกอบ", "นอร์เทิร์นไอร์แลนด์"}),
		default_divtype = "เทศมณฑล",
		british_spelling = true,
		data = export.northern_irish_counties,
	},

	-- council areas of Scotland
	{
		key_to_placename = chop(", สกอตแลนด์$"),
		placename_to_key = append(", สกอตแลนด์"),
		bare_label_setter = subpolity_bare_label_setter("สกอตแลนด์"),
		value_transformer = subpolity_value_transformer({"ประเทศองค์ประกอบ", "สกอตแลนด์"}),
		default_divtype = "council area",
		british_spelling = true,
		data = export.scottish_council_areas,
	},

	-- principal areas (cities, counties and county boroughs) of Wales
	{
		key_to_placename = chop(", เวลส์$"),
		placename_to_key = append(", เวลส์"),
		bare_label_setter = subpolity_bare_label_setter("เวลส์"),
		value_transformer = subpolity_value_transformer({"ประเทศองค์ประกอบ", "เวลส์"}),
		default_divtype = "เขตเลือกตั้งเทศมณฑล",
		british_spelling = true,
		data = export.welsh_principal_areas,
	},

}

return export