Wiktionary
viwiktionary
https://vi.wiktionary.org/wiki/Wiktionary:Trang_Ch%C3%ADnh
MediaWiki 1.46.0-wmf.26
case-sensitive
Phương tiện
Đặc biệt
Thảo luận
Thành viên
Thảo luận Thành viên
Wiktionary
Thảo luận Wiktionary
Tập tin
Thảo luận Tập tin
MediaWiki
Thảo luận MediaWiki
Bản mẫu
Thảo luận Bản mẫu
Trợ giúp
Thảo luận Trợ giúp
Thể loại
Thảo luận Thể loại
Phụ lục
Thảo luận Phụ lục
TimedText
TimedText talk
Mô đun
Thảo luận Mô đun
Event
Event talk
cát đằng
0
82284
2350191
1307322
2026-05-05T03:49:27Z
Kelly zhrm
58416
Kelly zhrm đã đổi [[Cát đằng]] thành [[cát đằng]]
1307322
wikitext
text/x-wiki
{{-vie-}}
{{-pron-}}
{{vie-pron|Cát|đằng}}
{{-pr-noun-}}
'''Cát đằng'''
# Chỉ [[người]] [[vợ lẽ]]. [[Xem]] [[Cát]] [[Lũy]].
{{-trans-}}
{{-ref-}}
{{R:FVDP}}
[[Thể loại:Danh từ riêng tiếng Việt]]
oau82o50vw4ibv45xuf20hw89zmwnyl
2350201
2350191
2026-05-05T03:59:09Z
Kelly zhrm
58416
2350201
wikitext
text/x-wiki
=={{langname|vi}}==
{{wp|Chi Cát đằng}}
==={{ĐM|etym}}===
{{vi-etym-sino|葛藤}}.
==={{ĐM|pron}}===
{{vi-IPA}}
==={{ĐM|n}}===
{{vi-noun}}
# Loài cây [[dây leo]] có hoa màu [[xanh biếc]], [[tím]] hoặc [[trắng]], thường được trồng để [[làm]] [[cảnh]].
# {{lb|vi|cũ|văn chương}} Cây [[sắn]] (cát) và cây [[bìm]] (đằng), hai loại cây leo sống [[bám]] vào những cây khác; dùng để ví thân phận [[lẽ mọn]].
==={{ĐM|ref}}===
* {{R:Tratu}}
c4asphggut3k8hxy93n7r35wo5oassk
2350215
2350201
2026-05-05T04:12:14Z
Kelly zhrm
58416
2350215
wikitext
text/x-wiki
=={{langname|vi}}==
{{wp|Chi Cát đằng}}
==={{ĐM|etym}}===
{{vi-etym-sino|葛藤}}.
==={{ĐM|pron}}===
{{vi-IPA}}
==={{ĐM|n}}===
{{vi-noun}}
# Loài cây [[dây leo]] có hoa màu [[xanh biếc]], [[tím]] hoặc [[trắng]], thường được trồng để [[làm]] [[cảnh]].
# {{lb|vi|cũ|văn chương}} Cây [[sắn]] (cát) và cây [[bìm]] (đằng), hai loại cây leo sống [[bám]] vào những cây khác; dùng để ví thân phận [[lẽ mọn]].
#: {{syn|vi|cát lũy}}
==={{ĐM|ref}}===
* {{R:Tratu}}
pv8mrvkq2c3esh8x5glbbjiuc5582xq
Thảo luận Wiktionary:Thảo luận
5
103987
2350163
2348988
2026-05-04T20:43:34Z
MediaWiki message delivery
19980
Mục mới: /* Bản tin Kỹ thuật: Tuần 19-2026 */
2350163
wikitext
text/x-wiki
<!-- Xin bắt đầu cuộc thảo luận mói ở CUỐI trang! Cám ơn. -->
{{Lưu trữ}}
== Upcoming Dark Mode user interface rollout for anonymous Wikimedia sites users ==
<div lang="en" dir="ltr">
{{int:Hello}} Wikimedians,
Apologies if this message is not in your language. {{int:please-translate}}.
The [[mw:Special:MyLanguage/Reading/Web|Reader Experience team]] will launch the Dark mode feature for anonymous users on all Wikimedia sites, including yours, on October 29, 2025.
[[:en:Special:MyLanguage/Light-on-dark color scheme|Dark mode]] is an option that allows users to view pages in light-coloured text, and icons on a dark background. Once it is available for anonymous users, they can enable it when using various devices. More information on ways to enable it can be found on [[:en:Special:MyLanguage/Wikipedia:Dark mode#Options for anyone|this page]].
Given many pages are still not compatible with dark mode this will be an opt-in feature and not automatically apply to pages.
Dark mode requires modifications to content pages and templates, and since our initial launch [https://diff.wikimedia.org/2024/07/17/dark-modes-bright-future-how-dark-mode-will-transform-wikipedias-accessibility/ in July 2024], we have been working with communities and helping them prepare for dark mode. Before the rollout, it is essential that template authors and technical contributors test dark mode and read [[mw:Special:MyLanguage/Reading/Web/Accessibility for reading/Updates/2024-04|this page]] to learn how to make pages Dark mode-ready and address any compatibility issues found in templates.
We will fix most color compatibility issues only on the most-viewed pages on projects with over 5 million monthly page views. Technical contributors with an account should opt into dark mode currently using preferences or settings and test pages and seek help before the release to ensure everything complies before the enablement.
If you have any questions or need help, please [[mw:Special:MyLanguage/Talk:Reading/Web/Accessibility for reading#|contact the Reader Experience team]] for support.
Thank you!
</div>
<bdi lang="en" dir="ltr">[[User:UOzurumba (WMF)|UOzurumba (WMF)]]</bdi> 02:08, ngày 30 tháng 9 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:UOzurumba (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=User:UOzurumba_(WMF)/sandbox_Dark_mode_deployment_mass_message_list_(October_2025)&oldid=29358561 -->
== Bản tin Kỹ thuật: Tuần 41-2025 ==
<section begin="technews-2025-W41"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/41|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* [[mw:Special:MyLanguage/Help:Edit check#paste|Kiểm tra Nội dung Dán (Paste Check)]] là một tính năng Kiểm tra Sửa đổi mới để giúp phòng tránh và chống lại các hành vi vi phạm bản quyền. Khi biên tập viên dán văn bản vào bài viết, Kiểm tra Nội dung Dán sẽ nhắc họ xác nhận nguồn gốc và giấy phép của nội dung được dán đó. Bắt đầu từ thứ 4, ngày 8 tháng 10, [[phab:T403680|22 wiki sẽ thử nghiệm tính năng Kiểm tra Nội dung Dán]]. Kiểm tra Nội dung Dán sẽ giúp các tình nguyện viên mới hiểu và tuân theo các quy định và hướng dẫn cần thiết để thực hiện những đóng góp mang tính xây dựng cho các dự án Wikipedia.
'''Cập nhật cho biên tập viên'''
* Các thiết bị di động sẽ hiển thị các bài viết trên trang di động trực tiếp trên tên miền chuẩn (như <code>en.wikipedia.org</code>), thay vì thông qua việc đổi hướng tới tên miền "m" (như <code>en.m.wikipedia.org</code>). Thay đổi này nhằm cải thiện hiệu năng. Nó sẽ được kích hoạt trên các trang Wikipedia trong tuần này. Liên kết URL di động và tùy chọn "Phiên bản máy tính" vẫn sẽ tiếp tục khả dụng. [[mw:Requests for comment/Mobile domain sunsetting/2025 Announcement|Tìm hiểu thêm]]. [https://phabricator.wikimedia.org/T214998]
* [[mw:Special:MyLanguage/Help:CirrusSearch#creationdate and lasteditdate|Bộ lọc ngày]] mới, <code dir=ltr>creationdate:</code> và <code dir=ltr>lasteditdate:</code>, nay có sẵn trong bộ máy tìm kiếm của wiki. Những bộ lọc này cho phép người dùng lọc kết quả tìm kiếm theo bản sửa đổi đầu tiên hoặc cuối cùng của trang. Bộ lọc hỗ trợ các toán tử so sánh (v.d. <code dir=ltr>>2024</code>) và ngày dạng tương đối (v.d. <code dir=ltr>today-1d</code>), giúp việc tìm nội dung hoặc trang được cập nhật gần đây trong khoảng năm cụ thể trở nên dễ dàng hơn. [https://phabricator.wikimedia.org/T403593]
* [[f:|Wikifunctions]] nay hỗ trợ văn bản giàu tính chất (rich text) trong lời gọi hàm nhúng trên 150 wiki đã kích hoạt nó. Để giới thiệu tính năng này, nhóm đã tạo [[f:Z26333|bảng biến cách tiếng Latin]] mà biên tập viên Wiktionary có thể sử dụng để tự động tạo ra các dạng danh từ, nhằm tạo ra những kết quả rõ ràng và được định dạng — xem một [[f:Wikifunctions:Embedded function calls/Wiktionary tables demonstration|ví dụ đầu ra]] cụ thể. Nếu bạn cần hỗ trợ hay có bất kỳ phản hồi nào, vui lòng [[f:Wikifunctions:Project chat|liên hệ nhóm Wikifunctions]]. [https://phabricator.wikimedia.org/T397402]
* Một liên kết sửa đổi nay sẽ hiển thị trong hộp thể loại trên các trang bài viết đối với người dùng đã đăng nhập, khi nhấn vào sẽ khởi động trực tiếp hộp thoại thể loại bằng Trình Soạn thảo Trực quan (VisualEditor). [https://phabricator.wikimedia.org/T291691]
* [[File:Octicons-sync.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:34}} {{PLURAL:34|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, tuần trước đã có vấn đề khi tải các tập tin pdf và hiện nó đã được giải quyết. [https://phabricator.wikimedia.org/T405957]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Trường <code dir=ltr>rev_sha1</code> trong bảng cơ sở dữ liệu bản sửa đổi đang chuẩn bị được loại bỏ để thay thế bằng trường <code dir=ltr>content_sha1</code> trong bảng cơ sở dữ liệu nội dung. Xem [https://lists.wikimedia.org/hyperkitty/list/cloud@lists.wikimedia.org/thread/2D2M3SP4WHR6BXXKTZ2PBLZQYR3EGQVR/ thông báo này] để biết thêm thông tin.
* [[mw:Special:MyLanguage/Reading/Web|Nhóm Trải nghiệm Người đọc]] sẽ triển khai giao diện người dùng [[w:en:Light-on-dark color scheme|Chế độ Tối]] trên tất cả các trang Wikimedia vào ngày 29 tháng 10 năm 2025. Tất cả thành viên vô danh trên các trang Wikimedia sẽ có tùy chọn kích hoạt bảng màu có văn bản màu sáng trên nền tối. Chế độ này được thiết kế để cung cấp trải nghiệm đọc thoải mái hơn, đặc biệt trong những trường hợp thiếu sáng. Tác giả bản mẫu và biên tập viên kỹ thuật được khuyến khích [[mw:Special:MyLanguage/Reading/Web/Accessibility for reading/Updates/2024-04|tìm hiểu cách chuẩn bị các trang để tương thích với Chế độ tối]] và giải quyết bất kỳ vấn đề tương thích nào xuất hiện trong các bản mẫu trên wiki của họ trước thời điểm kích hoạt. Vui lòng liên hệ nhóm Web nếu có bất kỳ câu hỏi hay cần sự trợ giúp nào trên [[mw:Talk:Reading/Web/Accessibility for reading#|trang thảo luận này]] trước ngày kích hoạt. [https://phabricator.wikimedia.org/T395628]
* Bắt đầu từ thứ 2, ngày 6 tháng 10, các điểm cuối API theo đường dẫn <code>rest.php</code> sẽ được định tuyến lại qua Cổng API nội bộ mới. Mỗi wiki sẽ được cập nhật dựa trên các nhóm phát hành tiêu chuẩn, với tổng lưu lượng truy cập tăng dần theo thời gian. Thay đổi này dự kiến không gây ra bất kỳ sự gián đoạn gì. Nếu phát hiện thấy có bất kỳ vấn đề nào, vui lòng tạo tác vụ Phabricator gửi lên [[phab:tag/serviceops/|bảng của nhóm Vận hành Dịch vụ]]. [https://phabricator.wikimedia.org/T400130]
* [[File:Octicons-sync.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.45/wmf.22|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/41|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W41"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 17:23, ngày 6 tháng 10 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:Quiddity (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29400897 -->
== <span lang="en" dir="ltr">Have your say: vote for the 2025 Board of Trustees</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Hello all,
The voting period for the [[m:Special:MyLanguage/Wikimedia Foundation elections/2025|2025 Board of Trustees election]] is now open. Candidates are running for two (2) seats on the Board.
To check your voter eligibility, please visit the [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Voter eligibility guidelines|voter eligibility page]].
Learn more about them by [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Candidates|reading their application statements and watch their candidacy videos]].
When you are ready, go to the [[m:Special:SecurePoll/vote/405|SecurePoll voting page to vote]].
'''The vote is open from October 8 at 00:00 UTC to October 22 at 23:59 UTC.'''
Best regards,
Abhishek Suryawanshi<br />Chair, Elections Committee<section end="announcement-content" />
</div>
[[Thành viên:MediaWiki message delivery|MediaWiki message delivery]] ([[Thảo luận Thành viên:MediaWiki message delivery|thảo luận]]) 04:49, ngày 9 tháng 10 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:RamzyM (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29360896 -->
== Bản tin Kỹ thuật: Tuần 42-2025 ==
<section begin="technews-2025-W42"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/42|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Tuần trước, chúng tôi đã tiến hành triển khai những cải tiến về các tính năng bảo mật tài khoản và xác thực hai yếu tố (2FA) trên tất cả các wiki. Những thay đổi đó bao gồm cải tiến giao diện người dùng cho trang [https://auth.wikimedia.org/metawiki/wiki/Special:AccountSecurity Đặc biệt:Bảo mật tài khoản], hỗ trợ nhiều phương thức xác thực 2FA thông qua các ứng dụng xác thực và khóa bảo mật di động (trước đây người dùng chỉ có thể kích hoạt một phương thức xác thực), và mô đun Mã Khôi phục mới giúp giảm thiểu tình trạng khóa tài khoản do mất ứng dụng và thiết bị xác thực hai yếu tố. Là một phần của dự án [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security|Bảo mật Tài khoản]], quá trình này sẽ tiếp tục trong phần còn lại của năm 2025 để cải thiện nhiều hơn trải nghiệm người dùng, cùng việc thêm hỗ trợ cho mã khóa làm phương thức xác thực thứ hai thay thế.
'''Cập nhật cho biên tập viên'''
* Một phần khác của dự án Bảo mật tài khoản là cung cấp 2FA cho tất cả người dùng. Bên cạnh biên tập viên có quyền nâng cao, chẳng hạn như bảo quản viên và hành chính viên, 40% biên tập viên nay có quyền truy cập vào 2FA. Bạn có thể kiểm tra xem bạn có quyền truy cập đó không tại [https://auth.wikimedia.org/metawiki/wiki/Special:AccountSecurity Đặc biệt: Bảo mật tài khoản]. Hướng dẫn kích hoạt có trên trang được liên kết theo. Kế hoạch là tiếp tục tăng cường tính khả dụng nếu xác định rằng khả năng hỗ trợ người dùng có thể hỗ trợ việc sử dụng toàn cục của nó. [https://phabricator.wikimedia.org/T400579]
* Tuần này, người dùng trên các wiki mà mặc định đã có sẵn tính năng [[mw:Special:MyLanguage/Talk pages project/Usability|Cải tiến Khả năng Sử dụng]] trên trang thảo luận (tất cả ''trừ'' 12 wiki được liệt kê trong tác vụ [[phab:T379264|T379264]]) sẽ có được khả năng gửi lời cảm ơn bình luận trực tiếp trên trang thảo luận mà nó xuất hiện. Trước thay đổi này, việc cảm ơn chỉ có thể được thực hiện bằng cách truy cập lịch sử sửa đổi của trang thảo luận. Bạn có thể [[diffblog:2025/10/13/revolutionizing-gratitude-a-new-era-of-thanking-comments/|tìm hiểu thêm về thay đổi này]]. [https://phabricator.wikimedia.org/T366095]
* Người dùng chưa [[Special:Preferences#mw-prefsection-personal-email|xác thực địa chỉ email của mình]] sẽ sớm nhận thông báo hàng tháng nhắc họ làm điều này. Điều này là bởi vì người dùng đã xác thực email của họ có thể dễ dàng khôi phục tài khoản của mình hơn. Những lời nhắc này sẽ không được gửi nếu người dùng không hoạt động hoặc đã loại bỏ email chưa được xác thực khỏi tài khoản của mình. [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Email_confirmation][https://phabricator.wikimedia.org/T58074]
* [[File:Octicons-sync.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:21}} {{PLURAL:21|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, đã có một bản sửa lỗi nhằm giải quyết một lỗi thỉnh thoảng xảy ra khi lưu các đoạn đã được dịch trong công cụ Dịch Nội dung, cùng với đó các thông báo lỗi có liên quan giờ dễ nhìn hơn. [https://phabricator.wikimedia.org/T376531]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Nhóm Công cụ Không được Hỗ trợ đã chọn [[c:Special:MyLanguage/Commons:Video2commons|Video2Commons]] làm công cụ đầu tiên cho chu kỳ thí điểm của họ. Nhóm sẽ tìm hiểu cách để cải tiến và duy trì công cụ này trong những tháng tiếp theo. [[m:Special:MyLanguage/Product and Technology Advisory Council/Unsupported Tools Working Group|Tìm hiểu thêm trên Meta]].
* [[File:Octicons-sync.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.45/wmf.23|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/42|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W42"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 18:59, ngày 13 tháng 10 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:Quiddity (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29434481 -->
== <span lang="en" dir="ltr">Help us decide the name of the new Abstract Wikipedia project</span> ==
<div lang="en" dir="ltr">
<section begin="function1"/>
{{int:Hello}}. Please help pick a name for the new Abstract Wikipedia wiki project. This project will be a wiki that will enable users to combine functions from [[:f:|Wikifunctions]] and data from Wikidata in order to generate natural language sentences in any supported languages. These sentences can then be used by any Wikipedia (or elsewhere).
There will be two rounds of voting, each followed by legal review of candidates, with votes beginning on 20 October and 17 November 2025. Our goal is to have a final project name selected on mid-December 2025. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki.
{{Int:Feedback-thanks-title}}
<section end="function1"/>
</div>
-- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 11:44, ngày 20 tháng 10 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:Sannita (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29432175 -->
== Bản tin Kỹ thuật: Tuần 43-2025 ==
<section begin="technews-2025-W43"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/43|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Để tối ưu hóa cách dữ liệu người dùng được lưu trong cơ sở dữ liệu của chúng tôi, các tùy chọn được lưu của người dùng chưa đăng nhập trong vòng hơn 5 năm và có ít hơn 100 sửa đổi sẽ bị xóa. Khi những người dùng đó quay lại, tùy chọn mặc định sẽ được áp dụng. [https://phabricator.wikimedia.org/T406724]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:20}} {{PLURAL:20|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, đã có một liên kết hỏng từ thông điệp giao diện Đóng góp toàn cục đến trang Đóng góp toàn cục trên XTools mà hiện đã được giải quyết. [https://phabricator.wikimedia.org/T406415]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Việc định tuyến lại toàn bộ lưu lượng đến các điểm cuối API theo cổng <code dir=ltr><nowiki>rest.php</nowiki></code> thông qua một cổng API chung hiện đã hoàn tất. Nếu phát hiện bất kỳ vấn đề nào, vui lòng gửi tác vụ phabricator lên [[phab:tag/serviceops/|bảng tác vụ của nhóm Vận hành Dịch vụ]].
* Các sửa đổi đối với chú thích hoặc từ hạn định Wikidata nay sẽ ít hiển thị thường xuyên hơn trên các mục Thay đổi gần đây và Danh sách theo dõi trên các wiki khác, nhằm giảm bớt các thông báo không cần thiết. Thay đổi này sẽ giảm tổng số lượng các khoản mục 'gây nhiễu'. Bản thân các trang Wikidata sẽ không có sự thay đổi nào. [https://phabricator.wikimedia.org/T401290]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.45/wmf.24|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/43|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W43"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:36, ngày 20 tháng 10 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29478670 -->
== Bản tin Kỹ thuật: Tuần 44-2025 ==
<section begin="technews-2025-W44"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/44|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Ứng dụng Wikipedia dành cho iOS đã ra mắt thử nghiệm A/B/C nhằm cải tiến tính năng duyệt theo thẻ cho một số khu vực và ngôn ngữ nhất định. Thử nghiệm mang tên “Nhiều thẻ động hơn” này sẽ khám phá trải nghiệm trên thẻ mới cùng với việc bổ sung đề xuất bài viết ở mục “Bạn có biết” và “Vì bạn đã đọc”. Bạn có thể [[mw:Special:MyLanguage/Wikimedia Apps/Team/iOS/Tabbed Browsing (Tabs)/New Tab Experience and Recommendations Experiment|đọc thêm thông tin trên trang dự án này]].
* Thành viên tự xác nhận trên các wiki [[gitiles:operations/mediawiki-config/+/a2d2aaab9ace84280dd2f4c70a33bb69cd73850f/dblists/small.dblist|nhỏ]] và [[gitiles:operations/mediawiki-config/+/a2d2aaab9ace84280dd2f4c70a33bb69cd73850f/dblists/medium.dblist|vừa]] đã triển khai phần mở rộng CampaignEvents nay có thể sử dụng công cụ [[m:Special:MyLanguage/Event Center/Registration|Đăng ký Sự kiện]] mà không cần quyền Người tổ chức Sự kiện. Tính năng này cho phép người tổ chức kích hoạt việc đăng ký, quản lý người tham gia, và cho phép các thành viên đăng ký chỉ với một cú nhấp chuột thay vì phải ký vào trang sự kiện.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:31}} {{PLURAL:31|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, vấn đề về màu sắc nhấp nháy khi giữ hoặc nhấn phím mũi tên trong phần cài đặt chế độ tối của giao diện Vector 2022 nay đã được giải quyết. [https://phabricator.wikimedia.org/T402285]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Phần mở rộng CampaignEvents sẽ được triển khai trên tất cả những wiki còn lại trong tuần từ ngày 17 tháng 11 năm 2025. Phần mở rộng này hiện bao gồm ba tính năng: Đăng ký Sự kiện, Danh sách Cộng tác, và Danh sách Mời. Trong đợt triển khai này, Danh sách Lời mời sẽ không được kích hoạt cho Wikifunctions và MediaWiki cho đến khi những cộng đồng này yêu cầu kích hoạt. [[m:Special:MyLanguage/CampaignEvents/Deployment status|Truy cập trang thông tin triển khai để biết thêm thông tin]].
* Trải nghiệm chỗ thử REST dựa trên SwaggerUI nay đã có mặt trên tất cả các dự án wiki. Chỗ thử này có thể truy cập được thông qua trang [[{{#special:RestSandbox}}]]. Vui lòng báo cáo bất kỳ vấn đề nào lên bảng tin của nhóm Giao diện MediaWiki, hoặc tham gia thảo luận trên trang [[mw:Special:MyLanguage/MediaWiki Interfaces Team/Feature Feedback/REST Sandbox|khởi động dự án]] này. [https://phabricator.wikimedia.org/project/board/6931/]
* Những điểm cuối chuyển đổi với đường dẫn kết thúc bằng dấu gạch chéo trong REST API của MediaWiki hiện đang được đánh dấu là lỗi thời. Chúng vẫn sẽ tiếp tục hoạt động trong thời gian này, tuy nhiên dự kiến chúng sẽ bị loại bỏ vào cuối tháng 1 năm 2026. Toàn bộ người dùng API đang gọi chúng được khuyến khích chuyển sang bản đường dẫn không kết thúc bằng dấu gạch chéo. Cả hai biến thể điểm cuối này đều có thể tìm thấy và thử được sử dụng [https://test.wikipedia.org/w/index.php?api=mw-extra&title=Special%3ARestSandbox Chỗ thử REST]. Xem trang [[mw:API/Deprecation|Ngừng hỗ trợ với REST API MediaWiki]] để biết thêm thông tin chi tiết về các chính sách và thủ tục trong việc ngừng hỗ trợ API.
* [[mw:API:REST API/Changelog|Nhật trình thay đổi chuyên biệt nay đã có sẵn cho REST API của MediaWiki]]. Nhật trình thay đổi này cung cấp tổng quan về những thay đổi này, giúp các nhà phát triển dễ dàng theo dõi những cải tiến và lần lặp lại của chúng. Mọi thông báo cũng sẽ tiếp tục được gửi thông qua các kênh truyền thông chính, bao gồm Bản tin Kỹ thuật và danh sách phân phối qua thư điện tử, nhưng nay có thể dễ dàng tham khảo hơn từ một vị trí trung tâm. Nếu bạn có bất kỳ phản hồi nào về định dạng, cấu trúc, hoặc nội dung về nhật trình thay đổi này, vui lòng [[mw:API talk:REST API/Changelog|tham gia thảo luận tại đây]].
* Bảo quản viên nay có thể xóa thể loại theo dõi mà trước đây được thêm bởi phần mở rộng JsonConfig, do nó không còn được sử dụng. Xem các thể loại được liên kết từ [[d:Q130635582#sitelinks-wikipedia|Q130635582]]. Việc vẫn còn trang được liệt kê trên thể loại này là bình thường vì nó chỉ là vấn đề về bộ nhớ đệm, và chúng sẽ tự động được xóa khi các trang đó được sửa đổi trong lần tiếp theo. [https://phabricator.wikimedia.org/T378352]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.45/wmf.25|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/44|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W44"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:31, ngày 27 tháng 10 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29513638 -->
== <span lang="en" dir="ltr">Seeking volunteers to join several of the movement’s committees</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Each year, typically from October through December, several of the movement’s committees seek new volunteers.
Read more about the committees on their Meta-wiki pages:
* [[m:Special:MyLanguage/Affiliations Committee|Affiliations Committee (AffCom)]]
* [[m:Special:MyLanguage/Ombuds commission|Ombuds commission (OC)]]
* [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Community Resilience and Sustainability/Trust and Safety/Case Review Committee|Case Review Committee (CRC)]]
Applications for the committees open on October 30, 2025. Applications for the Affiliations Committee, Ombuds commission and the Case Review Committee close on December 11, 2025. Learn how to apply by [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Committee appointments|visiting the appointment page on Meta-wiki]]. Post to the talk page or email cst[[File:At sign.svg|16x16px|link=|(_AT_)]]wikimedia.org with any questions you may have.
For the Committee Support team,
<section end="announcement-content" />
</div>
-[[m:User:MKaur (WMF)| MKaur (WMF)]] 14:14, ngày 30 tháng 10 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:MKaur (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29517125 -->
== Bản tin Kỹ thuật: Tuần 45-2025 ==
<section begin="technews-2025-W45"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/45|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Các bảo quản viên giờ đây sẽ thấy rằng [[{{#special:MergeHistory}}]] đã trở nên linh hoạt hơn đáng kể trong việc hợp nhất. Nó có thể hợp nhất các phần được lấy từ giữa lịch sử của trang nguồn (thay vì chỉ từ phần đầu), và chèn các phiên bản vào bất kỳ vị trí nào trong lịch sử của trang đích (thay vì chỉ ở phần đầu). [https://phabricator.wikimedia.org/T382958]
* Đối với những người dùng đã kích hoạt "{{int:discussiontools-preference-autotopicsub}}" [[Special:Preferences#mw-prefsection-editing|trong tùy chọn của họ]], việc bắt đầu một chủ đề mới hoặc thêm một phản hồi vào một chủ đề hiện có giờ đây sẽ tự động đăng ký họ theo dõi các phản hồi mới trong chủ đề đó. Trước đây, điều này chỉ xảy ra nếu người dùng sử dụng tiện ích "{{int:Skin-action-addsection}}" hoặc "{{int:Discussiontools-replybutton}}" của DiscussionTools. Khi DiscussionTools mới được ra mắt, các tài khoản hiện có không được tự động bật tính năng theo dõi chủ đề, vì vậy thay đổi này chủ yếu sẽ ảnh hưởng đến các tài khoản mới hơn và những người dùng đã chủ động thay đổi tùy chọn của mình kể từ thời điểm đó. [https://phabricator.wikimedia.org/T290778]
* Các mô đun Scribunto giờ đây có thể được dùng để [[mw:Special:MyLanguage/Extension:Scribunto/Lua reference manual#SVG library|tạo ảnh SVG]]. Tính năng này cho phép tạo biểu đồ, đồ họa và các hình minh họa khác một cách linh hoạt thông qua Lua, giúp giảm nhu cầu phải tạo chúng bên ngoài rồi tải lên dưới dạng tập tin. [https://phabricator.wikimedia.org/T405861]
* Các trang web của Wikimedia giờ đây sẽ cung cấp cho tất cả người dùng ẩn danh tùy chọn bật chế độ tối, với giao diện chữ sáng trên nền tối. Cải tiến này nhằm mang lại trải nghiệm đọc dễ chịu hơn, đặc biệt là trong môi trường thiếu sáng. [https://phabricator.wikimedia.org/T395628]
* Những người dùng có danh sách theo dõi lớn từ lâu đã gặp lỗi quá thời gian khi chỉnh sửa [[Special:EditWatchlist|Special:EditWatchlist]]. Trang này nay sẽ tải các mục theo từng phần nhỏ thay vì tải toàn bộ cùng lúc nhờ bản cập nhật phân trang, giúp mọi người có thể chỉnh sửa danh sách theo dõi mượt mà hơn. Trong quá trình cập nhật cơ sở dữ liệu, tính năng sắp xếp theo thời hạn đã bị loại bỏ vì chậm hơn hơn 100 lần so với sắp xếp theo tên trang. Một [https://meta.wikimedia.org/wiki/Community_Wishlist/W454 yêu cầu từ cộng đồng] đã được tạo để tìm các cách thay thế nhằm khôi phục tính năng sắp xếp theo thời hạn. Nếu bạn thấy tính năng này quan trọng, hãy ủng hộ yêu cầu đó! [https://phabricator.wikimedia.org/T41510]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:31}} {{PLURAL:31|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, việc khắc phục lỗi tô sáng vẫn còn hiển thị sau khi sử dụng tính năng tìm và thay thế của VisualEditor trong quá trình tìm kiếm. [https://phabricator.wikimedia.org/T407318]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Từ năm 2019, [[m:Special:MyLanguage/Wikimedia URL Shortener|Trình rút gọn URL của Wikimedia]] tại https://w.wiki đã có sẵn cho tất cả các wiki của Wikimedia để tạo liên kết ngắn đến bài viết, liên kết cố định, bản so sánh, v.v. Tính năng này có trong thanh bên với tên "Lấy URL rút gọn". Hiện có 30 wiki vẫn đang sử dụng tiện ích mở rộng cũ "ShortUrl". Tiện ích cũ này sẽ sớm bị gỡ bỏ. Điều này có nghĩa là các URL dạng <code>/s/</code> sẽ không còn được hiển thị dưới tiêu đề bài viết thông qua thẻ HTML <code dir=ltr>class="title-shortlink"</code>. Tuy nhiên, các URL dạng <code>/s/</code> vẫn sẽ tiếp tục hoạt động. [https://phabricator.wikimedia.org/T107188]
* Vào thứ Năm, ngày 30 tháng 10, các nhóm [[:mw:Special:MyLanguage/MediaWiki Interfaces Team|Giao diện MediaWiki]] và [[:mw:Special:MyLanguage/Wikimedia Site Reliability Engineering|Vận hành Dịch vụ SRE]] đã bắt đầu chuyển hướng lưu lượng của Action API thông qua một cổng API chung. Các wiki riêng lẻ sẽ được cập nhật theo từng nhóm phát hành tiêu chuẩn, với tổng lưu lượng được tăng dần theo thời gian. Thay đổi này được kỳ vọng sẽ không gây ra lỗi hoặc gián đoạn. Nếu bạn phát hiện bất kỳ sự cố nào, vui lòng gửi báo cáo trên bảng [https://phabricator.wikimedia.org/tag/serviceops/ của nhóm Vận hành Dịch vụ].
* Việc triển khai MediaWiki Train sẽ tạm dừng trong hai tuần cuối cùng của năm 2025: ngày 22 và 29 tháng 12. Các khung thời gian backport cũng sẽ tạm ngưng từ thứ Hai, ngày 22 tháng 12 năm 2025 đến thứ Năm, ngày 2 tháng 1 năm 2026. "Backport window" là khoảng thời gian được lên lịch để bổ sung các nội dung như bản vá lỗi và thay đổi cấu hình. Hiện vẫn còn bảy đợt triển khai MediaWiki Train nữa trong năm 2025. [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/SMWTEAES4SDLDUSK4HMWNBSKNCXZAWYN/]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.45/wmf.26|MediaWiki]]
'''Chuyên sâu'''
* Năm 2025, Quỹ Wikimedia báo cáo rằng các hệ thống AI và công cụ tìm kiếm ngày càng sử dụng nội dung từ Wikipedia mà không dẫn người dùng quay lại trang, góp phần khiến lượng lượt xem từ người dùng thực giảm 8% so với năm 2024. Sau khi phát hiện các bot giả dạng người dùng thật, Wikimedia đã cập nhật dữ liệu truy cập để phản ánh sự thay đổi này. Bạn có thể đọc thêm về xu hướng người dùng hiện nay trên Wikipedia trong [[diffblog:2025/10/17/new-user-trends-on-wikipedia/|bài viết trên blog Diff]].
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/45|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W45"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:34, ngày 3 tháng 11 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29552512 -->
== Bản tin Kỹ thuật: Tuần 46-2025 ==
<section begin="technews-2025-W46"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/46|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
[[File:Talk pages default look (April 2023).jpg|thumb|alt=Hình chụp những thay đổi về mặt trực quan được thực hiện trên trang thảo luận|Ví dụ về trang thảo luận với thiết kế mới, bằng tiếng Pháp.]]
* Kể từ ngày 12 tháng 11, người dùng sẽ nhận thấy sự thay đổi về [[m:Special:MyLanguage/Talk pages project/Feature summary#Usability improvements|giao diện của các trang thảo luận]] trên [[Phab:T379264|một số trang Wikipedia]]. Hầu hết [[phab:T392121|toàn bộ các wiki]] đã có được thay đổi về mặt thiết kế này; những thay đổi này sẽ được thực hiện sau trên [[phab:T409297|Wikipedia tiếng Anh]]. Bạn có thể đọc thêm [[diffblog:2024/05/02/making-talk-pages-better-for-everyone/|trên ''Diff'']]. Người dùng có thể chọn không thực hiện thay đổi này [[Special:Preferences#mw-prefsection-editing|trong tùy chọn người dùng của mình]] ở tùy chọn "{{int:discussiontools-preference-visualenhancements}}". [https://phabricator.wikimedia.org/T379264]
* MediaWiki nay có thể hiển thị [[mw:Special:MyLanguage/Help:Protection indicators|chỉ báo trên trang]] tự động khi một trang bị khóa. Tính năng này được tắt theo mặc định. Nó có thể được bật theo [[m:Special:MyLanguage/Requesting wiki configuration changes|yêu cầu của cộng đồng]]. [https://phabricator.wikimedia.org/T12347]
* Việc sử dụng các nút "{{int:showpreview}}" hoặc "{{int:showdiff}}" trong trình soạn thảo mã nguồn nay sẽ đi kèm một số tham số URL nhất định như '[[mw:Special:MyLanguage/Manual:Parameters to index.php#useskin|useskin]]', '[[mw:Special:MyLanguage/Manual:Parameters to index.php#uselang|uselang]]' và '[[mw:Special:MyLanguage/Help:Section#Editing sections|section]]'. Bản cập nhật này đồng thời cũng sửa một vấn đề mà, nếu trình duyệt bị sập khi đang xem trước sửa đổi một đề mục duy nhất, việc lưu sửa đổi này có thể ghi đè toàn bộ trang chỉ bằng nội dung của đề mục đó. [https://phabricator.wikimedia.org/T62744][https://phabricator.wikimedia.org/T24029][https://phabricator.wikimedia.org/T155097]
* Các wiki Wikivoyage có thể dùng [[mw:Special:MyLanguage/Help:Extension:Kartographer#Markers and counters|điểm đánh dấu bản đồ bằng màu trong nội dung văn bản của bài viết]]. Nội dung văn bản của những điểm đánh dấu đó nay sẽ được hiển thị bằng màu đen hoặc trắng tương phản, thay vì luôn luôn là màu trắng. Cộng đồng có thể loại bỏ các phương pháp giải quyết cục bộ cho vấn đề này. [https://phabricator.wikimedia.org/T369454]
* Tab Hoạt động trên ứng dụng Wikipedia dành cho Android nay có sẵn cho tất cả người dùng. Tab mới này cung cấp thông tin chuyên sâu được cá nhân hóa về hoạt động đọc, sửa đổi, và quyên góp, đồng thời đơn giản hóa việc điều hướng và giúp cho việc sử dụng ứng dụng trở nên hấp dẫn hơn. [https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/Android/Activity_Tab_Experiment]
* Nhóm Phát triển Độc giả (Reader Growth) chuẩn bị khởi động thử nghiệm mang tên "Duyệt hình ảnh" để kiểm tra cách giúp người đọc dễ dàng duyệt và khám phá hình ảnh trên các bài viết Wikipedia hơn. Thử nghiệm này, một thử nghiệm A/B dành riêng cho thiết bị di động, sẽ bắt đầu được thực hiện vào tuần từ ngày 17 tháng 11 và sẽ kéo dài trong bốn tuần, ảnh hưởng đến 0,05% người dùng trên wiki tiếng Anh. Thử nghiệm này đã bắt đầu vào ngày 3 tháng 11 trên các wiki tiếng Ả Rập, tiếng Trung, tiếng Pháp, tiếng Indonesia và tiếng Việt, ảnh hưởng đến tối đa 10% người dùng trên những wiki này. [https://www.mediawiki.org/wiki/Readers/Reader_Growth/WE3.1.3_Image_Browsing]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:27}} {{PLURAL:27|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ như đã khắc phục việc không thể khóa tài khoản trên trang web dành cho di động. [https://phabricator.wikimedia.org/T256185]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* [[wikitech:Help talk:Toolforge/Toolforge standards committee#November 2025 committee nominations|Wikitech đang mở đề cử]] chọn thành viên mới của [[wikitech:Help:Toolforge/Toolforge standards committee|Ủy ban tiêu chuẩn của Toolforge]]. Ủy ban này giám sát [[wikitech:Help:Toolforge/Right to fork policy|Chính sách quyền sử dụng bản sao]] và [[wikitech:Help:Toolforge/Abandoned tool policy|Chính sách cho công cụ bị bỏ rơi]] của Toolforge cùng nhiều nhiệm vụ khác. Đề cử sẽ tiếp tục mở đến hết ngày 28 tháng 11 năm 2025.
* [[w:JSON Web Token#Standard fields|Trường bên cung cấp JWT]] trong [[mw:Special:MyLanguage/OAuth/For Developers#OAuth 2|mã truy cập OAuth 2]] dành cho [[m:Special:MyLanguage/Help:Unified login|wiki SUL]] (đăng nhập trung ương) đã được thay đổi thành <code><nowiki>https://meta.wikimedia.org</nowiki></code>. Các mã truy cập cũ vẫn sẽ hoạt động. [https://phabricator.wikimedia.org/T399199]
* [[w:JSON Web Token#Standard fields|Trường chủ đề JWT]] trong [[mw:Special:MyLanguage/OAuth/For Developers#OAuth 2|mã truy cập OAuth 2]] sẽ sớm thay đổi từ <code><user id></code> sang <code dir=ltr style="white-space:nowrap">mw:<identity type>:<user id></code>, trong đó <code><identity type></code> thường là <code dir=ltr>CentralAuth:</code><!-- not a typo --> (đối với [[m:Special:MyLanguage/Help:Unified login|wiki SUL]]) hoặc <code dir=ltr style="white-space:nowrap">local:<wiki id></code> (đối với các wiki khác). Điều này là nhằm tránh xung đột giữa các loại ID người dùng khác nhau, và để mã truy cập OAuth 2 và cookie <code>sessionJwt</code> trở nên giống nhau hơn. Các mã truy cập cũ vẫn sẽ hoạt động. [https://phabricator.wikimedia.org/T399199]
* Các thông điệp cấm của MediaWiki ([[MediaWiki:Blockedtext|blockedtext]], [[MediaWiki:Blockedtext-partial|blockedtext-partial]], [[MediaWiki:Autoblockedtext|autoblockedtext]], [[MediaWiki:Systemblockedtext|systemblockedtext]], [[MediaWiki:Blockedtext-tempuser|blockedtext-tempuser]], [[MediaWiki:Autoblockedtext-tempuser|autoblockedtext-tempuser]]) nay hỗ trợ thêm các tham số bổ sung nhằm chỉ ra xem người dùng đó có bị cấm sửa đổi trang thảo luận của mình <code><nowiki>$9</nowiki></code> hoặc gửi thư điện tử cho người dùng khác <code><nowiki>$</nowiki><nowiki>10</nowiki></code> hay không. [https://phabricator.wikimedia.org/T285612]
* Nhánh <code>REL1_45</code> cho lõi MediaWiki và từng phần mở rộng cùng giao diện trong git của Wikimedia đã được tạo. Đây là bước đầu tiên trong quá trình phát hành phiên bản MediaWiki 1.45.0, được lên kế hoạch triển khai vào cuối tháng 11 năm 2025. Nếu bạn đang thực hiện việc khắc phục lỗi nghiêm trọng hoặc thực hiện tính năng mới, bạn có thể cần phải lưu ý thay đổi này. [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/ZUY7TY3Z6XPZWZVAZV63OPO5OW52Q6GE/]
* Quy trình tạo bản dump CirrusSearch đã được cập nhật do hiệu suất bị chậm. Nếu bạn gặp bất kỳ sự cố nào khi chuyển sang bản dump thay thế, vui lòng liên hệ với Nhóm Nền tảng Tìm kiếm để được hỗ trợ. [https://phabricator.wikimedia.org/T366248][https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/3KQPOR6ACVN6OVLMLZPIBXQSWQKW4E3K/]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.2|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/46|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W46"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 20:38, ngày 10 tháng 11 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:UOzurumba (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29606150 -->
== Bản tin Kỹ thuật: Tuần 47-2025 ==
<section begin="technews-2025-W47"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/47|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* [[mw:Special:MyLanguage/Readers/Reader Experience|Nhóm Trải nghiệm Người đọc]] đang thử nghiệm tính năng [[mw:Special:MyLanguage/Readers/Reader Experience/WE3.3.4_Reading lists|danh sách đọc trên trang di động]], cho phép người đọc đã đăng nhập chưa thực hiện sửa đổi nào có thể lưu danh sách bài viết riêng tư để đọc sau. Thử nghiệm đang được thực hiện trên các Wikipedia tiếng Ả Rập, tiếng Trung, tiếng Pháp, tiếng Indonesia, và tiếng Việt kể từ tuần ngày 10 tháng 11, và sẽ bắt đầu trên Wikipedia tiếng Anh trong tuần ngày 17 tháng 11.
* Người dùng không thể nhận được mã xác nhận qua thư điện tử khi đăng nhập nay có thể nhờ hỗ trợ bằng cách gửi biểu mẫu trên trang đặc biệt mới. Cập nhật này là một phần của sáng kiến [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security|Bảo mật Tài khoản]]. Nếu tài khoản của bạn có địa chỉ thư điện tử, hãy đảm bảo rằng bạn vẫn có quyền truy cập vào nó. Trong quá trình đăng nhập từ thiết bị hoặc địa điểm mới mà không có 2FA, bạn có thể được yêu cầu nhập mã 6 ký tự được gửi từ thư điện tử để hoàn tất đăng nhập. [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security#Why are you requiring me to enter a code from my email to log in? Can I opt out of this?|Tìm hiểu thêm]].
* Một wiki mới đã được tạo ra: {{int:project-localized-name-group-wikisource}} tiếng [[d:Q13324|Minangkabau]] ([[s:min:|<code>s:min:</code>]]) [https://phabricator.wikimedia.org/T408317]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:23}} {{PLURAL:23|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]].
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Là một phần của dự án [[mw:Special:MyLanguage/Parsoid/Parser Unification|Hợp nhất Trình Phân tích Cú pháp]], Nhóm Chuyển đổi Nội dung đã triển khai Parsoid làm trình phân tích cú pháp mặc định cho nhiều trang Wikipedia có lưu lượng truy cập thấp và đang chuẩn bị tiếp tục bước tiếp theo để triển khai đến những trang có lưu lượng truy cập cao. Tin nhắn này là lời mời cho bạn tham gia vào Parsoid, như được miêu tả trong tài liệu [[mw:Special:MyLanguage/Help:Extension:ParserMigration|Extension:ParserMigration]], và tìm ra bất kỳ vấn đề nào mà bạn có thể gặp phải với quy trình làm việc của mình khi sử dụng bot, tiện ích hoặc đoạn mã người dùng. Hãy cho chúng tôi biết thông qua liên kết ''"Báo cáo lỗi hiển thị"'' trên thanh bên Công cụ hoặc tạo một tác vụ phab và gắn thẻ [[phab:project/view/5846|Nhóm Chuyển đổi Nội dung trên Phabricator]].
* Dự án Công cụ Không được Hỗ trợ: Một vài vấn đề với [[:c:Special:MyLanguage/Commons:Video2commons|Video2Commons]] đã được giải quyết, bao gồm lỗi tải lên liên quan đến tên tập tin, nhập video bị đen, và xử lý việc thử lại. Hỗ trợ cho AV1 cũng đã được thêm vào. Những công việc đang được tiến hành tập trung vào tính ổn định của backend, lỗi ffmpeg, nhập phụ đề, xử lý siêu dữ liệu, và tải lên danh sách phát. Để theo dõi các tác vụ cụ thể, hãy kiểm tra [[phab:tag/video2commons/|bảng tác vụ trên Phabricator]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.3|MediaWiki]]
'''Các cuộc họp và sự kiện'''
* Hãy lưu lịch ngay cho Hackathon Wikimedia tiếp theo sẽ diễn ra tại Milan, Ý từ ngày 1–3 tháng 5 năm 2026. Cổng đăng ký sẽ được mở vào tháng 1 năm 2026. [https://pretix.eu/wikimedia/Hackathon-2026/ Đơn đăng ký nhận học bổng hiện đang được mở], và sẽ đóng vào ngày 28 tháng 11 năm 2025. Nếu bạn có bất kỳ câu hỏi nào, vui lòng gửi thư đến <bdi lang="en" dir="ltr">hackathon@wikimedia.org</bdi>.
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/47|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W47"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 17:26, ngày 17 tháng 11 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29627455 -->
== <span lang="en" dir="ltr">Reminder: Help us decide the name of the new Abstract Wikipedia project</span> ==
<div lang="en" dir="ltr">
<section begin="function2"/>
{{int:Hello}}. Reminder: Please help to choose name for the new Abstract Wikipedia wiki project. The finalist vote starts today. The finalists for the name are: <span lang="en" dir="ltr" class="mw-content-ltr">Abstract Wikipedia, Multilingual Wikipedia, Wikiabstracts, Wikigenerator, Proto-Wiki</span>. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki.
{{Int:Feedback-thanks-title}}
<section end="function2"/>
</div>
-- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 14:23, ngày 20 tháng 11 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:Sannita (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29583860 -->
== Bản tin Kỹ thuật: Tuần 48-2025 ==
<section begin="technews-2025-W48"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/48|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Tuần trước, [[mw:Special:MyLanguage/Wikimedia Search Platform|Nhóm Tìm kiếm Wikimedia]] đã tạo lại chức năng của tiện ích "DWIM" (Do What I Mean - Làm những gì bạn muốn) trên máy chủ, cho Wikipedia tiếng Nga và tiếng Do Thái. Tính năng này bổ sung gợi ý đa bàn phím vào gợi ý trên hộp tìm kiếm tiêu chuẩn. Ví dụ, khi tìm kiếm ''<span lang="und" dir="ltr">cxfcnmt</span>'' trên Wikipedia tiếng Nga giờ đây sẽ bổ sung thêm gợi ý cho ''<span lang="ru" dir="ltr">счастье</span>'' ("sự hạnh phúc") mà người dùng có thể có ý định tìm tới. Họ dự kiến sẽ kích hoạt tính năng này trên các wiki khác bằng tiếng Nga và tiếng Do Thái trong tuần này. [https://phabricator.wikimedia.org/T408734]
* Cuối tuần này, người dùng [[Special:Preferences#mw-prefsection-betafeatures|tính năng beta]] "{{int:codemirror-beta-feature-title}}" sẽ có thể sử dụng tính năng tô màu cú pháp trong [[mw:Special:MyLanguage/Help:DiscussionTools|Công cụ Thảo luận]]. Điều này yêu cầu phải thiết lập tùy chọn "{{int:discussiontools-preference-sourcemodetoolbar}}". [https://phabricator.wikimedia.org/T407918]
* [[mw:Special:MyLanguage/Help:Extension:CampaignEvents|Phần mở rộng chiến dịch sự kiện]] – một bộ công cụ để phối hợp tổ chức sự kiện và các hoạt động cộng tác khác trên wiki nay đã được triển khai tới tất cả các wiki của Wikimedia. Một tính năng mới được gọi là [[m:Special:MyLanguage/CampaignEvents/Collaborative contributions|Đóng góp cộng tác]] cũng đã được thêm vào để giúp những người tổ chức và người tham gia thấy được tác động của những hoạt động đó. Hãy tham gia [[m:Special:MyLanguage/Event:Connection learning session 3|buổi học sắp tới]] để xem tính năng mới đó hoạt động thực tế như thế nào và chia sẻ phản hồi của bạn.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:24}} {{PLURAL:24|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một lỗi khiến cho CodeReviewBot ngừng hoạt động hiện đã được giải quyết. [https://phabricator.wikimedia.org/T410417]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Người dùng API của Wikimedia có thể tham gia nghiên cứu khả năng sử dụng để giúp xác thực thiết kế mới dành cho chỗ thử REST API của Wikimedia. Những người có hứng thú tham gia cần điền vào [https://wikimediafoundation.limesurvey.net/487662 biểu mẫu khảo sát tham gia] này. [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/IREJRRWTZTGCYWQHDMSNJFTQAEPOOAE3/]
* Nhóm Giao diện MediaWiki đang trong quá trình ngừng hỗ trợ các bảng định dạng (stylesheet) kiểu XSLT trong Action API. Hỗ trợ cho <code dir=ltr>format=xml'''&xlst={stylesheet}'''</code> sẽ bị loại bỏ khỏi các dự án Wikimedia vào cuối tháng 11 năm 2025. Ngoài ra, nó sẽ sớm mặc định bị vô hiệu hóa trong các phiên bản phát hành của MediaWiki: v1.43 (LTS), v1.44, và v1.45. Hỗ trợ cho các bảng định dạng kiểu XSLT sẽ bị loại bỏ hoàn toàn khỏi MediaWiki v1.46 (dự kiến phát hành vào khoảng thời gian từ tháng 4 đến tháng 5 năm 2026). [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/5AX7UWAVVUNUSBOIRHMNOKWOZ5EZI3JX/]
* Điểm cuối kế thừa của WDQS ([https://query-legacy-full.wikidata.org/ query-legacy-full.wikidata.org]) sẽ ngừng hoạt động vào cuối tháng 12 năm 2025, và sẽ chính thức bị vô hiệu hóa vào ngày 7 tháng 1 năm 2026. Sau ngày này, người dùng sẽ nhận thấy những yêu cầu đến query.wikidata.org mà yêu cầu toàn bộ biểu đồ bị lỗi hoặc trả về kết quả không hợp lệ nếu chúng không được viết lại để sử dụng liên kết SPARQL. Nhóm khuyên người dùng cần đảm bảo các công cụ và quy trình làm việc sử dụng các điểm cuối WDQS được hỗ trợ (<span dir=ltr><nowiki>https://query.wikidata.org/</nowiki></span> - Biểu đồ chính hoặc <span dir=ltr><nowiki>https://query-scholarly.wikidata.org/</nowiki></span> - Biểu đồ học thuật). Để được hỗ trợ chuyển đổi các trường hợp sử dụng (use case), vui lòng xem lại các trang [[d:Special:MyLanguage/Wikidata:Data_access|Truy cập Dữ liệu]] và [[d:Wikidata:Request_a_query|Yêu cầu Truy vấn]] để biết thêm thông tin và được hỗ trợ về các phương thức truy cập thay thế.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.4|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/48|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W48"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 15:56, ngày 24 tháng 11 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29702226 -->
== Bản tin Kỹ thuật: Tuần 49-2025 ==
<section begin="technews-2025-W49"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/49|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Bảng Nhìn lại Một Năm Wikipedia 2025 sẽ có mặt vào ngày 2 tháng 12 dành cho người dùng ứng dụng Wikipedia trên iOS và Android, gồm thông tin chuyên sâu được cá nhân hóa, những điểm nổi bật để đọc được cập nhật, cùng thiết kế đã được làm mới. Tìm hiểu thêm trên [[mw:Special:MyLanguage/Wikimedia Apps/Team/Wikipedia Year in Review/Updates|trang dự án]] của tính năng nhìn lại này.
* Nhóm Tăng trưởng đang nỗ lực cải thiện nội dung và cách trình bày của Email Xác minh được gửi tới người dùng mới để chúng trở nên thân thiện, hữu ích và có thêm nhiều thông tin hơn. Một số văn bản mới đã được soạn thảo cho thử nghiệm A/B và bạn có thể giúp đỡ bằng cách dịch chúng. Xem [[phab:T396155|Phabricator]].
* Tính năng [[mw:Special:MyLanguage/Help:Growth/Tools/Add a link|Thêm liên kết]] nay sẽ được triển khai tới Wikipedia tiếng Nhật, tiếng Urdu và tiếng Trung vào ngày 2 tháng 12. Thêm liên kết được dựa trên mô hình dự đoán nhằm gợi ý liên kết cần được thêm vào bài viết. Trong khi tính năng này đã có mặt trên hầu hết các trang Wikipedia, mô hình dự đoán đó không thể hỗ trợ một số ngôn ngữ nhất định. Một mô hình mới đã được phát triển để xử lý những ngôn ngữ này, và mô hình đó sẽ dần được triển khai sang các trang Wikipedia khác theo thời gian. Nếu bạn muốn được biết thêm thông tin, vui lòng liên hệ [[mw:user:Trizek (WMF)|Trizek (WMF)]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:34}} {{PLURAL:34|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề mà hộp tìm kiếm trên một số trang Commons không hiển thị kết quả nào do việc chuyển đổi từ SpecialSearch sang MediaSearch, hiện đã được giải quyết. [https://phabricator.wikimedia.org/T399476]
* Hai wiki mới đã được tạo ra:
** {{int:project-localized-name-group-wikipedia}} tiếng [[d:Q36846|Toki Pona]] ([[w:tok:|<code>w:tok:</code>]]) [https://phabricator.wikimedia.org/T404457]
** {{int:project-localized-name-group-wikiquote}} tiếng [[d:Q33655|Pidgin Nigeria]] ([[q:pcm:|<code>q:pcm:</code>]]) [https://phabricator.wikimedia.org/T408318]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.5|MediaWiki]]
'''Chuyên sâu'''
* Quỹ Wikimedia đang trong giai đoạn đầu của việc khám phá các phương pháp tiếp cận cho '''Chỉ dẫn bài viết'''. Sáng kiến này nhằm mục đích xác định các phương pháp can thiệp có thể giúp các biên tập viên mới dễ dàng hiểu và áp dụng các quy tắc và chính sách hiện hành của Wikipedia khi tạo bài viết. Dự án đang trong giai đoạn khám phá và thiết kế thử nghiệm giai đoạn đầu. Tất cả các thành viên cộng đồng được khuyến khích [[mw:Special:MyLanguage/Article guidance|tìm hiểu thêm]] về dự án, và chia sẻ suy nghĩ của họ trên [[mw:Special:MyLanguage/Talk:Article guidance|trang thảo luận này]].
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/49|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W49"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 18:58, ngày 1 tháng 12 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29732328 -->
== Bản tin Kỹ thuật: Tuần 50-2025 ==
<section begin="technews-2025-W50"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/50|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Bất kỳ ai muốn bảo mật tài khoản người dùng của mình nay có thể sử dụng tính năng [[m:Special:MyLanguage/Help:Two-factor authentication|xác thực hai yếu tố]] (2FA). Tính năng này có sẵn cho tất cả người dùng của toàn bộ các dự án Wikimedia. Đây là một phần của sáng kiến [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security|Bảo mật Tài khoản]]. Sau này, 2FA sẽ được yêu cầu đối với tất cả người dùng có thể thực hiện các hành động mang tính nhạy cảm về bảo mật hoặc quyền riêng tư.
'''Cập nhật cho biên tập viên'''
* Tiếp nối đợt triển khai lần trước, tính năng [[mw:Special:MyLanguage/Help:Growth/Tools/Add a link|Thêm liên kết]], một tính năng cho phép biên tập viên thêm liên kết được đề xuất trong quá trình sửa đổi, sẽ có mặt trên [[Phab:T410469|33 trang Wikipedia]] kể từ ngày 9 tháng 12. Việc mở rộng này có được nhờ mô hình dự đoán mới nay hỗ trợ tất cả các ngôn ngữ, kể cả những ngôn ngữ mà chưa được đề cập trước đây. Dù tính năng này đã có mặt trên hầu hết các trang Wikipedia được một thời gian, nhưng lần triển khai này sẽ giúp chúng tôi tiến gần hơn đến việc sử dụng mô hình được cải tiến này ở mọi nơi. Nếu bạn có bất kỳ câu hỏi nào hoặc muốn được biết thêm thông tin chi tiết vui lòng liên hệ với [[mw:user:Trizek (WMF)|Trizek (WMF)]].
* Tuần trước, [[mw:Special:MyLanguage/Wikimedia Search Platform|nhóm Nền tảng Tìm kiếm]] đã thêm gợi ý tìm kiếm [[w:vi:Chuyển tự|được chuyển tự]] khi bạn nhập tới các wiki bằng tiếng Georgia. Nếu chỉ có một vài gợi ý tìm kiếm thông thường, thì các truy vấn bằng chữ Latinh hoặc Kirin [[phab:T127003|nay sẽ được viết lại thành chữ Georgia]] để có thể tìm kiếm được nhiều kết quả trùng khớp hơn. Ví dụ, tìm kiếm <bdi lang="ka-Latn" dir="ltr">''bedniereba''</bdi> hoặc <bdi lang="ka-Cyrl" dir="ltr">''бедниереба''</bdi> nay sẽ gợi ý bài viết hiện có về <bdi lang="ka" dir="ltr">ბედნიერება</bdi> ("sự hạnh phúc"). Bạn có thể đề xuất những ngôn ngữ khác mà việc gợi ý được chuyển tự có thể hữu ích [[phab:T375215|trên Phabricator]] để dùng cho quá trình phát triển sau này.
* Cuối tuần này, một thử nghiệm có kiểm soát sẽ bắt đầu dành cho các biên tập viên trên 100 trang Wikipedia lớn nhất khi đang thực hiện sửa đổi một đề mục bằng trình soạn thảo trực quan trên trang web di động. 50% số biên tập viên đó sẽ nhận thấy nút "Sửa đổi toàn bộ trang" mới cho phép họ mở rộng phiên sửa đổi của mình lên toàn bộ trang đó. Tính năng này nhằm mục đích giúp người dùng trên trang web di động sửa đổi bất kỳ đề mục nào trong bài viết một cách dễ dàng hơn, bất kể việc họ chạm vào biểu tượng sửa đề mục nào để bắt đầu sửa đổi. Thử nghiệm này sẽ kéo dài khoảng 4 tuần. Bạn có thể tìm hiểu [[phab:T409112|thêm thông tin]] về dự án này.
* Cuối tuần này, [[mw:Special:MyLanguage/Readers/Reader Growth|nhóm Tăng trưởng Độc giả]] sẽ khởi động [[mw:Special:MyLanguage/Readers/Reader Growth/WE3.1.14 Expanded Mobile Sections|thử nghiệm trên trang web di động]] để mở rộng tất cả đề mục bài viết theo mặc định (hiện giờ chúng được mặc định thu gọn lại) và ghim tiêu đề của đề mục mà người dùng hiện đang đọc lên đầu trang. Thử nghiệm này sẽ ảnh hưởng tới 10% người dùng trên Wikipedia tiếng Ả Rập, tiếng Trung, tiếng Pháp, tiếng Indonesia và tiếng Việt. [https://phabricator.wikimedia.org/T409485]
* [[mw:Special:MyLanguage/Wikimedia Apps/Team/Wikipedia Year in Review/2025 Year in Review|Tổng kết Một Năm Wikipedia 2025]], một tính năng trong ứng dụng Wikipedia dành cho thiết bị di động (iOS và Android) nhằm cung cấp cho người dùng bản tóm tắt được cá nhân hóa về mức độ tương tác của họ với Wikipedia xuyên suốt trong một năm, nay đã có mặt trên ứng dụng iOS và Android. Phiên bản này bao gồm những thông tin chuyên sâu được mở rộng và cá nhân hóa, cải thiện những điểm nổi bật trong quá trình đọc, thông điệp mới cho nhà quyên góp, cùng thiết kế được cập nhật. Hãy mở ứng dụng để xem chuyên mục Tổng kết Năm và khám phá hành trình đọc của bạn trong năm 2025 nhé.
* Một lỗi phần mềm xảy ra gần đây khiến cho các sửa đổi được thực hiện bằng Trình Soạn thảo Trực quan thực hiện những thay đổi không mong muốn với mã nguồn wiki, trong đó có việc loại bỏ khoảng trắng và thay thế các dấu cách bằng dấu gạch dưới trong các liên kết wiki bên trong chú thích. Vấn đề này đã được giải quyết một phần vào tuần trước, và việc giải quyết vấn đề vẫn đang tiếp tục được thực hiện. Các biên tập viên sử dụng Trình Soạn thảo Trực quan trong các ngày từ 28 tháng 11 đến 2 tháng 12 nên kiểm tra lại sửa đổi của mình để tìm ra những thay đổi ngoài ý muốn. [https://phabricator.wikimedia.org/T411238]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:23}} {{PLURAL:23|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, vấn đề về việc xử lý không đúng các đường dẫn URL được sao chép từ thanh địa chỉ của người dùng Microsoft Edge đã được giải quyết. [https://phabricator.wikimedia.org/T341281]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Bắt đầu từ tuần này, người dùng [[Special:Preferences#mw-prefsection-betafeatures|tính năng beta]] "{{int:codemirror-beta-feature-title}}" sẽ sử dụng [[mw:Special:MyLanguage/Help:Extension:CodeMirror|CodeMirror]] làm trình sửa đổi dành cho các kiểu nội dung Lua, JavaScript, CSS, JSON và Vue, thay vì [[mw:Special:MyLanguage/Extension:CodeEditor|CodeEditor]]. Với thay đổi này, [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Linting|các linter]] sẽ được nâng cấp. Đây là một phần trong nỗ lực lớn hơn nhằm thay thế CodeEditor và mang tới trải nghiệm sửa đổi mã nguồn một cách nhất quán. [https://phabricator.wikimedia.org/T373711]
* Các nhà phát triển được khuyến khích tham gia [https://wikimediafoundation.limesurvey.net/552643 Khảo sát Mức độ Hài lòng của Nhà phát triển năm 2025], hiện vẫn đang được mở đến hết ngày 5 tháng 1 năm 2026. Nếu bạn tham gia vào việc xây dựng phần mềm cho hệ sinh thái Wikimedia và muốn chia sẻ kinh nghiệm hoặc phản hồi của mình, thì chúng tôi sẽ rất trân trọng sự tham gia của bạn. [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/W4WBKO6Q55UWWCCSFWQATKEXBEHP3QNR/]
* Tuần này không có phiên bản MediaWiki mới nào.
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/50|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W50"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 17:45, ngày 8 tháng 12 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29738112 -->
== Bản tin Kỹ thuật: Tuần 51-2025 ==
<section begin="technews-2025-W51"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/51|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:18}} {{PLURAL:18|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một trong số đó là việc giải quyết vấn đề khi tài khoản tạm thời chèn liên kết URL ngoài, việc này kích hoạt yêu cầu hCaptcha trong nhiều trường hợp hơn so với dự định, và không hiển thị popup cần thiết trong lần thử xuất bản sửa đổi đầu tiên. [https://phabricator.wikimedia.org/T411927]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* <span class="mw-translate-fuzzy">Để cải thiện hiệu suất cho cơ sở dữ liệu và trang web, các liên kết ngoài tới các dự án Wikimedia sẽ không còn được lưu trữ trong cơ sở dữ liệu. Điều này có nghĩa là chúng sẽ không thể được tìm thấy trong [[{{#special:LinkSearch}}]], sẽ không được kiểm tra bởi Danh sách đen về spam hoặc Bộ lọc Sai phạm dưới dạng liên kết mới, và sẽ không có trong bảng <code dir=ltr>externallinks</code> trên các bản sao cơ sở dữ liệu. Trong tương lai nó có thể được mở rộng sang những trang web khác đáng tin cậy được liên kết nhiều trên cơ sở từng wiki, chẳng hạn như liên kết Creative Commons trên Wikimedia Commons.</span> [https://phabricator.wikimedia.org/T405005]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.7|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/51|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W51"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:03, ngày 15 tháng 12 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29796010 -->
== Bản tin Kỹ thuật: Tuần 52-2025 ==
<section begin="technews-2025-W52"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2025/52|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Kể từ tháng 1, các bộ lọc sai phạm [[mw:Special:MyLanguage/Extension:AbuseFilter/Access flags|có thể được thiết lập]] để tự động loại bỏ chi tiết bộ lọc chẳng hạn như quy tắc và danh sách các sửa đổi và tác vụ thực hiện được ghi lại. Điều này sẽ giúp người giám sát sử dụng các bộ lọc sai phạm để ngăn chặn doxxing hoặc nội dung khác có thể bị loại bỏ. [https://phabricator.wikimedia.org/T290324]
* Số tiếp theo của Bản tin Kỹ thuật sẽ được phát hành vào ngày 12 tháng 1 năm 2026 do trùng vào kỳ nghỉ cuối năm. Xin cảm ơn tất cả các biên dịch viên cùng những người đã gửi nội dung hoặc phản hồi trong năm nay.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:16}} {{PLURAL:16|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, sự cố xảy ra khiến cho ứng dụng bị sập khi chạm vào mục "Bước Đầu tiên" trong mục Nhìn lại Một năm trên ứng dụng Wikipedia dành cho Android nay đã được giải quyết, và tính năng này được mở như mong đợi. [https://phabricator.wikimedia.org/T411546]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Những thành phần giao diện như khác biệt giữa các phiên bản và thể loại được tạo bởi MediaWiki từng có thuộc tính <code dir=ltr>data-mw="interface"</code> để phân biệt với nội dung wiki. Thuộc tính này đã được thay thế bằng <code dir=ltr>data-mw-interface=""</code>, nhằm tránh khả năng gây xung đột với những thuộc tính <code dir=ltr>data-mw</code> khác được tạo bởi Parsoid. [https://phabricator.wikimedia.org/T409187]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Không có phiên bản MediaWiki mới nào trong tuần này hoặc tuần tới.
'''Các cuộc họp và sự kiện'''
* [[mw:Wikimedia Hackathon Northwestern Europe 2026|Wikimedia Hackathon Tây Bắc Âu năm 2026]] sẽ diễn ra vào các ngày 13-14 tháng 3 năm 2026 tại Arnhem, Hà Lan. Đơn đăng ký vừa được mở vào giữa tháng 12 và sẽ đóng vào giữa tháng 1 hoặc có thể đóng sớm hơn nếu hết chỗ. Do sự kiện giới hạn khoảng 100 người tham gia, chúng tôi khuyến khích bạn đăng ký thật sớm.
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2025/52|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2025-W52"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 21:45, ngày 22 tháng 12 năm 2025 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29831856 -->
== Bản tin Kỹ thuật: Tuần 03-2026 ==
<section begin="technews-2026-W03"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/03|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Quỹ Wikimedia đã chia sẻ một số câu hỏi định hướng cho Kế hoạch Thường niên giai đoạn tháng 7 năm 2026–tháng 6 năm 2027 trên [[m:Special:MyLanguage/Wikimedia Foundation Annual Plan/2026-2027/Product & Technology OKRs|Meta]] và ''[[diffblog:2025/12/10/shaping-wikimedia-foundations-2026-2027-annual-goals-key-questions-for-the-wikimedia-movement/|Diff]]''. Những câu hỏi này tập trung vào những xu hướng toàn cầu, những thử nghiệm nhanh và hiệu quả hơn, hỗ trợ tốt hơn cho người mới, tăng cường năng lực cho biên tập viên và người dùng có quyền nâng cao, cải thiện sự cộng tác giữa các dự án, cũng như phát triển và duy trì lượng người đọc. Mọi phản hồi và ý kiến đóng góp đều được hoan nghênh trên [[m:Talk:Wikimedia Foundation Annual Plan/2026-2027|trang thảo luận]].
'''Cập nhật cho biên tập viên'''
* Là một phần của công việc hiện do nhóm Công nghệ Cộng đồng thực hênj xoay quanh dự án [[m:Special:MyLanguage/Community Wishlist/W372|Nhiều danh sách theo dõi]] (Multiple watchlists), việc hiển thị của tính năng [[Special:EditWatchlist|Sửa đổi Danh sách theo dõi]] (EditWatchlist) sẽ được cập nhật làm bước đầu tiên hướng tới việc có được nhiều danh sách theo dõi. Ngoài ra, việc phân trang của trang [[Special:Search|Tìm kiếm]] cũng sẽ được cập nhật như là một phần của công việc liên quan đến mong muốn [[m:Special:MyLanguage/Community Wishlist/W186|Cải tiến phân trang / điều hướng trang]]. [https://phabricator.wikimedia.org/T411596]
* [[m:Special:GlobalWatchlist|Danh sách theo dõi toàn cục]] là [[mw:Special:MyLanguage/Extension:GlobalWatchlist|phần mở rộng]] của MediaWiki cho phép bạn xem danh sách theo dõi của bạn từ các wiki khác nhau trên cùng một trang. Danh sách này gần đây đã được cập nhật để trông giống như [[Special:Watchlist|Danh sách theo dõi]] thông thường hơn, chẳng hạn như tiền xử lý các tài khoản tạm thời để che giấu địa chỉ IP (trong đó có việc chuyển hướng liên kết người dùng đến các trang đóng góp), in đậm tiêu đề trang, và mở các liên kết trong phần tóm lược sửa đổi và thẻ trong tab trình duyệt mới. [https://phabricator.wikimedia.org/T398361][https://phabricator.wikimedia.org/T298919][https://phabricator.wikimedia.org/T273526][https://phabricator.wikimedia.org/T286309]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:28}} {{PLURAL:28|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, vấn đề mà việc cấm tài khoản toàn cục không có tùy chọn cấm gửi thư điện tử, nay đã được giải quyết, và sẽ có thể sử dụng kể từ tuần ngày 13 tháng 1. [https://phabricator.wikimedia.org/T401293]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* [[mw:Special:MyLanguage/VisualEditor/Citation tool|Công cụ chú thích của Soạn thảo Trực quan]] và [[mw:Special:MyLanguage/Help:Reference Previews|Xem trước Chú thích]] nay hỗ trợ kiểu chú thích dạng "bản đồ". [https://phabricator.wikimedia.org/T411083]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.10|MediaWiki]]/[[mw:MediaWiki 1.46/wmf.11|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/03|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W03"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:33, ngày 12 tháng 1 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29907192 -->
== Thank You for Last Year – Join Wiki Loves Ramadan 2026 ==
Dear Wikimedia communities,
We hope you are doing well, and we wish you a happy New Year.
''Last year, we captured light. This year, we’ll capture legacy.''
In 2025, communities around the world shared the glow of Ramadan nights and the warmth of collective iftars. In 2026, ''Wiki Loves Ramadan'' is expanding, bringing more stories, more cultures, and deeper global connections across Wikimedia projects.
We invite you to explore the ''Wiki Loves Ramadan 2026'' [[m:Special:MyLanguage/Wiki Loves Ramadan 2026|Meta page]] to learn how you can participate and [[m:Special:MyLanguage/Wiki Loves Ramadan 2026/Participating communities|sign up]] your community.
📷 ''Photo campaign on '' [[c:Special:MyLanguage/Commons:Wiki Loves Ramadan 2026|Wikimedia Commons]]
If you have questions about the project, please refer to the FAQs:
* [[m:Special:MyLanguage/Wiki Loves Ramadan/FAQ/|Meta-Wiki]]
* [[c:Special:MyLanguage/Commons:Wiki Loves Ramadan/FAQ|Wikimedia Commons]]
''Early registration for updates is now open via the '''[[m:Special:RegisterForEvent/2710|Event page]]'''''
''Stay connected and receive updates:''
* [https://t.me/WikiLovesRamadan Telegram channel]
* [https://lists.wikimedia.org/postorius/lists/wikilovesramadan.lists.wikimedia.org/ Mailing list]
We look forward to collaborating with you and your community.
'''The Wiki Loves Ramadan 2026 Organizing Team''' 19:45, ngày 16 tháng 1 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:ZI Jony@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=29879549 -->
== Bản tin Kỹ thuật: Tuần 04-2026 ==
<section begin="technews-2026-W04"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/04|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Khay được hiển thị trên [[Special:Diff|Đặc biệt:Khác]] trong chế độ xem di động đã được thiết kế lại. Giờ đây nó mặc định được thu gọn, đồng thời tích hợp một liên kết để lùi lại sửa đổi đang được hiển thị trên màn hình, giúp các biên tập viên và người duyệt bài trên điện thoại di động dễ dàng thực hiện tác vụ mà vẫn giữ giao diện thật gọn gàng. [https://phabricator.wikimedia.org/T402297]
* [[m:Special:GlobalWatchlist|Danh sách Theo dõi Toàn cục]] cho phép bạn xem các danh sách theo dõi từ nhiều wiki khác nhau trên cùng một trang. [[mw:Special:MyLanguage/Extension:GlobalWatchlist|Phần mở rộng]] này tiếp tục được cải thiện — nay nó có thể tự động xác định hướng văn bản (nhằm đảm bảo việc hiển thị chính xác các trang web mà có tên miền bất thường) và hiển thị chi tiết phần miêu tả cho các tác vụ được lưu trong nhật trình. Cuối tuần này, một liên kết thường trực mới cho các tác vụ tạo trang cùng các lớp CSS cho từng mục nhập sẽ được thêm vào. [https://phabricator.wikimedia.org/T412505][https://phabricator.wikimedia.org/T287929][https://phabricator.wikimedia.org/T262768][https://phabricator.wikimedia.org/T414135]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:32}} {{PLURAL:32|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề mà được ghi nhận trước đây trong giao diện Vector 2022 mà các liên kết anchor đích bị che khuất bởi tiêu đề cố định nay đã được giải quyết. [https://phabricator.wikimedia.org/T406114]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Như đã đề cập trong [[m:Special:MyLanguage/Tech/News/2025/44|thông báo ngừng hỗ trợ vào tháng 10 năm 2025]], nhóm Giao diện MediaWiki sẽ bắt đầu loại bỏ toàn bộ điểm cuối chuyển đổi có dấu gạch chéo ở cuối khỏi API REST của MediaWiki vào tuần từ ngày 26 tháng 1. Những thay đổi này dự kiến sẽ được triển khai tới tất cả các wiki chậm nhất vào ngày 30 tháng 1. Tất cả người dùng API đang gọi những điểm cuối này được khuyên chuyển đổi sang những phiên bản không có dấu gạch chéo ở cuối. Cả hai loại biến thể điểm cuối này đều có thể được tìm thấy, so sánh và kiểm tra sử dụng [https://test.wikipedia.org/wiki/Special:RestSandbox Chỗ thử REST]. Nếu bạn có thắc mắc hay gặp bất kỳ sự cố nào, hãy gửi yêu cầu bằng cách tạo một tác vụ trong Phabricator gửi tới [https://phabricator.wikimedia.org/project/view/6931/ bảng tin #MW-Interfaces-Team].
* Tài liệu tham khảo trực quan cho [[mw:Special:MyLanguage/Wikimedia REST API|API REST của Wikimedia]] đã được chuyển. Những yêu cầu đến các tài liệu API trước đây được lưu trữ thông qua [[mw:Special:MyLanguage/RESTBase|RESTBase]] (v.d.: <code dir=ltr>https://en.wikipedia.org/api/rest_v1/</code>) nay được chuyển hướng tới [[w:en:Special:RestSandbox|Chỗ thử REST]].
* [[mw:Special:MyLanguage/Wikidata Platform|Nhóm Nền tảng Wikidata của WMF]] (WDP) đã phát hành [[d:Special:MyLanguage/Wikidata:Wikidata Platform team/Newsletter|bản tin tháng 1 năm 2026]]. Bản tin bao gồm những cập nhật về việc ngừng hoạt động điểm cuối biểu đồ đầy đủ (full-graph) cũ, thay đổi về chính sách User-Agent, thời gian làm việc hàng tháng của kế hoạch chuyển đổi sang Blazegraph, cùng những nỗ lực nhằm giảm thiểu những lỗi hồi quy gây ra bởi việc ngừng điểm cuối cũ. Xin nhắc lại rằng bạn có thể [[m:Special:MyLanguage/Global message delivery/Targets/WDP team updates|đăng ký nhận bản tin WDP đó]]!
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.12|MediaWiki]]
'''Các cuộc họp và sự kiện'''
* [[mw:Wikimedia Hackathon Northwestern Europe 2026|Cuộc thi Hackathon Wikimedia khu vực Tây Bắc Châu Âu năm 2026]] sẽ diễn ra vào ngày 13-14 tháng 3 năm 2026 tại Arnhem, Hà Lan. Cổng đăng ký đã được mở vào giữa tháng 12 và sẽ sớm đóng lại hoặc đóng ngay khi đã đủ số lượng người tham gia. Đây là cuộc thi hackathon kéo dài hai ngày, tập trung vào mảng kỹ thuật và quy tụ các thành viên Wikimedia từ khắp khu vực. Hy vọng sẽ gặp lại bạn tại đó!
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/04|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W04"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 20:29, ngày 19 tháng 1 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29943403 -->
== Rà soát thường niên Bộ Quy tắc Ứng xử Chung và Hướng dẫn Thực thi ==
<section begin="announcement-content" />
Tôi viết thư này để thông báo với bạn rằng thời gian xem xét hàng năm đối với Bộ Quy tắc Ứng xử và Hướng dẫn Thực thi hiện đã bắt đầu. Bạn có thể đưa ra các đề xuất thay đổi đến hết ngày 9 tháng 2 năm 2026. Đây là bước đầu tiên trong nhiều bước cần thực hiện cho quá trình xem xét hàng năm. [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2026|Đọc thêm thông tin và tìm cuộc thảo luận để tham gia trên trang UCoC trên Meta]].
[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Ủy ban Điều phối Bộ Quy tắc Ứng xử Toàn cầu]] (U4C) là một nhóm toàn cầu chuyên trách việc thực hiện Bộ Quy tắc Ứng xử Toàn cầu một cách công bằng và nhất quán. Đánh giá thường niên này được lên kế hoạch và thực hiện bởi U4C. Để biết thêm thông tin và trách nhiệm của U4C, [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|bạn có thể xem Hiến chương U4C]].
Vui lòng chia sẻ thông tin này với các thành viên khác trong cộng đồng của bạn ở bất cứ nơi nào phù hợp.
-- Hợp tác với U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]])<section end="announcement-content" />
21:02, ngày 19 tháng 1 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:Keegan (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29905753 -->
== Bản tin Kỹ thuật: Tuần 05-2026 ==
<section begin="technews-2026-W05"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/05|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Quỹ Wikimedia mời mọi người đóng góp ý kiến cho [[m:Special:MyLanguage/Product and Technology Advisory Council/Year1 Reflections and Proposed Way Forward 2026 Update|đề xuất kế hoạch tương lai]] của [[:m:Special:MyLanguage/Product and Technology Advisory Council|Hội đồng Cố vấn Sản phẩm và Công nghệ]] chậm nhất ngày 28 tháng 2.
* Tất cả người dùng đã đăng ký tài khoản nay có thể sử dụng passkey (mã xác thực) cho việc [[m:Special:MyLanguage/Help:Two-factor authentication|xác thực hai yếu tố]] (2FA). Passkey là một cách đơn giản để đăng nhập mà không cần phải sử dụng thiết bị thứ hai. Chúng sẽ xác thực danh tính của người dùng sử dụng vân tay, nhận diện khuôn mặt, hoặc dùng mã PIN. Để thiết lập một passkey, đầu tiên hãy thiết lập phương thức xác thực 2FA thông thường. Hiện tại, để đăng nhập bằng passkey, người dùng cũng phải sử dụng cả mật khẩu. Vào cuối quý này, tính năng đăng nhập không cần mật khẩu sẽ cho phép người dùng đăng nhập chỉ bằng một cú nhấn chuột và passkey. Người dùng có quyền nâng cao cũng sẽ bắt buộc phải kích hoạt xác thực 2FA. Đây là một phần của dự án [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security|Bảo mật Tài khoản]].
* Những người đóng góp chưa đăng ký tài khoản trên các IP hoặc dải IP bị cấm nay có thể tương tác trên wiki để chống lại quyết định cấm trên trang thảo luận thành viên, trừ khi tùy chọn "ngăn người dùng này sửa đổi trang thảo luận của họ" được bật. Điều này giúp giải quyết vấn đề rằng người dùng chưa đăng nhập không thể sử dụng quy trình bỏ cấm mặc định thông qua trang thảo luận thành viên. [https://phabricator.wikimedia.org/T398673]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:20}} {{PLURAL:20|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, phần miêu tả phương thức Xác thực hai yếu tố (2FA) trên trang quản lý đã được cập nhật. Giờ đây nó trở nên rõ ràng và dễ hiểu hơn, giúp người dùng dễ dàng sử dụng hơn. [https://phabricator.wikimedia.org/T332385]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Một biến Bộ lọc Sai phạm mới, <code>account_type</code>, đã được thêm vào để cung cấp một cách đáng tin cậy trong việc xác định loại tài khoản được tạo trong các tác vụ <code>createaccount</code> và <code>autocreateaccount</code>. Là một phần của thay đổi này, biến <code>accountname</code> đã được đổi tên thành <code>account_name</code>, và <code>accountname</code> nay đã lỗi thời. Những người quản lý bộ lọc sai phạm nên cập nhật bất kỳ bộ lọc nào đang sử dụng biến kiểm tra loại tài khoản mã hóa cứng hoặc đã lỗi thời nào nếu có. [https://phabricator.wikimedia.org/T414049]
* Các hình thu nhỏ được yêu cầu với kích thước không chuẩn và sử dụng các phương thức không chuẩn như yêu cầu trực tiếp đến <code dir=ltr><nowiki>upload.wikimedia.org/…</nowiki></code> sẽ ngừng hoạt động trong thời gian tới. Thay đổi này nhằm ngăn chặn việc các trình thu thập dữ liệu web và bot từ bên ngoài lạm dụng. Một số người dùng có đoạn mã CSS/JS tùy chỉnh, các bảo quản viên giao diện có thể sửa tiện ích và giao diện cục bộ, cùng người viết công cụ sẽ cần cập nhật đoạn mã của mình để sử dụng kích thước hình thu nhỏ tiêu chuẩn. [[phab:T414805|Thông tin chi tiết, các liên kết tìm kiếm, cùng ví dụ về cách giải quyết chúng có sẵn trong tác vụ này]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.13|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/05|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W05"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 21:17, ngày 26 tháng 1 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:UOzurumba (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=29969530 -->
== Bản tin Kỹ thuật: Tuần 06-2026 ==
<section begin="technews-2026-W06"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/06|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Tính năng "{{int:pageinfo-toolboxlink}}", một tính năng cung cấp thông tin xác thực về một trang ([{{fullurl:{{FULLPAGENAME}}|action=info}} ví dụ]), nay có thêm cả phần mục lục được tạo tự động. Nếu có trang [[MediaWiki:Pageinfo-header]] được người dùng tạo cục bộ, giờ nó có thể được xóa đi. [https://phabricator.wikimedia.org/T363726]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:21}} {{PLURAL:21|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, Trình Soạn thảo Trực quan trước đây đã thêm chức năng in đậm hoặc nghiêng vào phần miêu tả liên kết, làm cho mã wiki trở nên phức tạp. Vấn đề này hiện đã được giải quyết. [https://phabricator.wikimedia.org/T409669]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Không có bản dump XML nào được tạo ra vào ngày 20 tháng 1. Ngoài ra, kể từ giờ, các bản dump sẽ chỉ được tạo một lần mỗi tháng. [https://phabricator.wikimedia.org/T414389]
* Nhóm Giao diện MediaWiki đã ngừng hỗ trợ tất cả điểm cuối chuyển đổi có dấu gạch chéo ở cuối khỏi [https://www.mediawiki.org/wiki/Special:MyLanguage/API:REST%20API API REST của MediaWiki]. Tất cả người dùng API hiện đang gọi những điểm cuối đó được khuyến khích chuyển sang các bản không có dấu gạch chéo ở cuối. Nếu bạn có thắc mắc hoặc gặp bất kỳ sự cố nào, vui lòng gửi tác vụ phabricator tới [https://phabricator.wikimedia.org/project/view/6931/ bảng tin của #MW-Interfaces-Team].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.14|MediaWiki]]
'''Nổi bật trong tuần'''
* Xin nhắc tới người dùng rằng Quỹ Wikimedia đã chia sẻ một số câu hỏi định hướng cho Kế hoạch Hàng năm giai đoạn tháng 7 năm 2026–tháng 6 năm 2027 trên [[m:Special:MyLanguage/Wikimedia Foundation Annual Plan/2026-2027/Product & Technology OKRs|Meta]] và ''[[diffblog:2025/12/10/shaping-wikimedia-foundations-2026-2027-annual-goals-key-questions-for-the-wikimedia-movement/|Diff]]''. Những câu hỏi này tập trung vào những xu hướng toàn cầu, thử nghiệm nhanh hơn và hiệu quả hơn, hỗ trợ tốt hơn cho người mới, nâng cao năng lực cho biên tập viên và người dùng có quyền nâng cao, cải thiện việc cộng tác giữa các dự án, cũng như phát triển và giữ chân độc giả. Mọi phản hồi và ý kiến đóng góp đều được hoan nghênh trên [[m:Talk:Wikimedia Foundation Annual Plan/2026-2027|trang thảo luận]].
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/06|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W06"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 17:43, ngày 2 tháng 2 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30000986 -->
== Bản tin Kỹ thuật: Tuần 07-2026 ==
<section begin="technews-2026-W07"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/07|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* [[File:Maki-gift-15.svg|12px|link=|class=skin-invert|Mục Mong muốn cộng đồng]] <span lang="en" dir="ltr" class="mw-content-ltr">Logged-in contributors who manage large or complex watchlists can now organise and filter watched pages in ways that improve their workflows with the new [[mw:Special:MyLanguage/Help:Watchlist labels|Watchlist labels]] feature. By adding custom labels (for example: pages you created, pages being monitored for vandalism, or discussion pages) users can more quickly identify what needs attention, reduce cognitive load, and respond more efficiently. This improves watchlist usability, especially for highly active editors.</span>
* <span lang="en" dir="ltr" class="mw-content-ltr">A new feature available on [[Special:Contributions|Special:Contributions]] shows [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts|temporary accounts]] that are likely operated by the same person, and so makes patrolling less time-consuming. Upon checking contributions of a temporary account, users with access to temporary account IP addresses can now see a view of contributions from the related temporary accounts. The feature looks up all the IPs associated with a given temporary account within the data retention period and shows all the contributions of all temporary accounts that have used these IPs. [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts#February 2026: Improvements to the patroller tooling|Learn more]].</span> [https://phabricator.wikimedia.org/T415674]
* <span lang="en" dir="ltr" class="mw-content-ltr">When editors preview a wikitext edit, the reminder box that they are only seeing a preview (which is shown at the top), now has a grey/neutral background instead of a yellow/warning background. This makes it easier to distinguish preview notes from actual warnings (for example, edit conflicts or problematic redirect targets), which will now be shown in separate warning or error boxes.</span> [https://phabricator.wikimedia.org/T414742]
* <span lang="en" dir="ltr" class="mw-content-ltr">The [[m:Special:GlobalWatchlist|Global Watchlist]] lets you view your watchlists from multiple wikis on one page. The [[mw:Special:MyLanguage/Extension:GlobalWatchlist|extension]] continues to improve — it now properly supports more than one Wikibase site, for example both [[d:|Wikidata]] and [[testwikidata:|testwikidata]]. In addition, issues regarding text direction have been fixed for users who prefer Wikidata or other Wikibase sites in right-to-left (RTL) languages.</span> [https://phabricator.wikimedia.org/T415440][https://phabricator.wikimedia.org/T415458]
* <span lang="en" dir="ltr" class="mw-content-ltr">The automatic "magic links" for ISBN, RFC, and PMID numbers have been [[mw:Special:MyLanguage/Help:Magic links|deprecated in wikitext since 2021]] due to inflexibility and difficulties with localization. Several wikis have successfully replaced RFC and PMID magic links with equivalent external links, but a template was often required to replace the functionality of the ISBN magic link. There is now a new [[mw:Special:MyLanguage/Help:Magic words#isbn|built-in parser function]] <code dir=ltr><nowiki>{{#isbn}}</nowiki></code> available to replace the basic functionality of the ISBN magic link. This makes it easier for wikis who wish to migrate off of the deprecated magic link functionality to do so.</span> [https://phabricator.wikimedia.org/T145604]
* <span lang="en" dir="ltr" class="mw-content-ltr">Two new wikis have been created:</span>
** <span lang="en" dir="ltr" class="mw-content-ltr">a {{int:project-localized-name-group-wikipedia}} in [[d:Q35401|Jju]]</span> ([[w:kaj:|<code>w:kaj:</code>]]) [https://phabricator.wikimedia.org/T413283]
** <span lang="en" dir="ltr" class="mw-content-ltr">a {{int:project-localized-name-group-wikipedia}} in [[d:Q1186896|Nawat]]</span> ([[w:ppl:|<code>w:ppl:</code>]]) [https://phabricator.wikimedia.org/T413273]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:23}} {{PLURAL:23|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]].
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* <span lang="en" dir="ltr" class="mw-content-ltr">A new global user group has been created: [[{{int:grouppage-local-bot}}|{{int:group-local-bot}}]]. It will be used internally by the software to allow community bots to bypass rate limits that are applied to abusive [[w:en:Web scraping|web scrapers]]. Accounts that are approved as bots on at least one Wikimedia wiki will be automatically added to this group. It will not change what user permissions the bot has.</span> [https://phabricator.wikimedia.org/T415588]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.15|MediaWiki]]
'''Các cuộc họp và sự kiện'''
* <span lang="en" dir="ltr" class="mw-content-ltr">The [[mw:Special:MyLanguage/MediaWiki Users and Developers Conference Spring 2026|MediaWiki Users and Developers Conference, Spring 2026]] will be held March 25–27 in Salt Lake City, USA. This event is organized by and for the third-party MediaWiki community. You can propose sessions and register to attend.</span> [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/AZBWVI46SDEB65PGR5J6E4TYOQQEZXM7/]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/07|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W07"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 23:30, ngày 9 tháng 2 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:Quiddity (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30026671 -->
== Bản tin Kỹ thuật: Tuần 08-2026 ==
<section begin="technews-2026-W08"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/08|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* [[mw:Special:MyLanguage/Wikimedia Site Reliability Engineering|Nhóm SRE]] sẽ tiến hành dọn dẹp phiên bản [[m:Special:MyLanguage/Etherpad|Etherpad]] của Wikimedia, một trình sửa đổi trên web dành cho việc sửa đổi tài liệu cộng tác theo thời gian thực. Tất cả pad sẽ bị xóa vĩnh viễn sau ngày 30 tháng 4 năm 2026 – trường hợp nếu còn dự án vẫn đang được tiến hành di chuyển vào thời điểm đó thì nhóm có thể xem xét lại thời gian đó tùy từng trường hợp. Vui lòng tạo bản sao lưu cục bộ cho bất kỳ nội dung nào mà bạn muốn giữ lại, vì dữ liệu đã bị xóa không thể khôi phục được nữa. Việc dọn dẹp này sẽ giúp giảm bớt kích thước cơ sở dữ liệu và giảm thiểu lãng phí (dấu ấn) cơ sở hạ tầng. Etherpad sẽ tiếp tục hỗ trợ cộng tác theo thời gian thực, nhưng không kỳ vọng vào khả năng lưu trữ lâu dài. Những đợt dọn dẹp khác có thể xảy ra trong tương lai mà không cần báo trước. [https://phabricator.wikimedia.org/T415237]
'''Cập nhật cho biên tập viên'''
* Nhóm Tìm kiếm Thông tin sẽ triển khai [[mw:Special:MyLanguage/Readers/Information Retrieval/Phase 1|thử nghiệm trên ứng dụng di động dùng Android]] nhằm kiểm tra khả năng tìm kiếm kết hợp, có thể xử lý cả các truy vấn tìm theo ngữ nghĩa và theo từ khóa. Việc cải thiện tìm kiếm trên nền tảng này sẽ giúp người đọc dễ dàng tìm thấy những gì mà họ đang tìm kiếm hơn ngay trên Wikipedia. Thử nghiệm này sẽ bắt đầu được triển khai trước tiên là trên Wikipedia tiếng Hy Lạp vào cuối tháng 2, sau đó là các wiki tiếng Anh, tiếng Pháp và tiếng Bồ Đào Nha vào tháng 3. [https://diff.wikimedia.org/2026/01/08/semantic-search-making-it-easier-to-find-the-information-readers-want/ Đọc thêm] trên blog Diff. [https://www.mediawiki.org/wiki/Readers/Information_Retrieval]
* Nhóm Phát triển Độc giả sẽ tiến hành [[mw:Special:MyLanguage/Readers/Reader Growth/WE3.10.2 Mobile Table of Contents|một thử nghiệm]] cho người dùng web trên thiết bị di động nhằm thêm mục lục và tự động mở rộng tất cả các đề mục trong bài viết, nhằm tìm hiểu thêm về những vấn đề về điều hướng mà họ gặp phải. Thử nghiệm này sẽ có mặt trên các Wikipedia tiếng Ả Rập, tiếng Trung, tiếng Anh, tiếng Pháp, tiếng Indonesia và tiếng Việt.
* Trước đây, các thông báo đầu trang ([[{{ns:8}}:Sitenotice]] và [[{{ns:8}}:Anonnotice]]) chỉ được hiển thị trên trang web dành cho máy tính để bàn. Giờ đây, chúng sẽ được hiển thị trên mọi nền tảng. Người dùng trên trang web di động nay sẽ thấy được những thông báo này và được thông báo. Các bảo quản viên trang web nên sẵn sàng kiểm tra và sửa các thông báo đầu trang trên các thiết bị di động để tránh xung đột với bài viết. Để từ chối, bảo quản viên giao diện có thể thêm <code dir="ltr">#siteNotice { display: none; }</code> vào [[{{ns:8}}:Minerva.css]]. [https://phabricator.wikimedia.org/T138572][https://phabricator.wikimedia.org/T416644]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:19}} {{PLURAL:19|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề trên [[Special:RecentChanges|Đặc biệt:Thay đổi gần đây]] đã được giải quyết. Trước đây, nhấn vào nút ẩn trên các bộ lọc đang được áp dụng khiến cho nút "xem những thay đổi mới từ…" biến mất, dù nó đáng lẽ phải được hiển thị. Nút này giờ đây sẽ hoạt động như mong đợi. [https://phabricator.wikimedia.org/T406339]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Hiện đã có tài liệu mới giúp biên tập viên gỡ lỗi các tính năng tìm kiếm trên trang. Nó hỗ trợ việc khắc phục sự cố khi các trang xuất hiện trong kết quả tìm kiếm, khi thứ hạng có vẻ không như mong đợi và khi bạn cần kiểm tra nội dung nào đang được lập chỉ mục, giúp việc tìm hiểu và phân tích hành vi tìm kiếm trở nên dễ dàng hơn. [[mw:Help:CirrusSearch/Debug|Tìm hiểu thêm]]. [https://phabricator.wikimedia.org/T411169]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.16|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/08|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W08"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:17, ngày 16 tháng 2 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30086330 -->
== Bản tin Kỹ thuật: Tuần 09-2026 ==
<section begin="technews-2026-W09"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/09|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Tính năng [[mw:Special:MyLanguage/Edit check/Reference Check|Kiểm tra Nguồn Tham khảo]] đã được triển khai tới Wikipedia tiếng Anh, điều này có nghĩa là việc triển khai tính năng trên tất cả các trang Wikipedia đã hoàn thành. Tính năng này nhắc những người mới thêm nguồn tham khảo trước khi đăng nội dung mới, giúp giảm thiểu việc lùi sửa liên quan đến các vấn đề nguồn tham khảo phổ biến và cải thiện khả năng kiểm chứng được. Trong quá trình thử nghiệm A/B, tính năng này mang lại hiệu quả rất đáng kể: những người mới có hiển thị Kiểm tra Nguồn Tham khảo có khả năng thêm nguồn tham khảo cao hơn khoảng 2,2 lần trên trang web dành cho máy tính và cao hơn khoảng 17,5 lần trên trang web dành cho di động. [https://analytics.wikimedia.org/published/reports/editing/reference_check_ab_test_report_final_2025.html]
'''Cập nhật cho biên tập viên'''
* [[mw:Special:MyLanguage/Extension:InterwikiSorting|Phần mở rộng InterwikiSorting]], một phần mở rộng cho phép [[m:Special:MyLanguage/Interwiki sorting order|sắp xếp các liên kết liên wiki]], đã bị gỡ bỏ khỏi Wikipedia. Do đó, những biên tập viên đã bật tính năng sắp xếp liên kết liên wiki ở chế độ không rút gọn (định dạng danh sách đầy đủ) sẽ thấy được rằng các liên kết được sắp xếp lại. Các liên kết từ nay trở đi sẽ được liệt kê theo thứ tự bảng chữ cái dựa trên mã ngôn ngữ. [https://phabricator.wikimedia.org/T253764]
* Cuối tuần này, người dùng sửa đổi một đề mục của trang bằng cách sử dụng trình soạn thảo trực quan trên thiết bị di động, sẽ nhìn thấy một nút mới có tên "Sửa đổi toàn bộ trang". Khi chạm vào nút đó, bạn sẽ có thể sửa đổi toàn bộ bài viết. Điều này sẽ giúp ích khi thay đổi bạn muốn thực hiện nằm ngoài đề mục mà bạn mở ban đầu. [https://phabricator.wikimedia.org/T387175][https://phabricator.wikimedia.org/T409112]
* [[mw:Special:MyLanguage/Readers/Reader Experience|Nhóm Trải nghiệm Người đọc]] đang mời các biên tập viên đánh giá xem chế độ tối có nên tiếp tục được coi là ở giai đoạn "thử nghiệm" (beta) trên wiki của họ hay không, dựa trên kinh nghiệm của họ về mức độ hoạt động tốt hay không của chế độ này trên máy tính và thiết bị di động. Nếu tính năng này được đánh giá là hoàn thiện rồi, thì các biên tập viên có thể cập nhật các thông báo giao diện trong <code dir=ltr>MediaWiki:skin-theme-description</code> và <code dir=ltr>MediaWiki:Vector-night-mode-beta-tag</code> để cho biết rằng chế độ tối đã sẵn sàng và không còn được coi là trong giai đoạn thử nghiệm nữa.
* [[mw:Wikimedia_Apps/Team/iOS/Activity_Tab|Tab Hoạt động]] được cải tiến mà hiển thị thông tin chuyên sâu về người dùng nay có sẵn cho tất cả người dùng ứng dụng Wikipedia trên (phiên bản 7.9.0 trở lên). Sau quá trình thử nghiệm A/B trước đây cho thấy tỷ lệ tạo tài khoản trong số những người dùng có quyền truy cập vào tính năng này cao hơn, tính năng này đã được triển khai cho 100% người dùng kèm vài cập nhật. Tab Hoạt động nay hiển thị các bài viết bạn đã sửa đổi trên dòng thời gian, cung cấp thông tin chi tiết về tác động của việc sửa đổi chẳng hạn như số lượng đóng góp và xu hướng xem bài viết, cùng những tùy chọn tùy chỉnh để cải thiện trải nghiệm dành cho người dùng trong ứng dụng.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:21}} {{PLURAL:21|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một lỗi khiến cho [[mw:Special:MyLanguage/Extension:DiscussionTools|Công cụ Thảo luận (DiscussionTools)]] không thể hoạt động trên thiết bị di động, từ đó khôi phục đầy đủ tất cả chức năng. [https://phabricator.wikimedia.org/T415303]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* [[m:Special:GlobalWatchlist|Danh sách Theo dõi Toàn cục]] cho phép bạn xem các danh sách theo dõi từ nhiều wiki trên cùng một trang. [[mw:Special:MyLanguage/Extension:GlobalWatchlist|Phần mở rộng]] giúp thực hiện được điều này tiếp tục được cải tiến. Cải tiến mới nhất là việc bổ sung [[mw:Extension:GlobalWatchlist#hook|hook mới]], <code dir=ltr>ext.globalwatchlist.rebuild</code>, được kích hoạt sau mỗi lần xây dựng lại danh sách theo dõi. Điều này cho phép bạn chạy các tiện ích và đoạn mã người dùng cho trang Đặc biệt. [https://phabricator.wikimedia.org/T275159]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.17|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/09|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W09"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:03, ngày 23 tháng 2 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30119102 -->
== Bản tin Kỹ thuật: Tuần 10-2026 ==
<section begin="technews-2026-W10"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/10|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* [[m:Special:MyLanguage/Wikipedia 25/Easter egg experiments|Chế độ Sinh nhật]] Wikipedia 25 nay đã có mặt trên các trang Wikipedia tiếng Betawi, tiếng Breton, tiếng Trung, tiếng Séc, tiếng Hà Lan, tiếng Anh, tiếng Pháp, tiếng Gorontalo, tiếng Indonesia, tiếng Ý, tiếng Luxembourg, tiếng Madura, tiếng Sicilia, tiếng Tây Ban Nha, tiếng Thái và tiếng Việt! Tính năng chiến dịch hữu hạn này kỷ niệm 25 năm thành lập Wikipedia cùng linh vật cho ngày sinh nhật, Quả cầu Nhỏ (Baby Globe). Khi được bật, Quả cầu Nhỏ được hiển thị trên [[m:Special:MyLanguage/Wikipedia 25/Easter egg experiments/article configuration|~2,500 bài viết]], chờ người đọc khám phá. Cộng đồng có thể chọn bật chế độ Sinh nhật bằng cách đạt đồng thuận từ cộng đồng của mình và yêu cầu một bảo quản viên bật tính năng đó cũng như tùy chỉnh nó thông qua [[m:Special:MyLanguage/Wikipedia 25/Easter egg experiments#Community Configuration Demo|cấu hình cộng đồng]] trên wiki cục bộ.
'''Cập nhật cho biên tập viên'''
* [[:m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|Tham chiếu phụ (sub-referencing)]], một tính năng mới để tái sử dụng nguồn tham khảo với những chi tiết khác đã được triển khai tới Wikipedia tiếng Thụy Điển, Wikipedia tiếng Ba Lan và [[:phab:T418209|một vài trang wiki khác]]. Bạn có thể [[:m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing#test|thử tính năng này]] trên những dự án đó hoặc trên testwiki và [https://en.wikipedia.beta.wmcloud.org/wiki/Sub-referencing betawiki]. Kinh nghiệm từ wiki thí điểm đầu tiên Wikipedia tiếng Đức đã được [[:m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing/Learnings|công bố trong báo cáo]]. Hãy liên hệ với nhóm Wikimedia Deutschland nếu bạn [[:m:Talk:WMDE Technical Wishes/Sub-referencing#Pilot wikis|quan tâm đến việc trở thành một wiki thí điểm]].
* [[mw:Special:MyLanguage/Help:Edit check#Paste check|Kiểm tra Chép dán]] (Paste Check) sẽ có mặt trên mọi trang Wikipedia trong tuần này. Tính năng này nhắc những người mới dán các đoạn văn bản mà họ không chắc viết vào Trình Soạn thảo Trực quan cân nhắc xem làm như thế có nguy cơ vi phạm bản quyền hay không. Kiểm tra Chép dán [[mw:Special:MyLanguage/Edit check/Tags|gắn thẻ]] tất cả sửa đổi mà nó hiển thị để có thể xem xét tiếp. Các bảo quản viên cục bộ có thể thiết lập cấu hình cho các khía cạnh khác nhau của tính năng này thông qua [[{{#special:EditChecks}}]]. [[mw:Special:MyLanguage/Edit check/Paste Check#A/B Experiment|Nghiên cứu]] trên 22 wiki cho thấy Kiểm tra Chép dán giúp giảm 18% số lượng sửa đổi bị lùi lại wikis found that so với nhóm đối chứng. Các biên dịch viên có thể [https://translatewiki.net/w/i.php?title=Special%3ATranslate&group=ext-visualeditor-ve-mw-editcheck&filter=&optional=1&action=translate giúp biên dịch] tính năng này cùng những tính năng có liên quan.
* [[mw:Special:MyLanguage/Readers/Reader Experience|Nhóm Trải nghiệm Người đọc]] sẽ chuẩn hóa menu người dùng ở góc trên bên phải cho tất cả người dùng di động nhằm giúp nó gần giống trải nghiệm trên máy tính hơn. Hiện tại menu người dùng này chỉ hiển thị cho những người đã bật Chế độ Điều khiển Di động Nâng cao (AMC). Thay đổi duy nhất là một vài nút trước đây ở menu bên trái sẽ chuyển sang góc trên bên phải cho người dùng không bật chế độ AMC. Thay đổi này dự kiến được triển khai vào ngày 9 tháng 3 và nhằm mục đích cải thiện giao diện người dùng. [https://phabricator.wikimedia.org/T413912]
* Bắt đầu từ tuần ngày 2 tháng 3, các email được gửi khi thêm, xóa hoặc sửa địa chỉ email của tài khoản sẽ chuyển sang định dạng email HTML đẹp mắt và rõ ràng hơn nhiều so với định dạng email văn bản thuần túy trước đây. [https://phabricator.wikimedia.org/T410807]
* Thông báo hiện chỉ giới hạn lưu 2.000 mục lịch sử cho mỗi người dùng, điều này kéo dài trở về năm 2013 khi tính năng này mới được phát hành. Giờ nó sẽ thay đổi thành việc lưu các Thông báo trong 5 năm trở lại đây, nhưng mở rộng lên tối đa 10.000 mục. Điều này sẽ giúp bảo vệ cơ sở hạ tầng và giúp ngăn việc những thông báo xuất hiện gần đây hơn biến mất quá sớm. [https://phabricator.wikimedia.org/T383948]
* [[m:Special:GlobalWatchlist|Danh sách Theo dõi Toàn cục]] cho phép bạn xem các danh sách theo dõi của bạn từ nhiều wiki khác nhau trên cùng một trang tiếp tục được cải tiến. Lần cập nhật gần đây nhất cải thiện trải nghiệm sử dụng nhãn. [[mw:Special:MyLanguage/Extension:GlobalWatchlist|Phần mở rộng]] nay cho phép kích hoạt [[mw:Special:MyLanguage/Manual:Language#Fallback languages|hệ thống ngôn ngữ dự phòng]] cho các khoản mục Wikidata không có nhãn bằng ngôn ngữ được xem, đồng thời hiển thị những nhãn đó trong ngôn ngữ Wikidata yêu thích của người dùng nếu không cung cấp tham số URL <code dir=ltr>uselang=</code>. [https://phabricator.wikimedia.org/T373686][https://phabricator.wikimedia.org/T416111]
* Nhóm Wikipedia dành cho Android đã bắt đầu cuộc thử nghiệm beta cho tính năng [[mw:Special:MyLanguage/Readers/Information Retrieval/Phase 1|tìm kiếm kết hợp]] (hybrid search) trên Wikipedia tiếng Hy Lạp. Khả năng tìm kiếm kết hợp có thể xử lý cả truy vấn ngữ nghĩa và từ khóa giúp người đọc dễ dàng tìm kiếm những gì họ muốn tìm kiếm ngay trên Wikipedia hơn.
* Vì lý do bảo mật, thành viên của một vài nhóm người dùng nhất định [[m:Special:MyLanguage/Mandatory two-factor authentication for users with some extended rights|bắt buộc phải bật tính năng xác thực hai yếu tố]] (2FA). Hiện tại, 2FA bắt buộc phải được bật để sử dụng nhóm người dùng, nhưng không cần phải là để trở thành thành viên nhóm đó. Do mô hình này vẫn còn một vài lỗ hổng, tình hình này sẽ [[phab:T418580|dần dần thay đổi vào tháng 3]]. Các thành viên thuộc những nhóm người dùng đó sẽ không thể tắt phương thức 2FA cuối cùng có trên tài khoản của họ, và sẽ không thể thêm người dùng không dùng 2FA vào những nhóm này. Người dùng vẫn sẽ có thể thêm phương thức xác thực mới hoặc loại bỏ chúng, miễn là còn ít nhất một phương thức được bật. Trong khoảng nửa sau của tháng 3, những người dùng mà không có 2FA sẽ bị loại bỏ khỏi những nhóm này. Điều này áp dụng cho: Bảo quản viên Thông báo Trung ương, kiểm định viên, bảo quản viên giao diện, giám sát viên, nhân viên Wikidata, nhân viên Wikifunctions, bộ phận CNTT của Văn phòng WMF và bộ phận Tin cậy & An toàn của and WMF. Sẽ không có gì thay đổi với những người dùng khác. Xem tác vụ được liên kết để biết khung thời gian triển khai. [https://phabricator.wikimedia.org/T418580]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:27}} {{PLURAL:27|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề ngăn người dùng tạo một phiên bản trong [https://www.wikibase.cloud/ Wikibase.cloud] hiện đã được giải quyết. [https://phabricator.wikimedia.org/T416807]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Để giúp đảm bảo việc [[mw:Special:MyLanguage/MediaWiki Product Insights/Responsible Reuse|sử dụng cơ sở hạ tầng một cách hợp lý]], trong tháng tới Quỹ Wikimedia sẽ triển khai giới hạn truy cập API toàn cục trên tất cả các API của chúng tôi. Vào đầu tháng 3, các giới hạn nghiêm ngặt hơn sẽ được áp dụng cho các yêu cầu không xác định từ bên ngoài Toolforge/WMCS và các yêu cầu API được thực hiện từ các trình duyệt web. Vào tháng 4, những giới hạn cao hơn sẽ được áp dụng cho lưu lượng truy cập được xác định. Những giới hạn này được cố ý đặt ở mức cao nhất có thể nhằm giảm thiểu tác động đến cộng đồng. Các bot chạy trong Toolforge/WMCS hoặc có quyền thành viên bot trên bất kỳ wiki nào sẽ không bị ảnh hưởng vào lúc này. Tuy vậy, mọi nhà phát triển được khuyến cáo làm theo những lời khuyên thực tiễn được cập nhật. Để biết thêm thông tin, hãy xem [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|API Wikimedia/Giới hạn truy cập]].
* Điểm cuối Truy vấn Dữ liệu được Liên kết (LDF) của Dịch vụ Truy vấn Wikidata sẽ ngừng hoạt động vào tháng 2. Điểm cuối này phục vụ lưu lượng truy cập hạn chế, lưu lượng này đã được chuyển đổi thành công sang các phương thức truy cập dữ liệu khác phù hợp hơn để hỗ trợ các trường hợp sử dụng (use case) hiện có. Phần cứng được sử dụng để hỗ trợ điểm cuối LDF sẽ được phân bổ lại để hỗ trợ những nỗ lực chuyển đổi hệ thống backend đang diễn ra. [https://phabricator.wikimedia.org/T415696]
* Trình phân tích cú pháp Parsoid mới [[mw:Special:MyLanguage/Parsoid/Parser Unification/Updates|tiếp tục được triển khai đến nhiều wiki hơn]], nhằm cải thiện tính bền vững của nền tảng và giúp việc giới thiệu các tính năng đọc và sửa đổi mới trở nên dễ dàng hơn. Parsoid nay là trình phân tích cú pháp mặc định trên 488 trang wiki của WMF (268 trang Wikipedia), hiện chiếm hơn 10% tổng số lượt xem trang Wikipedia.
* Quy trình và tiêu chí để [[Special:MyLanguage/Wikimedia Enterprise#Access|yêu cầu quyền truy cập đặc biệt]] vào nguồn cấp dữ liệu khối lượng lớn của API ''Wikimedia Enterprise'' (miễn phí cho các trường hợp sử dụng phù hợp với nhiệm vụ), [[m:Talk:Wikimedia Enterprise#Exceptional access criteria|hiện đã được công bố]]. Điều này nhằm cung cấp tài liệu đầy đủ và rõ ràng hơn cho người dùng.
* [https://techblog.wikimedia.org/ Blog Kỹ thuật], một blog dành riêng cho cộng đồng kỹ thuật Wikimedia [https://techblog.wikimedia.org/2026/02/24/a-tech-blog-diff/ sẽ được chuyển] sang [[diffblog:|Diff]], blog tin tức và sự kiện cộng đồng. Việc chuyển đổi dự kiến sẽ được hoàn thành vào tháng 4 năm 2026, sau thời điểm này các bài viết mới sẽ được chấp nhận xuất bản. Người đọc sẽ có thể truy cập các bài đăng – cả bài cũ và mới – trên trang đích này tại https://diff.wikimedia.org/techblog.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.18|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/10|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W10"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 17:51, ngày 2 tháng 3 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30137798 -->
== Bản tin Kỹ thuật: Tuần 11-2026 ==
<section begin="technews-2026-W11"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/11|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* [[m:Special:MyLanguage/Tech/Server switch|Tất cả các wiki sẽ chuyển sang chế độ chỉ đọc trong vòng vài phút]] vào thứ 4, ngày 25 tháng 3 năm 2026 lúc [https://zonestamp.toolforge.org/1774450800 15:00 UTC]. Điều này là nhằm phục vụ cho việc thử nghiệm chuyển đổi máy chủ cơ sở dữ liệu dự phòng, [[wikitech:Deployments/Yearly calendar|diễn ra hai lần trong một năm]]. Trong quá trình chuyển đổi này, toàn bộ lưu lượng trên các trang web của Wikimedia được chuyển từ trung tâm dữ liệu chính sang trung tâm dữ liệu dự phòng nhằm kiểm tra tính khả dụng và ngăn ngừa việc gián đoạn dịch vụ ngay cả trong những trường hợp khẩn cấp.
* Tuần trước, tất cả các wiki đều bị giới hạn ở chế độ chỉ đọc trong vòng 2 giờ đồng hồ, cùng với đó các đoạn mã người dùng và tiện ích cũng không khả dụng trong thời gian được kéo dài. Điều này là do một sự cố bảo mật mà đã được khắc phục sau đó. Chúng tôi đang tiếp tục cố gắng để ngăn điều này tái diễn. Để cập nhật thông tin vui lòng xem [[m:Steward's noticeboard#Statement on Meta about today's user script security incident|bài đăng trên bảng tin của Nhân viên]] ([[m:Special:MyLanguage/Wikimedia Foundation/Product and Technology/Product Safety and Integrity/March 2026 User Script Incident|bản dịch]]).
'''Cập nhật cho biên tập viên'''
* Người dùng đang gặp phải nhiều lệnh cấm trên thiết bị di động nay sẽ thấy lý do cấm cho từng lần cấm riêng thay vì một thông báo chung chung. Điều này giúp họ hiểu tại sao mình bị cấm và cần thực hiện những bước nào để giải quyết vấn đề. Ví dụ, người dùng bị ảnh hưởng do sử dụng VPN phổ biến (chẳng hạn như [[Special:MyLanguage/Apple iCloud Private Relay|iCloud Private Relay]]) sẽ nhận được hướng dẫn rõ ràng hơn những việc cần làm để bắt đầu lại việc sửa đổi. [https://phabricator.wikimedia.org/T357118]
* Cuối tuần này, [[mw:Special:MyLanguage/VisualEditor/Suggestion Mode|Chế độ Đề xuất]] sẽ được cung cấp dưới dạng tính năng beta trong trình soạn thảo trực quan trên tất cả các trang Wikipedia. Tính năng này chủ động đề xuất nhiều loại hành động mà người dùng có thể cân nhắc thực hiện để cải thiện các bài viết trên Wikipedia, đồng thời tìm hiểu về các hướng dẫn có liên quan. Tính năng này có thể được cấu hình cục bộ và cũng có thể được mở rộng cục bộ với bằng việc tùy chỉnh Đề xuất. Cài đặt hiện tại có thể xem được tại trang [[Special:EditChecks]] và có [[mw:Special:MyLanguage/Help:Suggestion mode#For administrators %E2%80%93 local customization|hướng dẫn cách bảo quản viên có thể tùy chỉnh]] các liên kết để chỉ tới những trang hướng dẫn cục bộ. Tính năng này được kết nối với tính năng [[mw:Special:MyLanguage/Help:Edit check|Kiểm tra sửa đổi]], một tính năng đưa ra đề xuất cải thiện trong khi người nào đó viết nội dung mới. Trong tương lai, nhóm Sửa đổi dự kiến đánh giá tác động của tính năng này đối với người dùng mới thông qua một thử nghiệm có kiểm soát. [https://phabricator.wikimedia.org/T404600]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:23}} {{PLURAL:23|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một sự cố liên quan đến việc con trỏ bị lệch khi sử dụng tính năng tô sáng cú pháp của CodeMirror, một tính năng giúp mã wiki (wikitext) và mã code dễ đọc hơn, nay đã được giải quyết. Vấn đề này đặc biệt ảnh hưởng đến những người dùng đã định nghĩa quy tắc phông chữ trong stylesheet tùy chỉnh khi tạo chủ đề mới bằng Công cụ Thảo luận. [https://phabricator.wikimedia.org/T418793]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Cập nhật về giới hạn truy vấn API: Để giúp đảm bảo việc [[mw:Special:MyLanguage/MediaWiki Product Insights/Responsible Reuse|sử dụng hợp lý cơ sở hạ tầng]], giới hạn truy vấn API toàn cục sẽ được áp dụng trong tuần này cho các yêu cầu không có User-Agent hợp lệ bắt nguồn từ bên ngoài Toolforge/WMCS cùng các yêu cầu chưa được xác thực được thực hiện từ trình duyệt web. Trong tháng 4 tới sẽ thiết lập giới hạn cao hơn cho lưu lượng truy cập được xác định. Các bot chạy trên Toolforge/WMCS hoặc có quyền thành viên bot trên bất kỳ wiki nào hiện sẽ không bị ảnh hưởng vì điều này. Tuy vậy, mọi nhà phát triển được khuyến cáo nên tuân theo những hướng dẫn thực tiễn tốt nhất được cập nhật. Để biết thêm thông tin, hãy xem [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|API Wikimedia/Giới hạn truy vấn]].
* API GraphQL mới đã được phát hành. API này được phát triển như một giải pháp thay thế linh hoạt cho một số tính năng nhất định của Dịch vụ Truy vấn Wikidata (WDQS), nhằm cải thiện trải nghiệm và khả năng thích ứng của nhà phát triển, đồng thời giúp truy cập dữ liệu hiệu quả. Hãy dùng thử và [[d:Wikidata:Wikibase GraphQL#Feedback and development|gửi phản hồi]] của mình. Bạn cũng có thể [https://greatquestion.co/wikimediadeutschland/GraphQLAPI/apply đăng ký tham gia các bài kiểm tra về khả năng sẵn dùng].
* Vào tháng 2 [[m:Special:MyLanguage/Product and Technology Advisory Council/Unsupported Tools Working Group|Nhóm Làm việc cho Công cụ Không được Hỗ trợ PTAC]] đã tiếp tục cải tiến [[commons:Special:MyLanguage/Commons:Video2commons#|Video2Commons]], trong đó sửa các lỗi liên quan đến lỗi xác thực, xử lý tệp lớn, khả năng hiển thị hàng đợi tác vụ và làm rõ hơn hành vi tải lên. Hiện một số lĩnh vực vẫn đang được tiến hành thực hiện, trong đó có những thay đổi liên quan đến việc tải lên từ phía máy chủ đã lỗi thời. Hãy đọc [[m:Special:MyLanguage/Product and Technology Advisory Council/Unsupported Tools Working Group#February 2026|phần cập nhật này]] để tìm hiểu thêm.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.19|MediaWiki]]
'''Chuyên sâu'''
* Nhóm Hướng dẫn Bài viết mời các biên tập viên Wikipedia có kinh nghiệm từ một số [[mw:Special:MyLanguage/Article guidance/Pilot wikis and collaborators#Collaborators|wiki thí điểm]] được chọn cùng những người đóng góp có quan tâm từ các trang Wikipedia khác điền vào bảng câu hỏi này, có sẵn bằng [https://docs.google.com/forms/d/e/1FAIpQLSfmLeVWnxmsCbPoI_UF2jyRcn73WRGWCVPHzerXb4Cz97X_Ag/viewform tiếng Anh], [https://docs.google.com/forms/d/e/1FAIpQLSd6rzr4XXQw8r4024fE3geTPFe13M_6w7Mitj-YJi0sOlWTAw/viewform?usp=header tiếng Ả Rập], [https://docs.google.com/forms/d/e/1FAIpQLSdok3-RfB18lcugYTUMGkpwmqG_8p760Wv4dCXitOXOszjUDw/viewform?usp=header tiếng Bengali], [https://docs.google.com/forms/d/e/1FAIpQLSfjTfYp4jEo0akA4B1e-Nfg3QZPCudUjhJzHzzDi6AHyAaMGA/viewform?usp=header tiếng Nhật], [https://docs.google.com/forms/d/e/1FAIpQLScteVoI29Aue4xc72dekk-6RYtvmMgQxzMI900UOawrFrSTWg/viewform?usp=header tiếng Bồ Đào Nha], [https://docs.google.com/forms/d/e/1FAIpQLSetdxnYwL3ub2vqA7awCg5hJZPMIYcDPaiTe12rY9h0GYnVlw/viewform?usp=header tiếng Ba Tư] và [https://docs.google.com/forms/d/e/1FAIpQLScNvfJF-Ot-4pzA4qAN771_0QDJ4Li19YcUsaTgSKW8Nc7U_Q/viewform?usp=header tiếng Thổ Nhĩ Kỳ]. Phản hồi của bạn sẽ giúp nhóm tùy chỉnh hướng dẫn cho các biên tập viên ít kinh nghiệm hơn và giúp họ tìm hiểu các chính sách và thực tiễn của cộng đồng khi tạo bài viết. Tìm hiểu thêm [[mw:Special:MyLanguage/Article guidance|trên trang dự án]].
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/11|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W11"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 18:53, ngày 9 tháng 3 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30213008 -->
== Bản tin Kỹ thuật: Tuần 12-2026 ==
<section begin="technews-2026-W12"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/12|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Tính năng beta [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]], còn được biết đến với tên [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror 6]], được sử dụng để tô sáng cú pháp mã wiki kể từ tháng 11 năm 2024. Tính năng này sẽ chính thức kết thúc giai đoạn thử nghiệm beta vào tháng 5 năm 2026 nhằm đưa những cải tiến và [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Features|tính năng]] mới cho tất cả biên tập viên sử dụng trình tô sáng cú pháp tiêu chuẩn. Nếu bạn có bất kỳ câu hỏi hoặc thắc mắc nào về việc kết thúc giai đoạn thử nghiệm beta cho tính năng này, [[mw:Special:MyLanguage/Help talk:Extension:CodeMirror|vui lòng chia sẻ với chúng tôi]]. [https://phabricator.wikimedia.org/T259059]
* Một số thay đổi đối với quyền nhóm người dùng cục bộ được tiếp viên trên Meta-Wiki thực hiện và nhật trình về những thay đổi này chỉ được ghi lại trên đó. Giờ đây, thay đổi về quyền liên wiki sẽ được ghi lại trên cả Meta-Wiki và wiki của người dùng mục tiêu để giúp dễ dàng truy cập vào toàn bộ bản ghi thay đổi quyền người dùng trên wiki cục bộ hơn. Những mục nhật trình trước đây về những thay đổi này sẽ được cập nhật trong những tuần tiếp theo. [https://phabricator.wikimedia.org/T6055]
* Trên các wiki sử dụng [[m:Special:MyLanguage/Flagged Revisions|Thay đổi Được gắn cờ (Flagged Revisions)]], số lượng thay đổi đang chờ được hiển thị trên [[{{#Special:PendingChanges}}]] trước đây tính cả những trang mà không còn ở trong trạng thái đang chờ xem xét, do chúng đã bị xóa khỏi hệ thống mà không được xem xét lại, v.d. do bị xóa, được di chuyển sang không gian tên khác, hoặc do thay đổi cấu hình wiki. Bộ đếm giờ sẽ được hiển thị chính xác. Trên một số wiki số lượng thay đổi được hiển thị sẽ nhỏ hơn nhiều so với trước đây. Bản thân danh sách các trang sẽ không có thay đổi gì. [https://phabricator.wikimedia.org/T413016]
* Ngôn ngữ soạn thảo của Wikifunctions đã được viết lại, tạo ra một phiên bản mới của ngôn ngữ này. Thay đổi này nhằm mục đích tăng cường tính ổn định của dịch vụ bằng cách giảm mức tiêu thụ bộ nhớ của trình điều phối. Việc viết lại này cũng giúp cho phép giảm đáng kể độ trễ, đơn giản hóa mã nguồn và tạo ra các lớp trừu tượng tốt hơn, nhằm mở ra cơ hội bổ sung thêm các tính năng khác trong tương lai. Đọc thêm về [[f:Special:MyLanguage/Wikifunctions:Status updates/2026-03-11|các thay đổi này]].
* Người dùng nay có thể sắp xếp kết quả tìm kiếm theo thứ tự bảng chữ cái dựa trên tiêu đề trang. Lần cập nhật này cung cấp thêm một tùy chọn giúp cho việc tìm kiếm trang trở nên dễ dàng và nhanh chóng hơn. Trước đây, kết quả có thể được sắp xếp theo Ngày sửa đổi, Ngày tạo, hoặc Mức độ liên quan. Để sử dụng tùy chọn mới này, hãy mở 'Tìm kiếm nâng cao' trên trang kết quả tìm kiếm và chọn 'Thứ tự bảng chữ cái' trong mục 'Thứ tự sắp xếp'. [https://phabricator.wikimedia.org/T403775]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:28}} {{PLURAL:28|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một lỗi khiến cho Trình tải lên tập tin (UploadWizard) trên Wikimedia Commons không thể nhập tập tin từ Flickr nay đã được giải quyết. [https://phabricator.wikimedia.org/T419263]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Một trang đặc biệt mới, [[{{#special:LintTemplateErrors}}]], đã được tạo ra để liệt kê các trang nhúng được đánh dấu là chứa lỗi lint để giúp người dùng dễ dàng phát hiện chúng hơn. Danh sách được sắp xếp theo số lượng các trang được nhúng mà có lỗi. Ví dụ: [[{{#special:LintTemplateErrors}}/night-mode-unaware-background-color]]. [https://phabricator.wikimedia.org/T170874]
* Người dùng tính năng beta [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]] hiện đang sử dụng [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] thay vì [[mw:Special:MyLanguage/Extension:CodeEditor|CodeEditor]] để tô sáng cú pháp khi sửa đổi các trang nội dung JavaScript, CSS, JSON, Vue và Lua, trong một khoảng thời gian. Cùng với việc kết thúc thử nghiệm beta cho CodeMirror 6, kế hoạch là thay thế CodeEditor để trở thành trình soạn thảo tiêu chuẩn cho những kiểu nội dung này vào tháng 5 năm 2026. [[mw:Special:MyLanguage/Help talk:Extension:CodeMirror|Mọi phản hồi hoặc ý kiến đóng góp đều được hoan nghênh]]. [https://phabricator.wikimedia.org/T419332]
* Các mô đun JavaScript cho [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] JavaScript sẽ sớm được nâng cấp lên CodeMirror 6. Trước thời điểm nâng cấp này, việc tải các mô đun <code dir=ltr>ext.CodeMirror</code> hoặc <code dir=ltr>ext.CodeMirror.lib</code> từ các tiện ích và đoạn mã người dùng đã bị loại bỏ vào tháng 7 năm 2025. Việc sử dụng hook <code dir=ltr>ext.CodeMirror.switch</code> cũng đã bị loại bỏ vào tháng 3 năm 2025. Những người đóng góp nay có thể làm cho các đoạn mã hoặc tiện ích của mình tương thích với CodeMirror 6. Xem [[mw:Special:MyLanguage/Extension:CodeMirror#Gadgets and user scripts|hướng dẫn chuyển đổi]] để biết thêm thông tin. [https://phabricator.wikimedia.org/T373720]
* Nhóm Giao diện MediaWiki đang mở rộng phạm vi định nghĩa mô đun API REST để bao gồm cả [[mw:Special:MyLanguage/API:REST API/Extensions|các API mở rộng]]. Mô đun API REST là nhóm các điểm cuối có liên quan mà có thể được quản lý và đánh phiên bản độc lập. Hiện đã có các mô đun cho API [https://phabricator.wikimedia.org/T414470 GrowthExperiments] và [https://phabricator.wikimedia.org/T419053 Wikifunctions]. Khi chúng tôi chuyển đổi các API mở rộng sang cấu trúc này, tài liệu sẽ được chuyển ra khỏi phần đặc tả chính cho OpenAPI của MediaWiki cùng chế độ xem REST Sandbox, và thay vào đó sẽ có thể truy cập được thông qua tùy chọn dành riêng cho mô đun trong menu thả xuống trên [https://test.wikipedia.org/wiki/Special:RestSandbox REST Sandbox] (nghĩa là, [[{{#Special:RestSandbox}}]], có sẵn trên tất cả các dự án wiki).
* Phần mở rộng [[mw:Special:MyLanguage/Extension:Scribunto|Scribunto]] cung cấp nhiều thông tin khác nhau về wiki nơi mô đun đang được sử dụng thông qua thư viện [[mw:Special:MyLanguage/Extension:Scribunto/Lua reference manual|mw.site]]. Kể từ tuần trước, thư viện này cũng cung cấp một [[mw:Special:MyLanguage/Extension:Scribunto/Lua reference manual#mw.site.wikiId|cách]] truy cập [[mw:Special:MyLanguage/Manual:Wiki ID|ID của wiki]] có thể được sử dụng để hỗ trợ bảo trì mô đun liên wiki. [https://phabricator.wikimedia.org/T146616]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.20|MediaWiki]]
'''Chuyên sâu'''
* [[m:Special:MyLanguage/Coolest Tool Award|Giải thưởng Công cụ Tuyệt vời nhất năm 2026]] nhằm tôn vinh những công cụ xuất sắc do cộng đồng tạo ra, nay đã mở nhận đề cử! Hãy đề cử công cụ yêu thích của bạn bằng cách sử dụng biểu mẫu [https://wikimediafoundation.limesurvey.net/435684?lang=en khảo sát đề cử] trước ngày 23 tháng 3 năm 2026. Để biết thêm thông tin về quyền riêng tư và xử lý dữ liệu, vui lòng xem [[foundation:Special:MyLanguage/Legal:Coolest_Tool_Award_2026_Survey_Privacy_Statement|tuyên bố về quyền riêng tư của khảo sát]].
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/12|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W12"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:35, ngày 16 tháng 3 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30260505 -->
== Bản tin Kỹ thuật: Tuần 13-2026 ==
<section begin="technews-2026-W13"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/13|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Người dùng các trang Wikimedia nay có thể đăng nhập mà không cần mật khẩu bằng cách sử dụng khóa truy cập (passkey). Đây là một phương thức bảo mật sử dụng vân tay, nhận diện khuôn mặt hoặc mã PIN. Với thay đổi này, tất cả người dùng chọn đăng nhập không cần mật khẩu sẽ có thể đăng nhập vào tài khoản của mình một cách dễ dàng, nhanh chóng và an toàn hơn trên mọi thiết bị. Tùy chọn đăng nhập mới bằng khóa truy cập hiện hiển thị dưới dạng gợi ý tự động điền trong trường tên người dùng. [[phab:T417120|Nút "Đăng nhập bằng khóa truy cập"]] bổ sung sẽ sớm được cung cấp cho những người dùng đã bật tùy chọn sử dụng khóa truy cập. Lần cập nhật này sẽ cải thiện bảo mật cũng như trải nghiệm người dùng. [[c:File:Passwordless_login_screencast.webm|Bản ghi lại màn hình]] này sẽ minh họa từng bước quy trình đăng nhập không cần mật khẩu.
* [[m:Special:MyLanguage/Tech/Server switch|Tất cả các wiki sẽ chuyển sang chế độ chỉ đọc trong vòng vài phút]] vào thứ 4, ngày 25 tháng 3 năm 2026 lúc [https://zonestamp.toolforge.org/1774450800 15:00 UTC]. Điều này là nhằm phục vụ cho việc thử nghiệm chuyển đổi máy chủ cơ sở dữ liệu dự phòng, [[wikitech:Deployments/Yearly calendar|diễn ra hai lần trong một năm]]. Trong quá trình chuyển đổi này, toàn bộ lưu lượng trên các trang web của Wikimedia được chuyển từ trung tâm dữ liệu chính sang trung tâm dữ liệu dự phòng nhằm kiểm tra tính khả dụng và ngăn ngừa việc gián đoạn dịch vụ ngay cả trong những trường hợp khẩn cấp.
'''Cập nhật cho biên tập viên'''
* Người dùng các trang web của Wikimedia nay có thể xuất các thông báo cách đây hơn 5 năm của mình bằng cách sử dụng [[toolforge:echo-chamber|công cụ Toolforge mới]]. Điều này sẽ đảm bảo rằng người dùng có thể giữ lại được những thông báo quan trọng và tránh bị mất chúng do việc thay đổi theo kế hoạch nhằm xóa đi các thông báo cũ hơn 5 năm, như đã thông báo trước đó. [https://phabricator.wikimedia.org/T383948]
* Các biên tập viên Wikipedia tiếng Indonesia, tiếng Thái, tiếng Thổ Nhĩ Kỳ, và tiếng Anh Đơn giản nay có thể truy cập vào Đặc biệt:Bảng điều khiển cá nhân. Đây là [[mw:Special:MyLanguage/Moderator Tools/Dashboard|phiên bản trải nghiệm sớm]] giúp các biên tập viên mới làm quen với quy trình tuần tra, giúp họ dễ dàng chuyển từ việc sửa đổi sang tham gia vào những công việc kiểm duyệt nâng cao hơn trên dự án của mình. [https://phabricator.wikimedia.org/T402647]
* Trang [[vi:Special:Block|Đặc_biệt:Cấm]] nay có hai thay đổi nhỏ về mặt giao diện. Bảo quản viên nay có thể dễ dàng thực hiện lệnh cấm vô hạn thông qua nút chọn (nút radio) chuyên dụng trong mục thời hạn. Ngoài ra, việc chọn thời hạn là vô hạn sẽ cung cấp một bộ lý do phổ biến khác để lựa chọn, nó có thể được thay đổi tại: [[MediaWiki:Ipbreason-indef-dropdown]]. [https://phabricator.wikimedia.org/T401823]
* Biên tập viên sử dụng thiết bị di động [[mw:Special:MyLanguage/Contributors/Account Creation Experiments#Logged-out|tại một số wiki]] nay có thể nhìn thấy cải tiến về cảnh báo sửa đổi khi chưa đăng nhập, điều này là nhờ cập nhật gần đây từ nhóm Phát triển. Những thay đổi được phát hành vào tuần trước này là một phần trong những nỗ lực và thử nghiệm đang được thực hiện nhằm nâng cao [[mw:Special:MyLanguage/Contributors/Account Creation Experiments|trải nghiệm trong việc tạo tài khoản trên thiết bị di động]] và từ đó giúp tăng cường sự tham gia của họ. [https://phabricator.wikimedia.org/T408484]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:36}} {{PLURAL:36|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một lỗi khiến người dùng web trên thiết bị di động không thể nhìn thấy thông tin cấm khi có nhiều lệnh cấm đồng thời được áp dụng đã được giải quyết. Họ giờ có thể xem được tin nhắn cho tất cả các lệnh cấm hiện đang được áp dụng cho họ khi họ truy cập Wikipedia.
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Những image (ảnh) được dựng bằng Toolforge sẽ sớm được nâng cấp lên phiên bản buildpack mới, mang đến việc hỗ trợ các phiên bản ngôn ngữ mới hơn cùng những cải tiến và sửa lỗi khác tại thượng nguồn. Nếu bạn sử dụng Dịch vụ Dựng của Toolforge, hãy xem lại [https://lists.wikimedia.org/hyperkitty/list/cloud-announce@lists.wikimedia.org/thread/EMYTA32EV2V5SQ2JIEOD2CL66YFIZEKV/ email cloud-announce] gần đây và cập nhật cấu hình bản dựng của bạn nếu cần để đảm bảo các công cụ của bạn tương thích với phiên bản mới này. [https://wikitech.wikimedia.org/w/index.php?title=Help:Toolforge/Building_container_images&oldid=2392097#Buildpack_environment_upgrade_process][https://phabricator.wikimedia.org/T380127]
* Wiki tài liệu [https://api.wikimedia.org/wiki/Main_Page Cổng API] sẽ ngừng hoạt động vào tháng 6 năm 2026. Các khóa API được tạo trên Cổng API sẽ tiếp tục hoạt động bình thường. Các điểm cuối của api.wikimedia.org sẽ dần bị loại bỏ bắt đầu từ tháng 7 năm 2026. Tài liệu trên Cổng API đang được chuyển sang [[mw:Wikimedia APIs|mediawiki.org]]. Tìm hiểu thêm trên [[wikitech:API Portal/Deprecation|trang dự án]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.21|MediaWiki]]
'''Chuyên sâu'''
* [[m:Special:MyLanguage/WMDE Technical Wishes|Nhóm Mong muốn – Kỹ thuật của WMDE]] đang xem xét cải tiến [[m:WMDE Technical Wishes/References/VisualEditor automatic reference names|tên chú thích được tạo tự động trong Trình Soạn thảo Trực quan (VisualEditor)]]. Vui lòng xem qua [[m:WMDE Technical Wishes/References/VisualEditor automatic reference names#Proposed solutions|những giải pháp được đề xuất]] và tham gia vào [[m:Talk:WMDE Technical Wishes/References/VisualEditor automatic reference names#Request for comment|thảo luận này]].
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/13|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W13"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 16:51, ngày 23 tháng 3 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:UOzurumba (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30268305 -->
== Bản tin Kỹ thuật: Tuần 14-2026 ==
<section begin="technews-2026-W14"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/14|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Phiên bản Beta của [[abstract:|Abstract Wikipedia]] một dự án Wikimedia mới không phụ thuộc ngôn ngữ, đã được khởi động vào tuần trước. Dự án cho phép các cộng đồng xây dựng các bài viết Wikipedia bằng ngôn ngữ mẹ đẻ của họ, và các thành viên khác có thể dễ dàng truy cập các bài viết đó bằng ngôn ngữ của riêng họ. Wiki này hoạt động dựa trên chỉ dẫn từ Wikifunctions và cũng dựa trên nội dung có cấu trúc từ Wikidata. [[:f:Special:MyLanguage/Wikifunctions:Status updates/2026-03-26|Đọc thêm]].
'''Cập nhật cho biên tập viên'''
* Nhóm Phát triển đang tiến hành thử nghiệm A/B để đánh giá cho một thông điệp rõ ràng hơn, thân thiện hơn với người dùng nhằm khuyến khích việc tạo tài khoản trên wiki. Hiện tại, khi người dùng di động chưa đăng nhập bắt đầu sửa đổi, họ sẽ thấy một thông báo cảnh báo khó chịu, có thể khiến cho họ có cảm giác đột ngột và nản lòng. Điều này cũng làm cho việc sửa đổi bằng tài khoản tạm thời trở thành mặc định thay vì khuyến khích việc tạo tài khoản. Thử nghiệm đang được thực hiện trên mười trang Wikipedia, bao gồm tiếng Ả Rập, tiếng Pháp, tiếng Tây Ban Nha và tiếng Đức. [[mw:Special:MyLanguage/Contributors/Account Creation Experiments#2. Improve logged-out warning message (T415160)|Đọc thêm]].
* Nhóm Ứng dụng Wikimedia đang mời mọi người đóng góp ý kiến về [[mw:Special:MyLanguage/Wikimedia Apps/Team/Future of Editing on the Mobile Apps|việc sửa đổi trên ứng dụng Wikipedia dành cho thiết bị di động nên hoạt động như thế nào]]. Thảo luận tập trung vào việc cải thiện cách người dùng truy cập công cụ sửa đổi khi họ nhấn vào nút "Sửa đổi". Đây là một phần trong nỗ lực rộng lớn hơn nhằm chuyển đổi những người đọc mà có hứng thú với việc sửa đổi sang một con đường thân thiện hơn với người dùng để có thể bắt đầu đóng góp.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:45}} {{PLURAL:45|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một sự cố khiến việc lấy chú thích từ kho lưu trữ báo chí lớn [https://www.newspapers.com Newspapers.com] không còn hoạt động, do bị chặn trong các yêu cầu của [[mw:Special:MyLanguage/Citoid|Citoid]], nay đã được khắc phục. [https://phabricator.wikimedia.org/T419903]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.22|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/14|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W14"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 19:25, ngày 30 tháng 3 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30329462 -->
== Action Required: Update templates/modules for electoral maps (Migrating from P1846 to P14226) ==
Hello everyone,
This is a notice regarding an ongoing data migration on Wikidata that may affect your election-related templates and Lua modules (such as <code>Module:Itemgroup/list</code>).
'''The Change:'''<br />
Currently, many templates pull electoral maps from Wikidata using the property [[:d:Property:P1846|P1846]], combined with the qualifier [[:d:Property:P180|P180]]: [[:d:Q19571328|Q19571328]].
We are migrating this data (across roughly 4,000 items) to a newly created, dedicated property: '''[[:d:Property:P14226|P14226]]'''.
'''What You Need To Do:'''<br />
To ensure your templates and infoboxes do not break or lose their maps, please update your local code to fetch data from [[:d:Property:P14226|P14226]] instead of the old [[:d:Property:P1846|P1846]] + [[:d:Property:P180|P180]] structure. A [[m:Wikidata/Property Migration: P1846 to P14226/List|list of pages]] was generated using Wikimedia Global Search.
'''Deadline:'''<br />
We are temporarily retaining the old data on [[:d:Property:P1846|P1846]] to allow for a smooth transition. However, to complete the data cleanup on Wikidata, the old [[:d:Property:P1846|P1846]] statements will be removed after '''May 1, 2026'''. Please update your modules and templates before this date to prevent any disruption to your wiki's election articles.
Let us know if you have any questions or need assistance with the query logic. Thank you for your help! [[User:ZI Jony|ZI Jony]] using [[Thành viên:MediaWiki message delivery|MediaWiki message delivery]] ([[Thảo luận Thành viên:MediaWiki message delivery|thảo luận]]) 17:11, ngày 3 tháng 4 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:ZI Jony@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Non-Technical_Village_Pumps_distribution_list&oldid=29941252 -->
== Bản tin Kỹ thuật: Tuần 15-2026 ==
<section begin="technews-2026-W15"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/15|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* [[mw:Special:MyLanguage/Help:Extension:CampaignEvents|Phần mở rộng CampaignEvents]] nay có thêm tính năng mới nhằm thiết lập mục tiêu nhóm, nhằm cho phép những người tổ chức thiết lập và theo dõi mục tiêu sự kiện chẳng hạn như số lượng bài viết được tạo và số lượng người tham gia đóng góp theo thời gian thực. Tương tự, những người tham gia có thể cùng nhau hướng tới các mục tiêu chung và chứng kiến tác động tập thể của họ khi sự kiện diễn ra. Tính năng này hiện đã có trên tất cả các wiki của Wikimedia. Tìm hiểu thêm trong [[mw:Special:MyLanguage/Help:Extension:CampaignEvents/Registration/Collaborative contributions#Goal setting|trang tài liệu này]].
* [[File:Maki-gift-15.svg|12px|link=|class=skin-invert|Mục Mong muốn cộng đồng]] Tính năng [[mw:Special:MyLanguage/Help:Watchlist labels|gán nhãn danh sách theo dõi]] mới (được công bố trong [[m:Special:MyLanguage/Tech/News/2026/07|Bản tin Kỹ thuật 2026-07]]) nay có sẵn thông qua Trình Soạn thảo Trực quan, trình soạn thảo mã nguồn, và biểu tượng 'sao theo dõi' (hoặc liên kết theo dõi, đối với các giao diện không có biểu tượng hình sao). Trước đây việc gán nhãn như vậy chỉ có thể thực hiện được thông qua [[Special:EditWatchlist|EditWatchlist]]. Ở cả ba nơi đó, đây đều sẽ là trường mới ngay sau sau trường thời điểm hết hạn theo dõi.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:23}} {{PLURAL:23|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề mà trang thảo luận trên thiết bị di động dùng Parsoid không thể sử dụng được sau đề mục không có tiêu đề, nay đã được giải quyết. [https://phabricator.wikimedia.org/T419171]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|Tính năng chú thích phụ]], một tính năng cho phép biên tập viên thêm thông tin chi tiết vào nguồn tham khảo hiện có mà không cần nhân bản nó, sẽ được triển khai dần dần tới [[phab:T414094|nhiều trang wiki hơn]] vào cuối năm nay. Các wiki sử dụng tiện ích [[mw:Special:MyLanguage/Reference Tooltips|Chú thích nổi]] được khuyến khích cập nhật phiên bản của mình (thường là tại [[m:MediaWiki:Gadget-ReferenceTooltips.js|MediaWiki:Gadget-ReferenceTooltips.js]] như được hiển thị tại [https://en.wikipedia.org/w/index.php?diff=1344408362 đây]) để đảm bảo khả năng tương thích. Các tiện ích khác liên quan đến nguồn tham khảo khác cũng có thể bị ảnh hưởng. [https://phabricator.wikimedia.org/T416304]
* Tất cả các phiên bản của Wikinews sẽ bị đóng và chuyển sang chế độ chỉ đọc vào ngày 4 tháng 5 năm 2026. Mọi nội dung vẫn sẽ có thể truy cập được, nhưng sẽ không thể thêm bất kỳ sửa đổi hoặc bài viết mới nào. Việc đóng này đã được Hội đồng Quản trị của Quỹ Wikimedia phê duyệt sau những cuộc thảo luận kéo dài. [[m:Wikimedia Foundation Board noticeboard#Board of Trustees Approves Closure of Wikinews|Đọc thêm]].
* [[:mw:Special:MyLanguage/API:Action API|API Tác vụ]] có một số kiểu định dạng đầu ra được yêu cầu. Một trong số chúng, <bdi lang="zxx" dir="ltr"><code><nowiki>format=php</nowiki></code></bdi>, sẽ sớm bị loại bỏ. Vui lòng đảm bảo rằng các tập lệnh hoặc bot của bạn sử dụng [[mw:Special:MyLanguage/API:Data formats#Output|kiểu định dạng JSON]]. Việc loại bỏ này sẽ chỉ ảnh hưởng đến một số lượng rất nhỏ các tập lệnh người dùng và bot. [https://phabricator.wikimedia.org/T118538]
* Trang [[Special:NamespaceInfo|Đặc biệt:NamespaceInfo]] nay có chứa phần viết tắt không gian tên. Ví dụ "WP" cho không gian tên "Project" ("Wikipedia") trên Wikipedia tiếng Đức. [https://phabricator.wikimedia.org/T381455]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.23|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/15|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W15"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 16:19, ngày 6 tháng 4 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30362761 -->
== Bản tin Kỹ thuật: Tuần 16-2026 ==
<section begin="technews-2026-W16"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/16|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Các biên tập viên có kinh nghiệm được mời tham gia [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Main_Page thử nghiệm] tính năng [[mw:Special:MyLanguage/Article guidance|Hướng dẫn bài viết]], được thiết kế để giúp các biên tập viên ít kinh nghiệm hơn tạo ra các bài viết Wikipedia có cấu trúc tốt và phù hợp với quy định. Hướng dẫn thử nghiệm [[mw:Special:MyLanguage/Article guidance/Test feature guide|có sẵn tại đây]]. Ngoài ra, sau khi xem xét [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Category:Pages_using_article_guidance bản tóm tắt này], vui lòng cung cấp phản hồi trên [[mw:Talk:Article guidance|trang thảo luận của dự án]]. Dựa trên ý kiến đóng góp của bạn, tính năng này sẽ được tinh chỉnh và chuyển giao cho các trang Wikipedia thí điểm để biên dịch và điều chỉnh cho thích hợp. Hãy xem qua [[c:File:Article Guidance workflow demo - April 2026.webm|video]] giải thích về tính năng này.
'''Cập nhật cho biên tập viên'''
* Trên hầu hết các trang wiki, tất cả thành viên tự xác nhận nay có thể sử dụng trang [[Special:ChangeContentModel|Đặc biệt:ChangeContentModel]] để [[mw:Special:MyLanguage/Help:ChangeContentModel|tạo trang mới với kiểu nội dung tùy chỉnh]], chẳng hạn như danh sách gửi thông báo rộng rãi, giúp cho định dạng trang tùy chỉnh trở nên dễ tiếp cận hơn. Kiểm tra [[Special:ListGroupRights|Đặc biệt:Quyền nhóm người dùng]] để biết trạng thái trên wiki của bạn. [https://phabricator.wikimedia.org/T248294]
* Nhóm Phát triển đã khởi động một [[mw:Special:MyLanguage/Contributors/Account_Creation_Experiments|thử nghiệm tạo tài khoản]] để đánh giá xem việc thêm nút tạo tài khoản vào phần đầu trang web trên thiết bị di động có làm tăng số lượng người đăng ký tài khoản mới và khuyến khích nhiều người dùng thiết bị di động đóng góp vào wiki hay không. Thử nghiệm hiện đang được thực hiện trên Wikipedia tiếng Hindi, tiếng Indonesia, tiếng Bengali, tiếng Thái và tiếng Do Thái, và nhắm mục tiêu vào 10% người dùng web trên di động chưa đăng nhập.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:30}} {{PLURAL:30|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một sự cố có thể khiến Trình Soạn thảo Trực quan bị kẹt khi tải trên các thiết bị Windows đã tắt hiệu ứng hoạt ảnh, nay đã được giải quyết. [https://phabricator.wikimedia.org/T382856]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Kể từ cuối tuần này, {{int:group-abusefilter}} đã bật tính năng beta [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]] sẽ sử dụng [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] thay vì [[mw:Special:MyLanguage/Extension:CodeEditor|CodeEditor]] làm trình soạn thảo tại [[Special:AbuseFilter|Đặc biệt:Bộ lọc sai phạm]]. Đây là một phần trong nỗ lực rộng lớn hơn nhằm mang lại trải nghiệm người dùng nhất quán hơn trên tất cả các trình soạn thảo. [https://phabricator.wikimedia.org/T399673][https://phabricator.wikimedia.org/T419332]
* Các công cụ và bot truy cập vào [[mw:Special:MyLanguage/Notifications/API|API Thông báo]] (<bdi lang="zxx" dir="ltr"><code><nowiki>action=query&meta=notifications</nowiki></code></bdi>) sẽ cần phải cập nhật quyền OAuth hoặc BotPassword của mình để bao gồm cả quyền truy cập vào các thông báo riêng tư. [https://phabricator.wikimedia.org/T421991]
* Do việc nâng cấp thư viện, việc liệt kê danh sách trên các trang thể loại có thể hiển thị không đúng theo thứ tự bắt đầu từ thứ Hai, ngày 20 tháng 4. Một kịch bản chuyển đổi sẽ được chạy để khắc phục điều này, và sẽ mất từ vài giờ đến vài ngày tùy thuộc vào kích thước của wiki (tối đa một tuần đối với Wikipedia tiếng Anh). [https://phabricator.wikimedia.org/T422544]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.24|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/16|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W16"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 15:19, ngày 13 tháng 4 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30380527 -->
== Bản tin Kỹ thuật: Tuần 17-2026 ==
<section begin="technews-2026-W17"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/17|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Sau hai năm phát triển, [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]], hay còn được biết đến với tên [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror 6]], sẽ được chính thức đưa ra khỏi giai đoạn beta vào thứ 3, ngày 21 tháng 4. Nó mang lại khả năng đọc mã nguồn và mã wiki tốt hơn, giảm thiểu lỗi đánh máy cùng những [[mw:Special:MyLanguage/Help:Extension:CodeMirror|lợi ích]] khác cho tất cả người dùng sử dụng trình tô sáng cú pháp tiêu chuẩn. Xin gửi lời cảm ơn chân thành đến tình nguyện viên [https://phabricator.wikimedia.org/p/Bhsd/ Bhsd] vì đã phát triển nhiều tính năng mới, bao gồm [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Code folding|gấp mã nguồn]], [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Autocompletion|tự động điền]], và [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Linting|kiểm tra lỗi]]. [https://phabricator.wikimedia.org/T259059]
* Một bản cập nhật lớn dành cho ứng dụng Wikipedia trên iOS hiện đang được triển khai, nhằm thiết kế lại giao diện để phù hợp với thiết kế trực quan "Liquid Glass" mới nhất của Apple. [https://apps.apple.com/us/app/wikipedia/id324715238 Hãy tải phiên bản mới nhất] và khám phá bản cập nhật này.
'''Cập nhật cho biên tập viên'''
* [[mw:Special:MyLanguage/Readers/Reader Experience/WE3.3.4 Reading lists|Danh sách đọc]] là một tính năng cho phép người đọc lưu các bài viết vào danh sách để đọc sau. Tính năng này hiện đang trong giai đoạn thử nghiệm beta trên Wikipedia tiếng Ả Rập, tiếng Pháp, tiếng Indonesia, tiếng Việt và tiếng Trung, và được bật mặc định cho tất cả các tài khoản mới trên tất cả các trang Wikipedia.
* Một thử nghiệm khám phá việc mở rộng [[mw:Special:MyLanguage/Readers/Reader Growth/Mobile page previews|tính năng Xem trước Trang cho trang web di động]] sẽ được triển khai trong tuần ngày 20 tháng 4 trên các trang Wikipedia tiếng Ả Rập, tiếng Anh, tiếng Pháp, tiếng Ý, tiếng Ba Lan và tiếng Việt. Tính năng Xem trước Trang là pop-up hiển thị hình thu nhỏ kèm liên kết mở toàn bộ bài viết từ liên kết xanh, từ đó cải thiện khả năng tìm kiếm nội dung. Tính năng này hiện đã có sẵn trên máy tính để bàn và trong ứng dụng. [[m:Special:MyLanguage/List of experiments in Product and Technology#Template|Đọc thêm về thử nghiệm này cùng những thử nghiệm khác]].
* Trên một số trang wiki, những biên tập viên đã đăng nhập nhưng chưa [[mw:Special:MyLanguage/Help:Email confirmation|xác nhận địa chỉ thư điện tử (email) của mình]] nay có thể nhìn thấy một biểu ngữ khuyến khích họ làm vậy. Việc xác nhận địa chỉ email cho phép người dùng khôi phục quyền truy cập vào tài khoản nếu họ bị mất quyền truy cập đó. [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security#Encouraging users to confirm their email addresses|Tìm hiểu thêm]]. [https://phabricator.wikimedia.org/T421366]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:15}} {{PLURAL:15|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề mà việc sửa đổi các trang wiki rất lớn trong trình soạn thảo mã wiki 2017 gây ra hiện tượng tải chậm, bị trễ khi xem trước và cuộn, cũng như các vấn đề về hiệu suất khi chọn, cắt hay dán nội dung, nay đã được giải quyết. [https://phabricator.wikimedia.org/T184857]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Là một phần của việc nâng cấp [[mw:Special:MyLanguage/Help:Extension:CodeMirror|CodeMirror]] từ tính năng beta lên làm tính năng chính thức, tất cả người dùng sẽ sử dụng [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] thay vì [[mw:Special:MyLanguage/Extension:CodeEditor|CodeEditor]] làm trình tô sáng cú pháp khi sửa đổi các trang nội dung bằng JavaScript, CSS, JSON, Vue và Lua. [https://phabricator.wikimedia.org/T419332]
* Dịch vụ <code>mirrors.wikimedia.org</code> dành cho người dùng Debian và Ubuntu sẽ kết thúc hỗ trợ và ngừng hoạt động vào ngày 15 tháng 5. Tài nguyên dịch vụ này sẽ được thay thế bằng những tùy chọn mới và tốt hơn. Một số người dùng có thể cần phải chuyển sang máy chủ khác, quá trình này sẽ mất khoảng một phút. [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/LJYRIS4WB66HIRCAO4GIDTXCMDVZRBMA/ Bạn có thể đọc thêm]. [https://phabricator.wikimedia.org/T416707]
* Bảng <bdi lang="zxx" dir="ltr"><code><nowiki>image</nowiki></code></bdi> và <bdi lang="zxx" dir="ltr"><code><nowiki>oldimage</nowiki></code></bdi> sẽ bị loại bỏ khỏi [[wikitech:Help:Wiki Replicas|wikireplicas]]. Nếu công cụ hoặc truy vấn của bạn truy cập trực tiếp vào <bdi lang="zxx" dir="ltr"><code><nowiki>image</nowiki></code></bdi> hoặc <bdi lang="zxx" dir="ltr"><code><nowiki>oldimage</nowiki></code></bdi>, vui lòng cập nhật chúng để sử dụng bảng <bdi lang="zxx" dir="ltr"><code><nowiki>file</nowiki></code></bdi> và <bdi lang="zxx" dir="ltr"><code><nowiki>filerevision</nowiki></code></bdi> trước ngày 28 tháng 5. [https://phabricator.wikimedia.org/T28741]
* Sau việc triển khai những giới hạn tần suất truy cập API toàn cục gần đây đối với lưu lượng truy cập không xác định, Quỹ Wikimedia sẽ tiếp tục nỗ lực đảm bảo việc [[mw:Special:MyLanguage/MediaWiki Product Insights/Responsible Reuse|sử dụng hợp lý cơ sở hạ tầng]] bằng cách áp dụng giới hạn toàn cục đối với lưu lượng truy cập API xác định kể từ tuần cuối cùng của tháng 4. Những giới hạn này được cố ý đặt ở mức cao nhất có thể để giảm thiểu tác động đến cộng đồng. Các bot chạy trong Toolforge/WMCS hoặc có quyền thành viên bot trên bất kỳ wiki nào hiện sẽ không bị ảnh hưởng. Dù vậy, tất cả các nhà phát triển được khuyến cáo nên tuân theo những thực tiễn tốt nhất đã được cập nhật. Để biết thêm thông tin, hãy xem [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|API Wikimedia/Giới hạn tần suất]] và [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits/FAQ|Câu hỏi Thường gặp]].
* [[mw:Special:MyLanguage/Attribution API|API Ghi công]] hiện có sẵn dưới dạng [[mw:Special:MyLanguage/Wikimedia APIs/Stability policy|tính năng beta]]. API này lấy thông tin nhằm ghi công các bài viết và tập tin phương tiện của Wikimedia bất kỳ chỗ nào mà chúng được sử dụng. Trang tài liệu tham khảo có sẵn thông qua trang đặc biệt Chỗ thử REST có mặt trên tất cả các trang wiki của Wikimedia (chẳng hạn như [https://en.wikipedia.org/w/index.php?api=attribution.v0-beta&title=Special%3ARestSandbox chỗ thử REST trên Wikipedia tiếng Anh]). Hãy chia sẻ phản hồi của bạn trên [[mw:Talk:Attribution API|trang thảo luận dự án]].
* Tuần này không có phiên bản MediaWiki mới nào.
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/17|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W17"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 15:00, ngày 20 tháng 4 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30432763 -->
== Request for comment (global AI policy) ==
<bdi lang="en" dir="ltr" class="mw-content-ltr">
Apologies for writing in English. {{int:Please-translate}}
A [[:m:Requests for comment/Artificial intelligence policy|request for comment]] is currently being held to decide on a global AI policy. {{int:Feedback-thanks-title}}
[[Thành viên:MediaWiki message delivery|MediaWiki message delivery]] ([[Thảo luận Thành viên:MediaWiki message delivery|thảo luận]]) 00:58, ngày 26 tháng 4 năm 2026 (UTC)
</bdi>
<!-- Tin nhắn của Thành viên:Codename Noreste@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30424282 -->
== Bản tin Kỹ thuật: Tuần 18-2026 ==
<section begin="technews-2026-W18"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/18|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Cập nhật cho biên tập viên'''
* Sẽ có một thay đổi về cách người dùng mới được tự động xác nhận nhằm cải thiện khả năng bảo vệ chống phá hoại. Hiện tại, người dùng đã mở tài khoản được vài ngày và thực hiện được một vài sửa đổi được tự động thêm vào nhóm [[{{int:grouppage-autoconfirmed/{{CONTENTLANGUAGE}}}}|{{int:group-autoconfirmed}}]]. Cấu hình này thường bị một số thành viên phá hoại lợi dụng bằng cách tạo tài khoản và chỉ bắt đầu sử dụng nó sau một khoảng thời gian. Để giảm thiểu điều này, trong tuần tới cấu hình này sẽ được cập nhật sao cho – nhằm mục đích được tự động xác nhận – tuổi của tài khoản sẽ được tính từ sửa đổi đầu tiên của họ, thay vì ngày tạo tài khoản. Giá trị số của ngưỡng tuổi vẫn sẽ được giữ nguyên. Thay đổi này sẽ chỉ được triển khai đến các wiki yêu cầu ít nhất một sửa đổi là một phần trong điều kiện để có thể được tự động xác nhận. [https://phabricator.wikimedia.org/T418484]
* Tất cả người dùng Wikipedia đã tạo tài khoản mới và những người đã kích hoạt tùy chọn "tự động bật hầu hết các tính năng beta" trong tùy chọn của mình giờ đây có thể sử dụng tính năng beta [[mw:Special:MyLanguage/Readers/Reader Experience/WE3.3.4 Reading lists|danh sách đọc]] để lưu bài viết để đọc sau. Điều này giúp người dùng có thể sắp xếp mọi sở thích đọc ở một nơi để có thể dễ dàng truy cập.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:30}} {{PLURAL:30|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề khiến cho hình ảnh trong hộp thông tin có khoảng đệm quá lớn trên Firefox đã được giải quyết. [https://phabricator.wikimedia.org/T423676]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Nhắc lại, trong tuần này giới hạn tần suất truy cập API toàn cục sẽ được áp dụng cho lưu lượng truy cập API đã được xác định. Điều này giúp đảm bảo việc [[mw:MediaWiki Product Insights/Responsible Reuse|sử dụng cơ sở hạ tầng một cách hợp lý]]. Các bot chạy trong Toolforge/WMCS hoặc có quyền người dùng bot trên bất kỳ wiki nào hiện tại sẽ không bị ảnh hưởng. Dù vậy, tất cả các nhà phát triển được khuyến cáo tuân theo cách sử dụng thực tiễn được cập nhật. Để biết thêm thông tin, bao gồm giới hạn tần suất truy cập thực tế, xem [[mw:Wikimedia APIs/Rate limits|API Wikimedia/Giới hạn tần suất truy cập]] và [[mw:Wikimedia APIs/Rate limits/FAQ|Câu hỏi Thường gặp]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.26|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/18|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W18"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 18:06, ngày 27 tháng 4 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:UOzurumba (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30458046 -->
== Bản tin Kỹ thuật: Tuần 19-2026 ==
<section begin="technews-2026-W19"/><div class="plainlinks">
'''[[m:Special:MyLanguage/Tech/News|Tin tức kỹ thuật]]''' mới nhất từ cộng đồng kỹ thuật Wikimedia. Vui lòng chia sẻ với các thành viên khác về những thay đổi này. Không phải mọi thay đổi đều sẽ ảnh hưởng đến bạn. [[m:Special:MyLanguage/Tech/News/2026/19|Các bản dịch]] của bản tin này cũng có sẵn cho bạn.
'''Nổi bật trong tuần'''
* Nhóm [[mw:Special:MyLanguage/Article guidance|Chỉ dẫn bài viết]] mời các biên tập viên có kinh nghiệm từ [[mw:Special:MyLanguage/Article guidance/Pilot wikis and collaborators|các trang Wikipedia thí điểm]]—tiếng Ả Rập, tiếng Bengal, tiếng Nhật, tiếng Bồ Đào Nha, tiếng Ba Tư, tiếng Thổ Nhĩ Kỳ, tiếng Anh đơn giản, tiếng Tây Ban Nha và tiếng Pháp—hỗ trợ biên dịch và điều chỉnh [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Category:Pages_using_article_guidance các mẫu dàn ý này]. Những dàn ý này sẽ giúp hướng dẫn các biên tập viên tạo ra các bài viết có cấu trúc tốt, rõ ràng và tuân theo quy định khi sử dụng [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Special:NewArticle tính năng này] dự kiến ra mắt vào tháng 5 năm 2026. Hiện có [[mw:Special:MyLanguage/Article guidance#Adapting a sample outline in a Wikipedia|hướng dẫn đơn giản]] về cách dịch và điều chỉnh những dàn ý này.
'''Cập nhật cho biên tập viên'''
* [[:m:Special:MyLanguage/Product and Technology Advisory Council|Hội đồng Cố vấn Sản phẩm và Công nghệ]] đã công bố [[:m:Special:MyLanguage/Product and Technology Advisory Council/May 2026 draft PTAC recommendation for feedback|bản thảo đề xuất]] về một mô hình mà các chi nhánh có thể thực hiện theo khi đóng góp vào lĩnh vực kỹ thuật. Mời các thành viên cộng đồng để lại phản hồi về đề xuất này trước ngày 8 tháng 5 [[:m:Talk:Product and Technology Advisory Council/May 2026 draft PTAC recommendation for feedback|trên trang thảo luận]].
* Số lượng tùy chọn về kích thước hình thu nhỏ có sẵn trong MediaWiki sẽ được giảm xuống còn ba tùy chọn tiêu chuẩn—Nhỏ (180px), Trung bình (250px), và Lớn (400px), là một phần của nỗ lực không ngừng nhằm cải thiện hiệu suất và giảm tải cho các dịch vụ hình thu nhỏ. Do đó, các tùy chọn hiện có sẽ được ánh xạ về kích thước mới gần nhất (ví dụ, những lựa chọn kích thước nhỏ hơn như 120px hoặc 150px sẽ hiển thị dưới kích thước 180px, trong khi những lựa chọn lớn hơn như 300px hoặc 360px sẽ hiển thị dưới kích thước 400px). Giao diện tùy chọn sẽ sớm được cập nhật để áp dụng những thay đổi này và người dùng không muốn áp dụng hoặc để lại phản hồi có thể thực hiện điều đó. [https://phabricator.wikimedia.org/T424909]
* Từ giờ trở đi, ngay cả khi một quyền tự động hết hạn, người dùng sẽ nhận được thông báo Echo tương tự như thông báo tiêu chuẩn về thay đổi quyền. Có một điểm khác biệt giữa thông báo này và [[m:Special:MyLanguage/Global reminder bot|Global reminder bot]] ở chỗ bot sẽ nhắc người dùng một tuần ''trước khi'' quyền đó hết hạn, để họ có thể gia hạn quyền.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Xem tất cả {{formatnum:32}} {{PLURAL:32|tác vụ}} được tạo bởi cộng đồng đã được [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|giải quyết vào tuần trước]]. Ví dụ, một vấn đề khiến bộ chọn ngôn ngữ ULS trong [[m:Special:Translate|Đặc biệt:Dịch]] cuộn dọc khi không cần thiết, đã được giải quyết. Trước đây, khi người dùng mở menu thả xuống "Dịch sang tiếng Anh" và nhập một số từ nhất định, hộp thoại sẽ cuộn dọc xuống vài pixel ngay cả khi có đủ không gian để hiển thị tất cả kết quả. Menu thả xuống giờ không còn dịch chuyển một cách không cần thiết khi lọc ngôn ngữ nữa. [https://phabricator.wikimedia.org/T358864]
* [[m:Special:GlobalWatchlist|Danh sách Theo dõi Toàn cục]], tính năng cho phép bạn xem các danh sách theo dõi của bạn từ nhiều trang wiki trên cùng một trang, tiếp tục được cải thiện. Ví dụ, danh sách theo dõi cho các trang Wikibase chẳng hạn như [[:d:|Wikidata]] nay hỗ trợ phần tử [[mw:Special:MyLanguage/Extension:EntitySchema|EntitySchema]] để có thể theo dõi tốt hơn. Chế độ Cập nhật Trực tiếp nay làm mới trang đặc biệt sau mỗi 60 giây để tuân theo [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|giới hạn tần suất truy vấn API toàn cục]] được cập nhật để cải thiện khả năng phản hồi theo thời gian thực. Ngoài ra, một lỗi về hướng khiến liên kết hiển thị là "thay đổi 3" thay vì "3 thay đổi" trong danh sách có hướng hỗn hợp đã được giải quyết. [https://phabricator.wikimedia.org/T415450][https://phabricator.wikimedia.org/T424422][https://phabricator.wikimedia.org/T418091]
'''Cập nhật cho những người đóng góp vào mảng kỹ thuật'''
* Giai đoạn thứ hai của [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|giới hạn tần suất truy vấn API toàn cục]] đã được triển khai để giảm [[diffblog:2026/03/26/quo-vadis-crawlers-progress-and-whats-next-on-safeguarding-our-infrastructure/|tác động của việc thu thập dữ liệu sử dụng AI]] và đảm bảo quyền truy cập hợp lý, bền vững vào các tài nguyên của Wikimedia, ưu tiên lưu lượng truy cập của con người và lưu lượng phù hợp với sứ mệnh. [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits#Limits|Giới hạn]] được chuyển từ mỗi giờ sang mỗi phút, tạo ra những mô hình lưu lượng truy cập mượt mà hơn và tải API dễ đoán hơn. Người dùng cộng đồng dự kiến không bị ảnh hưởng, và không cần phải thực hiện bất kỳ hành động gì. Các dấu hiệu ban đầu cho thấy một số người yêu cầu dựa trên User-Agent đang điều chỉnh hành vi vi, và khoảng 64% lưu lượng truy vấn API tự động đã được xác định. Việc giám sát vẫn tiếp tục, và Wikimedia Enterprise vẫn sẵn sàng để hỗ trợ thương mại.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Đề mục định kỳ]] Chi tiết cập nhật mã nguồn sắp tới trong tuần này: [[mw:MediaWiki 1.46/wmf.27|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tin tức Kỹ thuật]]''' do [[m:Special:MyLanguage/Tech/News/Writers|các biên tập viên Bản tin Kỹ thuật]] chuẩn bị và được đăng bởi [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Đóng góp]] • [[m:Special:MyLanguage/Tech/News/2026/19|Biên dịch]] • [[m:Tech|Nhờ giúp đỡ]] • [[m:Talk:Tech/News|Phản hồi]] • [[m:Global message delivery/Targets/Tech ambassadors|Đăng ký hoặc huỷ đăng ký]].''
</div><section end="technews-2026-W19"/>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 20:43, ngày 4 tháng 5 năm 2026 (UTC)
<!-- Tin nhắn của Thành viên:STei (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30498077 -->
dcan9aih1dcu9ah5ldw3360cg180prn
idømme
0
183536
2350226
306282
2026-05-05T06:12:11Z
Hiyuune
50834
2350226
wikitext
text/x-wiki
=={{langname|nb}}==
==={{section|v}}===
{{head|nb|Động từ}}
# [[kết án|Kết án]]; [[tuyên án]]].
16vdlr1sj4ci4qq0eqc6p7z1dipnly1
2350227
2350226
2026-05-05T06:12:19Z
Hiyuune
50834
/* {{langname|nb}} */
2350227
wikitext
text/x-wiki
=={{langname|nb}}==
==={{section|v}}===
{{head|nb|Động từ}}
# [[kết án|Kết án]]; [[tuyên án]].
lw6ut2i7uhjnknoty6xgdg42vvjoloz
geometric series
0
215331
2350137
1845602
2026-05-04T13:59:07Z
Kelly zhrm
58416
2350137
wikitext
text/x-wiki
=={{langname|en}}==
{{wp|en:}}
==={{ĐM|n}}===
{{en-noun|*}} <!--số nhiều cũng giống như số ít-->
# {{lb|en|analysis}} [[chuỗi|Chuỗi]] [[hình học]].
#: {{cot|en|arithmetic series|harmonic series}}
==={{ĐM|see}}===
* {{l|en|geometric progression}}
6f7xh4ttyiw5fggbiu7wza8hdymztce
Pacific Ocean
0
246563
2350220
2016614
2026-05-05T04:14:13Z
Hiyuune
50834
2350220
wikitext
text/x-wiki
{{-eng-}}
{{-place-}}
'''Pacific Ocean'''
# [[Thái Bình Dương]].
{{C|en|Đại dương}}
g9y7c6v95ftcsu2a0ccajo3235y5a2g
Arctic Ocean
0
259054
2350218
2016610
2026-05-05T04:14:02Z
Hiyuune
50834
2350218
wikitext
text/x-wiki
{{-eng-}}
{{-place-}}
'''Arctic Ocean'''
# [[Bắc Băng Dương]].
{{-syn-}}
* [[Arctic Sea]]
{{C|en|Đại dương}}
9d3r9fl0wtyvwf34rz8hl16uvn2ppva
Atlantic Ocean
0
259065
2350219
2016611
2026-05-05T04:14:07Z
Hiyuune
50834
2350219
wikitext
text/x-wiki
{{-eng-}}
{{-place-}}
'''Atlantic Ocean'''
# [[Đại Tây Dương]].
{{C|en|Đại dương}}
psnebiwcpx6nvuu947pjvu26q7t7vju
Thể loại:en:Đại dương
14
259066
2350221
2056366
2026-05-05T04:14:24Z
Hiyuune
50834
Hiyuune đã đổi [[Thể loại:Đại dương/Tiếng Anh]] thành [[Thể loại:en:Đại dương]]
2056366
wikitext
text/x-wiki
Trang này liệt kê các mục từ tiếng Anh thuộc chủ đề [[đại dương]].
[[Thể loại:Mục từ tiếng Anh theo chủ đề]]
[[Thể loại:Đại dương|A]]
kpxpygsrryyh9mfpe6u8yfykoonarpk
2350223
2350221
2026-05-05T04:14:35Z
Hiyuune
50834
Thay cả nội dung bằng “{{auto cat}}”
2350223
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Mô đun:languages/data/3/n
828
260849
2350133
2344047
2026-05-04T12:15:35Z
Lcsnes
40261
2350133
Scribunto
text/plain
local m_langdata = require("Module:languages/data")
-- Loaded on demand, as it may not be needed (depending on the data).
local function u(...)
u = require("Module:string utilities").char
return u(...)
end
local c = m_langdata.chars
local p = m_langdata.puaChars
local s = m_langdata.shared
local m = {}
m["naa"] = {
"Namla",
3508760,
"paa-pau",
"Latn",
}
m["nab"] = {
"tiếng Nambikwara",
2068190,
"sai-nmk",
"Latn",
"Tiếng Nambikwara",
"Nambikwara",
}
m["nac"] = {
"Narak",
6965295,
"ngf",
"Latn",
}
m["nae"] = {
"Naka'ela",
6960073,
"poz",
"Latn",
}
m["naf"] = {
"Nabak",
11732491,
"ngf",
"Latn",
}
m["nag"] = {
"Naga Pidgin",
3503454,
"crp",
"Latn",
ancestors = "as",
}
m["nah"] = {
"tiếng Nahuatl",
13300,
"azc-nah",
"Latn",
"Tiếng Nahuatl",
"Nahuatl",
}
m["naj"] = {
"Nalu",
36026,
"alv-nal",
"Latn",
}
m["nak"] = {
"Nakanai",
6528669,
"poz-ocw",
"Latn",
}
m["nal"] = {
"Nalik",
3335387,
"poz-ocw",
"Latn",
}
m["nam"] = {
"Ngan'gityemerri",
3298041,
"aus-dal",
"Latn",
}
-- Being converted into the family "Southern Min" ("zhx-nan", which will take the code "nan" once the language can be removed). Retain the name "Min Nan" here to avoid having to move things that are scheduled for deletion anyway.
m["nan"] = {
"tiếng Mân Nam",
36495,
"zhx-com",
"Hants, Latn, Bopo, Kana",
"Tiếng Mân Nam",
"Mân Nam",
wikimedia_codes = "zh-min-nan",
generate_forms = "zh-generateforms",
sort_key = {
Hani = "Hani-sortkey",
Kana = "Kana-sortkey"
},
}
m["nao"] = {
"Naaba",
11883865,
"sit-tib",
ancestors = "xct",
}
m["nap"] = {
"tiếng Napoli",
33845,
"roa-itd",
"Latn",
"Tiếng Napoli",
"Napoli",
}
m["naq"] = {
"tiếng Khoekhoe",
13301,
"khi-khk",
"Latn",
"Tiếng Khoekhoe",
"Khoekhoe",
}
m["nar"] = {
"Iguta",
5621686,
"nic-jer",
"Latn",
}
m["nas"] = {
"Nasioi",
56772,
"paa-sbo",
"Latn",
}
m["nat"] = {
"Hungworo",
3914395,
"nic-kmk",
"Latn",
}
m["naw"] = {
"Nawuri",
35906,
"alv-gng",
"Latn",
}
m["nax"] = {
"Nakwi",
3504178,
"qfa-mal",
"Latn",
}
m["nay"] = {
"Ngarrindjeri",
7022091,
"aus-pam",
"Latn",
}
m["naz"] = {
"Coatepec Nahuatl",
5138605,
"azc-nah",
"Latn",
}
m["nba"] = {
"Nyemba",
3346655,
"bnt-clu",
"Latn",
ancestors = "lch",
}
m["nbb"] = {
"Ndoe",
36134,
"nic-eko",
"Latn",
}
m["nbc"] = {
"Chang",
5071694,
"sit-kch",
"Latn",
}
m["nbd"] = {
"Ngbinda",
11132859,
"bnt-boa",
"Latn",
}
m["nbe"] = {
"Konyak Naga",
6430448,
"sit-kch",
"Latn",
}
m["nbg"] = {
"Nagarchal",
13299,
"dra-gon",
}
m["nbh"] = {
"Ngamo",
3438705,
"cdc-wst",
"Latn",
}
m["nbi"] = {
"Mao Naga",
12952905,
"tbq-anp",
"Latn",
}
m["nbj"] = {
"Ngarinman",
10600380,
nil,
"Latn",
}
m["nbk"] = {
"Nake",
11732496,
"ngf-mad",
"Latn",
}
m["nbm"] = {
"Ngbaka Ma'bo",
3915331,
"nic-nkm",
"Latn",
}
m["nbn"] = {
"Kuri",
3200540,
"poz",
"Latn",
}
m["nbo"] = {
"Nkukoli",
3914482,
"nic-uce",
"Latn",
}
m["nbp"] = {
"Nnam",
36138,
"nic-eko",
"Latn",
}
m["nbq"] = {
"Nggem",
12952956,
"ngf",
"Latn",
}
m["nbr"] = {
"Numana",
5529310,
"nic-nin",
"Latn",
}
m["nbs"] = {
"Namibian Sign Language",
6961792,
"sgn",
"Latn", -- when documented
}
m["nbt"] = {
"Na",
12952895,
"sit-tan",
"Deva, Latn",
}
m["nbu"] = {
"Rongmei Naga",
12952912,
"sit-zem",
"Latn",
}
m["nbv"] = {
"Ngamambo",
11129694,
"nic-mom",
"Latn",
}
m["nbw"] = {
"Southern Ngbandi",
17522635,
"nic-ngd",
"Latn",
}
m["nby"] = {
"Ningera",
11732524,
"paa-brd",
"Latn",
}
m["nca"] = {
"Iyo",
6101336,
"ngf-fin",
"Latn",
}
m["ncb"] = {
"tiếng Nicobar Trung",
3335553,
"aav-nic",
"Deva, Latn",
"Tiếng Nicobar Trung",
"Nicobar Trung",
}
m["ncc"] = {
"Ponam",
3396122,
"poz-aay",
"Latn",
}
m["ncd"] = {
"Nachering",
6957144,
"sit-kic",
"Deva",
}
m["nce"] = {
"Yale",
2992915,
"paa", --kwomtari or isolate
"Latn",
}
m["ncf"] = {
"Notsi",
3344784,
"poz-ocw",
"Latn",
}
m["ncg"] = {
"tiếng Nisga'a",
3342138,
"nai-tsi",
"Latn",
"Tiếng Nisga'a",
"Nisga'a",
}
m["nch"] = {
"tiếng Trung Nahuatl Huasteca",
2194290,
"azc-hua",
"Latn",
"Tiếng Trung Nahuatl Huasteca",
"Trung Nahuatl Huasteca",
}
m["nci"] = {
"tiếng Nahuatl cổ điển",
559242,
"azc-nah",
"Latn",
"Tiếng Nahuatl cổ điển",
"Nahuatl cổ điển",
entry_name = {remove_diacritics = c.macron},
}
m["ncj"] = {
"Northern Puebla Nahuatl",
15705671,
"azc-nah",
"Latn",
}
m["nck"] = {
"Nakara",
6960662,
"aus-arn",
"Latn",
}
m["ncl"] = {
"Michoacán Nahuatl",
2896217,
"azc-nah",
"Latn",
}
m["ncm"] = {
"Nambo",
42173731,
nil,
"Latn",
}
m["ncn"] = {
"Nauna",
3337158,
"poz-aay",
"Latn",
}
m["nco"] = {
"Sibe",
56806,
"paa-sbo",
"Latn",
}
m["ncq"] = {
"tiếng Katang Bắc",
12638175,
"mkh-kat",
"Laoo, Thai",
"Tiếng Katang Bắc",
"Katang Bắc",
sort_key = {
Laoo = "Laoo-sortkey",
Thai = "Thai-sortkey",
},
}
m["ncr"] = {
"Ncane",
11297920,
"nic-bbe",
"Latn",
ancestors = "nhu",
}
m["ncs"] = {
"Nicaraguan Sign Language",
33765,
"sgn",
"Sgnw",
}
m["nct"] = {
"tiếng Naga Chothe",
5105385,
"tbq-kuk",
"Beng, Latn",
"Tiếng Naga Chothe",
"Naga Chothe",
}
m["ncu"] = {
"Chumburung",
35198,
"alv-gng",
"Latn",
}
m["ncx"] = {
"tiếng Trung Nahuatl Puebla",
5061727,
"azc-nah",
"Latn",
"Tiếng Trung Nahuatl Puebla",
"Trung Nahuatl Puebla",
}
m["ncz"] = {
"Natchez",
3111838,
nil,
"Latn",
}
m["nda"] = {
"Ndasa",
35904,
"bnt-kel",
"Latn",
}
m["ndb"] = {
"Kenswei Nsei",
7067553,
"nic-rnn",
"Latn",
}
m["ndc"] = {
"Ndau",
13311,
"bnt-sho",
"Latn",
}
m["ndd"] = {
"Nde-Nsele-Nta",
36131,
"nic-eko",
"Latn",
}
m["ndf"] = {
"Nadruvian",
6957967,
nil,
"Latn",
}
m["ndg"] = {
"Ndengereko",
6983726,
"bnt-mbi",
"Latn",
}
m["ndh"] = {
"Ndali",
6983678,
"bnt-run",
"Latn",
}
m["ndi"] = {
"Chamba Leko",
36381,
"alv-lek",
"Latn",
}
m["ndj"] = {
"Ndamba",
6983684,
"bnt-kil",
"Latn",
}
m["ndk"] = {
"Ndaka",
11164947,
"bnt-nya",
"Latn",
}
m["ndl"] = {
"Ndolo",
6983788,
"bnt-zbi",
"Latn",
ancestors = "lse",
}
m["ndm"] = {
"Ndam",
56283,
"cdc-est",
"Latn",
}
m["ndn"] = {
"Ngundi",
35916,
"bnt-ngn",
"Latn",
}
m["ndp"] = {
"Ndo",
6983774,
"csu-mle",
"Latn",
}
m["ndq"] = {
"Ndombe",
6983792,
"bnt-swb",
"Latn",
}
m["ndr"] = {
"Ndoola",
35837,
"nic-mmb",
"Latn",
}
m["nds"] = {
"tiếng Hạ Đức",
25433,
"gmw-lgm",
"Latn",
"Tiếng Hạ Đức",
"Hạ Đức",
ancestors = "gml",
}
m["ndt"] = {
"Ndunga",
6983857,
"nic-mbc",
"Latn",
}
m["ndu"] = {
"Dugun",
11015189,
"alv-dur",
"Latn",
}
m["ndv"] = {
"Ndut",
36028,
"alv-cng",
"Latn",
}
m["ndw"] = {
"Ndobo",
11008568,
"bnt-ngn",
"Latn",
}
m["ndx"] = {
"Nduga",
6983833,
nil,
"Latn",
}
m["ndy"] = {
"Lutos",
6705910,
"csu-val",
"Latn",
}
m["ndz"] = {
"tiếng Ndogo",
35983,
"nic-ser",
"Latn",
"Tiếng Ndogo",
"Ndogo",
}
m["nea"] = {
"Eastern Ngad'a",
12473454,
"poz-cet",
}
m["neb"] = {
"Toura",
7853636,
"dmn-mda",
"Latn",
}
m["nec"] = {
"Nedebang",
4925378,
"ngf",
}
m["ned"] = {
"Nde-Gbite",
11010279,
"nic-grf",
}
m["nee"] = {
"Kumak",
3347266,
"poz-cln",
"Latn",
}
m["nef"] = {
"Nefamese",
6987002,
"crp",
}
m["neg"] = {
"tiếng Negidal",
33676,
"tuw-ewe",
"Cyrl",
"Tiếng Negidal",
"Negidal",
}
m["neh"] = {
"Nyenkha",
3695185,
"sit-ebo",
"Tibt, Latn",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
m["nej"] = {
"Neko",
6989840,
"ngf-fin",
"Latn",
}
m["nek"] = {
"Neku",
14916900,
"poz-cln",
}
m["nem"] = {
"Nemi",
3338008,
"poz-cln",
"Latn",
}
m["nen"] = {
"Nengone",
3338052,
"poz-occ",
"Latn",
}
m["neo"] = {
"tiếng Na Miểu",
15977293,
"hmn",
nil,
"Tiếng Na Miểu",
"Na Miểu",
}
m["neq"] = {
"North Central Mixe",
25559729,
nil,
"Latn",
}
m["ner"] = {
"Yahadian",
8046778,
nil,
"Latn",
}
m["nes"] = {
"Bhoti Kinnauri",
21179921,
"sit-las",
}
m["net"] = {
"Nete",
6998869,
"paa-eng",
}
m["neu"] = {
"Neo",
606917,
"art",
"Latn",
type = "appendix-constructed",
}
m["nev"] = {
"Nyaheun",
7070801,
"mkh-ban",
}
m["new"] = {
"tiếng Newa",
33979,
"sit-new",
"Deva, Newa, Ranj",
"Tiếng Newa",
"Newa",
ancestors = "nwx",
translit = {
Deva = "new-translit",
Newa = "new-Newa-translit",
},
}
m["nex"] = {
"Neme",
12952941,
}
m["ney"] = {
"Neyo",
36410,
"kro",
}
m["nez"] = {
"Nez Perce",
3339226,
"nai-shp",
"Latn",
}
m["nfa"] = {
"Dhao",
2053828,
"poz",
}
m["nfd"] = {
"Ahwai",
3913957,
"nic-plt",
"Latn",
}
m["nfl"] = {
"Aiwoo",
56742,
"poz-oce",
"Latn",
}
m["nfr"] = {
"tiếng Nafaanra",
13297,
"alv-snf",
"Latn",
"Tiếng Nafaanra",
"Nafaanra",
}
m["nfu"] = {
"Mfumte",
6826794,
"nic-nka",
"Latn",
}
m["nga"] = {
"Ngbaka",
36022,
"alv-gbf",
"Latn",
}
m["ngb"] = {
"Northern Ngbandi",
17522631,
"nic-ngd",
"Latn",
}
m["ngc"] = {
"tiếng Ngombe (Congo)",
3123524,
"bnt-bun",
"Latn",
"Tiếng Ngombe (Congo)",
"Ngombe (Congo)",
}
m["ngd"] = {
"Ngando (Central African Republic)",
35910,
"bnt-ngn",
}
m["nge"] = {
"Ngemba",
6750551,
"nic-nge",
"Latn",
}
m["ngg"] = { -- compare 'aiy'
"Ngbaka Manza",
11033316,
"alv-gbf",
"Latn",
}
m["ngh"] = {
"tiếng Nǀuu",
2618974,
"khi-tuu",
"Latn",
"Tiếng Nǀuu",
"Nǀuu",
}
m["ngi"] = {
"Ngizim",
3914924,
"cdc-wst",
"Latn",
}
m["ngj"] = {
"Ngie",
36361,
"nic-mom",
"Latn",
}
m["ngk"] = {
"Ngalkbun",
3913790,
"aus-gun",
"Latn",
}
m["ngl"] = {
"Lomwe",
35824,
"bnt-mak",
"Latn",
}
m["ngm"] = {
"Ngatik Men's Creole",
36400,
"crp",
ancestors = "en, pon",
}
m["ngn"] = {
"Ngwo",
36051,
"nic-mom",
"Latn",
}
m["ngo"] = {
"Ngoni",
7022547,
"bnt-ngu",
"Latn",
}
m["ngp"] = {
"Ngulu",
7193332,
"bnt-seu",
"Latn",
}
m["ngq"] = {
"Ngoreme",
7022573,
"bnt-lok",
"Latn",
}
m["ngr"] = {
"Nagu",
3063524,
"poz-oce",
"Latn",
}
m["ngs"] = {
"Gvoko",
3441188,
"cdc-cbm",
"Latn",
}
m["ngt"] = {
"Ngeq",
25559548,
"mkh-kat",
}
m["ngu"] = {
"Guerrero Nahuatl",
5614980,
"azc-nah",
"Latn",
}
m["ngv"] = {
"Nagumi",
35842,
"nic-jrn",
}
m["ngw"] = {
"Ngwaba",
3440480,
"cdc-cbm",
"Latn",
}
m["ngx"] = {
"Nggwahyi",
56265,
"cdc-cbm",
"Latn",
}
m["ngy"] = {
"Tibea",
36598,
"bnt-baf",
"Latn",
}
m["ngz"] = {
"Ngungwel",
35920,
"bnt-tkc",
"Latn",
}
m["nha"] = {
"Nhanda",
3339380,
"aus-psw",
"Latn",
}
m["nhb"] = {
"Beng",
3913311,
"dmn-nbe",
"Latn",
}
m["nhc"] = {
"Tabasco Nahuatl",
6047326,
"azc-nah",
"Latn",
}
m["nhd"] = {
"Chiripá",
2873230,
"tup-gua",
ancestors = "gn",
}
m["nhe"] = {
"Eastern Huasteca Nahuatl",
4358289,
"azc-nah",
"Latn",
}
m["nhf"] = {
"Nhuwala",
10600396,
"aus-nga",
"Latn",
}
m["nhg"] = {
"Tetelcingo Nahuatl",
3450252,
"azc-nah",
"Latn",
}
m["nhh"] = {
"Nahari",
6583560,
"inc-eas",
}
m["nhi"] = {
"Zacatlán-Ahuacatlán-Tepetzintla Nahuatl",
12953764,
"azc-nah",
"Latn",
}
m["nhk"] = {
"Cosoleacaque Nahuatl",
12953757,
"azc-nah",
"Latn",
}
m["nhm"] = {
"Morelos Nahuatl",
4800819,
"azc-nah",
"Latn",
}
m["nhn"] = {
"tiếng Trung Nahuatl",
6047309,
"azc-nah",
"Latn",
"Tiếng Trung Nahuatl",
"Trung Nahuatl",
}
m["nho"] = {
"Takuu",
3409818,
"poz-pnp",
"Latn",
}
m["nhp"] = {
"Pajapan Nahuatl",
12953760,
"azc-nah",
"Latn",
}
m["nhq"] = {
"Huaxcaleca Nahuatl",
12953758,
"azc-nah",
"Latn",
}
m["nhr"] = {
"Naro",
2164778,
"khi-kal",
"Latn",
}
m["nht"] = {
"Ometepec Nahuatl",
7090132,
"azc-nah",
"Latn",
}
m["nhu"] = {
"Noone",
36072,
"nic-bbe",
"Latn",
}
m["nhv"] = {
"tiếng Nahuatl Temascaltepec",
2379405,
"azc-nah",
"Latn",
"Tiếng Nahuatl Temascaltepec",
"Nahuatl Temascaltepec",
}
m["nhw"] = {
"tiếng Tây Huasteca Nahuatl",
2678840,
"azc-nah",
"Latn",
"Tiếng Tây Nahuatl Huasteca",
"Tây Nahuatl Huasteca",
}
m["nhx"] = {
"Mecayapan Nahuatl",
12953756,
"azc-nah",
"Latn",
}
m["nhy"] = {
"Northern Oaxaca Nahuatl",
12953763,
"azc-nah",
"Latn",
}
m["nhz"] = {
"Santa María La Alta Nahuatl",
15705753,
"azc-nah",
"Latn",
}
m["nia"] = {
"tiếng Nias",
2407831,
"poz-nws",
"Latn",
"Tiếng Nias",
"Nias",
}
m["nib"] = {
"Nakame",
11732495,
"ngf-fin",
"Latn",
}
m["nid"] = {
"Ngandi",
7021977,
"aus-arn",
"Latn",
}
m["nie"] = {
"Niellim",
33662,
"alv-bua",
}
m["nif"] = {
"Nek",
6989781,
"ngf-fin",
"Latn",
}
m["nig"] = {
"Ngalakan",
3913796,
"aus-gun",
"Latn",
}
m["nih"] = {
"Nyiha",
11128374,
"bnt-mby",
"Latn",
}
m["nii"] = {
"Nii",
35237,
"ngf",
"Latn",
}
m["nij"] = {
"Ngaju",
2992872,
"poz-brw",
"Latn",
}
m["nik"] = {
"tiếng Nicobar Nam",
7570194,
"aav-nic",
"Deva, Latn",
"Tiếng Nicobar Nam",
"Nicobar Nam",
}
m["nil"] = {
"Nila",
7036821,
}
m["nim"] = {
"Nilamba",
4121200,
"bnt-tkm",
"Latn",
}
m["nin"] = {
"Ninzo",
3914021,
"nic-nin",
}
m["nio"] = {
"tiếng Nganasan",
36743,
"syd",
"Cyrl",
"Tiếng Nganasan",
"Nganasan",
translit = "nio-translit",
}
m["niq"] = {
"Nandi",
6956591,
"sdv-nma",
}
m["nir"] = {
"Nimboran",
301116,
"paa-nim",
}
m["nis"] = {
"Nimi",
11732523,
"ngf-fin",
"Latn",
}
m["nit"] = {
"tiếng Nam Kolami",
56767,
"dra-knk",
"Deva, Telu",
"Tiếng Nam Kolami",
"Nam Kolami",
translit = {
Telu = "te-translit"
},
}
m["niu"] = {
"tiếng Niue",
33790,
"poz-pol",
"Latn",
"Tiếng Niue",
"Niue",
}
m["niv"] = {
"tiếng Nivkh",
36464,
"qfa-iso",
"Cyrl",
"Tiếng Nivkh",
"Nivkh",
translit = "niv-translit",
entry_name = {
from = {"['’]"},
to = {"ʼ"}
},
sort_key = "niv-sortkey",
}
m["niw"] = {
"Nimo",
3504126,
"paa-asa",
}
m["nix"] = {
"Hema",
5710904,
"bnt-nyg",
"Latn",
}
m["niy"] = {
"Ngiti",
7022396,
"csu-lnd",
}
m["niz"] = {
"Ningil",
11732527,
"qfa-tor",
}
m["nja"] = {
"Nzanyi",
3441299,
"cdc-cbm",
"Latn",
}
m["njb"] = {
"Nocte Naga",
7046410,
"sit-tno",
}
m["njh"] = {
"Lotha Naga",
33590,
"sit-aao",
}
m["nji"] = {
"Gudanji",
3915692,
"aus-mir",
}
m["njj"] = {
"Njen",
36112,
"nic-mom",
"Latn",
}
m["njl"] = {
"Njalgulgule",
7071229,
"sdv-daj",
}
m["njm"] = {
"tiếng Angami",
56761,
"tbq-anp",
"Latn",
"Tiếng Angami",
"Angami",
}
m["njn"] = {
"Liangmai Naga",
14194500,
"sit-zem",
}
m["njo"] = {
"tiếng Ao",
28433,
"sit-aao",
"Latn",
"Tiếng Ao",
"Ao",
}
m["njr"] = {
"Njerep",
35844,
"nic-mmb",
"Latn",
}
m["njs"] = {
"Nisa",
13593518,
"paa-egb",
}
m["njt"] = {
"Ndyuka-Trio Pidgin",
13591205,
"crp",
ancestors = "djk, tri",
}
m["nju"] = {
"Ngadjunmaya",
7021846,
"aus-pam",
}
m["njx"] = {
"Kunyi",
3196559,
"bnt-kng",
"Latn",
}
m["njy"] = {
"Njyem",
35898,
"bnt-ndb",
"Latn",
}
m["njz"] = {
"Nyishi",
56870,
"sit-tan",
"Latn",
}
m["nka"] = {
"Nkoya",
7042633,
"bnt-lbn",
"Latn",
}
m["nkb"] = {
"Khoibu Naga",
21481876,
"sit-mar",
}
m["nkc"] = {
"Nkongho",
35863,
"bnt-saw",
"Latn",
}
m["nkd"] = {
"Koireng",
6426342,
"sit-zem",
}
m["nke"] = {
"Duke",
3041075,
"poz-ocw",
}
m["nkf"] = {
"Inpui Naga",
21481817,
"sit-zem",
}
m["nkg"] = {
"Nekgini",
11732509,
"ngf-fin",
"Latn",
}
m["nkh"] = {
"Khezha Naga",
6401519,
"tbq-anp",
}
m["nki"] = {
"tiếng Naga Thangal",
56374,
"sit-zem",
"Latn, Beng",
"Tiếng Naga Thangal",
"Naga Thangal",
}
m["nkj"] = {
"Nakai",
14916897,
"ngf-okk",
"Latn",
}
m["nkk"] = {
"Nokuku",
7048122,
"poz-vnc",
}
m["nkm"] = {
"Namat",
15634505,
}
m["nkn"] = {
"Nkangala",
10962292,
"bnt-clu",
"Latn",
ancestors = "mck",
}
m["nko"] = {
"tiếng Nkonya",
35867,
"alv-gng",
"Latn",
"Tiếng Nkonya",
"Nkonya",
}
m["nkp"] = {
"Niuatoputapu",
3399095,
"poz-pnp",
}
m["nkq"] = {
"Nkami",
7042522,
"alv-gng",
"Latn",
}
m["nkr"] = {
"Nukuoro",
2635961,
"poz-pnp",
"Latn",
}
m["nks"] = {
"North Asmat",
11732049,
}
m["nkt"] = {
"Nyika",
16917497,
"bnt-mwi",
"Latn",
}
m["nku"] = {
"Bouna Kulango",
20668241,
"alv-kul",
}
-- nkv is treated as nkt, see WT:LT
m["nkw"] = {
"Nkutu",
7193313,
"bnt-tet",
"Latn",
}
m["nkx"] = {
"Nkoroo",
36000,
"ijo",
}
m["nkz"] = {
"tiếng Nkari",
11130307,
"nic-ief",
ancestors = "ibr",
"Latn",
"Tiếng Nkari",
"Nkari",
}
m["nla"] = {
"Ngombale",
36292,
"bai",
"Latn",
}
m["nlc"] = {
"Nalca",
6960839,
"ngf",
"Latn",
}
m["nle"] = {
"East Nyala",
25559347,
"bnt-msl",
"Latn",
ancestors = "luy",
}
m["nlg"] = {
"Gela",
3063531,
"poz-sls",
"Latn",
}
m["nli"] = {
"Grangali",
3444203,
"inc-kun",
}
m["nlj"] = {
"Nyali",
7070830,
"bnt-nya",
"Latn",
}
m["nlk"] = {
"Ninia Yali",
12953310,
}
m["nll"] = {
"Nihali",
33904,
"qfa-iso",
"Deva, Latn",
}
m["nlm"] = {
"Mankiyali",
47522426,
"inc-koh",
}
m["nlo"] = {
"Ngul",
35894,
"bnt-bdz",
"Latn",
}
m["nlq"] = {
"Lao Naga",
63283609,
"sit-tno",
}
m["nlu"] = {
"Nchumbulu",
36143,
"alv-gng",
"Latn",
}
m["nlv"] = {
"Orizaba Nahuatl",
3086050,
"azc-nah",
"Latn",
}
m["nlw"] = {
"Walangama",
7961277,
}
m["nlx"] = {
"Nahali",
33361,
"inc-bhi",
}
m["nly"] = {
"Nyamal",
7070837,
"aus-nga",
"Latn",
}
m["nlz"] = {
"Nalögo",
20527138,
"poz-oce",
}
m["nma"] = {
"Maram Naga",
56378,
"sit-zem",
}
m["nmb"] = {
"Big Nambas",
2902304,
"poz-vnc",
}
m["nmc"] = {
"tiếng Ngam",
3915446,
"csu-sar",
"Latn",
"Tiếng Ngam",
"Ngam",
}
m["nmd"] = {
"Ndumu",
35901,
"bnt-mbt",
"Latn",
}
m["nme"] = {
"Mzieme Naga",
6949473,
"sit-zem",
}
m["nmf"] = {
"tiếng Tangkhul Naga",
7682992,
"sit-tng",
nil,
"Tiếng Tangkhul Naga",
"Tangkhul Naga",
}
m["nmg"] = {
"Kwasio",
34098,
"bnt-mnj",
"Latn",
}
m["nmh"] = {
"Monsang Naga",
6902496,
}
m["nmi"] = {
"Nyam",
3438738,
"cdc-wst",
"Latn",
}
m["nmj"] = {
"Ngombe (Central African Republic)",
3913949,
"alv-gbs",
}
m["nmk"] = {
"Namakura",
3335410,
"poz-vnc",
}
m["nml"] = {
"Ndemli",
36089,
"nic-grf",
"Latn",
}
m["nmm"] = {
"Manangba",
6746900,
"sit-tam",
"Tibt, Deva",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
m["nmn"] = {
"tiếng ǃXóõ",
13229,
"khi-tuu",
"Latn",
"Tiếng ǃXóõ",
"ǃXóõ",
}
m["nmo"] = {
"tiếng Naga Moyon",
6927748,
"tbq-kuk",
"Latn, Beng",
"Tiếng Naga Moyon",
"Naga Moyon",
}
m["nmp"] = {
"Nimanbur",
nil,
}
m["nmq"] = {
"Nambya",
11008869,
"bnt-sho",
"Latn",
}
m["nmr"] = {
"Nimbari",
36069,
"alv-lni",
}
m["nms"] = {
"Letemboi",
3236886,
"poz-vnc",
}
m["nmt"] = {
"Namonuito",
12908815,
"poz-mic",
}
m["nmu"] = {
"Northeast Maidu",
3278074,
"nai-mdu",
"Latn",
}
m["nmv"] = {
"Ngamini",
7021944,
"aus-kar",
"Latn",
}
m["nmw"] = {
"Nimoa",
7037729,
"poz-ocw",
}
m["nmy"] = {
"Namuyi",
56844,
"sit-nax",
"Latn",
}
m["nmz"] = {
"Nawdm",
36085,
"nic-yon",
"Latn",
}
m["nna"] = {
"Nyangumarta",
33653,
}
m["nnb"] = {
"Nande",
3196953,
"bnt-glb",
"Latn",
}
m["nnc"] = {
"Nancere",
3140491,
"cdc-est",
"Latn",
}
m["nnd"] = {
"West Ambae",
2841479,
"poz-vnc",
"Latn",
}
m["nne"] = {
"Ngandyera",
10961003,
"bnt-ova",
"Latn",
}
m["nnf"] = {
"Ngaing",
11732510,
"ngf-fin",
"Latn",
}
m["nng"] = {
"tiếng Naga Maring",
12952908,
"sit-mar",
"Latn, Beng",
"Tiếng Naga Maring",
"Naga Maring",
}
m["nnh"] = {
"tiếng Ngiemboon",
36286,
"bai",
"Latn",
"Tiếng Ngiemboon",
"Ngiemboon",
}
m["nni"] = {
"North Nuaulu",
12952968,
"poz-cma",
}
m["nnj"] = {
"Nyangatom",
4662604,
"sdv-ttu",
}
m["nnk"] = {
"tiếng Nankina",
11732502,
"ngf-fin",
"Latn",
"Tiếng Nankina",
"Nankina",
}
m["nnl"] = {
"Northern Rengma Naga",
7067615,
"tbq-anp",
}
m["nnm"] = {
"Namia",
56363,
"paa-spk",
"Latn",
}
m["nnn"] = {
"Ngete",
56625,
"cdc-mas",
"Latn",
}
m["nnp"] = {
"tiếng Wancho",
7967085,
"sit-kch",
"Wcho, Deva, Latn",
"Tiếng Wancho",
"Wancho",
}
m["nnq"] = {
"Ngindo",
7022366,
"bnt-mbi",
"Latn",
}
m["nnr"] = {
"Narungga",
13591127,
"aus-pam",
}
m["nnt"] = {
"Nanticoke",
3915517,
"alg-eas",
"Latn",
}
m["nnu"] = {
"Dwang",
35258,
"alv-gng",
"Latn",
}
m["nnv"] = {
"Nukunu",
10604066,
}
m["nnw"] = {
"Southern Nuni",
11152248,
"nic-gnn",
"Latn",
}
m["nnx"] = {
"Ngong",
12952915,
}
m["nny"] = { -- contrast aus-ynk
"Nyangga",
10604331,
"aus-tnk",
"Latn",
}
m["nnz"] = {
"Nda'nda'",
36016,
"bai",
"Latn",
}
m["noa"] = {
"Woun Meu",
3111873,
"sai-chc",
"Latn",
}
m["noc"] = {
"Nuk",
11732534,
"ngf-fin",
"Latn",
}
m["nod"] = {
"tiếng Bắc Thái",
565110,
"tai-swe",
"Lana, Thai",
"Tiếng Bắc Thái",
"Bắc Thái",
entry_name = {remove_diacritics = c.ZWNJ},
sort_key = {
Lana = "Lana-sortkey",
Thai = "Thai-sortkey"
},
}
m["noe"] = {
"Nimadi",
3502294,
"inc-wes",
"Deva",
ancestors = "raj",
translit = "hi-translit",
}
m["nof"] = {
"Nomane",
11732531,
}
m["nog"] = {
"tiếng Nogai",
33871,
"trk-kno",
"Cyrl, Arab, Latn",
"Tiếng Nogai",
"Nogai",
translit = "nog-translit",
override_translit = true,
}
m["noh"] = {
"Nomu",
11732532,
}
m["noi"] = {
"Noiri",
12953774,
"inc-bhi",
}
m["noj"] = {
"Nonuya",
5372139,
"sai-wit",
"Latn",
}
m["nok"] = {
"Nooksack",
3343396,
}
m["nol"] = {
"Nomlaki",
3343229,
"nai-wtq",
"Latn",
}
m["nom"] = {
"Nocamán",
7046289,
"sai-pan",
"Latn",
}
m["non"] = {
"tiếng Bắc Âu cổ",
35505,
"gmq",
"Latn, Runr",
"Tiếng Bắc Âu cổ",
"Bắc Âu cổ",
translit = {Runr = "Runr-translit"},
}
m["nop"] = {
"Numanggang",
7069052,
"ngf-fin",
"Latn",
}
m["noq"] = {
"Ngongo",
11057478,
"bnt-yak",
"Latn",
}
m["nos"] = {
"Eastern Nisu",
25559419,
"tbq-nis",
}
m["not"] = {
"Nomatsiguenga",
3342992,
"awd",
"Latn",
}
m["nou"] = {
"Ewage-Notu",
5418860,
}
m["nov"] = {
"tiếng Novial",
36738,
"art",
"Latn",
"Tiếng Novial",
"Novial",
type = "appendix-constructed"
}
m["now"] = {
"Nyambo",
4967930,
"bnt-haj",
"Latn",
}
m["noy"] = {
"Noy",
36321,
"alv-bua",
}
m["noz"] = {
"Nayi",
3183349,
"omv-diz",
}
m["npa"] = {
"Nar Phu",
4926353,
"sit-tam",
}
m["npb"] = {
"Nupbikha",
3695201,
"sit-ebo",
}
m["npg"] = {
"Ponyo",
7228475,
"sit-kch",
}
m["nph"] = {
"Phom",
7187109,
"sit-kch",
}
m["npl"] = {
"Southeastern Puebla Nahuatl",
4632950,
"azc-nah",
"Latn",
}
m["npn"] = {
"Mondropolon",
3320594,
"poz-aay",
}
m["npo"] = {
"Pochuri Naga",
7206342,
"tbq-anp",
}
m["nps"] = {
"Nipsan",
11732528,
}
m["npu"] = {
"Puimei Naga",
7259044,
"sit-zem",
}
m["npy"] = {
"Napu",
12953768,
}
m["nqg"] = {
"tiếng Ede Nago",
12952408,
"alv-ede",
nil,
"Tiếng Ede Nago",
"Ede Nago",
}
m["nqk"] = {
"Kura Ede Nago",
12952409,
"alv-ede",
}
m["nql"] = {
"Ngendelengo",
63283693,
"bnt-swb",
"Latn",
}
m["nqm"] = {
"Ndom",
6983791,
"ngf",
"Latn",
}
m["nqn"] = {
"Nen",
20816352,
"paa-yam",
}
m["nqo"] = {
"N'Ko",
18546266,
"dmn-man",
"Nkoo",
}
m["nqq"] = {
"Kyan-Karyaw Naga",
63283784,
"sit-tno",
}
m["nqy"] = {
"Akyaung Ari",
4702035,
"sit-tng",
}
m["nra"] = {
"Ngom",
36087,
"bnt-kel",
"Latn",
}
m["nrb"] = {
"Nara",
36179,
"sdv-nes",
}
m["nrc"] = {
"tiếng Noreia",
37023,
"cel-con",
"Ital",
"Tiếng Noreia",
"Noreia",
translit = "Ital-translit",
}
m["nre"] = {
"Southern Rengma Naga",
7313205,
"tbq-anp",
}
m["nrf"] = {
"tiếng Norman",
33850,
"roa-oil",
"Latn",
"Tiếng Norman",
"Norman",
wikimedia_codes = "nrm",
ancestors = "frm",
sort_key = s["roa-oil-sortkey"],
}
m["nrg"] = {
"Narango",
12952929,
"poz-vnc",
}
m["nri"] = {
"Chokri Naga",
5104247,
"tbq-anp",
}
m["nrk"] = {
"Ngarla",
3915860,
"aus-nga",
"Latn",
}
m["nrl"] = {
"Ngarluma",
7022078,
"aus-nga",
"Latn",
}
m["nrm"] = {
"Narom",
3336135,
"poz-swa",
"Latn",
}
m["nrn"] = {
"Norn",
36708,
"gmq-ins",
"Latn",
}
m["nrp"] = {
"tiếng Piceni Bắc",
430138,
nil,
"Ital",
"Tiếng Piceni Bắc",
"Piceni Bắc",
translit = "Ital-translit",
}
m["nrr"] = {
"Norra",
12952967,
"tai",
}
m["nrt"] = {
"Northern Kalapuya",
3192121,
"nai-klp",
}
m["nru"] = {
"tiếng Ma Thoa",
21658869,
"sit-nas",
"Latn",
"Tiếng Ma Thoa",
"Ma Thoa",
}
m["nrx"] = {
"Ngurmbur",
2591251,
}
m["nrz"] = {
"Lala (New Guinea)",
6480151,
"poz-ocw",
}
m["nsa"] = {
"Sangtam Naga",
7418144,
"sit-aao",
}
m["nsb"] = {
"Lower Nossob",
6693681,
"khi-tuu",
"Latn",
}
m["nsc"] = {
"Nshi",
11129508,
"nic-rnn",
"Latn",
}
m["nsd"] = {
"Southern Nisu",
nil,
"tbq-nis",
}
m["nse"] = {
"Nsenga",
3081996,
"bnt-sna",
"Latn",
}
m["nsg"] = {
"Ngasa",
56345,
"sdv-lma",
}
m["nsh"] = {
"Ngoshie",
7022582,
"nic-mom",
"Latn",
}
m["nsi"] = {
"Nigerian Sign Language",
7033021,
"sgn",
}
m["nsk"] = {
"tiếng Naskapi",
1704302,
"alg",
"Cans",
"Tiếng Naskapi",
"Naskapi",
ancestors = "cr",
translit = "nsk-translit",
}
m["nsl"] = {
"Norwegian Sign Language",
1781613,
"sgn",
}
m["nsm"] = {
"Sema",
3478238,
"tbq-anp",
}
m["nsn"] = {
"Nehan",
3337774,
"poz-ocw",
}
m["nso"] = {
"tiếng Sotho Bắc",
33890,
"bnt-sts",
"Latn",
"Tiếng Sotho Bắc",
"Sotho Bắc",
}
m["nsp"] = {
"Nepalese Sign Language",
3915492,
"sgn",
}
m["nsq"] = {
"Northern Sierra Miwok",
3344226,
"nai-utn",
"Latn",
}
m["nsr"] = {
"Maritime Sign Language",
3915483,
"sgn",
}
m["nss"] = {
"Nali",
3335385,
"poz-aay",
}
m["nst"] = {
"Tangsa",
56350,
"sit-tno",
"Latn, Tnsa",
}
m["nsu"] = {
"Sierra Negra Nahuatl",
nil,
"azc-nah",
"Latn",
}
m["nsv"] = {
"Southwestern Nisu",
nil,
"tbq-nis",
}
m["nsw"] = {
"Navut",
3337327,
"poz-vnc",
}
m["nsx"] = {
"Nsongo",
7067577,
"bnt-tmb",
"Latn",
}
m["nsy"] = {
"Nasal",
6966574,
}
m["nsz"] = {
"Nisenan",
33665,
"nai-mdu",
"Latn",
}
m["ntd"] = {
"Northern Tidong",
nil,
"poz-san",
}
m["nte"] = {
"Nathembo",
11030947,
"bnt-mak",
}
m["ntg"] = {
"Ngantangarra",
33060509,
}
m["nti"] = {
"Natioro",
36140,
"alv-wan",
}
m["ntj"] = {
"Ngaanyatjarra",
3915409,
"aus-pam",
"Latn",
}
m["ntk"] = {
"Ikoma",
5996114,
"bnt-lok",
"Latn",
}
m["ntm"] = {
"tiếng Nateni",
3070731,
"nic-grm",
"Latn",
"Tiếng Nateni",
"Nateni",
}
m["nto"] = {
"Ntomba",
11130292,
"bnt-mon",
"Latn",
}
m["ntp"] = {
"tiếng Tepehuan Bắc",
15615651,
"azc",
"Latn",
"Tiếng Tepehuan Bắc",
"Tepehuan Bắc",
sort_key = {remove_diacritics = c.acute},
}
m["ntr"] = {
"Delo",
35195,
"nic-gne",
"Latn",
}
m["nts"] = {
"Natagaimas",
6967931,
}
m["ntu"] = {
"Natügu",
nil,
"poz-oce",
}
m["ntw"] = {
"Nottoway",
3344791,
"iro-nor",
}
m["ntx"] = {
"Somra",
7560536,
"sit-tng",
}
m["nty"] = {
"Mantsi",
56878,
"sit-mnz",
}
m["nua"] = {
"Yuaga",
3573088,
"poz-cln",
"Latn",
}
m["nuc"] = {
"Nukuini",
3346231,
}
m["nud"] = {
"Ngala",
7021893,
"paa-spk",
"Latn",
}
m["nue"] = {
"Ngundu",
12952953,
"bad-cnt",
"Latn",
}
m["nuf"] = {
"Nusu",
56413,
"tbq-nus",
}
m["nug"] = {
"Nungali",
7069826,
"aus-mir",
}
m["nuh"] = {
"Ndunda",
3913968,
"nic-mmb",
"Latn",
}
m["nui"] = {
"Ngumbi",
36459,
"bnt-yko",
}
m["nuj"] = {
"Nyole (Uganda)",
3739448,
"bnt-msl",
"Latn",
}
m["nuk"] = {
"tiếng Nuu-chah-nulth",
2992876,
"wak",
"Latn",
"Tiếng Nuu-chah-nulth",
"Nuu-chah-nulth",
}
m["nul"] = {
"Nusa Laut",
7070332,
"poz-cma",
}
m["num"] = {
"Niuafo'ou",
36173,
"poz-pol",
"Latn",
}
m["nun"] = {
"Anong",
2748232,
"sit-nng",
}
m["nuo"] = {
"tiếng Nguồn",
3915785,
"mkh-vie",
"Latn",
"Tiếng Nguồn",
"Nguồn",
sort_key = "vi-sortkey",
}
m["nup"] = {
"tiếng Nupe",
36720,
"alv-ngb",
"Latn",
"Tiếng Nupe",
"Nupe",
entry_name = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron},
sort_key = "nup-sortkey",
}
m["nuq"] = {
"Nukumanu",
12909019,
"poz-pnp",
}
m["nur"] = {
"Nuguria",
7068910,
"poz-pnp",
}
m["nus"] = {
"tiếng Nuer",
33675,
"sdv-dnu",
"Latn",
"Tiếng Nuer",
"Nuer",
}
m["nut"] = {
"tiếng Nùng",
72695,
"tai",
"Latn, Hani",
"Tiếng Nùng",
"Nùng",
sort_key = {Hani = "Hani-sortkey"},
}
m["nuu"] = {
"Ngbundu",
11126081,
"bad",
"Latn",
}
m["nuv"] = {
"Northern Nuni",
11016572,
"nic-gnn",
"Latn",
}
m["nuw"] = {
"Nguluwan",
6528643,
}
m["nux"] = {
"Mehek",
6809452,
"paa-spk",
"Latn",
}
m["nuy"] = {
"Nunggubuyu",
1747811,
"aus-arn",
}
m["nuz"] = {
"Tlamacazapa Nahuatl",
2073277,
"azc-nah",
"Latn",
}
m["nvh"] = {
"Nasarian",
6966614,
"poz-vnc",
}
m["nvm"] = {
"Namiae",
12952922,
}
m["nvo"] = {
"Nyokon",
nil,
"nic-mbw",
"Latn",
}
m["nwa"] = {
"Nawathinehena",
6982892,
"alg-ara",
"Latn",
}
m["nwb"] = {
"Nyabwa",
33664,
"kro-wee",
}
m["nwc"] = {
"Classical Newar",
5128301,
"sit-new",
}
m["nwe"] = {
"Ngwe",
36181,
"bai",
"Latn",
}
m["nwi"] = {
"Southwest Tanna",
3504488,
}
m["nwm"] = {
"Nyamusa-Molo",
12747951,
"csu-bbk",
}
m["nwo"] = {
"Nauo",
6981305,
"aus-pam",
"Latn",
}
m["nwr"] = {
"Nawaru",
12638166,
"ngf",
}
m["nwx"] = {
"Middle Newar",
nil,
"sit-new",
"Deva, Newa, Ranj",
ancestors = "nwc",
}
m["nwy"] = {
"Nottoway-Meherrin",
nil,
"iro-nor",
}
m["nxa"] = {
"Nauete",
6981095,
"poz-tim",
}
m["nxd"] = {
"Ngando (Congo)",
3913277,
"bnt-ske",
}
m["nxe"] = {
"Nage",
2295569,
"poz-cet",
}
m["nxg"] = {
"tiếng Ngadha",
1516651,
"poz-cet",
"Latn",
"Tiếng Ngadha",
"Ngadha",
}
m["nxi"] = {
"Nindi",
7038230,
"bnt-mbi",
"Latn",
}
m["nxl"] = {
"South Nuaulu",
18544857,
"poz-cma",
}
m["nxm"] = {
"tiếng Numidia",
35761,
"afa",
"Tfng, Latn", --Tfng may not support all the needed characters
"Tiếng Numidia",
"Numidia",
translit = {Tfng = "Tfng-translit"},
}
m["nxn"] = {
"Ngawun",
3915711,
"aus-pam",
"Latn",
}
m["nxo"] = {
"Ndambomo",
6983681,
"bnt-kel",
"Latn",
}
m["nxq"] = {
"tiếng Nạp Tây",
2478711,
"sit-nas",
"Nkdb, Nkgb, Latn, Lisu",
"Tiếng Nạp Tây",
"Nạp Tây",
translit = {Lisu = "Lisu-translit"},
sort_key = {Lisu = s["Lisu-sortkey"]},
}
m["nxr"] = {
"Ninggerum",
11732526,
"ngf-okk",
"Latn",
}
m["nxu"] = {
"Narau",
6965452,
"ngf",
"Latn",
}
m["nxx"] = {
"Nafri",
6958211,
"paa-sen",
"Latn",
}
m["nyb"] = {
"Nyangbo",
36256,
"alv-ktg",
"Latn",
}
m["nyc"] = {
"Nyanga-li",
7070876,
"bnt-boa",
"Latn",
}
m["nyd"] = {
"Nyole (Kenya)",
7071227,
"bnt-msl",
"Latn",
}
m["nye"] = {
"Nyengo",
7071068,
"bnt-clu",
"Latn",
}
m["nyf"] = {
"Giryama",
3107606,
"bnt-mij",
"Latn",
}
m["nyg"] = {
"Nyindu",
11030685,
"bnt-shh",
"Latn",
}
m["nyh"] = {
"Nyigina",
3913780,
"aus-nyu",
"Latn",
}
m["nyi"] = {
"Nyimang",
34846,
"sdv-nyi",
"Latn",
}
m["nyj"] = {
"Nyanga (Congo)",
7070879,
"bnt-nyb",
"Latn",
}
m["nyk"] = {
"Nyaneka",
10962298,
"bnt-swb",
"Latn",
}
m["nyl"] = {
"tiếng Nyeu",
3033578,
"mkh-kat",
"Thai, Khmr, Laoo",
"Tiếng Nyeu",
"Nyeu",
}
m["nym"] = {
"Nyamwezi",
4121131,
"bnt-tkm",
"Latn",
}
m["nyn"] = {
"Nyankole",
13207,
"bnt-nyg",
"Latn",
}
m["nyo"] = {
"tiếng Nyoro",
33794,
"bnt-nyg",
"Latn",
"Tiếng Nyoro",
"Nyoro",
}
m["nyp"] = {
"Nyang'i",
7070894,
"ssa-klk",
}
m["nys"] = {
"tiếng Nyunga",
7049771,
"aus-pam",
"Latn",
"Tiếng Nyunga",
"Nyunga",
}
m["nyt"] = {
"Nyawaygi",
3915783,
"aus-dyb",
}
m["nyu"] = {
"Nyungwe",
7071318,
"bnt-sna",
"Latn",
}
m["nyv"] = {
"Nyulnyul",
3442732,
"aus-nyu",
"Latn",
}
m["nyw"] = {
"tiếng Nyaw",
26425602,
"tai",
"Thai, Latn, Tayo", -- Vietnamese alphabet
"Tiếng Nyaw",
"Nyaw",
sort_key = "Thai-sortkey", -- no effect on Latn
}
m["nyx"] = {
"Nganyaywana",
3913800,
"aus-cww",
"Latn",
}
m["nyy"] = {
"Nyakyusa",
3272620,
"bnt-run",
"Latn",
}
m["nza"] = {
"Tigon Mbembe",
36518,
"nic-jkn",
"Latn",
}
m["nzb"] = {
"Njebi",
35923,
"bnt-nze",
"Latn",
}
m["nzd"] = {
"tiếng Nzadi",
17152586,
"bnt-bdz",
"Latn",
"Tiếng Nzadi",
"Nzadi",
entry_name = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.caron},
}
m["nzi"] = {
"Nzima",
36337,
"alv-ctn",
}
m["nzk"] = {
"Nzakara",
3913339,
"znd",
"Latn",
}
m["nzm"] = {
"Zeme Naga",
21491053,
"sit-zem",
}
m["nzs"] = {
"New Zealand Sign Language",
36239,
"sgn",
}
m["nzu"] = {
"Central Teke",
36473,
"bnt-tkc",
}
m["nzy"] = {
"Nzakambay",
36374,
"alv-mbm",
"Latn",
}
m["nzz"] = {
"Nanga Dama Dogon",
6963443,
"nic-nwa",
}
return require("Module:languages").finalizeData(m, "language")
893vivfd268rqj9gwpvpl97fc2me1c6
Mô đun:languages/data/3/t
828
260866
2350228
2348336
2026-05-05T06:13:35Z
TheHighFighter2
42988
2350228
Scribunto
text/plain
local m_langdata = require("Module:languages/data")
-- Loaded on demand, as it may not be needed (depending on the data).
local function u(...)
u = require("Module:string utilities").char
return u(...)
end
local c = m_langdata.chars
local p = m_langdata.puaChars
local s = m_langdata.shared
local m = {}
m["taa"] = {
"tiếng Hạ Tanana",
28565,
"ath-nor",
"Latn",
"Tiếng Hạ Tanana",
"Hạ Tanana",
}
m["tab"] = {
"tiếng Tabasaran",
34079,
"cau-esm",
"Cyrl, Latn, Arab",
"Tiếng Tabasaran",
"Tabasaran",
translit = "tab-translit",
override_translit = true,
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
entry_name = {
Cyrl = s["cau-Cyrl-entryname"],
Latn = s["cau-Latn-entryname"],
},
sort_key = "tab-sortkey",
}
m["tac"] = {
"Lowland Tarahumara",
15616384,
"azc-trc",
"Latn",
}
m["tad"] = {
"tiếng Tause",
2356440,
"paa-lkp",
"Latn",
"Tiếng Tause",
"Tause",
}
m["tae"] = {
"tiếng Tariana",
732726,
"awd-nwk",
"Latn",
"Tiếng Tariana",
"Tariana",
}
m["taf"] = {
"tiếng Tapirapé",
7684673,
"tup-gua",
"Latn",
"Tiếng Tapirapé",
"Tapirapé",
}
m["tag"] = {
"tiếng Tagoi",
36537,
"nic-ras",
"Latn",
"Tiếng Tagoi",
"Tagoi",
}
m["taj"] = {
"tiếng Tamang Đông",
12953177,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
"Tiếng Tamang Đông",
"Tamang Đông",
}
m["tak"] = {
"tiếng Tala",
3914494,
"cdc-wst",
"Latn",
"Tiếng Tala",
"Tala",
}
m["tal"] = {
"tiếng Tal",
3440387,
"cdc-wst",
"Latn",
"Tiếng Tal",
"Tal",
}
m["tan"] = {
"Tangale",
529921,
"cdc-wst",
"Latn",
}
m["tao"] = {
"tiếng Yami",
715760,
"phi",
"Latn",
"Tiếng Yami",
"Yami",
}
m["tap"] = {
"tiếng Taabwa",
7673650,
"bnt-sbi",
"Latn",
"Tiếng Taabwa",
"Taabwa",
}
m["tar"] = {
"Central Tarahumara",
20090009,
"azc-trc",
"Latn",
sort_key = {remove_diacritics = c.acute .. "ꞌ"},
}
m["tas"] = {
"tiếng Tây Bồi",
2233794,
"crp",
"Latn",
ancestors = "fr",
sort_key = s["roa-oil-sortkey"],
"Tiếng Tây Bồi",
"Tây Bồi",
}
m["tau"] = {
"Upper Tanana",
28281,
"ath-nor",
"Latn",
}
m["tav"] = {
"tiếng Tatuyo",
2524007,
"sai-tuc",
"Latn",
"Tiếng Tatuyo",
"Tatuyo",
}
m["taw"] = {
"Tai",
7675861,
"ngf-mad",
"Latn",
}
m["tax"] = {
"tiếng Tamki",
3449082,
"cdc-est",
"Latn",
"Tiếng Tamki",
"Tamki",
}
m["tay"] = {
"tiếng Atayal",
715766,
"map-ata",
"Latn",
"Tiếng Atayal",
"Atayal",
}
m["taz"] = {
"tiếng Tocho",
36680,
"alv-tal",
"Latn",
"Tiếng Tocho",
"Tocho",
}
m["tba"] = {
"Aikanã",
3409307,
"qfa-iso",
}
m["tbb"] = {
"Tapeba",
12953908,
}
m["tbc"] = {
"Takia",
3514336,
"poz-oce",
}
m["tbd"] = {
"tiếng Kaki Ae",
6349417,
"poz-ocw",
"Latn",
"Tiếng Kaki Ae",
"Kaki Ae",
}
m["tbe"] = {
"tiếng Tanimbili",
3515188,
"poz-oce",
"Latn",
"Tiếng Tanimbili",
"Tanimbili",
}
m["tbf"] = {
"tiếng Mandara",
3285424,
"poz-ocw",
"Latn",
"Tiếng Mandara",
"Mandara"
}
m["tbg"] = {
"North Tairora",
20210398,
"paa-kag",
}
m["tbh"] = {
"Thurawal",
3537135,
"aus-yuk",
}
m["tbi"] = {
"Gaam",
35338,
"sdv-eje",
"Latn",
}
m["tbj"] = {
"tiếng Tiang",
3528020,
"poz-ocw",
"Latn",
"Tiếng Tiang",
"Tiang",
}
m["tbk"] = {
"tiếng Tagbanwa Calamian",
3915487,
"phi-kal",
"Latn",
"Tiếng Tagbanwa Calamian",
"Tagbanwa Calamian",
}
m["tbl"] = {
"Tboli",
7690594,
"phi",
}
m["tbm"] = {
"Tagbu",
7675188,
"nic-ser",
}
m["tbn"] = {
"Barro Negro Tunebo",
12953943,
"cba",
}
m["tbo"] = {
"Tawala",
7689206,
"poz-ocw",
"Latn",
}
m["tbp"] = {
"Taworta",
7689337,
"paa-lkp",
"Latn",
}
m["tbr"] = {
"Tumtum",
3407029,
"qfa-kad",
}
m["tbs"] = {
"Tanguat",
7683166,
"paa",
"Latn",
}
m["tbt"] = {
"Kitembo",
13123561,
"bnt-shh",
"Latn",
}
m["tbu"] = {
"Tubar",
56730,
"azc-trc",
"Latn",
}
m["tbv"] = {
"Tobo",
7811712,
"ngf",
}
m["tbw"] = {
"Tagbanwa",
3915475,
"phi",
"Latn",
}
m["tbx"] = {
"Kapin",
6366665,
"poz-ocw",
"Latn",
}
m["tby"] = {
"Tabaru",
11732670,
"paa-nha",
}
m["tbz"] = {
"tiếng Tammari",
35186,
"nic-eov",
"Latn",
"Tiếng Tammari",
"Tammari",
}
m["tca"] = {
"Ticuna",
1815205,
"sai-tyu",
"Latn",
}
m["tcb"] = {
"Tanacross",
28268,
"ath-nor",
"Latn",
}
m["tcc"] = {
"Datooga",
35327,
"sdv-nis",
"Latn",
}
m["tcd"] = {
"tiếng Tafi",
36545,
"alv-ktg",
"Latn",
"Tiếng Tafi",
"Tafi",
}
m["tce"] = {
"Southern Tutchone",
31091048,
"ath-nor",
"Latn",
}
m["tcf"] = {
"Malinaltepec Tlapanec",
25559732,
"omq",
"Latn",
}
m["tcg"] = {
"Tamagario",
7680531,
"ngf",
}
m["tch"] = {
"Turks and Caicos Creole English",
7855478,
"crp",
"Latn",
ancestors = "en",
}
m["tci"] = {
"Wára",
20825638,
"paa-yam",
}
m["tck"] = {
"Tchitchege",
36595,
"bnt-tek",
}
m["tcl"] = {
"Taman (Myanmar)",
15616518,
"sit-jnp",
"Latn",
}
m["tcm"] = {
"Tanahmerah",
3514927,
"ngf",
}
m["tco"] = {
"tiếng Taungyo",
12953186,
"tbq-brm",
"Mymr",
"Tiếng Taungyo",
"Taungyo",
ancestors = "obr",
}
m["tcp"] = {
"Tawr Chin",
7689338,
"tbq-kuk",
}
m["tcq"] = {
"Kaiy",
6348709,
"paa-lkp",
}
m["tcs"] = {
"Torres Strait Creole",
36648,
"crp",
"Latn",
ancestors = "en",
}
m["tct"] = {
"T'en",
3442330,
"qfa-kms",
}
m["tcu"] = {
"Southeastern Tarahumara",
36807,
"azc-trc",
"Latn",
}
m["tcw"] = {
"Tecpatlán Totonac",
7692795,
"nai-ttn",
"Latn",
}
m["tcx"] = {
"tiếng Toda",
34042,
"dra-tkt",
"Taml",
"Tiếng Toda",
"Toda",
}
m["tcy"] = {
"tiếng Tulu",
34251,
"dra-tlk",
"Tutg, Mlym, Knda", -- Tigalari is not available. Mlym is nearer than Knda but both lack ɛ/ɛː.
"Tiếng Tulu",
"Tulu",
translit = {
Mlym = "ml-translit",
Knda = "kn-translit",
},
}
m["tcz"] = {
"Thado Chin",
6583558,
"tbq-kuk",
}
m["tda"] = {
"tiếng Tagdal",
36570,
"son",
"Latn, Tfng",
"Tiếng Tagdal",
"Tagdal",
translit = {Tfng = "Tfng-translit"},
}
m["tdb"] = {
"tiếng Panchpargania",
21946879,
"inc-eas",
"Deva, as-Beng, Orya, Chis",
"Tiếng Panchpargania",
"Panchpargania",
ancestors = "bh",
}
m["tdc"] = {
"tiếng Emberá-Tadó",
3052041,
"sai-chc",
"Latn",
"Tiếng Emberá-Tadó",
"Emberá-Tadó",
}
m["tdd"] = {
"tiếng Thái Na",
36556,
"tai-swe",
"Tale",
"Tiếng Thái Na",
"Thái Na",
translit = "Tale-translit",
entry_name = {remove_diacritics = c.ZWNJ .. c.ZWJ},
}
m["tde"] = {
"Tiranige Diga Dogon",
5313387,
"nic-dgw",
}
m["tdf"] = {
"Talieng",
37525108,
"mkh-ban",
}
m["tdg"] = {
"tiếng Tamang Tây",
12953178,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
"Tiếng Tamang Tây",
"Tamang Tây",
}
m["tdh"] = {
"Thulung",
56553,
"sit-kiw",
}
m["tdi"] = {
"Tomadino",
7818197,
"poz-btk",
"Latn",
}
m["tdj"] = {
"Tajio",
7676870,
"poz",
}
m["tdk"] = {
"Tambas",
3440392,
"cdc-wst",
}
m["tdl"] = {
"Sur",
3914453,
"nic-tar",
}
m["tdm"] = {
"Taruma",
nil,
}
m["tdn"] = {
"Tondano",
3531514,
"phi",
}
m["tdo"] = {
"Teme",
3913994,
"alv-mye",
}
m["tdq"] = {
"Tita",
3914899,
"nic-bco",
}
m["tdr"] = {
"tiếng Tơ Đrá",
7812881,
"mkh-nbn",
"Latn",
"Tiếng Tơ Đrá",
"Tơ Đrá"
}
m["tds"] = {
"Doutai",
5302331,
"paa-lkp",
}
m["tdt"] = {
"Tetun Dili",
12643484,
"crp",
"Latn",
ancestors = "tet",
}
m["tdu"] = {
"Tempasuk Dusun",
3529155,
"poz-san",
}
m["tdv"] = {
"Toro",
3438367,
"nic-alu",
}
m["tdy"] = {
"tiếng Tadyawan",
7674700,
"phi",
"Latn",
"Tiếng Tadyawan",
"Tadyawan"
}
m["tea"] = {
"tiếng Temiar",
3914693,
"mkh-asl",
"Latn",
"Tiếng Temiar",
"Temiar",
}
m["teb"] = {
"Tetete",
7706087,
"sai-tuc",
"Latn",
}
m["tec"] = {
"Terik",
3518379,
"sdv-nma",
}
m["ted"] = {
"Tepo Krumen",
11152243,
"kro-grb",
}
m["tee"] = {
"Huehuetla Tepehua",
56455,
"nai-ttn",
}
m["tef"] = {
"tiếng Teressa",
3518362,
"aav-nic",
"Deva, Latn",
"Tiếng Teressa",
"Teressa",
}
m["teg"] = {
"Teke-Tege",
36478,
"bnt-tek",
}
m["teh"] = {
"Tehuelche",
33930,
"sai-cho",
"Latn",
}
m["tei"] = {
"Torricelli",
3450788,
"qfa-tor",
}
m["tek"] = {
"Ibali Teke",
2802914,
"bnt-tek",
}
m["tem"] = {
"Temne",
36613,
"alv-mel",
}
m["ten"] = {
"Tama (Colombia)",
3832969,
"sai-tuc",
"Latn",
}
m["teo"] = {
"Ateso",
29474,
"sdv-ttu",
"Latn",
}
m["tep"] = {
"Tepecano",
3915525,
"azc",
"Latn",
}
m["teq"] = {
"Temein",
7698064,
"sdv",
}
m["ter"] = {
"Tereno",
3314742,
"awd",
"Latn",
}
m["tes"] = {
"tiếng Tengger",
12473479,
"poz",
"Latn",
"Tiếng Tengger",
"Tengger",
}
m["tet"] = {
"tiếng Tetum",
34125,
"poz-tim",
"Latn",
"Tiếng Tetum",
"Tetum",
}
m["teu"] = {
"Soo",
3437607,
"ssa-klk",
}
m["tev"] = {
"Teor",
12953198,
"poz-cma",
}
m["tew"] = {
"Tewa",
56492,
"nai-kta",
"Latn",
}
m["tex"] = {
"Tennet",
56346,
"sdv",
}
m["tey"] = {
"Tulishi",
12911106,
"qfa-kad",
"Latn",
}
m["tez"] = {
"tiếng Tetserret",
7706841,
"ber",
"Latn, Tfng",
"Tiếng Tetserret",
"Tetserret",
translit = {Tfng = "Tfng-translit"},
}
m["tfi"] = {
"Tofin Gbe",
3530330,
"alv-pph",
}
m["tfn"] = {
"Dena'ina",
27785,
"ath-nor",
"Latn",
}
m["tfo"] = {
"Tefaro",
7694618,
"paa-egb",
"Latn",
}
m["tfr"] = {
"tiếng Teribe",
36533,
"cba",
"Latn",
"Tiếng Teribe",
"Teribe",
}
m["tft"] = {
"tiếng Ternate",
3518492,
"paa-nha",
"Latn, Arab",
"Tiếng Ternate",
"Ternate",
}
m["tga"] = {
"Sagalla",
12953082,
"bnt-cht",
}
m["tgb"] = {
"Tobilung",
12953913,
"poz-san",
}
m["tgc"] = {
"Tigak",
3528276,
"poz-ocw",
}
m["tgd"] = {
"Ciwogai",
3438799,
"cdc-wst",
}
m["tge"] = {
"tiếng Tamang Gorkha Đông",
12953175,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
"Tiếng Tamang Gorkha Đông",
"Tamang Gorkha Đông",
}
m["tgf"] = {
"Chali",
3695197,
"sit-ebo",
"Tibt, Latn",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
m["tgh"] = {
"Tobagonian Creole English",
7811541,
"crp",
ancestors = "en",
}
m["tgi"] = {
"Lawunuia",
3219937,
"poz-ocw",
}
m["tgn"] = {
"Tandaganon",
nil,
"phi",
}
m["tgo"] = {
"Sudest",
7675351,
"poz-ocw",
}
m["tgp"] = {
"Tangoa",
2410276,
"poz-vnc",
"Latn",
}
m["tgq"] = {
"Tring",
7842360,
"poz-swa",
}
m["tgr"] = {
"Tareng",
25559541,
"mkh",
}
m["tgs"] = {
"Nume",
3346290,
"poz-vnc",
}
m["tgt"] = {
"Central Tagbanwa",
3915515,
"phi",
"Tagb",
}
m["tgu"] = {
"Tanggu",
7682930,
"paa",
"Latn",
}
m["tgv"] = {
"Tingui-Boto",
7808195,
"sai-mje",
"Latn",
}
m["tgw"] = {
"Tagwana Senoufo",
36514,
"alv-tdj",
}
m["tgx"] = {
"Tagish",
28064,
"ath-nor",
"Latn",
}
m["tgy"] = {
"Togoyo",
36825,
"nic-ser",
}
m["thc"] = {
"Tai Hang Tong",
7675753,
"tai-nor",
}
m["thd"] = {
"Kuuk Thaayorre",
6448718,
"aus-pmn",
"Latn",
}
m["the"] = {
"Chitwania Tharu",
22083804,
"inc-eas",
}
m["thf"] = {
"Thangmi",
7710314,
"sit-new",
}
m["thh"] = {
"Northern Tarahumara",
15616395,
"azc-trc",
"Latn",
}
m["thi"] = {
"Tai Long",
25559562,
"tai-swe",
}
m["thk"] = {
"Tharaka",
15407179,
"bnt-kka",
}
m["thl"] = {
"Dangaura Tharu",
22083815,
"inc-eas",
}
m["thm"] = {
"tiếng Thavưng",
34780,
"mkh-vie",
"Thai", --Laoo is feasible but no evidence yet.
"Tiếng Thavưng",
"Thavưng",
sort_key = "Thai-sortkey",
}
m["thn"] = {
"tiếng Thachanad",
7708880,
"dra-mal",
"Mlym",
"Tiếng Thachanad",
"Thachanad",
translit ="ml-translit",
}
m["thp"] = {
"tiếng Thompson",
1755054,
"sal",
"Latn",
"Tiếng Thompson",
"Thompson",
}
m["thq"] = {
"Kochila Tharu",
22083826,
"inc-eas",
}
m["thr"] = {
"Rana Tharu",
12953920,
"inc-eas",
}
m["ths"] = {
"Thakali",
7709348,
"sit-tam",
}
m["tht"] = {
"Tahltan",
30125,
"ath-nor",
"Latn",
}
m["thu"] = {
"Thuri",
7799291,
"sdv-lon",
}
m["thy"] = {
"Tha",
3915849,
"alv-bwj",
}
m["tic"] = {
"Tira",
36677,
"alv-hei",
}
m["tif"] = {
"Tifal",
11732691,
"ngf-okk",
}
m["tig"] = {
"tiếng Tigre",
34129,
"sem-eth",
"Ethi, Arab",
"Tiếng Tigre",
"Tigre",
translit = {Ethi = "Ethi-translit"},
}
m["tih"] = {
"Timugon Murut",
7807680,
"poz-san",
}
m["tii"] = {
"Tiene",
36469,
"bnt-tek",
}
m["tij"] = {
"Tilung",
7803037,
"sit-kiw",
}
m["tik"] = {
"Tikar",
36483,
"nic-bdn",
"Latn",
}
m["til"] = {
"Tillamook",
2109432,
"sal",
}
m["tim"] = {
"Timbe",
7804599,
"ngf",
}
m["tin"] = {
"tiếng Tindi",
36860,
"cau-and",
"Cyrl",
"Tiếng Tindi",
"Tindi",
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
entry_name = {Cyrl = s["cau-Cyrl-entryname"]},
}
m["tio"] = {
"Teop",
3518239,
"poz-ocw",
}
m["tip"] = {
"Trimuris",
7842270,
"paa-tkw",
}
m["tiq"] = {
"Tiéfo",
3914874,
"alv-sav",
}
m["tis"] = {
"Masadiit Itneg",
18748769,
"phi",
}
m["tit"] = {
"Tinigua",
3029805,
}
m["tiu"] = {
"Adasen",
11214797,
"phi",
}
m["tiv"] = {
"Tiv",
34131,
"nic-tvc",
"Latn",
}
m["tiw"] = {
"tiếng Tiwi",
1656014,
"qfa-iso",
"Latn",
"Tiếng Tiwi",
"Tiwi",
}
m["tix"] = {
"Southern Tiwa",
7570552,
"nai-kta",
"Latn",
}
m["tiy"] = {
"tiếng Tiruray",
7809425,
"phi",
"Latn",
"Tiếng Tiruray",
"Tiruray",
}
m["tiz"] = {
"Tai Hongjin",
3915716,
"tai-swe",
}
m["tja"] = {
"Tajuasohn",
3915326,
"kro-wkr",
}
m["tjg"] = {
"Tunjung",
3542117,
"poz",
}
m["tji"] = {
"tiếng Thổ Gia Bắc",
12953229,
"sit-tja",
"Latn",
"Tiếng Thổ Gia Bắc",
"Thổ Gia Bắc",
}
m["tjl"] = {
"tiếng Thái Lai",
7675773,
"tai-swe",
"Mymr",
"Tiếng Thái Lai",
"Thái Lai",
}
m["tjm"] = {
"Timucua",
638300,
"qfa-iso",
}
m["tjn"] = {
"Tonjon",
3913372,
"dmn-jje",
}
m["tjs"] = {
"tiếng Thổ Gia Nam",
12633994,
"sit-tja",
"Latn",
"Tiếng Thổ Gia Nam",
"Thổ Gia Nam",
}
m["tju"] = {
"Tjurruru",
3913834,
"aus-nga",
"Latn",
}
m["tjw"] = {
"Chaap Wuurong",
5285187,
"aus-pam",
"Latn",
}
m["tka"] = {
"Truká",
7847648,
}
m["tkb"] = {
"Buksa",
20983638,
"inc-eas",
}
m["tkd"] = {
"Tukudede",
36863,
"poz-tim",
"Latn",
}
m["tke"] = {
"Takwane",
11030092,
"bnt-mak",
ancestors = "vmw",
}
m["tkf"] = {
"Tukumanféd",
42330115,
"tup-gua",
"Latn",
}
m["tkl"] = {
"tiếng Tokelau",
34097,
"poz-pnp",
"Latn",
"Tiếng Tokelau",
"Tokelau",
}
m["tkm"] = {
"Takelma",
56710,
}
m["tkn"] = {
"tiếng Tokunoshima",
3530484,
"jpx-nry",
"Jpan",
"Tiếng Tokunoshima",
"Tokunoshima",
translit = s["jpx-translit"],
display_text = s["jpx-displaytext"],
entry_name = s["jpx-entryname"],
sort_key = s["jpx-sortkey"],
}
m["tkp"] = {
"Tikopia",
36682,
"poz-pnp",
"Latn",
}
m["tkq"] = {
"Tee",
3075144,
"nic-ogo",
"Latn",
}
m["tkr"] = {
"tiếng Tsakhur",
36853,
"cau-wsm",
"Cyrl, Latn, Arab",
"Tiếng Tsakhur",
"Tsakhur",
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
entry_name = {
Cyrl = s["cau-Cyrl-entryname"],
Latn = s["cau-Latn-entryname"],
},
}
m["tks"] = {
"Ramandi",
25261947,
"xme-ttc",
ancestors = "xme-ttc-sou",
}
m["tkt"] = {
"Kathoriya Tharu",
22083822,
"inc-eas",
}
m["tku"] = {
"Upper Necaxa Totonac",
56343,
"nai-ttn",
"Latn",
}
m["tkv"] = {
"Mur Pano",
nil,
"poz-ocw",
"Latn",
}
m["tkw"] = {
"Teanu",
3516731,
"poz-oce",
"Latn",
}
m["tkx"] = {
"Tangko",
7682993,
"ngf-okk",
}
m["tkz"] = {
"Takua",
7678544,
"mkh",
}
m["tla"] = {
"Southwestern Tepehuan",
3518245,
"azc",
"Latn",
}
m["tlb"] = {
"Tobelo",
1142333,
"paa-nha",
}
m["tlc"] = {
"Misantla Totonac",
56460,
"nai-ttn",
"Latn",
}
m["tld"] = {
"Talaud",
7678964,
"phi",
}
m["tlf"] = {
"Telefol",
7696150,
"ngf-okk",
}
m["tlg"] = {
"Tofanma",
4461493,
"paa-pau",
}
m["tlh"] = {
"tiếng Klingon",
10134,
"art",
"Latn",
"Tiếng Klingon",
"Klingon",
type = "appendix-constructed",
}
m["tli"] = {
"tiếng Tlingit",
27792,
"xnd",
"Latn, Cyrl",
"Tiếng Tlingit",
"Tlingit",
}
m["tlj"] = {
"Talinga-Bwisi",
7679530,
"bnt-haj",
}
m["tlk"] = {
"Taloki",
3514563,
"poz-btk",
}
m["tll"] = {
"Tetela",
2613465,
"bnt-tet",
}
m["tlm"] = {
"Tolomako",
3130514,
"poz-vnc",
}
m["tln"] = {
"Talondo'",
7680293,
"poz-ssw",
}
m["tlo"] = {
"Talodi",
36525,
"alv-tal",
}
m["tlp"] = {
"Filomena Mata-Coahuitlán Totonac",
5449202,
"nai-ttn",
"Latn",
}
m["tlq"] = {
"tiếng Tai Loi",
7675784,
"mkh-pal",
nil,
"Tiếng Tai Loi",
"Tai Loi"
}
m["tlr"] = {
"Talise",
3514510,
"poz-sls",
}
m["tls"] = {
"Tambotalo",
7681065,
"poz-vnc",
}
m["tlt"] = {
"Teluti",
12953194,
"poz-cma",
}
m["tlu"] = {
"Tulehu",
7852006,
"poz-cma",
}
m["tlv"] = {
"Taliabu",
3514498,
"poz-cma",
"Latn",
}
m["tlx"] = {
"Khehek",
3196124,
"poz-aay",
}
m["tly"] = {
"tiếng Talysh",
34318,
"xme-ttc",
"Latn, Cyrl, fa-Arab",
"Tiếng Talysh",
"Talysh",
}
m["tma"] = {
"Tama (Chad)",
57001,
"sdv-tmn",
}
m["tmb"] = {
"Avava",
2157461,
"poz-vnc",
}
m["tmc"] = {
"Tumak",
3121045,
"cdc-est",
}
m["tmd"] = {
"Haruai",
12632146,
"ngf-mad",
}
m["tme"] = {
"Tremembé",
5246937,
}
m["tmf"] = {
"Toba-Maskoy",
3033544,
"sai-mas",
"Latn",
}
m["tmg"] = {
"Ternateño",
7232597,
}
m["tmh"] = {
"tiếng Tuareg",
34065,
"ber",
"Latn, Tfng, Arab",
"Tiếng Tuareg",
"Tuareg",
entry_name = {remove_diacritics = c.grave .. c.acute .. c.circ},
}
m["tmi"] = {
"Tutuba",
7857052,
"poz-vnc",
}
m["tmj"] = {
"Samarokena",
7408865,
"paa-tkw",
}
m["tmk"] = {
"Northwestern Tamang",
15616509,
"sit-tam",
"sit-tam-Tibt, Deva",
display_text = {["sit-tam-Tibt"] = s["Tibt-displaytext"]},
entry_name = {["sit-tam-Tibt"] = s["Tibt-entryname"]},
}
m["tml"] = {
"Tamnim Citak",
12643315,
"ngf",
}
m["tmm"] = {
"Tai Thanh",
7675842,
"tai-swe",
}
m["tmn"] = {
"Taman (Indonesia)",
7680671,
"poz",
"Latn",
}
m["tmo"] = {
"tiếng Temoq",
7698205,
"mkh-asl",
"Latn",
"Tiếng Temoq",
"Temoq"
}
m["tmq"] = {
"Tumleo",
7852641,
"poz-ocw",
}
m["tms"] = {
"Tima",
36684,
"nic-ktl",
}
m["tmt"] = {
"Tasmate",
7687571,
"poz-vnc",
}
m["tmu"] = {
"Iau",
56867,
"paa-lkp",
}
m["tmv"] = {
"Motembo",
11013108,
"bnt-bun",
}
m["tmy"] = {
"Tami",
3514812,
"poz-oce",
}
m["tmz"] = {
"Tamanaku",
3441435,
"sai-ven",
"Latn",
}
m["tna"] = {
"Tacana",
3182551,
"sai-tac",
"Latn",
}
m["tnb"] = {
"Western Tunebo",
3181238,
"cba",
}
m["tnc"] = {
"Tanimuca-Retuarã",
36535,
"sai-tuc",
"Latn",
}
m["tnd"] = {
"Angosturas Tunebo",
25559604,
"cba",
}
m["tne"] = {
"Tinoc Kallahan",
3192219,
}
m["tng"] = {
"Tobanga",
3440501,
"cdc-est",
}
m["tnh"] = {
"Maiani",
6735243,
"ngf-mad",
"Latn",
}
m["tni"] = {
"Tandia",
7682454,
"poz-hce",
"Latn",
}
m["tnk"] = {
"Kwamera",
3200806,
"poz-oce",
}
m["tnl"] = {
"Lenakel",
3229429,
"poz-oce",
}
m["tnm"] = {
"Tabla",
7673105,
"paa-sen",
}
m["tnn"] = {
"North Tanna",
957945,
"poz-oce",
}
m["tno"] = {
"Toromono",
510544,
"sai-tac",
"Latn",
}
m["tnp"] = {
"Whitesands",
3063761,
"poz-oce",
}
m["tnq"] = {
"tiếng Taíno",
5232952,
"awd-taa",
"Latn",
"Tiếng Taíno",
"Taíno",
}
m["tnr"] = {
"Bedik",
35096,
"alv-ten",
}
m["tns"] = {
"Tenis",
7699870,
"poz-ocw",
}
m["tnt"] = {
"Tontemboan",
3531666,
"phi",
"Latn",
}
m["tnu"] = {
"Tay Khang",
6362363,
"tai",
}
m["tnv"] = {
"tiếng Tanchangya",
7682361,
"inc-eas",
"Cakm, Beng",
"Tiếng Tanchangya",
"Tanchangya",
ancestors = "inc-obn",
}
m["tnw"] = {
"Tonsawang",
3531660,
"phi",
}
m["tnx"] = {
"Tanema",
2106984,
"poz-oce",
}
m["tny"] = {
"Tongwe",
7821200,
"bnt",
}
m["tnz"] = {
"tiếng Ten'edn",
3073453,
"mkh-asl",
"Latn",
"Tiếng Ten'edn",
"Ten'edn",
}
m["tob"] = {
"Toba",
3113756,
"sai-guc",
"Latn",
}
m["toc"] = {
"Coyutla Totonac",
15615591,
"nai-ttn",
"Latn",
}
m["tod"] = {
"tiếng Toma",
11055484,
"dmn-msw",
"Latn, Loma",
"Tiếng Toma",
"Toma",
}
m["tof"] = {
"Gizrra",
5565941,
}
m["tog"] = {
"Tonga (Malawi)",
3847648,
"bnt-nys",
"Latn",
}
m["toh"] = {
"Tonga (Mozambique)",
7820988,
"bnt-bso",
}
m["toi"] = {
"Tonga (Zambia)",
34101,
"bnt-bot",
}
m["toj"] = {
"Tojolabal",
36762,
"myn",
}
m["tok"] = {
"tiếng Toki Pona",
36846,
"art",
"Latn",
"Tiếng Toki Pona",
"Toki Pona",
type = "appendix-constructed",
}
m["tol"] = {
"Tolowa",
20827,
"ath-pco",
"Latn",
}
m["tom"] = {
"Tombulu",
3531199,
"phi",
}
m["too"] = {
"Xicotepec de Juárez Totonac",
8044353,
"nai-ttn",
"Latn",
}
m["top"] = {
"tiếng Totonac Papantla",
56329,
"nai-ttn",
"Latn",
"Tiếng Totonac Papantla",
"Totonac Papantla",
}
m["toq"] = {
"Toposa",
3033588,
"sdv-ttu",
}
m["tor"] = {
"Togbo-Vara Banda",
11002922,
"bad-cnt",
}
m["tos"] = {
"tiếng Totonac cao nguyên",
13154149,
"nai-ttn",
"Latn",
"Tiếng Totonac cao nguyên",
"Totonac cao nguyên",
}
m["tou"] = {
"tiếng Thổ",
22694631,
"mkh-vie",
nil,
"Tiếng Thổ",
"Thổ",
}
m["tov"] = {
"Upper Taromi",
12953183,
"xme-ttc",
ancestors = "xme-ttc-cen",
}
m["tow"] = {
"tiếng Jemez",
3912876,
"nai-kta",
"Latn",
"Tiếng Jemez",
"Jemez",
}
m["tox"] = {
"tiếng Tobi",
34022,
"poz-mic",
nil,
"Tiếng Tobi",
"Tobi",
}
m["toy"] = {
"Topoiyo",
7824977,
"poz-kal",
}
m["toz"] = {
"To",
7811216,
"alv-mbm",
}
m["tpa"] = {
"Taupota",
7688832,
"poz-ocw",
}
m["tpc"] = {
"tiếng Me'phaa Azoyú",
25559730,
"omq",
"Latn",
"Tiếng Me'phaa Azoyú",
"Me'phaa Azoyú",
}
m["tpe"] = {
"tiếng Tippera",
16115423,
"tbq-bdg",
"Latn, Beng",
"Tiếng Tippera",
"Tippera",
}
m["tpf"] = {
"Tarpia",
12953185,
"poz-ocw",
}
m["tpg"] = {
"Kula",
6442714,
"qfa-tap",
}
m["tpi"] = {
"tiếng Tok Pisin",
34159,
"crp",
"Latn",
"Tiếng Tok Pisin",
"Tok Pisin",
ancestors = "en",
}
m["tpj"] = {
"Tapieté",
3121063,
}
m["tpk"] = {
"Tupinikin",
33924,
"tup-gua",
}
m["tpl"] = {
"Tlacoapa Me'phaa",
16115511,
"omq",
}
m["tpm"] = {
"Tampulma",
36590,
"nic-gnw",
}
m["tpn"] = {
"tiếng Tupi",
31528147,
"tup-gua",
"Latn",
"Tiếng Tupi",
"Tupi",
}
m["tpo"] = {
"tiếng Thái Hàng Tổng",
7675795,
"tai-nor",
"Latn",
"Tiếng Thái Hàng Tổng",
"Thái Hàng Tổng"
}
m["tpp"] = {
"Pisaflores Tepehua",
56349,
"nai-ttn",
}
m["tpq"] = {
"Tukpa",
12953230,
"sit-las",
}
m["tpr"] = {
"Tuparí",
3542217,
"tup",
"Latn",
}
m["tpt"] = {
"tiếng Tepehua Tlachichilco",
56330,
"nai-ttn",
nil,
"Tiếng Tepehua Tlachichilco",
"Tepehua Tlachichilco",
}
m["tpu"] = {
"tiếng Tampuan",
3514882,
"mkh-ban",
"Khmr",
"Tiếng Tampuan",
"Tampuan",
}
m["tpv"] = {
"Tanapag",
3397371,
"poz-mic",
}
m["tpw"] = {
"tiếng Tupi cổ",
56944,
"tup-gua",
"Latn",
"Tiếng Tupi cổ",
"Tupi cổ",
}
m["tpx"] = {
"tiếng Me'phaa Acatepec",
31157882,
"omq",
"Latn",
}
m["tpy"] = {
"Trumai",
12294279,
"qfa-iso",
}
m["tpz"] = {
"Tinputz",
3529205,
"poz-ocw",
}
m["tqb"] = {
"Tembé",
10322157,
"tup-gua",
"Latn",
}
m["tql"] = {
"Lehali",
3229119,
"poz-oce",
}
m["tqm"] = {
"Turumsa",
7856508,
"paa",
}
m["tqn"] = {
"Tenino",
15699255,
"nai-shp",
"Latn",
ancestors = "nai-spt",
}
m["tqo"] = {
"Toaripi",
7811403,
"ngf",
}
m["tqp"] = {
"Tomoip",
3531388,
"poz-ocw",
}
m["tqq"] = {
"tiếng Tunni",
3514343,
"cus-som",
nil,
"Tiếng Tunni",
"Tunni",
}
m["tqr"] = {
"Torona",
36679,
"alv-tal",
}
m["tqt"] = {
"Western Totonac",
7116691,
"nai-ttn",
"Latn",
}
m["tqu"] = {
"Touo",
56750,
}
m["tqw"] = {
"tiếng Tonkawa",
2454881,
"qfa-iso",
"Latn",
"Tiếng Tonkawa",
"Tonkawa",
}
m["tra"] = {
"Tirahi",
3812406,
"inc-koh",
}
m["trb"] = {
"Terebu",
7701797,
"poz-ocw",
}
m["trc"] = {
"Copala Triqui",
12953935,
"omq-tri",
"Latn",
}
m["trd"] = {
"Turi",
7854914,
"mun",
}
m["tre"] = {
"East Tarangan",
18609750,
"poz",
}
m["trf"] = {
"Trinidadian Creole English",
7842493,
"crp",
ancestors = "en",
}
m["trg"] = {
"Lishán Didán",
56473,
"sem-nna",
}
m["trh"] = {
"Turaka",
12953237,
"ngf",
}
m["tri"] = {
"tiếng Trió",
56885,
"sai-tar",
"Latn",
"Tiếng Trió",
"Trió",
}
m["trj"] = {
"Toram",
3441225,
"cdc-est",
}
m["trl"] = {
"Traveller Scottish",
3915671,
"crp",
"Latn",
ancestors = "sco, rom",
}
m["trm"] = {
"Tregami",
34081,
"nur-sou",
}
m["trn"] = {
"Trinitario",
3539279,
"awd",
}
m["tro"] = {
"Tarao",
3515603,
"tbq-kuk",
"Latn",
}
m["trp"] = {
"tiếng Kok Borok",
35947,
"tbq-bdg",
"Beng, Latn",
"Tiếng Kok Borok",
"Kok Borok",
}
m["trq"] = {
"tiếng Triqui San Martín Itunyoso",
12953934,
"omq-tri",
"Latn",
"Tiếng Triqui San Martín Itunyoso",
"Triqui San Martín Itunyoso",
}
m["trr"] = {
"Taushiro",
1957508,
}
m["trs"] = {
"tiếng Triqui Chicahuaxtla",
3539587,
"omq-tri",
"Latn",
"Tiếng Triqui Chicahuaxtla",
"Triqui Chicahuaxtla",
}
m["trt"] = {
"Tunggare",
615071,
"paa-egb",
"Latn",
}
m["tru"] = {
"tiếng Turoyo",
34040,
"sem-cna",
"Syrc, Latn",
"Tiếng Turoyo",
"Turoyo",
entry_name = "Syrc-entryname",
translit = "tru-translit",
}
m["trv"] = {
"tiếng Truku",
716686,
"map-ata",
"Latn",
"Tiếng Truku",
"Truku",
}
m["trw"] = {
"tiếng Torwali",
2665246,
"inc-koh",
"ur-Arab",
"Tiếng Torwali",
"Torwali",
}
m["trx"] = {
"Tringgus",
7842365,
"day",
}
m["try"] = {
"Turung",
7856514,
"tai-swe",
"as-Beng",
}
m["trz"] = {
"Torá",
7827518,
"sai-cpc",
}
m["tsa"] = {
"Tsaangi",
36675,
"bnt-nze",
}
m["tsb"] = {
"tiếng Tsamai",
2371358,
"cus-eas",
"Latn",
"Tiếng Tsamai",
"Tsamai",
}
m["tsc"] = {
"Tswa",
2085051,
"bnt-tsr",
}
m["tsd"] = {
"tiếng Tsakonia",
220607,
"grk",
"Grek",
"Tiếng Tsakonia",
"Tsakonia",
ancestors = "grc-dor",
translit = "el-translit",
entry_name = {remove_diacritics = c.caron .. c.diaerbelow .. c.brevebelow},
sort_key = s["Grek-sortkey"],
}
m["tse"] = {
"Tunisian Sign Language",
7853191,
"sgn",
}
m["tsf"] = {
"Southwestern Tamang",
12953176,
"sit-tam",
}
m["tsg"] = {
"tiếng Tausug",
34142,
"phi",
"Latn, Arab",
"Tiếng Tausug",
"Tausug",
}
m["tsh"] = {
"Tsuvan",
3502326,
"cdc-cbm",
}
m["tsi"] = {
"tiếng Tsimshian",
20085721,
"nai-tsi",
"Latn",
"Tiếng Tsimshian",
"Tsimshian",
}
m["tsj"] = {
"tiếng Tshangla",
36840,
"sit-tsk",
"Tibt, Latn, Deva",
"Tiếng Tshangla",
"Tshangla",
translit = {Tibt = "Tibt-translit"},
override_translit = true,
display_text = {Tibt = s["Tibt-displaytext"]},
entry_name = {Tibt = s["Tibt-entryname"]},
sort_key = {Tibt = "Tibt-sortkey"},
}
m["tsl"] = {
"Ts'ün-Lao",
3446675,
"tai",
}
m["tsm"] = {
"Turkish Sign Language",
36885,
"sgn",
}
m["tsp"] = {
"Northern Toussian",
11155635,
"alv-sav",
}
m["tsq"] = {
"Thai Sign Language",
7709156,
"sgn",
"Sgnw",
}
m["tsr"] = {
"Akei",
2828964,
"poz-vnc",
}
m["tss"] = {
"Taiwan Sign Language",
34019,
"sgn-jsl",
}
m["tsu"] = {
"tiếng Tsou",
716681,
"map-tsu",
"Latn",
"Tiếng Tsou",
"Tsou",
}
m["tsv"] = {
"Tsogo",
36674,
"bnt-tso",
}
m["tsw"] = {
"Tsishingini",
13123571,
"nic-kam",
}
m["tsx"] = {
"Mubami",
6930815,
"ngf",
}
m["tsy"] = {
"Tebul Sign Language",
7692090,
"sgn",
}
m["tta"] = {
"Tutelo",
2311602,
"sio-ohv",
}
m["ttb"] = {
"Gaa",
3438361,
"nic-dak",
}
m["ttc"] = {
"Tektiteko",
36686,
"myn",
}
m["ttd"] = {
"Tauade",
7688634,
}
m["tte"] = {
"Bwanabwana",
5003667,
"poz-ocw",
"Latn",
}
m["ttf"] = {
"Tuotomb",
7853459,
"nic-mbw",
"Latn",
}
m["ttg"] = {
"Tutong",
3507990,
"poz-swa",
"Latn",
}
m["tth"] = {
"tiếng Tà Ôi Thượng",
3512660,
"mkh-kat",
"Latn",
"Tiếng Tà Ôi Thượng",
"Tà Ôi Thượng"
}
m["tti"] = {
"Tobati",
7811556,
"poz-ocw",
"Latn",
}
m["ttj"] = {
"tiếng Tooro",
7824218,
"bnt-nyg",
"Latn",
"Tiếng Tooro",
"Tooro",
}
m["ttk"] = {
"Totoro",
3532756,
"sai-bar",
"Latn",
}
m["ttl"] = {
"Totela",
10962316,
"bnt-bot",
"Latn",
}
m["ttm"] = {
"Northern Tutchone",
20822,
"ath-nor",
"Latn",
}
m["ttn"] = {
"Towei",
7829606,
"paa-pau",
}
m["tto"] = {
"Lower Ta'oih",
25559539,
"mkh-kat",
}
m["ttp"] = {
"Tombelala",
6799663,
"poz-kal",
}
m["ttr"] = {
"Tera",
56267,
"cdc-cbm",
}
m["tts"] = {
"tiếng Isan",
33417,
"tai-swe",
"Thai",
"Tiếng Isan",
"Isan",
sort_key = "Thai-sortkey",
}
m["ttt"] = {
"tiếng Tat",
56489,
"ira-swi",
"Cyrl, Latn, Armn, fa-Arab",
"Tiếng Tat",
"Tat",
ancestors = "fa",
}
m["ttu"] = {
"Torau",
3532208,
"poz-ocw",
}
m["ttv"] = {
"Titan",
3445811,
"poz-aay",
}
m["ttw"] = {
"Long Wat",
7856961,
"poz-swa",
}
m["tty"] = {
"Sikaritai",
7513600,
"paa-lkp",
}
m["ttz"] = {
"Tsum",
12953223,
"sit-kyk",
}
m["tua"] = {
"Wiarumus",
7998045,
"qfa-tor",
"Latn",
}
m["tub"] = {
"Tübatulabal",
56704,
"azc",
"Latn",
}
m["tuc"] = {
"Mutu",
3331003,
"poz-ocw",
"Latn",
}
m["tud"] = {
"Tuxá",
7857217,
}
m["tue"] = {
"Tuyuca",
2520538,
"sai-tuc",
"Latn",
}
m["tuf"] = {
"Central Tunebo",
12953942,
"cba",
}
m["tug"] = {
"Tunia",
863721,
"alv-bua",
}
m["tuh"] = {
"Taulil",
3516141,
"paa-bng",
}
m["tui"] = {
"Tupuri",
36646,
"alv-mbm",
"Latn",
}
m["tuj"] = {
"Tugutil",
12953228,
"paa-nha"
}
m["tul"] = {
"Tula",
3914907,
"alv-wjk",
}
m["tum"] = {
"tiếng Tumbuka",
34138,
"bnt-nys",
"Latn",
"Tiếng Tumbuka",
"Tumbuka",
}
m["tun"] = {
"tiếng Tunica",
56619,
"qfa-iso",
"Latn",
"Tiếng Tunica",
"Tunica",
}
m["tuo"] = {
"Tucano",
3541834,
"sai-tuc",
"Latn",
}
m["tuq"] = {
"Tedaga",
36639,
"ssa-sah",
}
m["tus"] = {
"Tuscarora",
36944,
"iro-nor",
"Latn",
}
m["tuu"] = {
"Tututni",
20627,
"ath-pco",
"Latn",
}
m["tuv"] = {
"Turkana",
36958,
"sdv-ttu",
"Latn",
}
m["tux"] = {
"Tuxináwa",
7857204,
"sai-pan",
"Latn",
}
m["tuy"] = {
"Tugen",
3541935,
"sdv-nma",
}
m["tuz"] = {
"Turka",
36643,
"nic-gur",
"Latn",
}
m["tva"] = {
"Vaghua",
3553248,
"poz-ocw",
"Latn",
}
m["tvd"] = {
"Tsuvadi",
3914936,
"nic-kam",
}
m["tve"] = {
"Te'un",
7690709,
"poz-cet",
"Latn",
}
m["tvk"] = {
"Southeast Ambrym",
252411,
"poz-vnc",
"Latn",
}
m["tvl"] = {
"tiếng Tuvalu",
34055,
"poz-pnp",
"Latn",
"Tiếng Tuvalu",
"Tuvalu",
}
m["tvm"] = {
"Tela-Masbuar",
7695666,
"poz-tim",
}
m["tvn"] = {
"tiếng Tavoy",
7689158,
"tbq-brm",
"Mymr",
"Tiếng Tavoy",
"Tavoy",
ancestors = "obr",
}
m["tvo"] = {
"Tidore",
3528199,
"paa-nha",
"Latn, Arab",
}
m["tvs"] = {
"Taveta",
15632387,
"bnt-par",
}
m["tvt"] = {
"Tutsa Naga",
7856987,
"sit-tno",
}
m["tvu"] = {
"Tunen",
36632,
"nic-mbw",
}
m["tvw"] = {
"Sedoa",
7445362,
"poz-kal",
}
m["tvx"] = {
"tiếng Taivoan",
1975271,
"map",
"Latn",
"Tiếng Taivoan",
"Taivoan",
}
m["tvy"] = {
"Timor Pidgin",
4904029,
"crp",
ancestors = "pt",
}
m["twa"] = {
"Twana",
7857412,
"sal",
}
m["twb"] = {
"Western Tawbuid",
12953912,
"phi",
}
m["twc"] = {
"Teshenawa",
3436597,
"phi",
}
m["twe"] = {
"Teiwa",
3519302,
"ngf",
"Latn",
}
m["twf"] = {
"tiếng Taos",
7684320,
"nai-kta",
"Latn",
"Tiếng Taos",
"Taos",
}
m["twg"] = {
"Tereweng",
12953200,
"qfa-tap",
}
m["twh"] = {
"tiếng Thái Trắng",
7675751,
"tai-swe",
"Tavt",
"Tiếng Thái Trắng",
"Thái Trắng",
--translit = "Tavt-translit",
sort_key = {
from = {"[꪿ꫀ꫁ꫂ]", "([ꪵꪶꪹꪻꪼ])([ꪀ-ꪯ])"},
to = {"", "%2%1"}
},
}
m["twm"] = {
"Tawang Monpa",
36586,
"sit-ebo",
"Tibt",
translit = "Tibt-translit",
override_translit = true,
display_text = s["Tibt-displaytext"],
entry_name = s["Tibt-entryname"],
sort_key = "Tibt-sortkey",
}
m["twn"] = {
"Twendi",
7857682,
"nic-mmb",
}
m["two"] = {
"Tswapong",
3446241,
"bnt-sts",
}
m["twp"] = {
"Ere",
3056045,
"poz-aay",
"Latn",
}
m["twq"] = {
"tiếng Tasawaq",
36564,
"son",
"Latn",
"Tiếng Tasawaq",
"Tasawaq",
}
m["twr"] = {
"Southwestern Tarahumara",
12953909,
"azc-trc",
"Latn",
}
m["twt"] = {
"Turiwára",
3542307,
"tup-gua",
"Latn",
}
m["twu"] = {
"Termanu",
7702572,
"poz-tim",
}
m["tww"] = {
"Tuwari",
7857159,
"paa-spk",
}
m["twy"] = {
"Tawoyan",
3513542,
"poz-bre",
}
m["txa"] = {
"Tombonuo",
7818692,
"poz-san",
}
m["txb"] = {
"tiếng Tochari B",
3199353,
"ine-toc",
"Latn",
"Tiếng Tochari B",
"Tochari B",
wikipedia_article = "Tocharian languages", -- wikidata id has no associated article
standardChars = "AaÄäĀāCcEeIiKkLlMmṂṃNnṄṅÑñOoPpRrSsŚśṢṣTtUuWwYy" .. c.punc,
}
m["txc"] = {
"Tsetsaut",
20829,
"ath-nor",
"Latn",
}
m["txe"] = {
"Totoli",
7828387,
"poz-tot",
"Latn",
}
m["txg"] = {
"tiếng Tangut",
2727930,
"sit-qia",
"Tang",
"Tiếng Tangut",
"Tangut",
translit = "txg-translit",
}
m["txj"] = {
"Tarjumo",
nil,
"ssa-sah",
"Latn, Arab",
}
m["txh"] = {
"tiếng Thracia",
36793,
"ine",
"Latn, Grek",
"Tiếng Thracia",
"Thracia",
translit = "el-translit",
}
m["txi"] = {
"Ikpeng",
9344891,
"sai-pek",
"Latn",
}
m["txm"] = {
"Tomini",
7818911,
"poz",
}
m["txn"] = {
"West Tarangan",
3515594,
"poz",
}
m["txo"] = {
"tiếng Toto",
36709,
"sit-dhi",
"Beng, Toto",
"Tiếng Toto",
"Toto",
}
m["txq"] = {
"Tii",
7801784,
"poz-tim",
}
m["txr"] = {
"Tartessian",
36795,
}
m["txs"] = {
"Tonsea",
3531659,
"phi",
}
m["txt"] = {
"Citak",
3447279,
"ngf",
}
m["txu"] = {
"tiếng Kayapó",
3101212,
"sai-nje",
"Latn",
"Tiếng Kayapó",
"Kayapó",
}
m["txx"] = {
"Tatana",
18643518,
"poz-san",
}
m["tya"] = {
"Tauya",
7688978,
"ngf-mad",
}
m["tye"] = {
"Kyenga",
3913304,
"dmn-bbu",
"Latn",
}
m["tyh"] = {
"tiếng Ơ Đu",
3347428,
"mkh-khm",
nil,
"Tiếng Ơ Đu",
"Ơ Đu",
}
m["tyi"] = {
"Teke-Tsaayi",
33123613,
"bnt-nze",
}
m["tyj"] = {
"tiếng Tay Dọ",
7675746,
"tai-nor",
"Thai, Latn, Tayo", -- Vietnamese alphabet
"Tiếng Tay Dọ",
"Tay Dọ",
}
m["tyl"] = {
"Thu Lao",
12953921,
"tai-cen",
}
m["tyn"] = {
"Kombai",
6428241,
"ngf",
}
m["typ"] = {
"Kuku-Thaypan",
3915693,
"aus-pmn",
"Latn",
}
m["tyr"] = {
"tiếng Thái Đỏ",
3915207,
"tai-swe",
"Tavt",
"Tiếng Thái Đỏ",
"Thái Đỏ",
}
m["tys"] = {
"tiếng Tày Sa Pa",
3446668,
"tai-sap",
"Latn",
"Tiếng Tày Sa Pa",
"Tày Sa Pa",
}
m["tyt"] = {
"Tày Tac",
7862029,
"tai-swe",
}
m["tyu"] = {
"Kua",
3832933,
"khi-kal",
}
m["tyv"] = {
"tiếng Tuva",
34119,
"trk-ssb",
"Cyrl",
"Tiếng Tuva",
"Tuva",
translit = "tyv-translit",
override_translit = true,
sort_key = "tyv-sortkey",
}
m["tyx"] = {
"Teke-Tyee",
36634,
"bnt-nze",
}
m["tyz"] = {
"tiếng Tày", -- This does not mean its umbrella "Tai" languages.
2511476,
"tai-tay",
"Latn, Hani",
"Tiếng Tày",
"Tày",
sort_key = {Hani = "Hani-sortkey"},
}
m["tza"] = {
"Tanzanian Sign Language",
7684177,
"sgn",
}
m["tzh"] = {
"Tzeltal",
36808,
"myn",
"Latn",
}
m["tzj"] = {
"Tz'utujil",
36941,
"myn",
"Latn",
}
m["tzl"] = {
"tiếng Talossa",
1063911,
"art",
"Latn",
"Tiếng Talossa",
"Talossa",
type = "appendix-constructed",
sort_key = "tzl-sortkey",
}
m["tzm"] = {
"tiếng Tamazight Trung Atlas",
49741,
"ber",
"Tfng, Arab, Latn",
"Tiếng Tamazight Trung Atlas",
"Tamazight Trung Atlas",
translit = "Tfng-translit",
}
m["tzn"] = {
"Tugun",
12953225,
"poz-tim",
}
m["tzo"] = {
"tiếng Tzotzil",
36809,
"myn",
"Latn",
"Tiếng Tzotzil",
"Tzotzil",
}
m["tzx"] = {
"Tabriak",
56872,
"paa-lsp",
"Latn",
}
return require("Module:languages").finalizeData(m, "language")
eob7rv88eeqh1y2s47hj07gp9dr850p
Thảo luận Thành viên:WhoAlone
3
262036
2350193
2349078
2026-05-05T03:50:21Z
Hiyuune
50834
/* Thảo luận Thành viên:P. ĐĂNG */ Đề tài mới ([[mw:c:Special:MyLanguage/User:JWBTH/CD|CD]])
2350193
wikitext
text/x-wiki
==Hoan nghênh==
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào Russian Federal Subjects! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 04:21, ngày 13 tháng 1 năm 2022 (UTC)
== Chú ý ==
Cảm ơn bạn đã đóng góp ở đây. Trước khi bạn tiếp tục đóng góp, hãy lưu ý nhưng điều sau:
*Nhiều trang bạn dùng {{tl|-dfn-}} là không đúng do bản mẫu đó dùng cho từ không thuộc bất kỳ loại từ nào. Nhưng những từ bạn tạo đều có loại từ cả như [[đăng tải]] là động từ phải dùng {{tl|-verb-}}. Vì vậy trước khi tạo mục từ phải xem kỹ loại từ nào rồi đặt bản mẫu phù hợp với từ đó.
*Nhớ xuống dòng bản mẫu, không nên để một cục như [https://vi.wiktionary.org/w/index.php?title=%C4%91%C4%83ng_t%E1%BA%A3i&oldid=2040920 thế này]. Phải xuống dòng để người ta dễ nhìn.
Mong bạn chú ý những điều trên khi tạo mục từ, cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:04, ngày 13 tháng 1 năm 2022 (UTC)
:Cảm ơn góp ý của bạn. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 11:45, ngày 13 tháng 1 năm 2022 (UTC)
== Tiếng Nga ==
Xin chào, xin hỏi biết nói tiếng Nga không? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:21, ngày 19 tháng 1 năm 2022 (UTC)
:Chào bạn, tôi hầu như không biết nói tiếng Nga nên chỉ hiểu được một vài từ cơ bản. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:23, ngày 19 tháng 1 năm 2022 (UTC)
* la caisse: [[File:La caisse.ogg]]
Cái này là Tiếng Pháp giọng Canada, em không nghe rõ, anh nghe “là kê-x” hay “là cây-x”? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:28, ngày 19 tháng 1 năm 2022 (UTC)
:Tôi nghe hơi giống "cây-x" hơn bạn nhé. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:31, ngày 19 tháng 1 năm 2022 (UTC)
::Cám ơn. Năm mới vui vẻ! [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:36, ngày 19 tháng 1 năm 2022 (UTC)
== [[Bản mẫu:*đề mục]] ==
Chào bạn. Để tránh hiện tượng lỗi tính số liệu thống kê ở trang [[Wiktionary:Thống kê]], bạn chú ý sau khi tạo đề mục ngôn ngữ, bạn nhớ thêm vào danh sách này (theo bảng chữ cái). Xin cảm ơn bạn đã giúp sức cho dự án. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 01:37, ngày 19 tháng 1 năm 2022 (UTC)
== Chú ý một chút ==
Cảm ơn bạn đã đóng góp, tuy nhiên mong bạn có thể thay dòng dầu mục từ in đậm như '''haron''' thành <code><nowiki>{{pn}}</nowiki></code> để dùng tên trang thay cho việc viết lại tên sẽ tốt hơn. Cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:11, ngày 15 tháng 2 năm 2022 (UTC)
== Thư mời tham gia biểu quyết ==
{| class="table" align="center" style="width: 80%; background-color: #FAFAD2; border: 1px solid #fceb92; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[File:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | Mời bạn cho nhận xét ở [[Thảo luận Wiktionary:Bảo quản viên|Biểu quyết bảo quản viên]] của '''[[Thành viên:Ccv2020]]''' tại '''[[Thảo_luận_Wiktionary:Bảo_quản_viên#Ccv2020|đây]]'''.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!</small>
|}[[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 00:55, ngày 23 tháng 2 năm 2022 (UTC)
== Về các mục từ Unicode tiếng Khiết Đan ==
Chào bạn. Cảm ơn bạn đã đóng góp cho mảng Unicode. Theo danh sách [[Trợ giúp:Unicode/Ảnh/Danh sách|này]], toàn bộ 470 ký tự trong khối “Khitan Small Script” đều cần {{tl|cảnh báo Unicode}} (chúng thuộc Unicode 13.0 – 2020, chưa có thiết bị nào hỗ trợ sẵn chúng, đây là một ngôn ngữ cổ). Xin lỗi vì quy định này do tôi nghĩ ra, nhưng nó cho thấy mảng Unicode cũng là một mảng quan trọng trong từ điển mở này, và chúng cũng cần phải có một hệ thống quản lý. Vì thế, phiền bạn một chút, bạn hãy thêm bản mẫu trên vào tất cả các mục từ Unicode có liên quan. Xin cảm ơn. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 08:11, ngày 20 tháng 6 năm 2022 (UTC)
== Về biển tạm nghỉ trên trang cá nhân của bạn ==
Bạn đã hoạt động trở lại rồi mà sao lại đặt biển tạm nghỉ đến ngày 13? -- [[Thành viên:Nguyên Hưng Trần|Nguyên Hưng Trần]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|thảo luận]]) 11:41, ngày 12 tháng 8 năm 2022 (UTC)
== Bảo quản viên? ==
Tôi thấy bạn khá là tích cực trong việc đóng góp trên Wiktionary và đang đứng hạng 2 về tổng số sửa đổi (trừ bot), không biết liệu bạn có đồng ý muốn ngồi vào ghế bảo quản viên hay không nên hỏi. [[Thành viên:KhanhCN Defender1st Minh|KhanhCN Defender1st Minh]] ([[Thảo luận Thành viên:KhanhCN Defender1st Minh|thảo luận]]) 16:14, ngày 20 tháng 8 năm 2022 (UTC)
== Danh từ riêng ==
Xin chào, cháu thêm [[Wilson]] rồi, mà chữ "Danh từ riêng" không có ở đó. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 19:49, ngày 30 tháng 9 năm 2022 (UTC)
:Chào bạn, nếu muốn hiện đề mục "Danh từ riêng" thì bạn dùng bản mẫu {{Liên kết bản mẫu|-pr-noun-}} thay cho {{Liên kết bản mẫu|-noun-}} nhé. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 01:23, ngày 1 tháng 10 năm 2022 (UTC)
::Viết rồi. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 12:20, ngày 1 tháng 10 năm 2022 (UTC)
== Hoặc mu hoặc mus ==
By one of the Maonan (mmd) entries, did you mean "mus" or simply "mu"? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 10:27, ngày 26 tháng 2 năm 2023 (UTC)
:It is "mus". – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 10:30, ngày 26 tháng 2 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV không? Tôi thấy bạn hiện là tv tích cực nhất của dự án. Nếu muốn gánh thêm trách nhiệm, bạn có thể tự ra ứng cử. Tôi sẽ ủng hộ và cấp quyền trong tương lai gần. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:33, ngày 19 tháng 6 năm 2023 (UTC)
:Tôi sẽ xem xét có nên làm hay không. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 14:29, ngày 19 tháng 6 năm 2023 (UTC)
::Khi bạn quyết định ra ứng cử thì nhớ tag tôi. Tôi hy vọng bạn sẽ đồng ý vác tù và hàng tổng. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 18:03, ngày 22 tháng 6 năm 2023 (UTC)
== Thư mời ==
Mời bạn cho đôi lời nhận xét tại [[Thảo luận Wiktionary:Bảo quản viên#P. %C4%90%C4%82NG|Biểu quyết chọn bảo quản viên]]. Xin hết lòng cảm ơn rất nhiều. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:42, ngày 24 tháng 8 năm 2023 (UTC)
== Chú ý ==
Khi bạn tạo bản mẫu dòng tên mục từ, chuyển tự, biến cách, tham khảo... cho các ngôn ngữ với mã ISO 639-1 thì cần phải di chuyển chúng sang mã ISO 639-2/3 nhé bạn. – [[Thành viên:Nguyên Hưng Trần|<span style="color:black; font-family:Noto Sans">'''Trần Nguyên Hưng'''</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|<sup><span style="color:#28efff">(◇)</span></sup>]] 11:19, ngày 21 tháng 10 năm 2023 (UTC)
== Thư mời ==
Chào bạn! Mời bạn cho ý kiến tại [[Thảo_luận_Wiktionary:Bảo_quản_viên#Nguyên_Hưng_Trần|Biểu quyết chọn bảo quản viên]]. Thanks bạn! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:20, ngày 30 tháng 12 năm 2023 (UTC)
== BQV ==
Tôi đã ứng cử bạn vào làm bảo quản viên tại dự án. Mời bạn vào [https://vi.wiktionary.org/wiki/Th%E1%BA%A3o_lu%E1%BA%ADn_Wiktionary:B%E1%BA%A3o_qu%E1%BA%A3n_vi%C3%AAn#WhoAlone đây] chấp nhận ứng cử. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:41, ngày 31 tháng 12 năm 2023 (UTC)
== Công cụ chống spam ==
Mời bạn vào trang [[Đặc_biệt:Trang_đặc_biệt|này]], kéo xuống đề mục "công cụ chống spam". Bạn WhoAlone nên dùng công cụ này, BQV mặc định sửa được trang đó. Dùng công cụ này sẽ tiện lợi hơn trong công tác phòng chống tên miền không mang tính đóng góp. Vì tựu chung, "phòng bệnh tốt hơn trị bệnh", dự án vốn ít người nên hạn chế rơi vào trường hợp cấm (đặc biệt đối với IP), chặn từ địa chỉ trang web spam mang lại hiệu quả hơn. Một ngày tốt lành! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 28 tháng 1 năm 2024 (UTC)
== [[Mô đun:languages/data/3]] ==
Chào bạn, hiện tại mô đun dữ liệu ngôn ngữ mà bạn đang sửa đổi (xem [https://vi.wiktionary.org/w/index.php?title=M%C3%B4_%C4%91un:languages/data/3/h&curid=272288&diff=2144810&oldid=2144615 2144810]) thì một số ngôn ngữ đã lỗi thời rồi (tức là, bên en đã chỉnh sửa lại mô đun ngôn ngữ rồi sau đó là cập nhật dữ liệu (/data/[2 hoặc 3]/[chữ đầu tiên của tên mã]) của nó). Cho nên khi bạn hỗ trợ ngôn ngữ nào thì bạn có thể chép bên en (thường là bắt đầu bằng "m["(''mã ngôn ngữ'')"]") rồi dán vào (tức là đè lên) thông tin ngôn ngữ bạn muốn nhé! – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 11:08, ngày 28 tháng 1 năm 2024 (UTC)
== Chúc mừng năm mới ==
Chúc bạn ngày lễ vui vẻ và giữ vững tinh thần tích cực, chung tay đóng góp cho cả hai dự án Wikipedia và Wiktionary ngày càng lớn mạnh. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:04, ngày 9 tháng 2 năm 2024 (UTC)
== Di chuyển tắt đổi hướng ==
Thay vì bạn di chuyển mục từ bạn tạo có tiêu đề sai sau đó xóa đổi hướng của nó thì bạn có thể tắt chức năng "Để lại trang đổi hướng" bên dưới. Làm việc này sẽ nhanh hơn là di chuyển sau đó xóa mục từ. – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 03:33, ngày 15 tháng 2 năm 2024 (UTC)
== Lùi sửa đổi ==
Chào bạn. Cho mình hỏi tại sao bạn lại lùi sửa đổi xóa dấu chấm của mình trong [[thế hệ]]. – [[Thành viên:Duchuyfootball|Duchuyfootball]] ([[Thảo luận Thành viên:Duchuyfootball|thảo luận]]) 11:07, ngày 9 tháng 2 năm 2025 (UTC)
:Có chút nhầm lẫn nhé bạn, tôi đã xem lại và xóa lại dấu chấm rồi. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 13:25, ngày 9 tháng 2 năm 2025 (UTC)
== Tiếng Moklen ==
Where in Thunder did you get the Moklen Terms in the Thai Script? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 07:37, ngày 25 tháng 3 năm 2025 (UTC)
:Here: https://scholarspace.manoa.hawaii.edu/server/api/core/bitstreams/dbe1822a-b500-4cc2-bbad-29ae56b3afb0/content – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 15:13, ngày 25 tháng 3 năm 2025 (UTC)
== IP/Dải IP ==
Tôi có ý định chia sẻ với bạn một số việc đã học được từ các thao tác bảo trì Wikipedia (cũng từ các bạn tv đã hướng dẫn tôi :D). Thực ra, cấm IP cho đến dải dường không ưu tiên trong công tác bảo quản, nên được hạn chế hình thức cấm này hết mức có thể vì IP khi bị cấm có thể nhảy liên tục (chỉ cấm khi đã là phương án cuối cùng). Nhắm vào mục đích phá hoại người dùng mới là ưu tiên (ví dụ, IP XXX phá hoại duy nhất bài XYZ, thì ưu tiên khóa bài hơn việc cấm; IP spam link thì đưa link đó là danh sách link spam, hơn là việc cấm). Các IP chỉ có duy nhất từ 1 sửa đổi, việc cấm nên là hạn chế nhất có thể. Ngoài ra, các tv trước khi bị cấm nên được nhắc nhở vì quy định của dự án là chế tài người dùng khi có hành vi lặp đi lặp lại (trừ rối + phá hoại dai dẳng). Tôi đã bỏ cấm cho IP [[Thành viên:42.114.213.20|42.114.213.20]] vì nhận thấy địa chỉ này chưa lạm dụng + nhắc nhở trước khi chế tài. Hy vọng tương lai được cộng tác cùng bạn nhiều hơn trong việc hỗ trợ bảo trì dự án. Một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:54, ngày 12 tháng 5 năm 2025 (UTC)
== Quy định mục từ tiếng Lự ==
Mặc dù ở Trung Quốc hay trong từ điển của Hanna thì mỗi âm tiết trong từ tiếng Lự đều tách ra như tiếng Việt, nhưng bên en không có mục từ nào tách âm tiết ra như vậy cả, cho nên quy định mục từ tiếng Lự ở đây cũng ghép âm tiết luôn (tôi biết là lâu rồi bạn chưa tạo mục từ tiếng Lự nào cả nhưng tôi chỉ đưa ra lời khuyên thôi). – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 17:46, ngày 27 tháng 9 năm 2025 (UTC)
== Trang thảo luận có phá hoại ==
Bác để ý chút nhé, thay vì bác tẩy trống trang thì bác vui lòng xóa luôn trang đó đi luôn ạ, để trống như vậy là vô nghĩa và có thể gây thừa thãi. Cảm ơn bác đã chú ý – [[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 14:53, ngày 23 tháng 10 năm 2025 (UTC)
== Thanh điệu tiếng Thái Trắng ==
Tôi quên nói với bạn là bản thân tiếng Thái Trắng khi viết là hầu hết các từ có dấu thanh, nhưng cái cuốn từ vựng của Đỗ Thị Tấc và Hà Mạnh Phong nó không ghi dấu thanh điệu. Nếu không để dấu thanh điệu lên các phụ âm (tô) thì có thể mỗi âm tiết sẽ phát âm với thanh ngang hoặc thanh huyền (mặc dù chuyển tự có phân biệt thanh điệu), nên khi tạo mục từ tôi nghĩ các mục từ nên để thêm dấu thanh. – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 11:45, ngày 5 tháng 11 năm 2025 (UTC)
== [[Mô đun:quote-test]] ==
Thấy bạn đang hoạt động, nhờ bạn xóa mô đun này do tạo nhầm. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 13:02, ngày 13 tháng 1 năm 2026 (UTC)
== [[MediaWiki:Rcshowhideanons]] ==
Như tôi đã nêu ở phần lý do, trang cần xóa là cả trang MediaWiki này chứ không phải chỉ xóa mỗi trang thảo luận. – [[Thành viên:Nvdtn19|Nvdtn19]] ([[Thảo luận Thành viên:Nvdtn19|thảo luận]]) 08:17, ngày 16 tháng 1 năm 2026 (UTC)
== You may be an eligible candidate for the U4C election ==
<div lang="en" dir="ltr" class="mw-content-ltr">
Greetings,
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] seeks candidates for the 2026 election. The U4C is the global committee responsible for overseeing enforcement of the [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct|Universal Code of Conduct]]. Elections are held annually, if elected a committee member serves for two years.
This year the U4C requires candidates to hold administrator rights on at least one wiki, which is why you are being contacted as you appear to hold this right. There are other requirements, such as candidates must be at least 18 years old and may not be employed by the Wikimedia Foundation or other related chapters and affiliates. You can find more information in the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026#Call_for_Candidates|call for candidates on Meta-wiki]]. Additionally, the committee's working language is English; some ability to communicate in English is required.
The election opens on 18 May, if you are eligible and interested you have until 10 May to submit your candidacy. There will be a week in between for candidates to answer questions from the community. Voting takes place privately in [[m:Special:MyLanguage/SecurePoll|SecurePoll]], successful candidates must receive at least 60% support. More information is available on [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026|the 2026 Elections page]], including timelines and other candidacy information. If you read over the material and consider yourself qualified, please consider submitting your name to run for the committee. If you think someone else in your community might be interested and qualified, please encourage them to run.
In partnership with the U4C -- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 20:17, ngày 28 tháng 4 năm 2026 (UTC) </div>
<!-- Tin nhắn của Thành viên:Keegan (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=User:Keegan_(WMF)/test&oldid=30472541 -->
== [[Thảo luận Thành viên:P. ĐĂNG]] ==
Nhờ bạn bán khóa trang thảo luận thành viên này 3 tháng do rối phá bĩnh. [[User:Hiyuune|<span style="font-family: Segoe UI Light;color:#FF69B4;letter-spacing:">Linh Huynh</span>]] ([[User talk:Hiyuune|<span style="color:#008080;">talk</span>]]) 03:50, ngày 5 tháng 5 năm 2026 (UTC)
92oxo0cxp9l1rn5944m0xiv6zaoongb
2350240
2350193
2026-05-05T06:44:28Z
PANG450p
61185
/* Thảo luận Thành viên:P. ĐĂNG */
2350240
wikitext
text/x-wiki
==Hoan nghênh==
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào Russian Federal Subjects! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 04:21, ngày 13 tháng 1 năm 2022 (UTC)
== Chú ý ==
Cảm ơn bạn đã đóng góp ở đây. Trước khi bạn tiếp tục đóng góp, hãy lưu ý nhưng điều sau:
*Nhiều trang bạn dùng {{tl|-dfn-}} là không đúng do bản mẫu đó dùng cho từ không thuộc bất kỳ loại từ nào. Nhưng những từ bạn tạo đều có loại từ cả như [[đăng tải]] là động từ phải dùng {{tl|-verb-}}. Vì vậy trước khi tạo mục từ phải xem kỹ loại từ nào rồi đặt bản mẫu phù hợp với từ đó.
*Nhớ xuống dòng bản mẫu, không nên để một cục như [https://vi.wiktionary.org/w/index.php?title=%C4%91%C4%83ng_t%E1%BA%A3i&oldid=2040920 thế này]. Phải xuống dòng để người ta dễ nhìn.
Mong bạn chú ý những điều trên khi tạo mục từ, cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:04, ngày 13 tháng 1 năm 2022 (UTC)
:Cảm ơn góp ý của bạn. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 11:45, ngày 13 tháng 1 năm 2022 (UTC)
== Tiếng Nga ==
Xin chào, xin hỏi biết nói tiếng Nga không? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:21, ngày 19 tháng 1 năm 2022 (UTC)
:Chào bạn, tôi hầu như không biết nói tiếng Nga nên chỉ hiểu được một vài từ cơ bản. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:23, ngày 19 tháng 1 năm 2022 (UTC)
* la caisse: [[File:La caisse.ogg]]
Cái này là Tiếng Pháp giọng Canada, em không nghe rõ, anh nghe “là kê-x” hay “là cây-x”? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:28, ngày 19 tháng 1 năm 2022 (UTC)
:Tôi nghe hơi giống "cây-x" hơn bạn nhé. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:31, ngày 19 tháng 1 năm 2022 (UTC)
::Cám ơn. Năm mới vui vẻ! [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:36, ngày 19 tháng 1 năm 2022 (UTC)
== [[Bản mẫu:*đề mục]] ==
Chào bạn. Để tránh hiện tượng lỗi tính số liệu thống kê ở trang [[Wiktionary:Thống kê]], bạn chú ý sau khi tạo đề mục ngôn ngữ, bạn nhớ thêm vào danh sách này (theo bảng chữ cái). Xin cảm ơn bạn đã giúp sức cho dự án. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 01:37, ngày 19 tháng 1 năm 2022 (UTC)
== Chú ý một chút ==
Cảm ơn bạn đã đóng góp, tuy nhiên mong bạn có thể thay dòng dầu mục từ in đậm như '''haron''' thành <code><nowiki>{{pn}}</nowiki></code> để dùng tên trang thay cho việc viết lại tên sẽ tốt hơn. Cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:11, ngày 15 tháng 2 năm 2022 (UTC)
== Thư mời tham gia biểu quyết ==
{| class="table" align="center" style="width: 80%; background-color: #FAFAD2; border: 1px solid #fceb92; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[File:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | Mời bạn cho nhận xét ở [[Thảo luận Wiktionary:Bảo quản viên|Biểu quyết bảo quản viên]] của '''[[Thành viên:Ccv2020]]''' tại '''[[Thảo_luận_Wiktionary:Bảo_quản_viên#Ccv2020|đây]]'''.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!</small>
|}[[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 00:55, ngày 23 tháng 2 năm 2022 (UTC)
== Về các mục từ Unicode tiếng Khiết Đan ==
Chào bạn. Cảm ơn bạn đã đóng góp cho mảng Unicode. Theo danh sách [[Trợ giúp:Unicode/Ảnh/Danh sách|này]], toàn bộ 470 ký tự trong khối “Khitan Small Script” đều cần {{tl|cảnh báo Unicode}} (chúng thuộc Unicode 13.0 – 2020, chưa có thiết bị nào hỗ trợ sẵn chúng, đây là một ngôn ngữ cổ). Xin lỗi vì quy định này do tôi nghĩ ra, nhưng nó cho thấy mảng Unicode cũng là một mảng quan trọng trong từ điển mở này, và chúng cũng cần phải có một hệ thống quản lý. Vì thế, phiền bạn một chút, bạn hãy thêm bản mẫu trên vào tất cả các mục từ Unicode có liên quan. Xin cảm ơn. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 08:11, ngày 20 tháng 6 năm 2022 (UTC)
== Về biển tạm nghỉ trên trang cá nhân của bạn ==
Bạn đã hoạt động trở lại rồi mà sao lại đặt biển tạm nghỉ đến ngày 13? -- [[Thành viên:Nguyên Hưng Trần|Nguyên Hưng Trần]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|thảo luận]]) 11:41, ngày 12 tháng 8 năm 2022 (UTC)
== Bảo quản viên? ==
Tôi thấy bạn khá là tích cực trong việc đóng góp trên Wiktionary và đang đứng hạng 2 về tổng số sửa đổi (trừ bot), không biết liệu bạn có đồng ý muốn ngồi vào ghế bảo quản viên hay không nên hỏi. [[Thành viên:KhanhCN Defender1st Minh|KhanhCN Defender1st Minh]] ([[Thảo luận Thành viên:KhanhCN Defender1st Minh|thảo luận]]) 16:14, ngày 20 tháng 8 năm 2022 (UTC)
== Danh từ riêng ==
Xin chào, cháu thêm [[Wilson]] rồi, mà chữ "Danh từ riêng" không có ở đó. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 19:49, ngày 30 tháng 9 năm 2022 (UTC)
:Chào bạn, nếu muốn hiện đề mục "Danh từ riêng" thì bạn dùng bản mẫu {{Liên kết bản mẫu|-pr-noun-}} thay cho {{Liên kết bản mẫu|-noun-}} nhé. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 01:23, ngày 1 tháng 10 năm 2022 (UTC)
::Viết rồi. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 12:20, ngày 1 tháng 10 năm 2022 (UTC)
== Hoặc mu hoặc mus ==
By one of the Maonan (mmd) entries, did you mean "mus" or simply "mu"? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 10:27, ngày 26 tháng 2 năm 2023 (UTC)
:It is "mus". – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 10:30, ngày 26 tháng 2 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV không? Tôi thấy bạn hiện là tv tích cực nhất của dự án. Nếu muốn gánh thêm trách nhiệm, bạn có thể tự ra ứng cử. Tôi sẽ ủng hộ và cấp quyền trong tương lai gần. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:33, ngày 19 tháng 6 năm 2023 (UTC)
:Tôi sẽ xem xét có nên làm hay không. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 14:29, ngày 19 tháng 6 năm 2023 (UTC)
::Khi bạn quyết định ra ứng cử thì nhớ tag tôi. Tôi hy vọng bạn sẽ đồng ý vác tù và hàng tổng. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 18:03, ngày 22 tháng 6 năm 2023 (UTC)
== Thư mời ==
Mời bạn cho đôi lời nhận xét tại [[Thảo luận Wiktionary:Bảo quản viên#P. %C4%90%C4%82NG|Biểu quyết chọn bảo quản viên]]. Xin hết lòng cảm ơn rất nhiều. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:42, ngày 24 tháng 8 năm 2023 (UTC)
== Chú ý ==
Khi bạn tạo bản mẫu dòng tên mục từ, chuyển tự, biến cách, tham khảo... cho các ngôn ngữ với mã ISO 639-1 thì cần phải di chuyển chúng sang mã ISO 639-2/3 nhé bạn. – [[Thành viên:Nguyên Hưng Trần|<span style="color:black; font-family:Noto Sans">'''Trần Nguyên Hưng'''</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|<sup><span style="color:#28efff">(◇)</span></sup>]] 11:19, ngày 21 tháng 10 năm 2023 (UTC)
== Thư mời ==
Chào bạn! Mời bạn cho ý kiến tại [[Thảo_luận_Wiktionary:Bảo_quản_viên#Nguyên_Hưng_Trần|Biểu quyết chọn bảo quản viên]]. Thanks bạn! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:20, ngày 30 tháng 12 năm 2023 (UTC)
== BQV ==
Tôi đã ứng cử bạn vào làm bảo quản viên tại dự án. Mời bạn vào [https://vi.wiktionary.org/wiki/Th%E1%BA%A3o_lu%E1%BA%ADn_Wiktionary:B%E1%BA%A3o_qu%E1%BA%A3n_vi%C3%AAn#WhoAlone đây] chấp nhận ứng cử. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:41, ngày 31 tháng 12 năm 2023 (UTC)
== Công cụ chống spam ==
Mời bạn vào trang [[Đặc_biệt:Trang_đặc_biệt|này]], kéo xuống đề mục "công cụ chống spam". Bạn WhoAlone nên dùng công cụ này, BQV mặc định sửa được trang đó. Dùng công cụ này sẽ tiện lợi hơn trong công tác phòng chống tên miền không mang tính đóng góp. Vì tựu chung, "phòng bệnh tốt hơn trị bệnh", dự án vốn ít người nên hạn chế rơi vào trường hợp cấm (đặc biệt đối với IP), chặn từ địa chỉ trang web spam mang lại hiệu quả hơn. Một ngày tốt lành! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 28 tháng 1 năm 2024 (UTC)
== [[Mô đun:languages/data/3]] ==
Chào bạn, hiện tại mô đun dữ liệu ngôn ngữ mà bạn đang sửa đổi (xem [https://vi.wiktionary.org/w/index.php?title=M%C3%B4_%C4%91un:languages/data/3/h&curid=272288&diff=2144810&oldid=2144615 2144810]) thì một số ngôn ngữ đã lỗi thời rồi (tức là, bên en đã chỉnh sửa lại mô đun ngôn ngữ rồi sau đó là cập nhật dữ liệu (/data/[2 hoặc 3]/[chữ đầu tiên của tên mã]) của nó). Cho nên khi bạn hỗ trợ ngôn ngữ nào thì bạn có thể chép bên en (thường là bắt đầu bằng "m["(''mã ngôn ngữ'')"]") rồi dán vào (tức là đè lên) thông tin ngôn ngữ bạn muốn nhé! – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 11:08, ngày 28 tháng 1 năm 2024 (UTC)
== Chúc mừng năm mới ==
Chúc bạn ngày lễ vui vẻ và giữ vững tinh thần tích cực, chung tay đóng góp cho cả hai dự án Wikipedia và Wiktionary ngày càng lớn mạnh. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:04, ngày 9 tháng 2 năm 2024 (UTC)
== Di chuyển tắt đổi hướng ==
Thay vì bạn di chuyển mục từ bạn tạo có tiêu đề sai sau đó xóa đổi hướng của nó thì bạn có thể tắt chức năng "Để lại trang đổi hướng" bên dưới. Làm việc này sẽ nhanh hơn là di chuyển sau đó xóa mục từ. – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 03:33, ngày 15 tháng 2 năm 2024 (UTC)
== Lùi sửa đổi ==
Chào bạn. Cho mình hỏi tại sao bạn lại lùi sửa đổi xóa dấu chấm của mình trong [[thế hệ]]. – [[Thành viên:Duchuyfootball|Duchuyfootball]] ([[Thảo luận Thành viên:Duchuyfootball|thảo luận]]) 11:07, ngày 9 tháng 2 năm 2025 (UTC)
:Có chút nhầm lẫn nhé bạn, tôi đã xem lại và xóa lại dấu chấm rồi. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 13:25, ngày 9 tháng 2 năm 2025 (UTC)
== Tiếng Moklen ==
Where in Thunder did you get the Moklen Terms in the Thai Script? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 07:37, ngày 25 tháng 3 năm 2025 (UTC)
:Here: https://scholarspace.manoa.hawaii.edu/server/api/core/bitstreams/dbe1822a-b500-4cc2-bbad-29ae56b3afb0/content – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 15:13, ngày 25 tháng 3 năm 2025 (UTC)
== IP/Dải IP ==
Tôi có ý định chia sẻ với bạn một số việc đã học được từ các thao tác bảo trì Wikipedia (cũng từ các bạn tv đã hướng dẫn tôi :D). Thực ra, cấm IP cho đến dải dường không ưu tiên trong công tác bảo quản, nên được hạn chế hình thức cấm này hết mức có thể vì IP khi bị cấm có thể nhảy liên tục (chỉ cấm khi đã là phương án cuối cùng). Nhắm vào mục đích phá hoại người dùng mới là ưu tiên (ví dụ, IP XXX phá hoại duy nhất bài XYZ, thì ưu tiên khóa bài hơn việc cấm; IP spam link thì đưa link đó là danh sách link spam, hơn là việc cấm). Các IP chỉ có duy nhất từ 1 sửa đổi, việc cấm nên là hạn chế nhất có thể. Ngoài ra, các tv trước khi bị cấm nên được nhắc nhở vì quy định của dự án là chế tài người dùng khi có hành vi lặp đi lặp lại (trừ rối + phá hoại dai dẳng). Tôi đã bỏ cấm cho IP [[Thành viên:42.114.213.20|42.114.213.20]] vì nhận thấy địa chỉ này chưa lạm dụng + nhắc nhở trước khi chế tài. Hy vọng tương lai được cộng tác cùng bạn nhiều hơn trong việc hỗ trợ bảo trì dự án. Một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:54, ngày 12 tháng 5 năm 2025 (UTC)
== Quy định mục từ tiếng Lự ==
Mặc dù ở Trung Quốc hay trong từ điển của Hanna thì mỗi âm tiết trong từ tiếng Lự đều tách ra như tiếng Việt, nhưng bên en không có mục từ nào tách âm tiết ra như vậy cả, cho nên quy định mục từ tiếng Lự ở đây cũng ghép âm tiết luôn (tôi biết là lâu rồi bạn chưa tạo mục từ tiếng Lự nào cả nhưng tôi chỉ đưa ra lời khuyên thôi). – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 17:46, ngày 27 tháng 9 năm 2025 (UTC)
== Trang thảo luận có phá hoại ==
Bác để ý chút nhé, thay vì bác tẩy trống trang thì bác vui lòng xóa luôn trang đó đi luôn ạ, để trống như vậy là vô nghĩa và có thể gây thừa thãi. Cảm ơn bác đã chú ý – [[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 14:53, ngày 23 tháng 10 năm 2025 (UTC)
== Thanh điệu tiếng Thái Trắng ==
Tôi quên nói với bạn là bản thân tiếng Thái Trắng khi viết là hầu hết các từ có dấu thanh, nhưng cái cuốn từ vựng của Đỗ Thị Tấc và Hà Mạnh Phong nó không ghi dấu thanh điệu. Nếu không để dấu thanh điệu lên các phụ âm (tô) thì có thể mỗi âm tiết sẽ phát âm với thanh ngang hoặc thanh huyền (mặc dù chuyển tự có phân biệt thanh điệu), nên khi tạo mục từ tôi nghĩ các mục từ nên để thêm dấu thanh. – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 11:45, ngày 5 tháng 11 năm 2025 (UTC)
== [[Mô đun:quote-test]] ==
Thấy bạn đang hoạt động, nhờ bạn xóa mô đun này do tạo nhầm. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 13:02, ngày 13 tháng 1 năm 2026 (UTC)
== [[MediaWiki:Rcshowhideanons]] ==
Như tôi đã nêu ở phần lý do, trang cần xóa là cả trang MediaWiki này chứ không phải chỉ xóa mỗi trang thảo luận. – [[Thành viên:Nvdtn19|Nvdtn19]] ([[Thảo luận Thành viên:Nvdtn19|thảo luận]]) 08:17, ngày 16 tháng 1 năm 2026 (UTC)
== You may be an eligible candidate for the U4C election ==
<div lang="en" dir="ltr" class="mw-content-ltr">
Greetings,
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] seeks candidates for the 2026 election. The U4C is the global committee responsible for overseeing enforcement of the [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct|Universal Code of Conduct]]. Elections are held annually, if elected a committee member serves for two years.
This year the U4C requires candidates to hold administrator rights on at least one wiki, which is why you are being contacted as you appear to hold this right. There are other requirements, such as candidates must be at least 18 years old and may not be employed by the Wikimedia Foundation or other related chapters and affiliates. You can find more information in the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026#Call_for_Candidates|call for candidates on Meta-wiki]]. Additionally, the committee's working language is English; some ability to communicate in English is required.
The election opens on 18 May, if you are eligible and interested you have until 10 May to submit your candidacy. There will be a week in between for candidates to answer questions from the community. Voting takes place privately in [[m:Special:MyLanguage/SecurePoll|SecurePoll]], successful candidates must receive at least 60% support. More information is available on [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026|the 2026 Elections page]], including timelines and other candidacy information. If you read over the material and consider yourself qualified, please consider submitting your name to run for the committee. If you think someone else in your community might be interested and qualified, please encourage them to run.
In partnership with the U4C -- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 20:17, ngày 28 tháng 4 năm 2026 (UTC) </div>
<!-- Tin nhắn của Thành viên:Keegan (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=User:Keegan_(WMF)/test&oldid=30472541 -->
== [[Thảo luận Thành viên:P. ĐĂNG]] ==
Nhờ bạn bán khóa trang thảo luận thành viên này 3 tháng do rối phá bĩnh. [[User:Hiyuune|<span style="font-family: Segoe UI Light;color:#FF69B4;letter-spacing:">Linh Huynh</span>]] ([[User talk:Hiyuune|<span style="color:#008080;">talk</span>]]) 03:50, ngày 5 tháng 5 năm 2026 (UTC)
== PANG450a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p ==
[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]][[Thành viên:PANG450p|PANG450p]] ([[Thảo luận Thành viên:PANG450p|thảo luận]]) 06:44, ngày 5 tháng 5 năm 2026 (UTC)
3o9l7wtdawea8613pbmh88hs03jisy0
2350243
2350240
2026-05-05T07:01:28Z
WhoAlone
40420
Đã lùi lại sửa đổi của [[Special:Contributions/PANG450p|PANG450p]] ([[User talk:PANG450p|thảo luận]]) quay về phiên bản cuối của [[User:Hiyuune|Hiyuune]]
2350193
wikitext
text/x-wiki
==Hoan nghênh==
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào Russian Federal Subjects! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 04:21, ngày 13 tháng 1 năm 2022 (UTC)
== Chú ý ==
Cảm ơn bạn đã đóng góp ở đây. Trước khi bạn tiếp tục đóng góp, hãy lưu ý nhưng điều sau:
*Nhiều trang bạn dùng {{tl|-dfn-}} là không đúng do bản mẫu đó dùng cho từ không thuộc bất kỳ loại từ nào. Nhưng những từ bạn tạo đều có loại từ cả như [[đăng tải]] là động từ phải dùng {{tl|-verb-}}. Vì vậy trước khi tạo mục từ phải xem kỹ loại từ nào rồi đặt bản mẫu phù hợp với từ đó.
*Nhớ xuống dòng bản mẫu, không nên để một cục như [https://vi.wiktionary.org/w/index.php?title=%C4%91%C4%83ng_t%E1%BA%A3i&oldid=2040920 thế này]. Phải xuống dòng để người ta dễ nhìn.
Mong bạn chú ý những điều trên khi tạo mục từ, cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:04, ngày 13 tháng 1 năm 2022 (UTC)
:Cảm ơn góp ý của bạn. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 11:45, ngày 13 tháng 1 năm 2022 (UTC)
== Tiếng Nga ==
Xin chào, xin hỏi biết nói tiếng Nga không? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:21, ngày 19 tháng 1 năm 2022 (UTC)
:Chào bạn, tôi hầu như không biết nói tiếng Nga nên chỉ hiểu được một vài từ cơ bản. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:23, ngày 19 tháng 1 năm 2022 (UTC)
* la caisse: [[File:La caisse.ogg]]
Cái này là Tiếng Pháp giọng Canada, em không nghe rõ, anh nghe “là kê-x” hay “là cây-x”? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:28, ngày 19 tháng 1 năm 2022 (UTC)
:Tôi nghe hơi giống "cây-x" hơn bạn nhé. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:31, ngày 19 tháng 1 năm 2022 (UTC)
::Cám ơn. Năm mới vui vẻ! [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:36, ngày 19 tháng 1 năm 2022 (UTC)
== [[Bản mẫu:*đề mục]] ==
Chào bạn. Để tránh hiện tượng lỗi tính số liệu thống kê ở trang [[Wiktionary:Thống kê]], bạn chú ý sau khi tạo đề mục ngôn ngữ, bạn nhớ thêm vào danh sách này (theo bảng chữ cái). Xin cảm ơn bạn đã giúp sức cho dự án. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 01:37, ngày 19 tháng 1 năm 2022 (UTC)
== Chú ý một chút ==
Cảm ơn bạn đã đóng góp, tuy nhiên mong bạn có thể thay dòng dầu mục từ in đậm như '''haron''' thành <code><nowiki>{{pn}}</nowiki></code> để dùng tên trang thay cho việc viết lại tên sẽ tốt hơn. Cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:11, ngày 15 tháng 2 năm 2022 (UTC)
== Thư mời tham gia biểu quyết ==
{| class="table" align="center" style="width: 80%; background-color: #FAFAD2; border: 1px solid #fceb92; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[File:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | Mời bạn cho nhận xét ở [[Thảo luận Wiktionary:Bảo quản viên|Biểu quyết bảo quản viên]] của '''[[Thành viên:Ccv2020]]''' tại '''[[Thảo_luận_Wiktionary:Bảo_quản_viên#Ccv2020|đây]]'''.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!</small>
|}[[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 00:55, ngày 23 tháng 2 năm 2022 (UTC)
== Về các mục từ Unicode tiếng Khiết Đan ==
Chào bạn. Cảm ơn bạn đã đóng góp cho mảng Unicode. Theo danh sách [[Trợ giúp:Unicode/Ảnh/Danh sách|này]], toàn bộ 470 ký tự trong khối “Khitan Small Script” đều cần {{tl|cảnh báo Unicode}} (chúng thuộc Unicode 13.0 – 2020, chưa có thiết bị nào hỗ trợ sẵn chúng, đây là một ngôn ngữ cổ). Xin lỗi vì quy định này do tôi nghĩ ra, nhưng nó cho thấy mảng Unicode cũng là một mảng quan trọng trong từ điển mở này, và chúng cũng cần phải có một hệ thống quản lý. Vì thế, phiền bạn một chút, bạn hãy thêm bản mẫu trên vào tất cả các mục từ Unicode có liên quan. Xin cảm ơn. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 08:11, ngày 20 tháng 6 năm 2022 (UTC)
== Về biển tạm nghỉ trên trang cá nhân của bạn ==
Bạn đã hoạt động trở lại rồi mà sao lại đặt biển tạm nghỉ đến ngày 13? -- [[Thành viên:Nguyên Hưng Trần|Nguyên Hưng Trần]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|thảo luận]]) 11:41, ngày 12 tháng 8 năm 2022 (UTC)
== Bảo quản viên? ==
Tôi thấy bạn khá là tích cực trong việc đóng góp trên Wiktionary và đang đứng hạng 2 về tổng số sửa đổi (trừ bot), không biết liệu bạn có đồng ý muốn ngồi vào ghế bảo quản viên hay không nên hỏi. [[Thành viên:KhanhCN Defender1st Minh|KhanhCN Defender1st Minh]] ([[Thảo luận Thành viên:KhanhCN Defender1st Minh|thảo luận]]) 16:14, ngày 20 tháng 8 năm 2022 (UTC)
== Danh từ riêng ==
Xin chào, cháu thêm [[Wilson]] rồi, mà chữ "Danh từ riêng" không có ở đó. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 19:49, ngày 30 tháng 9 năm 2022 (UTC)
:Chào bạn, nếu muốn hiện đề mục "Danh từ riêng" thì bạn dùng bản mẫu {{Liên kết bản mẫu|-pr-noun-}} thay cho {{Liên kết bản mẫu|-noun-}} nhé. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 01:23, ngày 1 tháng 10 năm 2022 (UTC)
::Viết rồi. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 12:20, ngày 1 tháng 10 năm 2022 (UTC)
== Hoặc mu hoặc mus ==
By one of the Maonan (mmd) entries, did you mean "mus" or simply "mu"? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 10:27, ngày 26 tháng 2 năm 2023 (UTC)
:It is "mus". – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 10:30, ngày 26 tháng 2 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV không? Tôi thấy bạn hiện là tv tích cực nhất của dự án. Nếu muốn gánh thêm trách nhiệm, bạn có thể tự ra ứng cử. Tôi sẽ ủng hộ và cấp quyền trong tương lai gần. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:33, ngày 19 tháng 6 năm 2023 (UTC)
:Tôi sẽ xem xét có nên làm hay không. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 14:29, ngày 19 tháng 6 năm 2023 (UTC)
::Khi bạn quyết định ra ứng cử thì nhớ tag tôi. Tôi hy vọng bạn sẽ đồng ý vác tù và hàng tổng. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 18:03, ngày 22 tháng 6 năm 2023 (UTC)
== Thư mời ==
Mời bạn cho đôi lời nhận xét tại [[Thảo luận Wiktionary:Bảo quản viên#P. %C4%90%C4%82NG|Biểu quyết chọn bảo quản viên]]. Xin hết lòng cảm ơn rất nhiều. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:42, ngày 24 tháng 8 năm 2023 (UTC)
== Chú ý ==
Khi bạn tạo bản mẫu dòng tên mục từ, chuyển tự, biến cách, tham khảo... cho các ngôn ngữ với mã ISO 639-1 thì cần phải di chuyển chúng sang mã ISO 639-2/3 nhé bạn. – [[Thành viên:Nguyên Hưng Trần|<span style="color:black; font-family:Noto Sans">'''Trần Nguyên Hưng'''</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|<sup><span style="color:#28efff">(◇)</span></sup>]] 11:19, ngày 21 tháng 10 năm 2023 (UTC)
== Thư mời ==
Chào bạn! Mời bạn cho ý kiến tại [[Thảo_luận_Wiktionary:Bảo_quản_viên#Nguyên_Hưng_Trần|Biểu quyết chọn bảo quản viên]]. Thanks bạn! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:20, ngày 30 tháng 12 năm 2023 (UTC)
== BQV ==
Tôi đã ứng cử bạn vào làm bảo quản viên tại dự án. Mời bạn vào [https://vi.wiktionary.org/wiki/Th%E1%BA%A3o_lu%E1%BA%ADn_Wiktionary:B%E1%BA%A3o_qu%E1%BA%A3n_vi%C3%AAn#WhoAlone đây] chấp nhận ứng cử. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:41, ngày 31 tháng 12 năm 2023 (UTC)
== Công cụ chống spam ==
Mời bạn vào trang [[Đặc_biệt:Trang_đặc_biệt|này]], kéo xuống đề mục "công cụ chống spam". Bạn WhoAlone nên dùng công cụ này, BQV mặc định sửa được trang đó. Dùng công cụ này sẽ tiện lợi hơn trong công tác phòng chống tên miền không mang tính đóng góp. Vì tựu chung, "phòng bệnh tốt hơn trị bệnh", dự án vốn ít người nên hạn chế rơi vào trường hợp cấm (đặc biệt đối với IP), chặn từ địa chỉ trang web spam mang lại hiệu quả hơn. Một ngày tốt lành! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 28 tháng 1 năm 2024 (UTC)
== [[Mô đun:languages/data/3]] ==
Chào bạn, hiện tại mô đun dữ liệu ngôn ngữ mà bạn đang sửa đổi (xem [https://vi.wiktionary.org/w/index.php?title=M%C3%B4_%C4%91un:languages/data/3/h&curid=272288&diff=2144810&oldid=2144615 2144810]) thì một số ngôn ngữ đã lỗi thời rồi (tức là, bên en đã chỉnh sửa lại mô đun ngôn ngữ rồi sau đó là cập nhật dữ liệu (/data/[2 hoặc 3]/[chữ đầu tiên của tên mã]) của nó). Cho nên khi bạn hỗ trợ ngôn ngữ nào thì bạn có thể chép bên en (thường là bắt đầu bằng "m["(''mã ngôn ngữ'')"]") rồi dán vào (tức là đè lên) thông tin ngôn ngữ bạn muốn nhé! – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 11:08, ngày 28 tháng 1 năm 2024 (UTC)
== Chúc mừng năm mới ==
Chúc bạn ngày lễ vui vẻ và giữ vững tinh thần tích cực, chung tay đóng góp cho cả hai dự án Wikipedia và Wiktionary ngày càng lớn mạnh. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:04, ngày 9 tháng 2 năm 2024 (UTC)
== Di chuyển tắt đổi hướng ==
Thay vì bạn di chuyển mục từ bạn tạo có tiêu đề sai sau đó xóa đổi hướng của nó thì bạn có thể tắt chức năng "Để lại trang đổi hướng" bên dưới. Làm việc này sẽ nhanh hơn là di chuyển sau đó xóa mục từ. – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 03:33, ngày 15 tháng 2 năm 2024 (UTC)
== Lùi sửa đổi ==
Chào bạn. Cho mình hỏi tại sao bạn lại lùi sửa đổi xóa dấu chấm của mình trong [[thế hệ]]. – [[Thành viên:Duchuyfootball|Duchuyfootball]] ([[Thảo luận Thành viên:Duchuyfootball|thảo luận]]) 11:07, ngày 9 tháng 2 năm 2025 (UTC)
:Có chút nhầm lẫn nhé bạn, tôi đã xem lại và xóa lại dấu chấm rồi. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 13:25, ngày 9 tháng 2 năm 2025 (UTC)
== Tiếng Moklen ==
Where in Thunder did you get the Moklen Terms in the Thai Script? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 07:37, ngày 25 tháng 3 năm 2025 (UTC)
:Here: https://scholarspace.manoa.hawaii.edu/server/api/core/bitstreams/dbe1822a-b500-4cc2-bbad-29ae56b3afb0/content – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 15:13, ngày 25 tháng 3 năm 2025 (UTC)
== IP/Dải IP ==
Tôi có ý định chia sẻ với bạn một số việc đã học được từ các thao tác bảo trì Wikipedia (cũng từ các bạn tv đã hướng dẫn tôi :D). Thực ra, cấm IP cho đến dải dường không ưu tiên trong công tác bảo quản, nên được hạn chế hình thức cấm này hết mức có thể vì IP khi bị cấm có thể nhảy liên tục (chỉ cấm khi đã là phương án cuối cùng). Nhắm vào mục đích phá hoại người dùng mới là ưu tiên (ví dụ, IP XXX phá hoại duy nhất bài XYZ, thì ưu tiên khóa bài hơn việc cấm; IP spam link thì đưa link đó là danh sách link spam, hơn là việc cấm). Các IP chỉ có duy nhất từ 1 sửa đổi, việc cấm nên là hạn chế nhất có thể. Ngoài ra, các tv trước khi bị cấm nên được nhắc nhở vì quy định của dự án là chế tài người dùng khi có hành vi lặp đi lặp lại (trừ rối + phá hoại dai dẳng). Tôi đã bỏ cấm cho IP [[Thành viên:42.114.213.20|42.114.213.20]] vì nhận thấy địa chỉ này chưa lạm dụng + nhắc nhở trước khi chế tài. Hy vọng tương lai được cộng tác cùng bạn nhiều hơn trong việc hỗ trợ bảo trì dự án. Một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:54, ngày 12 tháng 5 năm 2025 (UTC)
== Quy định mục từ tiếng Lự ==
Mặc dù ở Trung Quốc hay trong từ điển của Hanna thì mỗi âm tiết trong từ tiếng Lự đều tách ra như tiếng Việt, nhưng bên en không có mục từ nào tách âm tiết ra như vậy cả, cho nên quy định mục từ tiếng Lự ở đây cũng ghép âm tiết luôn (tôi biết là lâu rồi bạn chưa tạo mục từ tiếng Lự nào cả nhưng tôi chỉ đưa ra lời khuyên thôi). – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 17:46, ngày 27 tháng 9 năm 2025 (UTC)
== Trang thảo luận có phá hoại ==
Bác để ý chút nhé, thay vì bác tẩy trống trang thì bác vui lòng xóa luôn trang đó đi luôn ạ, để trống như vậy là vô nghĩa và có thể gây thừa thãi. Cảm ơn bác đã chú ý – [[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 14:53, ngày 23 tháng 10 năm 2025 (UTC)
== Thanh điệu tiếng Thái Trắng ==
Tôi quên nói với bạn là bản thân tiếng Thái Trắng khi viết là hầu hết các từ có dấu thanh, nhưng cái cuốn từ vựng của Đỗ Thị Tấc và Hà Mạnh Phong nó không ghi dấu thanh điệu. Nếu không để dấu thanh điệu lên các phụ âm (tô) thì có thể mỗi âm tiết sẽ phát âm với thanh ngang hoặc thanh huyền (mặc dù chuyển tự có phân biệt thanh điệu), nên khi tạo mục từ tôi nghĩ các mục từ nên để thêm dấu thanh. – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 11:45, ngày 5 tháng 11 năm 2025 (UTC)
== [[Mô đun:quote-test]] ==
Thấy bạn đang hoạt động, nhờ bạn xóa mô đun này do tạo nhầm. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 13:02, ngày 13 tháng 1 năm 2026 (UTC)
== [[MediaWiki:Rcshowhideanons]] ==
Như tôi đã nêu ở phần lý do, trang cần xóa là cả trang MediaWiki này chứ không phải chỉ xóa mỗi trang thảo luận. – [[Thành viên:Nvdtn19|Nvdtn19]] ([[Thảo luận Thành viên:Nvdtn19|thảo luận]]) 08:17, ngày 16 tháng 1 năm 2026 (UTC)
== You may be an eligible candidate for the U4C election ==
<div lang="en" dir="ltr" class="mw-content-ltr">
Greetings,
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] seeks candidates for the 2026 election. The U4C is the global committee responsible for overseeing enforcement of the [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct|Universal Code of Conduct]]. Elections are held annually, if elected a committee member serves for two years.
This year the U4C requires candidates to hold administrator rights on at least one wiki, which is why you are being contacted as you appear to hold this right. There are other requirements, such as candidates must be at least 18 years old and may not be employed by the Wikimedia Foundation or other related chapters and affiliates. You can find more information in the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026#Call_for_Candidates|call for candidates on Meta-wiki]]. Additionally, the committee's working language is English; some ability to communicate in English is required.
The election opens on 18 May, if you are eligible and interested you have until 10 May to submit your candidacy. There will be a week in between for candidates to answer questions from the community. Voting takes place privately in [[m:Special:MyLanguage/SecurePoll|SecurePoll]], successful candidates must receive at least 60% support. More information is available on [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026|the 2026 Elections page]], including timelines and other candidacy information. If you read over the material and consider yourself qualified, please consider submitting your name to run for the committee. If you think someone else in your community might be interested and qualified, please encourage them to run.
In partnership with the U4C -- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 20:17, ngày 28 tháng 4 năm 2026 (UTC) </div>
<!-- Tin nhắn của Thành viên:Keegan (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=User:Keegan_(WMF)/test&oldid=30472541 -->
== [[Thảo luận Thành viên:P. ĐĂNG]] ==
Nhờ bạn bán khóa trang thảo luận thành viên này 3 tháng do rối phá bĩnh. [[User:Hiyuune|<span style="font-family: Segoe UI Light;color:#FF69B4;letter-spacing:">Linh Huynh</span>]] ([[User talk:Hiyuune|<span style="color:#008080;">talk</span>]]) 03:50, ngày 5 tháng 5 năm 2026 (UTC)
92oxo0cxp9l1rn5944m0xiv6zaoongb
2350244
2350243
2026-05-05T07:01:51Z
WhoAlone
40420
Đã khóa “[[Thảo luận Thành viên:WhoAlone]]” ([Sửa đổi=Chỉ cho phép thành viên tự xác nhận] (hết hạn 07:01, ngày 5 tháng 8 năm 2026) [Di chuyển=Chỉ cho phép thành viên tự xác nhận] (hết hạn 07:01, ngày 5 tháng 8 năm 2026))
2350193
wikitext
text/x-wiki
==Hoan nghênh==
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào Russian Federal Subjects! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 04:21, ngày 13 tháng 1 năm 2022 (UTC)
== Chú ý ==
Cảm ơn bạn đã đóng góp ở đây. Trước khi bạn tiếp tục đóng góp, hãy lưu ý nhưng điều sau:
*Nhiều trang bạn dùng {{tl|-dfn-}} là không đúng do bản mẫu đó dùng cho từ không thuộc bất kỳ loại từ nào. Nhưng những từ bạn tạo đều có loại từ cả như [[đăng tải]] là động từ phải dùng {{tl|-verb-}}. Vì vậy trước khi tạo mục từ phải xem kỹ loại từ nào rồi đặt bản mẫu phù hợp với từ đó.
*Nhớ xuống dòng bản mẫu, không nên để một cục như [https://vi.wiktionary.org/w/index.php?title=%C4%91%C4%83ng_t%E1%BA%A3i&oldid=2040920 thế này]. Phải xuống dòng để người ta dễ nhìn.
Mong bạn chú ý những điều trên khi tạo mục từ, cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:04, ngày 13 tháng 1 năm 2022 (UTC)
:Cảm ơn góp ý của bạn. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 11:45, ngày 13 tháng 1 năm 2022 (UTC)
== Tiếng Nga ==
Xin chào, xin hỏi biết nói tiếng Nga không? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:21, ngày 19 tháng 1 năm 2022 (UTC)
:Chào bạn, tôi hầu như không biết nói tiếng Nga nên chỉ hiểu được một vài từ cơ bản. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:23, ngày 19 tháng 1 năm 2022 (UTC)
* la caisse: [[File:La caisse.ogg]]
Cái này là Tiếng Pháp giọng Canada, em không nghe rõ, anh nghe “là kê-x” hay “là cây-x”? [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:28, ngày 19 tháng 1 năm 2022 (UTC)
:Tôi nghe hơi giống "cây-x" hơn bạn nhé. – [[Thành viên:Russian Federal Subjects|Russian Federal Subjects]] ([[Thảo luận Thành viên:Russian Federal Subjects|thảo luận]]) 00:31, ngày 19 tháng 1 năm 2022 (UTC)
::Cám ơn. Năm mới vui vẻ! [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 00:36, ngày 19 tháng 1 năm 2022 (UTC)
== [[Bản mẫu:*đề mục]] ==
Chào bạn. Để tránh hiện tượng lỗi tính số liệu thống kê ở trang [[Wiktionary:Thống kê]], bạn chú ý sau khi tạo đề mục ngôn ngữ, bạn nhớ thêm vào danh sách này (theo bảng chữ cái). Xin cảm ơn bạn đã giúp sức cho dự án. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 01:37, ngày 19 tháng 1 năm 2022 (UTC)
== Chú ý một chút ==
Cảm ơn bạn đã đóng góp, tuy nhiên mong bạn có thể thay dòng dầu mục từ in đậm như '''haron''' thành <code><nowiki>{{pn}}</nowiki></code> để dùng tên trang thay cho việc viết lại tên sẽ tốt hơn. Cảm ơn.--[[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 10:11, ngày 15 tháng 2 năm 2022 (UTC)
== Thư mời tham gia biểu quyết ==
{| class="table" align="center" style="width: 80%; background-color: #FAFAD2; border: 1px solid #fceb92; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[File:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | Mời bạn cho nhận xét ở [[Thảo luận Wiktionary:Bảo quản viên|Biểu quyết bảo quản viên]] của '''[[Thành viên:Ccv2020]]''' tại '''[[Thảo_luận_Wiktionary:Bảo_quản_viên#Ccv2020|đây]]'''.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!</small>
|}[[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 00:55, ngày 23 tháng 2 năm 2022 (UTC)
== Về các mục từ Unicode tiếng Khiết Đan ==
Chào bạn. Cảm ơn bạn đã đóng góp cho mảng Unicode. Theo danh sách [[Trợ giúp:Unicode/Ảnh/Danh sách|này]], toàn bộ 470 ký tự trong khối “Khitan Small Script” đều cần {{tl|cảnh báo Unicode}} (chúng thuộc Unicode 13.0 – 2020, chưa có thiết bị nào hỗ trợ sẵn chúng, đây là một ngôn ngữ cổ). Xin lỗi vì quy định này do tôi nghĩ ra, nhưng nó cho thấy mảng Unicode cũng là một mảng quan trọng trong từ điển mở này, và chúng cũng cần phải có một hệ thống quản lý. Vì thế, phiền bạn một chút, bạn hãy thêm bản mẫu trên vào tất cả các mục từ Unicode có liên quan. Xin cảm ơn. [[Thành viên:Ccv2020|<span style=color:#80ff00>⎕</span>]] – [[Thảo luận Thành viên:Ccv2020|<span style=color:#ff0000>⍰</span>]] – [[Đặc biệt:Đóng góp/Ccv2020|<span style=color:#ffff00>〿</span>]] 08:11, ngày 20 tháng 6 năm 2022 (UTC)
== Về biển tạm nghỉ trên trang cá nhân của bạn ==
Bạn đã hoạt động trở lại rồi mà sao lại đặt biển tạm nghỉ đến ngày 13? -- [[Thành viên:Nguyên Hưng Trần|Nguyên Hưng Trần]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|thảo luận]]) 11:41, ngày 12 tháng 8 năm 2022 (UTC)
== Bảo quản viên? ==
Tôi thấy bạn khá là tích cực trong việc đóng góp trên Wiktionary và đang đứng hạng 2 về tổng số sửa đổi (trừ bot), không biết liệu bạn có đồng ý muốn ngồi vào ghế bảo quản viên hay không nên hỏi. [[Thành viên:KhanhCN Defender1st Minh|KhanhCN Defender1st Minh]] ([[Thảo luận Thành viên:KhanhCN Defender1st Minh|thảo luận]]) 16:14, ngày 20 tháng 8 năm 2022 (UTC)
== Danh từ riêng ==
Xin chào, cháu thêm [[Wilson]] rồi, mà chữ "Danh từ riêng" không có ở đó. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 19:49, ngày 30 tháng 9 năm 2022 (UTC)
:Chào bạn, nếu muốn hiện đề mục "Danh từ riêng" thì bạn dùng bản mẫu {{Liên kết bản mẫu|-pr-noun-}} thay cho {{Liên kết bản mẫu|-noun-}} nhé. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 01:23, ngày 1 tháng 10 năm 2022 (UTC)
::Viết rồi. [[Đặc biệt:Contributions/138.229.19.202|138.229.19.202]] ([[Thảo luận Thành viên:138.229.19.202|thảo luận]]) 12:20, ngày 1 tháng 10 năm 2022 (UTC)
== Hoặc mu hoặc mus ==
By one of the Maonan (mmd) entries, did you mean "mus" or simply "mu"? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 10:27, ngày 26 tháng 2 năm 2023 (UTC)
:It is "mus". – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 10:30, ngày 26 tháng 2 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV không? Tôi thấy bạn hiện là tv tích cực nhất của dự án. Nếu muốn gánh thêm trách nhiệm, bạn có thể tự ra ứng cử. Tôi sẽ ủng hộ và cấp quyền trong tương lai gần. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:33, ngày 19 tháng 6 năm 2023 (UTC)
:Tôi sẽ xem xét có nên làm hay không. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 14:29, ngày 19 tháng 6 năm 2023 (UTC)
::Khi bạn quyết định ra ứng cử thì nhớ tag tôi. Tôi hy vọng bạn sẽ đồng ý vác tù và hàng tổng. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 18:03, ngày 22 tháng 6 năm 2023 (UTC)
== Thư mời ==
Mời bạn cho đôi lời nhận xét tại [[Thảo luận Wiktionary:Bảo quản viên#P. %C4%90%C4%82NG|Biểu quyết chọn bảo quản viên]]. Xin hết lòng cảm ơn rất nhiều. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:42, ngày 24 tháng 8 năm 2023 (UTC)
== Chú ý ==
Khi bạn tạo bản mẫu dòng tên mục từ, chuyển tự, biến cách, tham khảo... cho các ngôn ngữ với mã ISO 639-1 thì cần phải di chuyển chúng sang mã ISO 639-2/3 nhé bạn. – [[Thành viên:Nguyên Hưng Trần|<span style="color:black; font-family:Noto Sans">'''Trần Nguyên Hưng'''</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|<sup><span style="color:#28efff">(◇)</span></sup>]] 11:19, ngày 21 tháng 10 năm 2023 (UTC)
== Thư mời ==
Chào bạn! Mời bạn cho ý kiến tại [[Thảo_luận_Wiktionary:Bảo_quản_viên#Nguyên_Hưng_Trần|Biểu quyết chọn bảo quản viên]]. Thanks bạn! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:20, ngày 30 tháng 12 năm 2023 (UTC)
== BQV ==
Tôi đã ứng cử bạn vào làm bảo quản viên tại dự án. Mời bạn vào [https://vi.wiktionary.org/wiki/Th%E1%BA%A3o_lu%E1%BA%ADn_Wiktionary:B%E1%BA%A3o_qu%E1%BA%A3n_vi%C3%AAn#WhoAlone đây] chấp nhận ứng cử. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:41, ngày 31 tháng 12 năm 2023 (UTC)
== Công cụ chống spam ==
Mời bạn vào trang [[Đặc_biệt:Trang_đặc_biệt|này]], kéo xuống đề mục "công cụ chống spam". Bạn WhoAlone nên dùng công cụ này, BQV mặc định sửa được trang đó. Dùng công cụ này sẽ tiện lợi hơn trong công tác phòng chống tên miền không mang tính đóng góp. Vì tựu chung, "phòng bệnh tốt hơn trị bệnh", dự án vốn ít người nên hạn chế rơi vào trường hợp cấm (đặc biệt đối với IP), chặn từ địa chỉ trang web spam mang lại hiệu quả hơn. Một ngày tốt lành! [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 28 tháng 1 năm 2024 (UTC)
== [[Mô đun:languages/data/3]] ==
Chào bạn, hiện tại mô đun dữ liệu ngôn ngữ mà bạn đang sửa đổi (xem [https://vi.wiktionary.org/w/index.php?title=M%C3%B4_%C4%91un:languages/data/3/h&curid=272288&diff=2144810&oldid=2144615 2144810]) thì một số ngôn ngữ đã lỗi thời rồi (tức là, bên en đã chỉnh sửa lại mô đun ngôn ngữ rồi sau đó là cập nhật dữ liệu (/data/[2 hoặc 3]/[chữ đầu tiên của tên mã]) của nó). Cho nên khi bạn hỗ trợ ngôn ngữ nào thì bạn có thể chép bên en (thường là bắt đầu bằng "m["(''mã ngôn ngữ'')"]") rồi dán vào (tức là đè lên) thông tin ngôn ngữ bạn muốn nhé! – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 11:08, ngày 28 tháng 1 năm 2024 (UTC)
== Chúc mừng năm mới ==
Chúc bạn ngày lễ vui vẻ và giữ vững tinh thần tích cực, chung tay đóng góp cho cả hai dự án Wikipedia và Wiktionary ngày càng lớn mạnh. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:04, ngày 9 tháng 2 năm 2024 (UTC)
== Di chuyển tắt đổi hướng ==
Thay vì bạn di chuyển mục từ bạn tạo có tiêu đề sai sau đó xóa đổi hướng của nó thì bạn có thể tắt chức năng "Để lại trang đổi hướng" bên dưới. Làm việc này sẽ nhanh hơn là di chuyển sau đó xóa mục từ. – <span style="background:#011635;border-radius:6.342px;box-shadow:1px 1px 5px #173562;padding:5px;width:100%;"><span lang="vi" xml:lang="vi" class="Hani" style="font-size: 150%; line-height: 1em;">[[Thành viên:Nguyên Hưng Trần|<span style="color:beige;">𠊛𥋴</span>]][[Thảo luận Thành viên:Nguyên Hưng Trần|𫇳𣋀]]</span></span> 03:33, ngày 15 tháng 2 năm 2024 (UTC)
== Lùi sửa đổi ==
Chào bạn. Cho mình hỏi tại sao bạn lại lùi sửa đổi xóa dấu chấm của mình trong [[thế hệ]]. – [[Thành viên:Duchuyfootball|Duchuyfootball]] ([[Thảo luận Thành viên:Duchuyfootball|thảo luận]]) 11:07, ngày 9 tháng 2 năm 2025 (UTC)
:Có chút nhầm lẫn nhé bạn, tôi đã xem lại và xóa lại dấu chấm rồi. – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 13:25, ngày 9 tháng 2 năm 2025 (UTC)
== Tiếng Moklen ==
Where in Thunder did you get the Moklen Terms in the Thai Script? -- – [[Thành viên:Apisite|Apisite]] ([[Thảo luận Thành viên:Apisite|thảo luận]]) 07:37, ngày 25 tháng 3 năm 2025 (UTC)
:Here: https://scholarspace.manoa.hawaii.edu/server/api/core/bitstreams/dbe1822a-b500-4cc2-bbad-29ae56b3afb0/content – [[Thành viên:WhoAlone|<span style="color:black ;font:16px Calibri;">'''''Who'''''</span>]]<sup>[[Thảo luận Thành viên:WhoAlone|<span style="color:gray ;font:12px Arial;">Alone</span>]]</sup> 15:13, ngày 25 tháng 3 năm 2025 (UTC)
== IP/Dải IP ==
Tôi có ý định chia sẻ với bạn một số việc đã học được từ các thao tác bảo trì Wikipedia (cũng từ các bạn tv đã hướng dẫn tôi :D). Thực ra, cấm IP cho đến dải dường không ưu tiên trong công tác bảo quản, nên được hạn chế hình thức cấm này hết mức có thể vì IP khi bị cấm có thể nhảy liên tục (chỉ cấm khi đã là phương án cuối cùng). Nhắm vào mục đích phá hoại người dùng mới là ưu tiên (ví dụ, IP XXX phá hoại duy nhất bài XYZ, thì ưu tiên khóa bài hơn việc cấm; IP spam link thì đưa link đó là danh sách link spam, hơn là việc cấm). Các IP chỉ có duy nhất từ 1 sửa đổi, việc cấm nên là hạn chế nhất có thể. Ngoài ra, các tv trước khi bị cấm nên được nhắc nhở vì quy định của dự án là chế tài người dùng khi có hành vi lặp đi lặp lại (trừ rối + phá hoại dai dẳng). Tôi đã bỏ cấm cho IP [[Thành viên:42.114.213.20|42.114.213.20]] vì nhận thấy địa chỉ này chưa lạm dụng + nhắc nhở trước khi chế tài. Hy vọng tương lai được cộng tác cùng bạn nhiều hơn trong việc hỗ trợ bảo trì dự án. Một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:54, ngày 12 tháng 5 năm 2025 (UTC)
== Quy định mục từ tiếng Lự ==
Mặc dù ở Trung Quốc hay trong từ điển của Hanna thì mỗi âm tiết trong từ tiếng Lự đều tách ra như tiếng Việt, nhưng bên en không có mục từ nào tách âm tiết ra như vậy cả, cho nên quy định mục từ tiếng Lự ở đây cũng ghép âm tiết luôn (tôi biết là lâu rồi bạn chưa tạo mục từ tiếng Lự nào cả nhưng tôi chỉ đưa ra lời khuyên thôi). – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 17:46, ngày 27 tháng 9 năm 2025 (UTC)
== Trang thảo luận có phá hoại ==
Bác để ý chút nhé, thay vì bác tẩy trống trang thì bác vui lòng xóa luôn trang đó đi luôn ạ, để trống như vậy là vô nghĩa và có thể gây thừa thãi. Cảm ơn bác đã chú ý – [[Thành_viên:Kateru Zakuro|<span style="color:#EE1D25;">'''Kateru'''</span> <span style="color:#EE1D25;">'''Zakuro'''</span>]] ([[Thảo luận Thành viên:Kateru Zakuro|thảo luận]]) 14:53, ngày 23 tháng 10 năm 2025 (UTC)
== Thanh điệu tiếng Thái Trắng ==
Tôi quên nói với bạn là bản thân tiếng Thái Trắng khi viết là hầu hết các từ có dấu thanh, nhưng cái cuốn từ vựng của Đỗ Thị Tấc và Hà Mạnh Phong nó không ghi dấu thanh điệu. Nếu không để dấu thanh điệu lên các phụ âm (tô) thì có thể mỗi âm tiết sẽ phát âm với thanh ngang hoặc thanh huyền (mặc dù chuyển tự có phân biệt thanh điệu), nên khi tạo mục từ tôi nghĩ các mục từ nên để thêm dấu thanh. – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 11:45, ngày 5 tháng 11 năm 2025 (UTC)
== [[Mô đun:quote-test]] ==
Thấy bạn đang hoạt động, nhờ bạn xóa mô đun này do tạo nhầm. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 13:02, ngày 13 tháng 1 năm 2026 (UTC)
== [[MediaWiki:Rcshowhideanons]] ==
Như tôi đã nêu ở phần lý do, trang cần xóa là cả trang MediaWiki này chứ không phải chỉ xóa mỗi trang thảo luận. – [[Thành viên:Nvdtn19|Nvdtn19]] ([[Thảo luận Thành viên:Nvdtn19|thảo luận]]) 08:17, ngày 16 tháng 1 năm 2026 (UTC)
== You may be an eligible candidate for the U4C election ==
<div lang="en" dir="ltr" class="mw-content-ltr">
Greetings,
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] seeks candidates for the 2026 election. The U4C is the global committee responsible for overseeing enforcement of the [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct|Universal Code of Conduct]]. Elections are held annually, if elected a committee member serves for two years.
This year the U4C requires candidates to hold administrator rights on at least one wiki, which is why you are being contacted as you appear to hold this right. There are other requirements, such as candidates must be at least 18 years old and may not be employed by the Wikimedia Foundation or other related chapters and affiliates. You can find more information in the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026#Call_for_Candidates|call for candidates on Meta-wiki]]. Additionally, the committee's working language is English; some ability to communicate in English is required.
The election opens on 18 May, if you are eligible and interested you have until 10 May to submit your candidacy. There will be a week in between for candidates to answer questions from the community. Voting takes place privately in [[m:Special:MyLanguage/SecurePoll|SecurePoll]], successful candidates must receive at least 60% support. More information is available on [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026|the 2026 Elections page]], including timelines and other candidacy information. If you read over the material and consider yourself qualified, please consider submitting your name to run for the committee. If you think someone else in your community might be interested and qualified, please encourage them to run.
In partnership with the U4C -- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 20:17, ngày 28 tháng 4 năm 2026 (UTC) </div>
<!-- Tin nhắn của Thành viên:Keegan (WMF)@metawiki gửi cho mọi người trong danh sách tại https://meta.wikimedia.org/w/index.php?title=User:Keegan_(WMF)/test&oldid=30472541 -->
== [[Thảo luận Thành viên:P. ĐĂNG]] ==
Nhờ bạn bán khóa trang thảo luận thành viên này 3 tháng do rối phá bĩnh. [[User:Hiyuune|<span style="font-family: Segoe UI Light;color:#FF69B4;letter-spacing:">Linh Huynh</span>]] ([[User talk:Hiyuune|<span style="color:#008080;">talk</span>]]) 03:50, ngày 5 tháng 5 năm 2026 (UTC)
92oxo0cxp9l1rn5944m0xiv6zaoongb
Thể loại:Đại dương
14
265790
2350217
2264593
2026-05-05T04:13:29Z
Hiyuune
50834
Thay cả nội dung bằng “{{auto cat}}”
2350217
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Mô đun:languages/canonical names
828
273923
2350229
2350115
2026-05-05T06:14:46Z
TheHighFighter2
42988
2350229
Scribunto
text/plain
return {
["Tiếng A'ou"] = "aou",
["Aba"] = "utp",
["Abai Sungai"] = "abf",
["Tiếng Abanyom"] = "abm",
["Abenlen Ayta"] = "abp",
["Abipon"] = "axb",
["Abishira"] = "ash",
["Abom"] = "aob",
["Tiếng Abon"] = "abo",
["Tiếng Abron"] = "abr",
["Abu"] = "ado",
["Abu' Arapesh"] = "aah",
["Abua"] = "abn",
["Tiếng Abui"] = "abz",
["Abun"] = "kgr",
["Abung"] = "abl",
["Tiếng Abure"] = "abu",
["Abureni"] = "mgj",
["Abé"] = "aba",
["Tiếng Me'phaa Acatepec"] = "tpx",
["Ache"] = "yif",
["Tiếng Achi"] = "acr",
["Tiếng Achuar"] = "acu",
["Achumawi"] = "acv",
["Aché"] = "guq",
["Acroá"] = "acs",
["Adabe"] = "adb",
["Adai"] = "xad",
["Adamorobe Sign Language"] = "ads",
["Adang"] = "adn",
["Adangbe"] = "adq",
["Adap"] = "adp",
["Adasen"] = "tiu",
["Adele"] = "ade",
["Adhola"] = "adh",
["Tiếng Adi"] = "adi",
["Adioukrou"] = "adj",
["Adithinngithigh"] = "dth",
["Tiếng Adnyamathanha"] = "adt",
["Adonara"] = "adr",
["Aduge"] = "adu",
["Aeka"] = "aez",
["Aekyom"] = "awi",
["Aequian"] = "xae",
["Aer"] = "aeq",
["Afade"] = "aal",
["Afghan Sign Language"] = "afg",
["Afitti"] = "aft",
["Afra"] = "ulf",
["Afrihili"] = "afh",
["Afro-Seminole Creole"] = "afs",
["Agarabi"] = "agd",
["Agariya"] = "agi",
["Tiếng Agatu"] = "agc",
["Agavotaguerra"] = "avo",
["Aghu"] = "ahh",
["Aghu Tharrnggala"] = "gtu",
["Agi"] = "aif",
["Agob"] = "kit",
["Agoi"] = "ibm",
["Tiếng Aguacateca"] = "agu",
["Aguano"] = "aga",
["Aguaruna"] = "agr",
["Aguna"] = "aug",
["Agusan Manobo"] = "msm",
["Agutaynen"] = "agn",
["Agwagwune"] = "yay",
["Ahanta"] = "aha",
["Ahirani"] = "ahr",
["Ahwai"] = "nfd",
["Ai-Cham"] = "aih",
["Aighon"] = "aix",
["Aikanã"] = "tba",
["Aiklep"] = "mwg",
["Aimele"] = "ail",
["Ainbai"] = "aic",
["Aiome"] = "aki",
["Airoran"] = "air",
["Aisi"] = "mmq",
["Aiwoo"] = "nfl",
["Aja"] = "aja",
["Ajagua"] = "sai-ajg",
["Ajawa"] = "ajw",
["Ajyíninka Apurucayali"] = "cpc",
["Ak"] = "akq",
["Aka (Central Africa)"] = "axk",
["Aka (Sudan)"] = "soh",
["Aka-Bea"] = "abj",
["Aka-Cari"] = "aci",
["Aka-Kede"] = "akx",
["Aka-Kol"] = "aky",
["Aka-Kora"] = "ack",
["Akar-Bale"] = "acl",
["Akaselem"] = "aks",
["Akatek"] = "knj",
["Ake"] = "aik",
["Akebu"] = "keu",
["Akei"] = "tsr",
["Akeu"] = "aeu",
["Akolet"] = "akt",
["Akoose"] = "bss",
["Akoye"] = "miw",
["Akpa"] = "akf",
["Akpes"] = "ibe",
["Akrukay"] = "afi",
["Akuku"] = "ayk",
["Akum"] = "aku",
["Tiếng Akuntsu"] = "aqz",
["Akurio"] = "ako",
["Akuwagel"] = "bey",
["Akwa"] = "akw",
["Akyaung Ari"] = "nqy",
["Al-Sayyid Bedouin Sign Language"] = "syy",
["Alabat Island Agta"] = "dul",
["Alacatlatzala Mixtec"] = "mim",
["Alago"] = "ala",
["Tiếng Alamblak"] = "amp",
["Tiếng Alangan"] = "alj",
["Alapmunte"] = "apv",
["Alas-Kluet Batak"] = "btz",
["Alazapa"] = "nai-ala",
["Albanian Sign Language"] = "sqk",
["Tiếng Mixtec Alcozauca"] = "xta",
["Alege"] = "alf",
["Algerian Sign Language"] = "asp",
["Ali"] = "aiy",
["Alladian"] = "ald",
["Allar"] = "all",
["Tiếng Alyentiyak"] = "sai-all",
["Alngith"] = "aid",
["Alo Phola"] = "ypo",
["Alor"] = "aol",
["Aloápam Zapotec"] = "zaq",
["Alu"] = "mte",
["Tiếng Kurumba Alu"] = "xua",
["Alugu"] = "aub",
["Tiếng Alumu-Tesu"] = "aab",
["Alune"] = "alp",
["Alungul"] = "aus-alu",
["Aluo"] = "yna",
["Alur"] = "alz",
["Alutiiq"] = "ems",
["Alviri-Vidari"] = "avd",
["Alyawarr"] = "aly",
["Amahai"] = "amq",
["Tiếng Amal"] = "aad",
["Tiếng Amanab"] = "amn",
["Amanayé"] = "ama",
["Amara"] = "aie",
["Amarakaeri"] = "amr",
["Amarizana"] = "awd-ama",
["Amasi"] = "alv-ama",
["Amatlán Zapotec"] = "zpo",
["Amba"] = "rwm",
["Tiếng Ambai"] = "amk",
["Ambakich"] = "aew",
["Ambala Ayta"] = "abc",
["Ambelau"] = "amv",
["Ambele"] = "ael",
["Amblong"] = "alm",
["Ambo"] = "amb",
["Ambul"] = "apo",
["Tiếng Ambulas"] = "abt",
["Amele"] = "aey",
["Amganad Ifugao"] = "ifa",
["Ami"] = "amy",
["Ammonite"] = "sem-amm",
["Amo"] = "amo",
["Amol"] = "alx",
["Amoltepec Mixtec"] = "mbz",
["Amondawa"] = "adw",
["Amorite"] = "sem-amo",
["Ampanang"] = "apg",
["Ampari Dogon"] = "aqd",
["Amri Karbi"] = "ajz",
["Amto"] = "amt",
["Ana Tinga Dogon"] = "dti",
["Tiếng Anaang"] = "anw",
["Anakalangu"] = "akg",
["Anam"] = "pda",
["Anambé"] = "aan",
["Anamgura"] = "imi",
["Anasi"] = "bpo",
["Tiếng Anauyá"] = "awd-ana",
["Ancient Ligurian"] = "xlg",
["Ancient North Arabian"] = "xna",
["Ancient Zapotec"] = "xzp",
["Andai"] = "afd",
["Andajin"] = "ajn",
["Tiếng Ả Rập Andalusia"] = "xaa",
["Andaman Creole Hindi"] = "hca",
["Andaqui"] = "ana",
["Andarum"] = "aod",
["Andegerebinha"] = "adg",
["Andh"] = "anr",
["Andio"] = "bzb",
["Andjingith"] = "aus-and",
["Andoa"] = "anb",
["Andoque"] = "ano",
["Andoquero"] = "sai-and",
["Andra-Hus"] = "anx",
["Aneityum"] = "aty",
["Anem"] = "anz",
["Aneme Wake"] = "aby",
["Anfillo"] = "myo",
["Angaataha"] = "agm",
["Angaité"] = "aqt",
["Angal"] = "age",
["Angal Enen"] = "aoe",
["Angal Heneng"] = "akh",
["Tiếng Angami"] = "njm",
["Angevin"] = "roa-ang",
["Tiếng Yali Angguruk"] = "yli",
["Angkamuthi"] = "avm",
["Angkola Batak"] = "akb",
["Tiếng Angkula"] = "aus-ang",
["Angloromani"] = "rme",
["Angor"] = "agg",
["Angoram"] = "aog",
["Angosturas Tunebo"] = "tnd",
["Anguthimri"] = "awg",
["Ani Phowa"] = "ypn",
["Animere"] = "anf",
["Anindilyakwa"] = "aoi",
["Anjam"] = "boj",
["Anmatyerre"] = "amx",
["Tiếng Annobón"] = "fab",
["Anong"] = "nun",
["Anor"] = "anj",
["Anserma"] = "ans",
["Ansus"] = "and",
["Antakarinya"] = "ant",
["Antigua and Barbuda Creole English"] = "aig",
["Tiếng Creole Antilles"] = "gcf",
["Anu"] = "anl",
["Anuak"] = "anu",
["Anufo"] = "cko",
["Anus"] = "auq",
["Anuta"] = "aud",
["Anyin Morofo"] = "mtb",
["Tiếng Ao"] = "njo",
["Aoheng"] = "pni",
["Aore"] = "aor",
["Ap Ma"] = "kbx",
["Apalachee"] = "xap",
["Apali"] = "ena",
["Apasco-Apoala Mixtec"] = "mip",
["Tiếng Apatani"] = "apt",
["Apiaká"] = "api",
["Apma"] = "app",
["Apolista"] = "awd-apo",
["Aproumu Aizi"] = "ahp",
["Apurinã"] = "apu",
["Arabana"] = "ard",
["Arabela"] = "arl",
["Aralle-Tabulahan"] = "atq",
["Arammba"] = "stk",
["Aranama-Tamique"] = "xrt",
["Arandai"] = "jbj",
["Araona"] = "aro",
["Tiếng Arapaho"] = "arp",
["Arapaso"] = "arj",
["Arara-Karo"] = "arr",
["Ararandewára"] = "xaj",
["Arawum"] = "awm",
["Arbore"] = "arv",
["Are"] = "mwc",
["Areba"] = "aea",
["Argentine Sign Language"] = "aed",
["Arguni"] = "agf",
["Arhuaco"] = "arh",
["Arhâ"] = "aqr",
["Arhö"] = "aok",
["Tiếng Ari"] = "aac",
["Aribwatsa"] = "laz",
["Aribwaung"] = "ylu",
["Arifama-Miniafia"] = "aai",
["Arigidi"] = "aqg",
["Arikapú"] = "ark",
["Arikara"] = "ari",
["Arikem"] = "ait",
["Tiếng Arin"] = "xrn",
["Aringa"] = "luc",
["Armazic"] = "xrm",
["Armenian Sign Language"] = "aen",
["Arop-Lokep"] = "apr",
["Arop-Sissano"] = "aps",
["Arosi"] = "aia",
["Arritinngithigh"] = "rrt",
["Arta"] = "atz",
["Arua"] = "aru",
["Aruamu"] = "msy",
["Aruek"] = "aur",
["Aruop"] = "lsr",
["Arutani"] = "atx",
["Aruá"] = "arx",
["As"] = "asz",
["Asaro'o"] = "mtv",
["Ashe"] = "ahs",
["Tiếng Ashkun"] = "ask",
["Asho Chin"] = "csh",
["Asháninka"] = "cni",
["Tiếng Ashéninka Pajonal"] = "cjo",
["Ashéninka Perené"] = "prq",
["Tiếng Asi"] = "bno",
["Asilulu"] = "asl",
["Asoa"] = "asv",
["Assangori"] = "sjg",
["Tiếng Assiniboine"] = "asb",
["Asu"] = "aum",
["Asue Awyu"] = "psa",
["Tiếng Asumboa"] = "aua",
["Asunción Mixtepec Zapotec"] = "zoo",
["Ata"] = "atm",
["Ata Manobo"] = "atd",
["Atakapa"] = "aqp",
["Atampaya"] = "amz",
["Atanques"] = "cba-ata",
["Atatláhuca Mixtec"] = "mib",
["Tiếng Atemble"] = "ate",
["Ateso"] = "teo",
["Ati"] = "atk",
["Atohwaim"] = "aqm",
["Atong (Cameroon)"] = "ato",
["Atorada"] = "aox",
["Tiếng Atsahuaca"] = "atc",
["Atsam"] = "cch",
["Atsugewi"] = "atw",
["Attié"] = "ati",
["Au"] = "avt",
["Aulua"] = "aul",
["Aurá"] = "aux",
["Aushi"] = "auh",
["Aushiri"] = "avs",
["Auslan"] = "asf",
["Austral"] = "aut",
["Australian Aboriginal Sign Language"] = "asw",
["Austrian Sign Language"] = "asq",
["Austronesian Mari"] = "hob",
["Auwe"] = "smf",
["Auyana"] = "auy",
["Auye"] = "auu",
["Auyokawa"] = "auo",
["Avatime"] = "avn",
["Avau"] = "avb",
["Avava"] = "tmb",
["Avikam"] = "avi",
["Avá-Canoeiro"] = "avv",
["Awa (China)"] = "vwa",
["Awa (New Guinea)"] = "awb",
["Awa-Cuaiquer"] = "kwi",
["Awabakal"] = "awk",
["Awak"] = "awo",
["Awar"] = "aya",
["Awara"] = "awx",
["Awbono"] = "awh",
["Aweer"] = "bob",
["Awera"] = "awr",
["Awetí"] = "awe",
["Tiếng Awjila"] = "auj",
["Awngthim"] = "gwm",
["Awtuw"] = "kmn",
["Awun"] = "aww",
["Awutu"] = "afu",
["Awyi"] = "auw",
["Axamb"] = "ahb",
["Ayabadhu"] = "ayd",
["Ayautla Mazatec"] = "vmy",
["Ayerrerenge"] = "axe",
["Ayi"] = "ayq",
["Ayizi"] = "yyz",
["Ayizo"] = "ayb",
["Ayomán"] = "sai-ayo",
["Ayoquesco Zapotec"] = "zaf",
["Ayoreo"] = "ayo",
["Ayu"] = "ayu",
["Ayutla Mixtec"] = "miy",
["Azha"] = "aza",
["Azhe"] = "yiz",
["Azoyú Me'phaa"] = "tpc",
["Baa"] = "kwb",
["Tiếng Baagandji"] = "drl",
["Baan"] = "bvj",
["Baangi"] = "bqx",
["Baatonum"] = "bba",
["Baba"] = "bbw",
["Babango"] = "bbm",
["Babanki"] = "bbk",
["Babine-Witsuwit'en"] = "bcr",
["Babole"] = "bvx",
["Tiếng Bacama"] = "bcy",
["Tiếng Mã Lai Bacan"] = "btj",
["Bada"] = "bhz",
["Bade"] = "bde",
["Badeshi"] = "bdz",
["Badimaya"] = "bia",
["Badyara"] = "pbp",
["Baeggu"] = "bvd",
["Baelelea"] = "bvc",
["Baenan"] = "sai-bae",
["Baetora"] = "btr",
["Bafanji"] = "bfj",
["Bafaw"] = "bwt",
["Bafia"] = "ksf",
["Bafut"] = "bfd",
["Baga Kaloum"] = "bqf",
["Baga Koga"] = "bgo",
["Baga Manduri"] = "bmd",
["Baga Pokur"] = "bcg",
["Baga Sitemu"] = "bsp",
["Baga Sobané"] = "bsv",
["Bagheli"] = "bfy",
["Bagirmi"] = "bmi",
["Bago-Kusuntu"] = "bqg",
["Bagri"] = "bgq",
["Tiếng Bagua"] = "sai-bag",
["Bagupi"] = "bpi",
["Bagusa"] = "bqb",
["Baha"] = "yha",
["Baham"] = "bdw",
["Bahamian Creole"] = "bah",
["Baharna Arabic"] = "abv",
["Bahau"] = "bhv",
["Bahinemo"] = "bjh",
["Bahonsuai"] = "bsu",
["Bai"] = "bdj",
["Baibai"] = "bbf",
["Baikeno"] = "bkx",
["Baima"] = "bqh",
["Baimak"] = "bmx",
["Bainouk-Gunyaamolo"] = "bcz",
["Bainouk-Samik"] = "bcb",
["Baissa Fali"] = "fah",
["Bajan"] = "bjs",
["Bajelani"] = "bjm",
["Bajjika"] = "vjk",
["Baka"] = "bkc",
["Bakairí"] = "bkq",
["Bakaka"] = "bqz",
["Baki"] = "bki",
["Bakoko"] = "bkh",
["Bakole"] = "kme",
["Bakpinka"] = "bbs",
["Bakulung"] = "bbu",
["Bakumpai"] = "bkr",
["Tiếng Bakung"] = "xkl",
["Bakwé"] = "bjw",
["Balaesang"] = "bls",
["Balangao"] = "blw",
["Balangingi"] = "sse",
["Tiếng Balantak"] = "blz",
["Balau"] = "blg",
["Baldemu"] = "bdn",
["Bali"] = "bcp",
["Baliledo"] = "poz-bal",
["Balinese Malay"] = "mhp",
["Balkan Romani"] = "rmn",
["Balo"] = "bqo",
["Baloi"] = "biz",
["Balong"] = "bnt-bal",
["Baltic Romani"] = "rml",
["Baluan-Pam"] = "blq",
["Bamako Sign Language"] = "bog",
["Bamali"] = "bbq",
["Bambalang"] = "bmo",
["Bambam"] = "ptu",
["Bambili-Bambui"] = "baw",
["Bamenyam"] = "bce",
["Bamu"] = "bcf",
["Bamukumbit"] = "bqt",
["Bamum"] = "bax",
["Bamunka"] = "bvm",
["Bamwe"] = "bmg",
["Ban Khor Sign Language"] = "bfk",
["Bana"] = "bcw",
["Banam Bay"] = "vrt",
["Banao Itneg"] = "bjx",
["Banaro"] = "byz",
["Banda"] = "bnd",
["Banda Malay"] = "bpq",
["Banda-Bambari"] = "liy",
["Banda-Banda"] = "bpd",
["Banda-Mbrès"] = "bqk",
["Banda-Ndélé"] = "bfl",
["Banda-Yangere"] = "yaj",
["Bandi"] = "bza",
["Bandial"] = "bqj",
["Tiếng Bandjalang"] = "bdy",
["Bangala"] = "bxg",
["Bangandu"] = "bgf",
["Bangba"] = "bbe",
["Tiếng Banggai"] = "bgz",
["Tiếng Bangi"] = "bni",
["Bangime"] = "dba",
["Bangka"] = "mfb",
["Bangolan"] = "bgj",
["Bangubangu"] = "bnx",
["Bangwinji"] = "bsj",
["Baniva"] = "bvv",
["Baniwa"] = "bwi",
["Banka"] = "bxw",
["Bankan Tey Dogon"] = "dbw",
["Tiếng Bankon"] = "abb",
["Banoni"] = "bcm",
["Bantayanon"] = "bfx",
["Bantik"] = "bnq",
["Banyumasan"] = "map-bms",
["Baraamu"] = "brd",
["Baram Kayan"] = "kys",
["Barama"] = "bbg",
["Barambu"] = "brm",
["Baramu"] = "bmz",
["Barapasi"] = "brp",
["Baras"] = "brs",
["Barasana"] = "bsn",
["Barbareño"] = "boi",
["Barclayville Grebo"] = "gry",
["Bardi"] = "bcj",
["Barein"] = "bva",
["Bargam"] = "mlp",
["Bariai"] = "bch",
["Bariji"] = "bjc",
["Barikanchi"] = "bxo",
["Tiếng Barikewa"] = "jbk",
["Barngarla"] = "bjb",
["Barok"] = "bjk",
["Tiếng Barombi"] = "bbi",
["Barranbinya"] = "aus-bra",
["Barro Negro Tunebo"] = "tbn",
["Barrow Point"] = "bpt",
["Baruga"] = "bjz",
["Barunggam"] = "aus-brm",
["Baruya"] = "byr",
["Barwe"] = "bwg",
["Barí"] = "mot",
["Basa"] = "bzw",
["Basa-Gumna"] = "bsl",
["Basa-Gurmana"] = "buj",
["Basap"] = "bdb",
["Bashkardi"] = "bsg",
["Bassa-Kontagora"] = "bsr",
["Bassari"] = "bsc",
["Bassossi"] = "bsi",
["Bata"] = "bta",
["Bataan Ayta"] = "ayt",
["Batad Ifugao"] = "ifb",
["Batanga"] = "bnm",
["Bateri"] = "btv",
["Bathari"] = "bhm",
["Bati (Cameroon)"] = "btc",
["Bati (Indonesia)"] = "bvt",
["Batu"] = "btu",
["Batui"] = "zbt",
["Bau"] = "bbd",
["Bauchi"] = "bsf",
["Baure"] = "brg",
["Bauria"] = "bge",
["Bauro"] = "bxa",
["Bauwaki"] = "bwk",
["Bauzi"] = "bvz",
["Bawm Chin"] = "bgr",
["Bay Miwok"] = "mkq",
["Bayali"] = "bjy",
["Baybayanon"] = "bvy",
["Baygo"] = "byg",
["Bayogoula"] = "nai-bay",
["Bayono"] = "byl",
["Bayot"] = "bda",
["Bayungu"] = "bxj",
["Bazigar"] = "bfr",
["Baïnounk Gubëeher"] = "alv-bgu",
["Beami"] = "beo",
["Beaver"] = "bea",
["Beba"] = "bfp",
["Bebe"] = "bzv",
["Bebele"] = "beb",
["Bebeli"] = "bek",
["Bebil"] = "bxp",
["Bedik"] = "tnr",
["Bedjond"] = "bjv",
["Bedoanas"] = "bed",
["Beeke"] = "bkf",
["Beele"] = "bxq",
["Beembe"] = "beq",
["Beezen"] = "bnz",
["Befang"] = "bby",
["Begbere-Ejar"] = "bqv",
["Bekati'"] = "bei",
["Bekwarra"] = "bkv",
["Bekwel"] = "bkw",
["Belait"] = "beg",
["Belanda Bor"] = "bxb",
["Belanda Viri"] = "bvi",
["Belizean Creole"] = "bzj",
["Bembe"] = "bmb",
["Ben Tey"] = "dbt",
["Bena"] = "yun",
["Benabena"] = "bef",
["Bende"] = "bdp",
["Bendi"] = "bct",
["Beneraf"] = "bnv",
["Beng"] = "nhb",
["Benga"] = "bng",
["Benggoi"] = "bgy",
["Bengkala Sign Language"] = "bqy",
["Bentong"] = "bnu",
["Benyadu'"] = "byd",
["Beothuk"] = "bue",
["Bepour"] = "bie",
["Bera"] = "brf",
["Berakou"] = "bxv",
["Berau Malay"] = "bve",
["Berawan"] = "lod",
["Bergish"] = "gmw-bgh",
["Berinomo"] = "bit",
["Berom"] = "bom",
["Berta"] = "wti",
["Berti"] = "byt",
["Besme"] = "bes",
["Besoa"] = "bep",
["Betaf"] = "bfe",
["Bete"] = "byf",
["Bete-Bendi"] = "btt",
["Betoi"] = "sai-bet",
["Betta Kurumba"] = "xub",
["Bhadrawahi"] = "bhd",
["Bhalay"] = "bhx",
["Bharia"] = "bha",
["Bhatri"] = "bgw",
["Bhattiyali"] = "bht",
["Bhaya"] = "bhe",
["Bhele"] = "bhy",
["Bhilali"] = "bhi",
["Bhoti Kinnauri"] = "nes",
["Bhunjia"] = "bhu",
["Biafada"] = "bif",
["Biage"] = "bdf",
["Biak"] = "bhw",
["Biali"] = "beh",
["Bian Marind"] = "bpv",
["Biangai"] = "big",
["Biao"] = "byk",
["Biao Mon"] = "bmt",
["Biao-Jiao Mien"] = "bje",
["Bibaali"] = "bcn",
["Bibbulman"] = "xbp",
["Bidiyo"] = "bid",
["Bidyara"] = "bym",
["Bidyogo"] = "bjg",
["Biem"] = "bmc",
["Bierebo"] = "bnk",
["Bieria"] = "brj",
["Biete"] = "biu",
["Big Nambas"] = "nmb",
["Biga"] = "bhc",
["Bigambal"] = "xbe",
["Bikaru"] = "bic",
["Bikya"] = "byb",
["Bila"] = "bip",
["Bilakura"] = "bql",
["Bilba"] = "bpz",
["Bilbil"] = "brz",
["Bile"] = "bil",
["Biliau"] = "bcu",
["Biloxi"] = "bll",
["Tiếng Bilua"] = "blb",
["Bilur"] = "bxf",
["Tiếng Bima"] = "bhp",
["Bimin"] = "bhl",
["Bimoba"] = "bim",
["Bina"] = "bmn",
["Binahari"] = "bxz",
["Binandere"] = "bhg",
["Binawa"] = "byj",
["Bindal"] = "xbd",
["Bine"] = "bon",
["Binji"] = "bpj",
["Binongan Itneg"] = "itb",
["Bintauna"] = "bne",
["Bintulu"] = "bny",
["Binukid"] = "bkd",
["Binumarien"] = "bjr",
["Bipi"] = "biq",
["Birgid"] = "brk",
["Birgit"] = "btf",
["Biri"] = "bzr",
["Biritai"] = "bqq",
["Birri"] = "bvq",
["Birrpayi"] = "xbj",
["Birwa"] = "brl",
["Biseni"] = "ije",
["Bishuo"] = "bwh",
["Bisis"] = "bnw",
["Bisorio"] = "bir",
["Tiếng Bissa"] = "bib",
["Bitare"] = "brt",
["Bitur"] = "mcc",
["Biwat"] = "bwm",
["Biyo"] = "byo",
["Biyom"] = "bpm",
["Blablanga"] = "blp",
["Black Speech"] = "art-bsp",
["Blafe"] = "bfh",
["Bo"] = "bgl",
["Bo-Rukul"] = "mae",
["Bo-Ung"] = "mux",
["Boano (Maluku)"] = "bzn",
["Boano (Sulawesi)"] = "bzl",
["Bobongko"] = "bgb",
["Bobot"] = "bty",
["Bodo (Central Africa)"] = "boy",
["Tiếng Gadaba Bodo"] = "gbj",
["Bodo Parja"] = "bdv",
["Bofi"] = "bff",
["Boga"] = "bvw",
["Bogaya"] = "boq",
["Boguru"] = "bqu",
["Tiếng Tân Aram Bohtan"] = "bhn",
["Boikin"] = "bzf",
["Bokha"] = "ybk",
["Boko"] = "bqc",
["Bokoto"] = "bdt",
["Bokyi"] = "bky",
["Tiếng Bola"] = "bnp",
["Bolak"] = "art-blk",
["Bolango"] = "bld",
["Bole"] = "bol",
["Bolgo"] = "bvo",
["Bolia"] = "bli",
["Bolinao"] = "smk",
["Bolivian Sign Language"] = "bvl",
["Boloki"] = "bkt",
["Bolon"] = "bof",
["Bolondo"] = "bzm",
["Bolongan"] = "blj",
["Bom"] = "bmf",
["Boma Nkuu"] = "bnt-bon",
["Boma Yumu"] = "bnt-boy",
["Bomboli"] = "bml",
["Bomboma"] = "bws",
["Bomitaba"] = "zmx",
["Bomu"] = "bmq",
["Bomwali"] = "bmw",
["Bon Gula"] = "glc",
["Bondei"] = "bou",
["Bondoukou Kulango"] = "kzc",
["Bondum Dom Dogon"] = "dbu",
["Bonerate"] = "bna",
["Bonggi"] = "bdg",
["Bonggo"] = "bpg",
["Bongili"] = "bui",
["Bongo"] = "bot",
["Bongu"] = "bpu",
["Bonjo"] = "bok",
["Bonkeng"] = "bvg",
["Bonkiman"] = "bop",
["Bookan"] = "bnb",
["Boor"] = "bvf",
["Bora"] = "boa",
["Border Kuna"] = "kvn",
["Borei"] = "gai",
["Boro"] = "xxb",
["Borong"] = "ksr",
["Boruca"] = "brn",
["Boselewa"] = "bwf",
["Bosngun"] = "bqs",
["Bote-Majhi"] = "bmj",
["Botolan Sambal"] = "sbl",
["Bouna Kulango"] = "nku",
["Bourbonnais-Berrichon"] = "roa-bbn",
["Tiếng Bourguignon"] = "roa-brg",
["Bozaba"] = "bzo",
["Bragat"] = "aof",
["Brazilian Sign Language"] = "bzs",
["Brek Karen"] = "kvl",
["Brem"] = "buq",
["Bribri"] = "bzd",
["British Sign Language"] = "bfi",
["Brokkat"] = "bro",
["Brokpake"] = "sgt",
["Brokskat"] = "bkk",
["Broome Pearling Lugger Pidgin"] = "bpl",
["Brunei Bisaya"] = "bsb",
["Bruny Island"] = "xpz",
["Bu"] = "jid",
["Bu-Nao Bunu"] = "bwx",
["Bua"] = "bub",
["Bualkhaw Chin"] = "cbl",
["Buamu"] = "box",
["Tiếng Bube"] = "bvb",
["Bubi"] = "buw",
["Bubia"] = "bbx",
["Budibud"] = "btp",
["Budong-Budong"] = "bdx",
["Budu"] = "buu",
["Buduma"] = "bdm",
["Budza"] = "bja",
["Buena Vista Yokuts"] = "nai-bvy",
["Buglere"] = "sab",
["Bugun"] = "bgg",
["Buhi'non Bikol"] = "ubl",
["Tiếng Buhid"] = "bku",
["Buhutu"] = "bxh",
["Bujhyal"] = "byh",
["Bukar-Sadung Bidayuh"] = "sdo",
["Bukat"] = "bvk",
["Bukawa"] = "buk",
["Bukit Malay"] = "bvu",
["Bukitan"] = "bkn",
["Bukiyip"] = "ape",
["Buksa"] = "tkb",
["Bukusu"] = "bxk",
["Bulgarian Sign Language"] = "bqn",
["Bulgebi"] = "bmp",
["Buli (Ghana)"] = "bwu",
["Buli (Indonesia)"] = "bzq",
["Bulu (Cameroon)"] = "bum",
["Bulu (New Guinea)"] = "bjl",
["Bum"] = "bmv",
["Bumaji"] = "byp",
["Bumbita Arapesh"] = "aon",
["Bumthangkha"] = "kjz",
["Bun"] = "buv",
["Buna"] = "bvn",
["Bunaba"] = "bck",
["Bunak"] = "bfn",
["Bunama"] = "bdd",
["Bundeli"] = "bns",
["Bung"] = "bqd",
["Bungain"] = "but",
["Bunganditj"] = "xbg",
["Tiếng Bungku"] = "bkz",
["Bungu"] = "wun",
["Bunoge"] = "dgb",
["Buol"] = "blf",
["Bura"] = "bwr",
["Burak"] = "bys",
["Buraka"] = "bkg",
["Burarra"] = "bvr",
["Burate"] = "bti",
["Burduna"] = "bxn",
["Bure"] = "bvh",
["Burgundian"] = "gem-bur",
["Burmeso"] = "bzu",
["Buru (Indonesia)"] = "mhs",
["Buru (Nigeria)"] = "bqw",
["Burui"] = "bry",
["Burumakok"] = "aip",
["Burun"] = "bdi",
["Burusu"] = "bqr",
["Buruwai"] = "asi",
["Busam"] = "bxs",
["Busami"] = "bsm",
["Busang Kayan"] = "bfg",
["Bushoong"] = "buf",
["Buso"] = "bso",
["Busoa"] = "bup",
["Bussa"] = "dox",
["Busuu"] = "bju",
["Butbut Kalinga"] = "kyb",
["Butchulla"] = "xby",
["Butmas-Tur"] = "bnr",
["Tiếng Butuanon"] = "btw",
["Buwal"] = "bhs",
["Buyeo"] = "xpy",
["Buyu"] = "byi",
["Buyuan Jino"] = "jiy",
["Bwa"] = "bww",
["Bwaidoka"] = "bwd",
["Bwala"] = "bnt-bwa",
["Bwanabwana"] = "tte",
["Bwatoo"] = "bwa",
["Bwela"] = "bwl",
["Bwile"] = "bwc",
["Bwisi"] = "bwz",
["Byangsi"] = "bee",
["Byep"] = "mkk",
["Bädi Kanum"] = "khd",
["Caac"] = "msq",
["Cabiyarí"] = "cbb",
["Cabécar"] = "cjp",
["Cacaloxtepec Mixtec"] = "miu",
["Cacaopera"] = "ccr",
["Cacua"] = "cbv",
["Cacán"] = "sai-cac",
["Caddo"] = "cad",
["Cafundó"] = "ccd",
["Cahuarano"] = "cah",
["Cajonos Zapotec"] = "zad",
["Caka"] = "ckx",
["Cakchiquel-Quiché Mixed Language"] = "ckz",
["Cakfem-Mushere"] = "cky",
["Calabrian Greek"] = "grk-cal",
["Calamian Tagbanwa"] = "tbk",
["Callawalla"] = "caw",
["Calusa"] = "nai-cal",
["Caluyanun"] = "clu",
["Caló"] = "rmq",
["Camarines Norte Agta"] = "abd",
["Cameroon Mambila"] = "mcu",
["Cameroon Pidgin"] = "wes",
["Campalagian"] = "cml",
["Camsá"] = "kbh",
["Camtho"] = "cmt",
["Camunic"] = "xcc",
["Candoshi-Shapra"] = "cbu",
["Canichana"] = "caz",
["Cao Miao"] = "cov",
["Tiếng Capanahua"] = "kaq",
["Capiznon"] = "cps",
["Caquinte"] = "cot",
["Cara"] = "cfd",
["Carabayo"] = "cby",
["Caramanta"] = "crf",
["Caranqui"] = "sai-caq",
["Carapana"] = "cbc",
["Carian"] = "xcr",
["Cariay"] = "awd-kar",
["Carijona"] = "cbd",
["Carolina Algonquian"] = "crr",
["Carolinian"] = "cal",
["Carpathian Romani"] = "rmc",
["Cashibo-Cacataibo"] = "cbr",
["Cashinahua"] = "cbs",
["Casiguran Dumagat Agta"] = "dgc",
["Casuarina Coast Asmat"] = "asc",
["Catacao"] = "sai-cat",
["Catalan Sign Language"] = "csc",
["Tiếng Catawba"] = "chc",
["Catuquinaru"] = "sai-ctq",
["Catío Chibcha"] = "cba-cat",
["Cauca"] = "cca",
["Cavere"] = "awd-cav",
["Cavineña"] = "cav",
["Cayubaba"] = "cyb",
["Cayuse"] = "xcy",
["Cazcan"] = "azc-caz",
["Cañari"] = "sai-cnr",
["Cebaara Senoufo"] = "sef",
["Cemuhî"] = "cam",
["Cen"] = "cen",
["Central Asmat"] = "cns",
["Central Awyu"] = "awu",
["Tiếng Bạch Trung"] = "bca",
["Central Bontoc"] = "lbk",
["Central Cagayan Agta"] = "agt",
["Tiếng Trung Dusun"] = "dtp",
["Central Grebo"] = "grv",
["Central Huishui Hmong"] = "hmc",
["Central Maewo"] = "mwo",
["Central Mahuatlán Zapoteco"] = "zam",
["Central Malay"] = "pse",
["Central Masela"] = "mxz",
["Central Mashan Hmong"] = "hmm",
["Central Melanau"] = "mel",
["Central Ojibwa"] = "ojc",
["Central Palawano"] = "plc",
["Central Pame"] = "pbs",
["Central Pomo"] = "poo",
["Central Puebla Nahuatl"] = "ncx",
["Central Sama"] = "sml",
["Central Siberian Yupik"] = "ess",
["Central Sierra Miwok"] = "csm",
["Central Subanen"] = "syb",
["Central Tagbanwa"] = "tgt",
["Central Tarahumara"] = "tar",
["Central Teke"] = "nzu",
["Central Tunebo"] = "tuf",
["Centúúm"] = "cet",
["Cerma"] = "cme",
["Ch'olti'"] = "myn-chl",
["Chaap Wuurong"] = "tjw",
["Chadian Sign Language"] = "cds",
["Chaha"] = "sem-cha",
["Chairel"] = "sit-cha",
["Chak"] = "ckh",
["Chakali"] = "cli",
["Chala"] = "cll",
["Chaldean Neo-Aramaic"] = "cld",
["Chali"] = "tgf",
["Chamacoco"] = "ceg",
["Chamba Daka"] = "ccg",
["Chamba Leko"] = "ndi",
["Chambri"] = "can",
["Champenois"] = "roa-cha",
["Chang"] = "nbc",
["Changriwa"] = "cga",
["Changthang"] = "cna",
["Chantyal"] = "chx",
["Chaná"] = "sai-chn",
["Chané"] = "caj",
["Chapacura"] = "sai-chp",
["Chara"] = "cra",
["Charrua"] = "sai-chr",
["Chaudangsi"] = "cdn",
["Chayahuita"] = "cbt",
["Chazumba Mixtec"] = "xtb",
["Che"] = "ruk",
["Cheke Holo"] = "mrn",
["Chemakum"] = "xch",
["Chenapian"] = "cjn",
["Chenchu"] = "cde",
["Chenoua"] = "cnu",
["Chepya"] = "ycp",
["Cherepon"] = "cpn",
["Chesu"] = "ych",
["Chetco-Tolowa"] = "ctc",
["Chhintange"] = "ctn",
["Chhulung"] = "cur",
["Chiangmai Sign Language"] = "csd",
["Chiapanec"] = "cip",
["Tiếng Triqui Chicahuaxtla"] = "trs",
["Chichicapan Zapotec"] = "zpv",
["Chichimeca-Jonaz"] = "pei",
["Chichonyi-Chidzihana-Chikauma"] = "coh",
["Chicomuceltec"] = "cob",
["Chiduruma"] = "dug",
["Chigmecatitlán Mixtec"] = "mii",
["Chilcotin"] = "clc",
["Chilean Sign Language"] = "csg",
["Chilisso"] = "clh",
["Chiltepec Chinantec"] = "csa",
["Chimalapa Zoque"] = "zoh",
["Chimariko"] = "cid",
["Chimila"] = "cbg",
["Chimwiini"] = "bnt-cmw",
["Chinali"] = "cih",
["Chinbon Chin"] = "cnb",
["Chinese Pidgin English"] = "cpi",
["Chinese Sign Language"] = "csl",
["Chipaya"] = "cap",
["Chiquihuitlán Mazatec"] = "maq",
["Chiquimulilla"] = "nai-chi",
["Chiquitano"] = "cax",
["Tiếng Chiricahua"] = "apm",
["Chirino"] = "sai-chi",
["Chiripá"] = "nhd",
["Chitimacha"] = "ctm",
["Chitkuli Kinnauri"] = "cik",
["Chitwania Tharu"] = "the",
["Choapan Zapotec"] = "zpc",
["Chochotec"] = "coz",
["Chokri Naga"] = "nri",
["Chokwe"] = "cjk",
["Tiếng Chol"] = "ctu",
["Cholón"] = "cht",
["Chono"] = "sai-cno",
["Chopi"] = "cce",
["Chuabo"] = "chw",
["Chuanqiandian Cluster Miao"] = "cqd",
["Chuave"] = "cjv",
["Chug"] = "cvg",
["Chuj"] = "cac",
["Chuka"] = "cuh",
["Chukwa"] = "cuw",
["Chumburung"] = "ncu",
["Tiếng Churah"] = "cdj",
["Churuya"] = "sai-chu",
["Chácobo"] = "cao",
["Ci Gbe"] = "cib",
["Cibak"] = "ckl",
["Cicipu"] = "awc",
["Ciguayo"] = "nai-cig",
["Cinamiguin Manobo"] = "mkx",
["Cinda-Regi-Tiyal"] = "cdr",
["Cineni"] = "cie",
["Cinta Larga"] = "cin",
["Cishingini"] = "asg",
["Citak"] = "txt",
["Ciwogai"] = "tgd",
["Classical Gaelic"] = "ghc",
["Classical Guaraní"] = "gn-cls",
["Classical Mandaic"] = "myz",
["Classical Newar"] = "nwc",
["Classical Quechua"] = "qwc",
["Coahuilteco"] = "xcw",
["Coast Miwok"] = "csi",
["Tiếng Kadazan bờ biển"] = "kzj",
["Coastal Konjo"] = "kjc",
["Coatecas Altas Zapotec"] = "zca",
["Coatepec Nahuatl"] = "naz",
["Coatlán Mixe"] = "mco",
["Coatlán Zapotec"] = "zps",
["Coatzospan Mixtec"] = "miz",
["Tiếng Cocama"] = "cod",
["Tiếng Cochimi"] = "coj",
["Cocopa"] = "coc",
["Cocos Islands Malay"] = "coa",
["Coeruna"] = "sai-coe",
["Coeur d'Alene"] = "crd",
["Cogui"] = "kog",
["Col"] = "liw",
["Colombian Sign Language"] = "csn",
["Colonia Tovar German"] = "gct",
["Columbia-Wenatchi"] = "col",
["Colán"] = "sai-col",
["Comaltepec Chinantec"] = "cco",
["Comechingon"] = "sai-cmg",
["Comecrudo"] = "xcm",
["Communicationssprache"] = "art-com",
["Como Karim"] = "cfg",
["Con"] = "cno",
["Coos"] = "csz",
["Copainalá Zoque"] = "zoc",
["Copala Triqui"] = "trc",
["Copallén"] = "sai-cop",
["Coquille"] = "coq",
["Cora"] = "crn",
["Cori"] = "cry",
["Coroado Puri"] = "sai-crd",
["Cosoleacaque Nahuatl"] = "nhk",
["Costa Rican Sign Language"] = "csr",
["Cotabato Manobo"] = "mta",
["Cotoname"] = "xcn",
["Tiếng Cowlitz"] = "cow",
["Coyaima"] = "coy",
["Coyotepec Popoloca"] = "pbf",
["Coyutla Totonac"] = "toc",
["Crimean Gothic"] = "gme-cgo",
["Croatian Sign Language"] = "csq",
["Cross River Mbembe"] = "mfn",
["Cruzeño"] = "crz",
["Cuban Sign Language"] = "csf",
["Cubeo"] = "cub",
["Cueva"] = "sai-cva",
["Cuiba"] = "cui",
["Cuitlatec"] = "cuy",
["Culina"] = "cul",
["Culli"] = "sai-cul",
["Cumanagoto"] = "cuo",
["Cumbric"] = "xcb",
["Cun"] = "cuq",
["Cung"] = "cug",
["Curonian"] = "xcu",
["Curripaco"] = "kpc",
["Cutchi-Swahili"] = "ccl",
["Cuvok"] = "cuv",
["Cuyamecalco Mixtec"] = "xtu",
["Tiếng Cuyunon"] = "cyo",
["Cwi Bwamu"] = "bwy",
["Czech Sign Language"] = "cse",
["Tiếng Cống"] = "cnc",
["Da'a Kaili"] = "kzf",
["Daai Chin"] = "dao",
["Daantanai'"] = "lni",
["Daba"] = "dbq",
["Dabe"] = "dbe",
["Dadanitic"] = "sem-dad",
["Dadi Dadi"] = "dda",
["Dadiya"] = "dbd",
["Daga"] = "dgz",
["Dagaari Dioula"] = "dgd",
["Dagba"] = "dgk",
["Dagik"] = "dec",
["Dagoman"] = "dgn",
["Daho-Doo"] = "das",
["Dai"] = "dij",
["Dair"] = "drb",
["Dairi Batak"] = "btd",
["Dakaka"] = "bpa",
["Dakka"] = "dkk",
["Dakpa"] = "dka",
["Daloa Bété"] = "bev",
["Dama (Nigeria)"] = "dmm",
["Dama (Sierra Leone)"] = "dmn-dam",
["Damakawa"] = "dam",
["Damal"] = "uhn",
["Dameli"] = "dml",
["Dampelas"] = "dms",
["Danaru"] = "dnr",
["Dandami Maria"] = "daq",
["Dangaura Tharu"] = "thl",
["Danish Sign Language"] = "dsl",
["Dano"] = "aso",
["Dao"] = "daz",
["Daonda"] = "dnd",
["Dar Daju Daju"] = "djc",
["Dar Fur Daju"] = "daj",
["Dar Sila Daju"] = "dau",
["Darai"] = "dry",
["Darkinjung"] = "xda",
["Darlong"] = "dln",
["Darmiya"] = "drd",
["Daro-Matu Melanau"] = "dro",
["Darumbal"] = "xgm",
["Dass"] = "dot",
["Datooga"] = "tcc",
["Daungwurrung"] = "dgw",
["Davawenyo"] = "daw",
["Dawawa"] = "dww",
["Dawera-Daweloor"] = "ddw",
["Day"] = "dai",
["Dayi"] = "dax",
["Dazaga"] = "dzg",
["Deccani"] = "dcc",
["Dedua"] = "ded",
["Defaka"] = "afn",
["Defi Gbe"] = "gbh",
["Deg"] = "mzw",
["Tiếng Deg Xinag"] = "ing",
["Degenan"] = "dge",
["Dehwari"] = "deh",
["Dek"] = "dek",
["Dela-Oenale"] = "row",
["Delo"] = "ntr",
["Delta Yokuts"] = "nai-dly",
["Dem"] = "dem",
["Dema"] = "dmx",
["Demisa"] = "dei",
["Demta"] = "dmy",
["Dena'ina"] = "tfn",
["Dendi"] = "ddn",
["Dengese"] = "dez",
["Dengka"] = "dnk",
["Deno"] = "dbb",
["Denya"] = "anv",
["Dení"] = "dny",
["Deori"] = "der",
["Desano"] = "des",
["Dewas Rai"] = "dwz",
["Dewoin"] = "dee",
["Dezfuli"] = "def",
["Dghwede"] = "dgh",
["Dhaiso"] = "dhs",
["Dhalandji"] = "dhl",
["Dhangu"] = "dhg",
["Dhao"] = "nfa",
["Tiếng Dharug"] = "xdk",
["Dhatki"] = "mki",
["Dhimal"] = "dhi",
["Dhofari Arabic"] = "adf",
["Dhudhuroa"] = "ddr",
["Dhungaloo"] = "dhx",
["Dhurga"] = "dhu",
["Dhuwal"] = "dwu",
["Dhuwaya"] = "dwy",
["Dia"] = "dia",
["Dibiyaso"] = "dby",
["Dibo"] = "dio",
["Dicamay Agta"] = "duy",
["Didinga"] = "did",
["Tiếng Dieri"] = "dif",
["Digo"] = "dig",
["Dii"] = "dur",
["Dijim-Bwilim"] = "cfa",
["Dilling"] = "dil",
["Dima"] = "jma",
["Tiếng Dimasa"] = "dis",
["Dimbong"] = "dii",
["Dime"] = "dim",
["Dinapigue Agta"] = "phi-din",
["Dineor"] = "mrx",
["Ding"] = "diz",
["Diodio"] = "ddi",
["Diri"] = "dwa",
["Dirim"] = "dir",
["Disa"] = "dsi",
["Diuwe"] = "diy",
["Diuxi-Tilantongo Mixtec"] = "xtd",
["Dixon Reef"] = "dix",
["Djadjawurrung"] = "dja",
["Djambarrpuyngu"] = "djr",
["Djangun"] = "djf",
["Djauan"] = "djn",
["Djawi"] = "djw",
["Djimini"] = "dyi",
["Djinang"] = "dji",
["Djinba"] = "djb",
["Djiwarli"] = "djl",
["Dobel"] = "kvo",
["Dobu"] = "dob",
["Doe"] = "doe",
["Doga"] = "dgg",
["Doghoro"] = "dgx",
["Dogoso"] = "dgs",
["Dogosé"] = "dos",
["Dogul Dom"] = "dbg",
["Doka"] = "dbi",
["Doko-Uyanga"] = "uya",
["Dom"] = "doa",
["Domaaki"] = "dmk",
["Dominican Sign Language"] = "doq",
["Dompo"] = "doy",
["Domu"] = "dof",
["Domung"] = "dev",
["Dondo"] = "dok",
["Dong"] = "doh",
["Dongo"] = "doo",
["Dongotono"] = "ddd",
["Dongshanba Lalo"] = "yik",
["Donno So Dogon"] = "dds",
["Doondo"] = "dde",
["Dorasque"] = "cba-dor",
["Dori'o"] = "dor",
["Dorig"] = "wwo",
["Doromu-Koki"] = "kqc",
["Dorze"] = "doz",
["Doso"] = "dol",
["Tiếng Doteli"] = "dty",
["Dothraki"] = "art-dtk",
["Doura"] = "don",
["Doutai"] = "tds",
["Doyayo"] = "dow",
["Drehu"] = "dhv",
["Duala"] = "dua",
["Duano"] = "dup",
["Duau"] = "dva",
["Dubu"] = "dmu",
["Dugun"] = "ndu",
["Duguri"] = "dbm",
["Dugwor"] = "dme",
["Duhwa"] = "kbz",
["Duit"] = "cba-dui",
["Duke"] = "nke",
["Dulbu"] = "dbo",
["Duli"] = "duz",
["Duma"] = "dma",
["Dumaitic"] = "sem-dum",
["Dumbea"] = "duf",
["Dumi"] = "dus",
["Dumpas"] = "dmv",
["Dumun"] = "dui",
["Duna"] = "duc",
["Dungmali"] = "raa",
["Dungu"] = "dbv",
["Tiếng Agta Dupaningan"] = "duo",
["Dura"] = "drq",
["Duri"] = "mvp",
["Duriankere"] = "dbn",
["Tiếng Duruwa"] = "pci",
["Dusner"] = "dsn",
["Dusun Deyah"] = "dun",
["Dusun Malang"] = "duq",
["Tiếng Dusun Witu"] = "duw",
["Tiếng Hạ Saxon Hà Lan"] = "nds-nl",
["Dutch Sign Language"] = "dse",
["Duupa"] = "dae",
["Duvle"] = "duv",
["Duwai"] = "dbp",
["Duwet"] = "gve",
["Dwang"] = "nnu",
["Dyaabugay"] = "dyy",
["Dyaberdyaber"] = "dyb",
["Dyan"] = "dya",
["Dyangadi"] = "dyn",
["Dyugun"] = "dyd",
["Tiếng Dyula"] = "dyu",
["Dza"] = "jen",
["Dzala"] = "dzl",
["Dzando"] = "dzn",
["Dzao Min"] = "bpn",
["Dzodinka"] = "add",
["Dâw"] = "kwa",
["Tiếng Ai"] = "eee",
["E'ma Buyang"] = "yzg",
["Tiếng Assam cận đại"] = "inc-oas",
["Early Modern Korean"] = "ko-ear",
["Early Tripuri"] = "xtr",
["East Damar"] = "dmr",
["East Franconian"] = "vmf",
["East Kewa"] = "kjs",
["East Limba"] = "lma",
["East Makian"] = "mky",
["East Masela"] = "vme",
["East Nyala"] = "nle",
["East Tarangan"] = "tre",
["Eastern Acipa"] = "acp",
["Tiếng Arrernte Đông"] = "aer",
["Eastern Bolivian Guaraní"] = "gui",
["Eastern Canadian Inuktitut"] = "ike",
["Eastern Durango Nahuatl"] = "azd",
["Eastern Gurung"] = "ggn",
["Eastern Highland Chatino"] = "cly",
["Eastern Highland Otomi"] = "otm",
["Eastern Huasteca Nahuatl"] = "nhe",
["Eastern Huishui Hmong"] = "hme",
["Eastern Karaboro"] = "xrb",
["Eastern Kayah"] = "eky",
["Eastern Keres"] = "kee",
["Eastern Krahn"] = "kqo",
["Eastern Lalu"] = "yit",
["Eastern Maninkakan"] = "emk",
["Eastern Meohang"] = "emg",
["Eastern Muria"] = "emu",
["Eastern Ngad'a"] = "nea",
["Eastern Nisu"] = "nos",
["Eastern Ojibwa"] = "ojg",
["Eastern Penan"] = "pez",
["Eastern Pomo"] = "peb",
["Eastern Qiandong Miao"] = "hmq",
["Eastern Subanun"] = "sfe",
["Eastern Tawbuid"] = "bnj",
["Eastern Xiangxi Miao"] = "muq",
["Eastern Xwla Gbe"] = "gbx",
["Ebira"] = "igb",
["Ecuadorian Sign Language"] = "ecs",
["Ede Cabe"] = "cbj",
["Ede Ica"] = "ica",
["Ede Ije"] = "ijj",
["Edera Awyu"] = "awy",
["Edolo"] = "etr",
["Edomite"] = "xdm",
["Edopi"] = "dbf",
["Efutop"] = "ofu",
["Egyptian Sign Language"] = "esl",
["Ejamat"] = "eja",
["Ekajuk"] = "eka",
["Ekari"] = "ekg",
["Ekele"] = "khy",
["Eki"] = "eki",
["Ekit"] = "eke",
["Ekpeye"] = "ekp",
["El Alto Zapotec"] = "zpp",
["El Hugeirat"] = "elh",
["Eleme"] = "elm",
["Elepi"] = "ele",
["Elip"] = "ekm",
["Elkei"] = "elk",
["Eloi"] = "art-elo",
["Elotepec Zapotec"] = "zte",
["Eloyi"] = "afo",
["Elseng"] = "mrf",
["Elu"] = "elu",
["Emae"] = "mmw",
["Emai"] = "ema",
["Eman"] = "emn",
["Embaloh"] = "emb",
["Emberá-Baudó"] = "bdc",
["Emberá-Catío"] = "cto",
["Emem"] = "enr",
["Emerillon"] = "eme",
["Emplawas"] = "emw",
["Enawené-Nawé"] = "unk",
["Ende"] = "end",
["Enga"] = "enq",
["Enggano"] = "eno",
["Enlhet"] = "enl",
["Enrekang"] = "ptt",
["Enu"] = "enu",
["Enwan"] = "env",
["Enwang"] = "enw",
["Enxet"] = "enx",
["Enya"] = "gey",
["Epena"] = "sja",
["Epi-Olmec"] = "xep",
["Epigraphic Mayan"] = "emy",
["Eravallan"] = "era",
["Erave"] = "kjy",
["Ere"] = "twp",
["Erie"] = "iro-ere",
["Eritai"] = "ert",
["Erokwanas"] = "erw",
["Erre"] = "err",
["Erromintxela"] = "emx",
["Eruwa"] = "erh",
["Ese Ejja"] = "ese",
["Eshtehardi"] = "esh",
["Eskayan"] = "esy",
["Esmeralda"] = "sai-esm",
["Esselen"] = "esq",
["Estado de México Otomi"] = "ots",
["Estonian Sign Language"] = "eso",
["Esuma"] = "esm",
["Etchemin"] = "etc",
["Etebi"] = "etb",
["Eten"] = "etx",
["Eteocypriot"] = "ecy",
["Ethiopian Sign Language"] = "eth",
["Etkywan"] = "ich",
["Eton (Cameroon)"] = "eto",
["Eton (Vanuatu)"] = "etn",
["Etulo"] = "utr",
["Evant"] = "bzz",
["Ewage-Notu"] = "nou",
["Ewarhuyana"] = "sai-ewa",
["Ewondo"] = "ewo",
["Extremaduran"] = "ext",
["Eyak"] = "eya",
["Ezaa"] = "eza",
["Fagani"] = "faf",
["Faire Atta"] = "azt",
["Faita"] = "faj",
["Faiwol"] = "fai",
["Fakkanci"] = "gel",
["Falam Chin"] = "cfm",
["Fali"] = "fli",
["Fam"] = "fam",
["Tiếng Fanagalo"] = "fng",
["Fanamaket"] = "bjp",
["Fang (Bantu)"] = "fan",
["Fang (Beboid)"] = "fak",
["Fania"] = "fni",
["Far Western Muria"] = "fmu",
["Fas"] = "fqs",
["Fasu"] = "faa",
["Fataleka"] = "far",
["Fataluku"] = "ddg",
["Fayu"] = "fau",
["Fedan"] = "pdn",
["Fembe"] = "agl",
["Fer"] = "kah",
["Feroge"] = "fer",
["Filomena Mata-Coahuitlán Totonac"] = "tlp",
["Finisterre Yau"] = "yuw",
["Finnish Sign Language"] = "fse",
["Finnish-Swedish Sign Language"] = "fss",
["Finongan"] = "fag",
["Fipa"] = "fip",
["Firan"] = "fir",
["Fiwaga"] = "fiw",
["Flemish Sign Language"] = "vgt",
["Flinders Island"] = "fln",
["Foau"] = "flh",
["Tiếng Foi"] = "foi",
["Foia Foia"] = "ffi",
["Folopa"] = "ppo",
["Foma"] = "fom",
["Fongoro"] = "fgr",
["Foodo"] = "fod",
["Forak"] = "frq",
["Fordata"] = "frd",
["Fore"] = "for",
["Forest Nenets"] = "syd-fne",
["Fortsenal"] = "frt",
["Franc-Comtois"] = "roa-fcm",
["Francisco León Zoque"] = "zos",
["French Belgian Sign Language"] = "sfb",
["French Sign Language"] = "fsl",
["Fuliiru"] = "flr",
["Fulniô"] = "fun",
["Fum"] = "fum",
["Fungwa"] = "ula",
["Furu"] = "fuu",
["Futuna-Aniwa"] = "fut",
["Fuyug"] = "fuy",
["Fwe"] = "fwe",
["Fwâi"] = "fwa",
["Fyam"] = "pym",
["Fyer"] = "fie",
["Ga'anda"] = "gqa",
["Ga'dang"] = "gdg",
["Gaa"] = "ttb",
["Gaam"] = "tbi",
["Gabadi"] = "kbt",
["Gabi"] = "gbw",
["Gabrielino-Fernandeño"] = "xgf",
["Gadang"] = "gdk",
["Gaddi"] = "gbk",
["Gade"] = "ged",
["Gadjerawang"] = "gdh",
["Gadsup"] = "gaj",
["Gafat"] = "gft",
["Gagadu"] = "gbu",
["Gagnoa Bété"] = "btg",
["Gahri"] = "bfu",
["Gaikundi"] = "gbf",
["Gaina"] = "gcn",
["Gal"] = "gap",
["Galambu"] = "glo",
["Galela"] = "gbi",
["Galeya"] = "gar",
["Galice"] = "gce",
["Galindian"] = "xgl",
["Gallaecian"] = "cel-gal",
["Tiếng Gallo"] = "roa-gal",
["Tiếng Gallura"] = "sdn",
["Tiếng Galo"] = "adl",
["Galoli"] = "gal",
["Gambera"] = "gma",
["Gamela"] = "sai-gam",
["Tiếng Gamilaraay"] = "kld",
["Gamkonora"] = "gak",
["Gamo-Ningi"] = "bte",
["Gana"] = "gnq",
["Ganang"] = "gne",
["Gane"] = "gzn",
["Ganggalida"] = "gcd",
["Ganglau"] = "ggl",
["Gangte"] = "gnb",
["Gangulu"] = "gnl",
["Gants"] = "gao",
["Ganzi"] = "gnz",
["Gao"] = "gga",
["Gapapaiwa"] = "pwg",
["Garawa"] = "wrk",
["Garhwali"] = "gbm",
["Tiếng Garifuna"] = "cab",
["Garingbal"] = "xgi",
["Garus"] = "gyb",
["Garza"] = "xgr",
["Gashowu"] = "nai-gsy",
["Gaulish"] = "cel-gau",
["Gavak"] = "dmc",
["Gavar"] = "gou",
["Gavião do Jiparaná"] = "gvo",
["Tiếng Gawwada"] = "gwd",
["Tiếng Gayil"] = "gyl",
["Gayo"] = "gay",
["Gayón"] = "sai-gay",
["Gbagyi"] = "gbr",
["Gban"] = "ggu",
["Gbanu"] = "gbv",
["Gbanziri"] = "gbg",
["Gbari"] = "gby",
["Gbaya"] = "gba",
["Gbaya-Bossangoa"] = "gbp",
["Gbaya-Bozoum"] = "gbq",
["Gbaya-Mbodomo"] = "gmm",
["Gbayi"] = "gyg",
["Gbesi Gbe"] = "gbs",
["Gbii"] = "ggb",
["Gbin"] = "xgb",
["Tiếng Gbiri-Niragu"] = "grh",
["Gboloo Grebo"] = "gec",
["Gciriku"] = "diu",
["Gcwi"] = "gwj",
["Ge"] = "hmj",
["Gebe"] = "gei",
["Gedaged"] = "gdd",
["Geji"] = "gji",
["Gela"] = "nlg",
["Gelao"] = "gio",
["Gele'"] = "sbc",
["Geme"] = "geq",
["Gen"] = "gej",
["Gende"] = "gaf",
["Gengle"] = "geg",
["Gepo"] = "ygp",
["Gera"] = "gew",
["German Sign Language"] = "gsg",
["Geruma"] = "gea",
["Geser-Gorom"] = "ges",
["Gey"] = "guv",
["Ghanaian Sign Language"] = "gse",
["Ghandruk Sign Language"] = "gds",
["Ghanongga"] = "ghn",
["Ghari"] = "gri",
["Ghayavi"] = "bmk",
["Ghera"] = "ghr",
["Ghomara"] = "gho",
["Tiếng Ghotuo"] = "aaa",
["Ghulfan"] = "ghl",
["Giangan"] = "bgi",
["Gibanawa"] = "gib",
["Gidar"] = "gid",
["Gikyode"] = "acd",
["Gilima"] = "gix",
["Gimi (Austronesian)"] = "gip",
["Gimme"] = "kmp",
["Gimnime"] = "gmn",
["Ginuman"] = "gnm",
["Girawa"] = "bbr",
["Giryama"] = "nyf",
["Githabul"] = "gih",
["Gitua"] = "ggt",
["Gitxsan"] = "git",
["Giyug"] = "giy",
["Gizrra"] = "tof",
["Glaro-Twabo"] = "glr",
["Glavda"] = "glw",
["Glio-Oubi"] = "oub",
["Gnau"] = "gnu",
["Goa'uld"] = "art-gld",
["Goaria"] = "gig",
["Gobasi"] = "goi",
["Gobu"] = "gox",
["Godié"] = "god",
["Godwari"] = "gdx",
["Goemai"] = "ank",
["Gogo"] = "gog",
["Gogodala"] = "ggw",
["Gojri"] = "gju",
["Gokana"] = "gkn",
["Gokhy"] = "sit-gkh",
["Gola"] = "gol",
["Golin"] = "gvf",
["Golpa"] = "lja",
["Gondi"] = "gon",
["Gongduk"] = "goe",
["Gonja"] = "gjn",
["Goo"] = "gov",
["Tiếng Gooniyandi"] = "gni",
["Gor"] = "gqr",
["Gorakor"] = "goc",
["Gorap"] = "goq",
["Goreng"] = "xgg",
["Tiếng Gorontalo"] = "gor",
["Gorovu"] = "grq",
["Gottscheerish"] = "gmw-gts",
["Goundo"] = "goy",
["Gourmanchéma"] = "gux",
["Gowlan"] = "goj",
["Gowro"] = "gwf",
["Gozarkhani"] = "goz",
["Grangali"] = "nli",
["Grass Koiari"] = "kbk",
["Grebo"] = "grb",
["Greek Sign Language"] = "gss",
["Green Gelao"] = "giq",
["Green Hmong"] = "hnj",
["Grenadian Creole English"] = "gcl",
["Gresi"] = "grs",
["Groma"] = "gro",
["Gros Ventre"] = "ats",
["Gua"] = "gwx",
["Guahibo"] = "guh",
["Guambiano"] = "gum",
["Guamo"] = "sai-gmo",
["Guanano"] = "gvc",
["Guatemalan Sign Language"] = "gsm",
["Guató"] = "gta",
["Guayabero"] = "guo",
["Guazacapán"] = "nai-guz",
["Gudang"] = "xgd",
["Gudanji"] = "nji",
["Gude"] = "gde",
["Gudu"] = "gdu",
["Guduf-Gava"] = "gdf",
["Guerrero Nahuatl"] = "ngu",
["Guevea de Humboldt Zapotec"] = "zpg",
["Gugadj"] = "ggd",
["Gugu Badhun"] = "gdc",
["Gugu Warra"] = "wrw",
["Guhu-Samane"] = "ghs",
["Guianese Creole"] = "gcr",
["Guiberoua Bété"] = "bet",
["Guinau"] = "awd-gnu",
["Guinea Kpelle"] = "gkp",
["Guinea-Bissau Creole"] = "pov",
["Guinea-Bissau Sign Language"] = "lgs",
["Guinean Sign Language"] = "gus",
["Guiqiong"] = "gqi",
["Gula"] = "glu",
["Gula'alaa"] = "gmb",
["Gule"] = "gly",
["Gullah"] = "gul",
["Gumalu"] = "gmu",
["Gumatj"] = "gnn",
["Gumawana"] = "gvs",
["Gundi"] = "gdi",
["Gunditjmara"] = "gjm",
["Gundungurra"] = "xrd",
["Gungabula"] = "gyf",
["Gungu"] = "rub",
["Guntai"] = "gnt",
["Gunu"] = "yas",
["Gunwinggu"] = "gup",
["Gunya"] = "gyy",
["Gupa-Abawa"] = "gpa",
["Gupapuyngu"] = "guf",
["Gur Lama"] = "las",
["Guragone"] = "gge",
["Guramalum"] = "grz",
["Tiếng Goran"] = "hac",
["Gureng Gureng"] = "gnr",
["Gurgula"] = "ggg",
["Guriaso"] = "grx",
["Gurindji"] = "gue",
["Gurjar Apabhramsa"] = "inc-gup",
["Gurmana"] = "gvm",
["Guro"] = "goa",
["Guruntum"] = "grd",
["Gusan"] = "gsn",
["Gusii"] = "guz",
["Gusilay"] = "gsl",
["Gutnish"] = "gmq-gut",
["Guwa"] = "xgw",
["Guwamu"] = "gwu",
["Guwar"] = "aus-guw",
["Guya"] = "gka",
["Guyanese Creole English"] = "gyn",
["Guyani"] = "gvy",
["Guébie"] = "gie",
["Gvoko"] = "ngs",
["Gwa"] = "gwb",
["Gwahatike"] = "dah",
["Gwak"] = "jgk",
["Gwamhi-Wuri"] = "bga",
["Gwandara"] = "gwn",
["Gwara"] = "alv-gwa",
["Gweda"] = "grw",
["Gweno"] = "gwe",
["Gwere"] = "gwr",
["Gyalsumdo"] = "gyo",
["Gyele"] = "gyi",
["Gyem"] = "gye",
["Güenoa"] = "sai-gue",
["Habu"] = "hbu",
["Hadothi"] = "hoj",
["Hadrami"] = "xhd",
["Hadza"] = "hts",
["Haeke"] = "aek",
["Hahon"] = "hah",
["Haigwai"] = "hgw",
["Hainyaxo Bozo"] = "bzx",
["Haiphong Sign Language"] = "haf",
["Haisla"] = "has",
["Haitian Vodoun Culture Language"] = "hvc",
["Haiǁom"] = "hgm",
["Haji"] = "hji",
["Hakö"] = "hao",
["Halang Doan"] = "hld",
["Halia"] = "hla",
["Hamap"] = "hmu",
["Hamba"] = "hba",
["Hamtai"] = "hmt",
["Hanga"] = "hag",
["Hanga Hundi"] = "wos",
["Hanoi Sign Language"] = "hab",
["Harami"] = "xha",
["Haraza"] = "nub-har",
["Harijan Kinnauri"] = "kjo",
["Tiếng Harsusi"] = "hss",
["Haruai"] = "tmd",
["Haruku"] = "hrk",
["Haryanvi"] = "bgc",
["Harzani"] = "hrz",
["Hasaitic"] = "sem-has",
["Hasha"] = "ybj",
["Hassaniya Arabic"] = "mey",
["Hatam"] = "had",
["Hausa Sign Language"] = "hsl",
["Haveke"] = "hvk",
["Havu"] = "hav",
["Hawai'i Pidgin Sign Language"] = "hps",
["Hawaiian Creole"] = "hwc",
["Haya"] = "hay",
["Hdi"] = "xed",
["Hehe"] = "heh",
["Heiban"] = "hbn",
["Helong"] = "heg",
["Helu"] = "elu-prk",
["Hema"] = "nix",
["Hemba"] = "hem",
["Herdé"] = "hed",
["Hermit"] = "llf",
["Tiếng Hernici"] = "xhr",
["Hewa"] = "ham",
["Heyo"] = "auk",
["Hibito"] = "hib",
["Hidatsa"] = "hid",
["Highland Konjo"] = "kjk",
["Highland Oaxaca Chontal"] = "chd",
["Highland Puebla Nahuatl"] = "azz",
["Tiếng Totonac cao nguyên"] = "tos",
["Hijuk"] = "hij",
["Hill Maria"] = "mrr",
["Himarimã"] = "hir",
["Himyaritic"] = "sem-him",
["Hindi Dogri"] = "dgo",
["Hinduri"] = "hii",
["Hinukh"] = "gin",
["Hismaic"] = "sem-his",
["Hitchiti"] = "nai-hit",
["Hitu"] = "htu",
["Hiw"] = "hiw",
["Hixkaryana"] = "hix",
["Hlepho Phowa"] = "yhl",
["Hlersu"] = "hle",
["Hmar"] = "hmr",
["Hmong Dô"] = "hmv",
["Hmong Shua"] = "hmz",
["Hmwaveke"] = "mrk",
["Ho Chi Minh City Sign Language"] = "hos",
["Hobyót"] = "hoh",
["Hoia Hoia"] = "hhi",
["Holikachuk"] = "hoi",
["Holiya"] = "hoy",
["Holma"] = "hod",
["Holoholo"] = "hoo",
["Holu"] = "hol",
["Homa"] = "hom",
["Honduran Lenca"] = "len",
["Honduras Sign Language"] = "hds",
["Hone"] = "juh",
["Hong Kong Sign Language"] = "hks",
["Honi"] = "how",
["Tiếng Hopi"] = "hop",
["Horned Miao"] = "hrm",
["Horo"] = "hor",
["Horom"] = "hoe",
["Hote"] = "hot",
["Hoti"] = "hti",
["Hovongan"] = "hov",
["Hoyahoya"] = "hhy",
["Hrangkhol"] = "hra",
["Hruso"] = "hru",
["Huachipaeri"] = "hug",
["Huambisa"] = "hub",
["Huaorani"] = "auc",
["Huarijio"] = "var",
["Huaulu"] = "hud",
["Huautla Mazatec"] = "mau",
["Huave"] = "huv",
["Huaxcaleca Nahuatl"] = "nhq",
["Huba"] = "hbb",
["Huehuetla Tepehua"] = "tee",
["Huetar"] = "cba-hue",
["Huichol"] = "hch",
["Huilliche"] = "huh",
["Huitepec Mixtec"] = "mxs",
["Hukumina"] = "huw",
["Hula"] = "hul",
["Huli"] = "hui",
["Hulung"] = "huk",
["Humburi Senni"] = "hmb",
["Humene"] = "huf",
["Hun"] = "uth",
["Hunde"] = "hke",
["Hungana"] = "hum",
["Hungarian Sign Language"] = "hsh",
["Hungworo"] = "nat",
["Hunjara-Kaina Ke"] = "hkk",
["Hunnic"] = "xhc",
["Hupdë"] = "jup",
["Hupla"] = "hap",
["Hutterisch"] = "geh",
["Hwana"] = "hwo",
["Hya"] = "hya",
["Hän"] = "haa",
["Hértevin"] = "hrt",
["I-Wak"] = "iwk",
["Iamalele"] = "yml",
["Iatmul"] = "ian",
["Iau"] = "tmu",
["Ibali Teke"] = "tek",
["Tiếng Ibanag"] = "ibg",
["Ibani"] = "iby",
["Iberian"] = "xib",
["Iboko"] = "bkp",
["Ibu"] = "ibu",
["Icelandic Sign Language"] = "icl",
["Iceve-Maci"] = "bec",
["Tiếng Ida'an"] = "dbj",
["Idakho-Isukha-Tiriki"] = "ida",
["Idaté"] = "idt",
["Idere"] = "ide",
["Idesa"] = "ids",
["Idi"] = "idi",
["Idoma"] = "idu",
["Idon"] = "idc",
["Tiếng Idu"] = "clk",
["Idun"] = "ldb",
["Iduna"] = "viv",
["Ifo"] = "iff",
["Igana"] = "igg",
["Igede"] = "ige",
["Ignaciano"] = "ign",
["Igo"] = "ahl",
["Iguta"] = "nar",
["Igwe"] = "igw",
["Iha"] = "ihp",
["Ihievbe"] = "ihi",
["Ija-Zuba"] = "vki",
["Ik"] = "ikx",
["Ika"] = "ikk",
["Ikaranggal"] = "ikr",
["Ikizu"] = "ikz",
["Iko"] = "iki",
["Ikobi-Mena"] = "meb",
["Ikoma"] = "ntk",
["Ikpeng"] = "txi",
["Ikpeshi"] = "ikp",
["Ikposo"] = "kpo",
["Iku-Gora-Ankwa"] = "ikv",
["Ikulu"] = "ikl",
["Ikwo"] = "iqw",
["Ila"] = "ilb",
["Ile Ape"] = "ila",
["Ilgar"] = "ilg",
["Ili'uun"] = "ilu",
["Ilianen Manobo"] = "mbi",
["Illyrian"] = "xil",
["Ilongot"] = "ilk",
["Ilue"] = "ilv",
["Ilwana"] = "mlk",
["Imbongu"] = "imo",
["Imonda"] = "imn",
["Imroing"] = "imr",
["Inabaknon"] = "abx",
["Inapang"] = "mzu",
["Indanga"] = "bnt-ind",
["Indian Sign Language"] = "ins",
["Indonesian Bajau"] = "bdl",
["Indonesian Sign Language"] = "inl",
["Indri"] = "idr",
["Indus Valley Language"] = "xiv",
["Inebu One"] = "oin",
["Ineseño"] = "inz",
["Inga"] = "inb",
["Inlaod Itneg"] = "iti",
["Inoke-Yate"] = "ino",
["Inonhan"] = "loc",
["Inpui Naga"] = "nkf",
["International Sign"] = "ils",
["Inuinnaqtun"] = "esx-inq",
["Inuit Sign Language"] = "iks",
["Inuktun"] = "esx-ink",
["Inuvialuktun"] = "ikt",
["Ipai"] = "nai-ipa",
["Ipalapa Amuzgo"] = "azm",
["Ipiko"] = "ipo",
["Ipili"] = "ipi",
["Ipulo"] = "ass",
["Iquito"] = "iqu",
["Ir"] = "irr",
["Irantxe"] = "irn",
["Iranun"] = "ill",
["Tiếng Ả Rập Iraq"] = "acm",
["Irarutu"] = "irh",
["Iraya"] = "iry",
["Iresim"] = "ire",
["Iriga Bicolano"] = "bto",
["Irish Sign Language"] = "isg",
["Tiếng Irula"] = "iru",
["Isabi"] = "isa",
["Isanzu"] = "isn",
["Isarog Agta"] = "agk",
["Isaurian"] = "und-isa",
["Isconahua"] = "isc",
["Isebe"] = "igo",
["Ishkashimi"] = "isk",
["Isinai"] = "inn",
["Isirawa"] = "srl",
["Islander Creole English"] = "icr",
["Israeli Sign Language"] = "isr",
["Isthmus Mixe"] = "mir",
["Tiếng Zapotec Isthmus"] = "zai",
["Isu"] = "isu",
["Isubu"] = "szv",
["Italian Sign Language"] = "ise",
["Itawit"] = "itv",
["Itene"] = "ite",
["Iteri"] = "itr",
["Itik"] = "itx",
["Ito"] = "itw",
["Itundujia Mixtec"] = "mce",
["Itzá"] = "itz",
["Iwal"] = "kbm",
["Iwam"] = "iwm",
["Iwur"] = "iwo",
["Ixcatec"] = "ixc",
["Ixcatlán Mazatec"] = "mzi",
["Ixtayutla Mixtec"] = "vmj",
["Ixtenco Otomi"] = "otz",
["Iyayu"] = "iya",
["Iyive"] = "uiv",
["Iyo"] = "nca",
["Iyo'wujwa Chorote"] = "crq",
["Iyojwa'ja Chorote"] = "crt",
["Izere"] = "izr",
["Izi"] = "izz",
["Izi-Ezaa-Ikwo-Mgbo"] = "izi",
["Tiếng Izon"] = "ijc",
["Izora"] = "cbo",
["Iñapari"] = "inp",
["Jabem"] = "jae",
["Jabutí"] = "jbt",
["Jad"] = "jda",
["Jadgali"] = "jdg",
["Jahanka"] = "jad",
["Jair Awyu"] = "awv",
["Jakati"] = "jat",
["Jalapa de Díaz Mazatec"] = "maj",
["Jalkunan"] = "bxl",
["Jamaican Country Sign Language"] = "jcs",
["Jamaican Sign Language"] = "jls",
["Jambi Malay"] = "jax",
["Jamiltepec Mixtec"] = "mxt",
["Jaminjung"] = "djd",
["Jamsay"] = "djm",
["Jamtish"] = "gmq-jmk",
["Jandavra"] = "jnd",
["Janday"] = "jan",
["Jangkang"] = "djo",
["Jangshung"] = "jna",
["Janji"] = "jni",
["Japanese Sign Language"] = "jsl",
["Japrería"] = "jru",
["Jara"] = "jaf",
["Jaru"] = "ddj",
["Jassic"] = "ysc",
["Jaunsari"] = "jns",
["Jawe"] = "jaz",
["Jaya"] = "jyy",
["Jebero"] = "jeb",
["Jeikó"] = "sai-jko",
["Tiếng Jemez"] = "tow",
["Jenaama Bozo"] = "bze",
["Jeng"] = "jeg",
["Jennu Kurumba"] = "xuj",
["Jere"] = "jer",
["Jeri Kuo"] = "jek",
["Jerung"] = "jee",
["Jhankot Sign Language"] = "jhs",
["Jiamao"] = "jio",
["Jiba"] = "juo",
["Jibu"] = "jib",
["Tiếng Jicarilla"] = "apj",
["Jilbe"] = "jie",
["Jili"] = "mgi",
["Jilim"] = "jil",
["Jimi"] = "jmi",
["Jimjimen"] = "jim",
["Tiếng Tấn"] = "cjy",
["Jina"] = "jia",
["Jingulu"] = "jig",
["Jiongnai Bunu"] = "pnu",
["Jirajara"] = "sai-jrj",
["Jirel"] = "jul",
["Jiru"] = "jrr",
["Jita"] = "jit",
["Jju"] = "kaj",
["Joba"] = "job",
["Jofotek-Bromnya"] = "jbr",
["Jola-Fonyi"] = "dyo",
["Jola-Kasa"] = "csk",
["Jonkor Bourmataguil"] = "jeu",
["Jordanian Sign Language"] = "jos",
["Jorá"] = "jor",
["Jowulu"] = "jow",
["Ju"] = "juu",
["Jukun Takum"] = "jbu",
["Tiếng Jumaytepeque"] = "nai-jum",
["Jumla Sign Language"] = "jus",
["Jumli"] = "jml",
["Jungle Inga"] = "inj",
["Juquila Mixe"] = "mxq",
["Jur Modo"] = "bex",
["Tiếng Juray"] = "juy",
["Jurúna"] = "jur",
["Jutiapa"] = "nai-jtp",
["Juwal"] = "mwb",
["Juxtlahuaca Mixtec"] = "vmc",
["Jwira-Pepesa"] = "jwi",
["Júma"] = "jua",
["Kaamba"] = "xku",
["Kaan"] = "ldl",
["Kaang Chin"] = "ckn",
["Kaansa"] = "gna",
["Kaapor Sign Language"] = "uks",
["Kaba"] = "ksp",
["Kabalai"] = "kvf",
["Kabatei"] = "xkp",
["Kabba-Laka"] = "lap",
["Kabishiana"] = "tup-kab",
["Kabola"] = "klz",
["Kabore One"] = "onk",
["Kabras"] = "lkb",
["Kaburi"] = "uka",
["Kabutra"] = "kbu",
["Tiếng Kabuverdianu"] = "kea",
["Kabwa"] = "cwa",
["Kabwari"] = "kcw",
["Tiếng Kachama-Ganjule"] = "kcx",
["Kachari"] = "xac",
["Kachi Koli"] = "gjk",
["Kacipo-Balesi"] = "koe",
["Kaco'"] = "xkk",
["Kadai"] = "kzd",
["Kadar"] = "kej",
["Kadara"] = "kad",
["Kadaru"] = "kdu",
["Kadiwéu"] = "kbc",
["Kado"] = "kdv",
["Kadugli"] = "xtc",
["Kaduo"] = "ktp",
["Kaera"] = "jka",
["Kafoa"] = "kpu",
["Kagan Kalagan"] = "kll",
["Kagate"] = "syw",
["Tiếng Kagayanen"] = "cgc",
["Kagoma"] = "kdm",
["Kagoro"] = "xkg",
["Kagulu"] = "kki",
["Kahe"] = "hka",
["Kahua"] = "agw",
["Kaian"] = "kct",
["Kaibobo"] = "kzb",
["Kaidipang"] = "kzp",
["Kaiep"] = "kbw",
["Kaikadi"] = "kep",
["Kaike"] = "kzq",
["Kaiku"] = "kkq",
["Kaimbulawa"] = "zka",
["Kaimbé"] = "xai",
["Kairak"] = "ckr",
["Kairiru"] = "kxa",
["Kairui-Midiki"] = "krd",
["Kais"] = "kzm",
["Kaivi"] = "kce",
["Kaiwá"] = "kgk",
["Kaiy"] = "tcq",
["Kajakse"] = "ckq",
["Kajali"] = "xkj",
["Kajaman"] = "kag",
["Kakabe"] = "kke",
["Kakanda"] = "kka",
["Tiếng Kaki Ae"] = "tbd",
["Kakihum"] = "kxe",
["Kako"] = "kkj",
["Kakwa"] = "keo",
["Kala"] = "kcl",
["Kala Lagaw Ya"] = "mwp",
["Kalaamaya"] = "lkm",
["Kalabakan"] = "kve",
["Kalabari"] = "ijn",
["Kalabra"] = "kzz",
["Kalagan"] = "kqe",
["Kalaktang Monpa"] = "kkf",
["Kalam"] = "kmh",
["Kalamsé"] = "knz",
["Kalanadi"] = "wkl",
["Kalanga"] = "kck",
["Kalapuya"] = "kyl",
["Kalarko"] = "kba",
["Kalasuri"] = "xme-kls",
["Kalenjin"] = "kln",
["Kalinago"] = "crb",
["Kalkatungu"] = "ktg",
["Kalkoti"] = "xka",
["Kalou"] = "ywa",
["Kaluli"] = "bco",
["Kalumpang"] = "kli",
["Kam"] = "kdx",
["Kamakan"] = "vkm",
["Kamang"] = "woi",
["Kamano"] = "kbq",
["Kamantan"] = "kci",
["Kamar"] = "keq",
["Kamara"] = "jmr",
["Kamarian"] = "kzx",
["Kamaru"] = "kgx",
["Kamarupi Prakrit"] = "inc-kam",
["Kamasa"] = "klp",
["Kamasau"] = "kms",
["Tiếng Kamayo"] = "kyk",
["Kamayurá"] = "kay",
["Kamba"] = "kam",
["Kambaira"] = "kyy",
["Tiếng Kambera"] = "xbr",
["Kamberataro"] = "kbv",
["Kamberau"] = "irx",
["Kambiwá"] = "xbw",
["Kami"] = "kmi",
["Kamkata-viri"] = "bsh",
["Kamo"] = "kcq",
["Kamoro"] = "kgq",
["Kamu"] = "xmu",
["Tiếng Kamula"] = "xla",
["Kamwe"] = "hig",
["Kanakuru"] = "kna",
["Kanamari"] = "knm",
["Kanashi"] = "xns",
["Kanasi"] = "soq",
["Kandas"] = "kqw",
["Kandawo"] = "gam",
["Kande"] = "kbs",
["Kang"] = "kyp",
["Kanga"] = "kcp",
["Kanggape"] = "igm",
["Kango"] = "kty",
["Kango-Sua"] = "kzy",
["Kangri"] = "xnr",
["Kaniet"] = "ktk",
["Kanikkaran"] = "kev",
["Kaningdon-Nindem"] = "kdp",
["Kaningi"] = "kzo",
["Kaningra"] = "knr",
["Kaninuwa"] = "wat",
["Kanite"] = "kmu",
["Kanjari"] = "kft",
["Kanju"] = "kbe",
["Tiếng Kankanaey"] = "kne",
["Kannada Kurumba"] = "kfi",
["Kanowit"] = "kxn",
["Kanoé"] = "kxo",
["Kansa"] = "ksk",
["Kantosi"] = "xkt",
["Kanu"] = "khx",
["Kanufi"] = "kni",
["Kanyok"] = "kny",
["Kao"] = "kax",
["Kaonde"] = "kqn",
["Kap"] = "ykm",
["Kapauri"] = "khp",
["Kapin"] = "tbx",
["Kapinawá"] = "xpn",
["Kapriman"] = "dju",
["Kaptiau"] = "kbi",
["Kapya"] = "klo",
["Tiếng Kaqchikel"] = "cak",
["Kara (New Guinea)"] = "leu",
["Kara (Tanzania)"] = "reg",
["Karadjeri"] = "gbd",
["Karaga Mandaya"] = "mry",
["Karami"] = "xar",
["Karamojong"] = "kdj",
["Karang"] = "kzr",
["Karanga"] = "kth",
["Karankawa"] = "zkk",
["Karas"] = "kgv",
["Karawa"] = "xrw",
["Kare (Africa)"] = "kbn",
["Kare (New Guinea)"] = "kmf",
["Tiếng Karekare"] = "kai",
["Karey"] = "kyd",
["Kari"] = "kbj",
["Karingani"] = "kgn",
["Karipuna"] = "kuq",
["Karipúna"] = "kgm",
["Karipúna Creole French"] = "kmv",
["Tiếng Kariri"] = "kzw",
["Tiếng Karitiâna"] = "ktn",
["Kariya"] = "kil",
["Kariyarra"] = "vka",
["Karkar-Yuri"] = "yuj",
["Karkin"] = "krb",
["Karko"] = "kko",
["Karnai"] = "bbv",
["Karo"] = "kxh",
["Karo Batak"] = "btx",
["Karok"] = "kyh",
["Karolanos"] = "kyn",
["Karon"] = "krx",
["Karon Dori"] = "kgw",
["Karore"] = "xkx",
["Karranga"] = "xrq",
["Karuwali"] = "rxw",
["Kasanga"] = "ccj",
["Kasem"] = "xsm",
["Kasiguranin"] = "ksn",
["Kaska"] = "kkz",
["Kaskean"] = "zsk",
["Kaskihá"] = "gva",
["Kassite"] = "und-kas",
["Kassonke"] = "kao",
["Kasua"] = "khs",
["Kataang"] = "kgd",
["Katabaga"] = "ktq",
["Katawixi"] = "xat",
["Katembri"] = "sai-kat",
["Kathlamet"] = "nai-kat",
["Kathoriya Tharu"] = "tkt",
["Kathu"] = "ykt",
["Katkari"] = "kfu",
["Katla"] = "kcr",
["Kato"] = "ktw",
["Katso"] = "kaf",
["Katukina"] = "knt",
["Kaulong"] = "pss",
["Kaur"] = "vkk",
["Kaure"] = "bpp",
["Tiếng Kaurna"] = "zku",
["Kauwera"] = "xau",
["Kawacha"] = "kcb",
["Kawaiisu"] = "xaw",
["Kawe"] = "kgb",
["Kawishana"] = "awd-kaw",
["Kaxararí"] = "ktx",
["Kaxuyana"] = "kbb",
["Kaya"] = "zra",
["Kayabí"] = "kyz",
["Kayagar"] = "kyt",
["Kayan"] = "pdu",
["Kayan Mahakam"] = "xay",
["Kayan River Kayan"] = "xkn",
["Tiếng Kalanguya"] = "kak",
["Kayardild"] = "gyd",
["Kayeli"] = "kzl",
["Kaytetye"] = "gbb",
["Kayupulau"] = "kzu",
["Kazukuru"] = "kzk",
["Ke'o"] = "xxk",
["Keak"] = "keh",
["Keapara"] = "khz",
["Kedah Malay"] = "meo",
["Kedang"] = "ksx",
["Keder"] = "kdy",
["Kehu"] = "khh",
["Kei"] = "kei",
["Keiga"] = "kec",
["Kein"] = "bmh",
["Keiyo"] = "eyo",
["Kela-Yela"] = "kel",
["Kelabit"] = "kzi",
["Keley-I Kallahan"] = "ify",
["Keliko"] = "kbo",
["Kelo"] = "xel",
["Kelon"] = "kyo",
["Kemak"] = "kem",
["Kembayan"] = "xem",
["Kemberano"] = "bzp",
["Kembra"] = "xkw",
["Kemezung"] = "dmo",
["Kemi Sami"] = "sjk",
["Kemiehua"] = "kfj",
["Kemtuik"] = "kmt",
["Kenaboi"] = "xbn",
["Kenati"] = "gat",
["Kendayan"] = "knx",
["Kendeje"] = "klf",
["Kendem"] = "kvm",
["Kenga"] = "kyq",
["Keningau Murut"] = "kxi",
["Keninjal"] = "knl",
["Kenswei Nsei"] = "ndb",
["Kenyan Sign Language"] = "xki",
["Kenyang"] = "ken",
["Kenyi"] = "lke",
["Keoru-Ahia"] = "xeu",
["Kepkiriwát"] = "kpn",
["Kepo'"] = "kuk",
["Kera"] = "ker",
["Kerak"] = "hhr",
["Kereho"] = "xke",
["Kerek"] = "krk",
["Kerewe"] = "ked",
["Kerewo"] = "kxz",
["Kerinci"] = "kvr",
["Tiếng Kerman"] = "xme-ker",
["Kesawai"] = "xes",
["Ketangalan"] = "kae",
["Kete"] = "kcv",
["Ketengban"] = "xte",
["Ketum"] = "ktt",
["Kewa"] = "kew",
["Keyagana"] = "kyg",
["Kgalagadi"] = "xkv",
["Khana"] = "ogo",
["Khandeshi"] = "khn",
["Khao"] = "xao",
["Kharam Naga"] = "kfw",
["Kharia Thar"] = "ksy",
["Khayo"] = "lko",
["Khe"] = "kqg",
["Khehek"] = "tlx",
["Khetrani"] = "xhe",
["Khezha Naga"] = "nkh",
["Khirwar"] = "kwx",
["Khisa"] = "kqm",
["Khlor"] = "llo",
["Khlula"] = "ykl",
["Khoibu Naga"] = "nkb",
["Khoini"] = "xkc",
["Kholok"] = "ktc",
["Tiếng Kholosi"] = "inc-kho",
["Khotanese"] = "kho",
["Khroskyabs"] = "jiq",
["Khumi Chin"] = "cnk",
["Khwe"] = "xuu",
["Kibala"] = "blv",
["Kibena"] = "bez",
["Kibet"] = "kie",
["Kibiri"] = "prm",
["Kichwa"] = "qwe-kch",
["Kikami"] = "kcu",
["Kilit"] = "xme-klt",
["Kilivila"] = "kij",
["Kiliwa"] = "klb",
["Kilmeri"] = "kih",
["Kim"] = "kia",
["Kimaama"] = "kig",
["Kimaragang"] = "kqr",
["Kimbu"] = "kiv",
["Kimki"] = "sbt",
["Kimré"] = "kqp",
["Kinabalian"] = "cbw",
["Kinalakna"] = "kco",
["Tiếng Kinaray-a"] = "krj",
["Kinga"] = "zga",
["Kings River Yokuts"] = "nai-kry",
["Kinikinao"] = "gqn",
["Tiếng Kinnaur"] = "kfk",
["Kinuku"] = "kkd",
["Kioko"] = "ues",
["Kiong"] = "kkm",
["Kiorr"] = "xko",
["Kipfokomo"] = "pkb",
["Kipsigis"] = "sgc",
["Kiput"] = "kyi",
["Kir-Balar"] = "kkr",
["Kire"] = "geb",
["Kirfi"] = "kks",
["Kirikiri"] = "kiy",
["Kirya-Konzel"] = "fkk",
["Kis"] = "kis",
["Kisa"] = "lks",
["Kisankasa"] = "kqh",
["Kisar"] = "kje",
["Kisi"] = "kiz",
["Kita Maninkakan"] = "mwk",
["Kitanemuk"] = "azc-ktn",
["Kitembo"] = "tbt",
["Kitja"] = "gia",
["Kitsai"] = "kii",
["Kiunum"] = "wei",
["Kla"] = "lda",
["Klamath-Modoc"] = "kla",
["Klao"] = "klu",
["Klias River Kadazan"] = "kqt",
["Ko"] = "fuj",
["Tiếng Koalib"] = "kib",
["Koasati"] = "cku",
["Koba"] = "kpd",
["Kobiana"] = "kcj",
["Kobol"] = "kgu",
["Kochila Tharu"] = "thq",
["Kodaku"] = "ksz",
["Kodeoha"] = "vko",
["Kodi"] = "kod",
["Kodia"] = "kwp",
["Koenoem"] = "kcs",
["Kofa"] = "kso",
["Kofei"] = "kpi",
["Kofyar"] = "kwl",
["Kohin"] = "kkx",
["Kohumono"] = "bcs",
["Koi"] = "kkt",
["Koireng"] = "nkd",
["Koitabu"] = "kqi",
["Koiwat"] = "kxt",
["Kui (Ấn Độ)"] = "kxu",
["Kok-Nar"] = "gko",
["Kok-Paponk"] = "okg",
["Kokata"] = "ktd",
["Koke"] = "kou",
["Koko-Bera"] = "kkp",
["Kokoda"] = "xod",
["Kokola"] = "kzn",
["Kokota"] = "kkk",
["Kol (Cameroon)"] = "biw",
["Kol (New Guinea)"] = "kol",
["Kola"] = "kvv",
["Kolbila"] = "klc",
["Kolibugan Subanon"] = "skn",
["Kolom"] = "klm",
["Koluwawa"] = "klx",
["Kom (India)"] = "kmm",
["Koma"] = "kmy",
["Komba"] = "kpf",
["Kombai"] = "tyn",
["Kombio"] = "xbi",
["Komering"] = "kge",
["Tiếng Komi-Yazva"] = "urj-kya",
["Kominimung"] = "xoi",
["Komo"] = "xom",
["Tiếng Komodo"] = "kvh",
["Kompane"] = "kvp",
["Komyandaret"] = "kzv",
["Kon Keu"] = "kkn",
["Konabéré"] = "bbo",
["Konai"] = "kxw",
["Konda"] = "knd",
["Konda-Dora"] = "kfc",
["Kondekor"] = "gau",
["Koneraw"] = "kdw",
["Konkomba"] = "xon",
["Konni"] = "kma",
["Kono (Guinea)"] = "knu",
["Kono (Nigeria)"] = "klk",
["Kono (Sierra Leone)"] = "kno",
["Konomala"] = "koa",
["Konomihu"] = "nai-knm",
["Konongo"] = "kcz",
["Konyak Naga"] = "nbe",
["Konyanka Maninka"] = "mku",
["Konzo"] = "koo",
["Kopar"] = "xop",
["Kopkaka"] = "opk",
["Korafe-Yegha"] = "kpr",
["Korak"] = "koz",
["Korana"] = "kqz",
["Korandje"] = "kcy",
["Korean Sign Language"] = "kvk",
["Koreguaje"] = "coe",
["Koresh-e Rostam"] = "okh",
["Korlai Creole Portuguese"] = "vkp",
["Koro (India)"] = "jkr",
["Koro (New Guinea)"] = "kxr",
["Koro (Vanuatu)"] = "krf",
["Koro (West Africa)"] = "kfo",
["Koromfé"] = "kfz",
["Koromira"] = "kqj",
["Koronadal Blaan"] = "bpr",
["Koroni"] = "xkq",
["Korop"] = "krp",
["Koropó"] = "xxr",
["Koroshi"] = "ktl",
["Korowai"] = "khe",
["Korubo"] = "xor",
["Korupun-Sela"] = "kpq",
["Tiếng Korwa"] = "kfp",
["Kosadle"] = "kiq",
["Kosarek Yale"] = "kkl",
["Kosena"] = "kze",
["Koshin"] = "kid",
["Kota (Gabon)"] = "koq",
["Kota (India)"] = "kfe",
["Kota Bangun Kutai Malay"] = "mqg",
["Kota Marudu Talantang"] = "grm",
["Kota Marudu Tinagas"] = "ktr",
["Kotafon Gbe"] = "kqk",
["Koti"] = "eko",
["Tiếng Kott"] = "zko",
["Kou"] = "snz",
["Kouya"] = "kyf",
["Kovai"] = "kqb",
["Kove"] = "kvc",
["Kowaki"] = "xow",
["Kowiai"] = "kwh",
["Koy Sanjaq Surat"] = "kqd",
["Koya"] = "kff",
["Koyaga"] = "kga",
["Koyo"] = "koh",
["Koyra Chiini"] = "khq",
["Koyukon"] = "koy",
["Kpagua"] = "kuw",
["Kpala"] = "kpl",
["Kpan"] = "kpk",
["Kpasam"] = "pbn",
["Kpati"] = "koc",
["Kpatili"] = "kym",
["Kpee"] = "cpo",
["Kpelle"] = "kpe",
["Kpessi"] = "kef",
["Kplang"] = "kph",
["Krache"] = "kye",
["Krahô"] = "xra",
["Krenak"] = "kqq",
["Kresh"] = "krs",
["Krevinian"] = "zkv",
["Kreye"] = "xre",
["Krikati-Timbira"] = "xri",
["Krim"] = "krm",
["Tiếng Kriol Úc"] = "rop",
["Krisa"] = "ksi",
["Kristang"] = "mcm",
["Krobu"] = "kxb",
["Krongo"] = "kgo",
["Kua"] = "tyu",
["Kua-nsi"] = "ykn",
["Kuamasi"] = "yku",
["Kuan"] = "uan",
["Kuanhua"] = "xnh",
["Kube"] = "kgf",
["Kubi"] = "kof",
["Kubo"] = "jko",
["Kubu"] = "kvb",
["Kucong"] = "lkc",
["Tiếng Kudiya"] = "kfg",
["Kudu-Camo"] = "kov",
["Kugama"] = "kow",
["Kugbo"] = "kes",
["Kugu-Muminh"] = "xmh",
["Kui (India)"] = "kxu",
["Kui (Indonesia)"] = "kvd",
["Kuijau"] = "dkr",
["Kuikúro"] = "kui",
["Kujarge"] = "vkj",
["Kuk"] = "kfn",
["Kukatja"] = "kux",
["Kukele"] = "kez",
["Kukkuzi"] = "urj-kuk",
["Kuku-Mangk"] = "xmq",
["Kuku-Mu'inh"] = "xmp",
["Kuku-Thaypan"] = "typ",
["Kuku-Ugbanh"] = "ugb",
["Kuku-Uwanh"] = "uwa",
["Kuku-Yalanji"] = "gvn",
["Kula"] = "tpg",
["Kulaal"] = "glj",
["Kulere"] = "kul",
["Kulfa"] = "kxj",
["Kulina"] = "xpk",
["Kulisusu"] = "vkl",
["Kulon"] = "uon",
["Kulung"] = "kle",
["Kumak"] = "nee",
["Kumalu"] = "ksl",
["Kumam"] = "kdi",
["Kuman"] = "kue",
["Kumaoni"] = "kfy",
["Kumba"] = "ksm",
["Kumbainggar"] = "kgs",
["Kumbaran"] = "wkb",
["Tiếng Kumeyaay"] = "nai-kum",
["Kumhali"] = "kra",
["Kumu"] = "kmw",
["Kumukio"] = "kuo",
["Tiếng Kuna"] = "cuk",
["Kunama"] = "kun",
["Kunbarlang"] = "wlg",
["Kunda"] = "kdn",
["Kunduvadi"] = "wku",
["Kung"] = "kfl",
["Kungarakany"] = "ggk",
["Kungardutyi"] = "gdt",
["Kunggari"] = "kgl",
["Kungkari"] = "lku",
["Kuni"] = "kse",
["Kuni-Boazi"] = "kvg",
["Kunimaipa"] = "kup",
["Kunja"] = "pep",
["Kunjen"] = "kjn",
["Kunyi"] = "njx",
["Kunza"] = "kuz",
["Kuo"] = "xuo",
["Kuot"] = "kto",
["Kupa"] = "kug",
["Kupang Malay"] = "mkn",
["Kupia"] = "key",
["Kupsabiny"] = "kpz",
["Kur"] = "kuv",
["Kura Ede Nago"] = "nqk",
["Kurama"] = "krh",
["Kuranko"] = "knk",
["Kuri"] = "nbn",
["Kuria"] = "kuj",
["Kurichiya"] = "kfh",
["Kurmukar"] = "kfv",
["Kurnai"] = "unn",
["Kurrama"] = "vku",
["Kurti"] = "ktm",
["Kurtjar"] = "gdj",
["Kurudu"] = "kjr",
["Kurukh"] = "kru",
["Kuruáya"] = "kyr",
["Kusaal"] = "kus",
["Kusaghe"] = "ksg",
["Kushi"] = "kuh",
["Kustenau"] = "awd-kus",
["Kusu"] = "ksv",
["Kusunda"] = "kgg",
["Kutang Ghale"] = "ght",
["Tiếng Ktunaxa"] = "kut",
["Kutep"] = "kub",
["Kuthant"] = "xut",
["Kutto"] = "kpa",
["Kutu"] = "kdc",
["Kuturmi"] = "khj",
["Kuuk Thaayorre"] = "thd",
["Kuuk Yak"] = "uky",
["Kuuku-Ya'u"] = "kuy",
["Kuvale"] = "olu",
["Kuwaa"] = "blh",
["Kuwaataay"] = "cwt",
["Kuwani"] = "paa-kwn",
["Tiếng Kven"] = "fkv",
["Kwa'"] = "bko",
["Kwaami"] = "ksq",
["Kwadi"] = "kwz",
["Kwaio"] = "kwd",
["Kwaja"] = "kdz",
["Kwak"] = "kwq",
["Kwakum"] = "kwu",
["Kwalhioqua-Tlatskanai"] = "qwt",
["Kwama"] = "kmq",
["Kwambi"] = "kwm",
["Kwamera"] = "tnk",
["Kwami"] = "ktf",
["Kwamtim One"] = "okk",
["Kwang"] = "kvi",
["Kwanga"] = "kwj",
["Kwangali"] = "kwn",
["Kwanja"] = "knp",
["Kwanka"] = "bij",
["Kwara'ae"] = "kwf",
["Kwasio"] = "nmg",
["Kwaya"] = "kya",
["Kwaza"] = "xwa",
["Kwegu"] = "xwg",
["Kwer"] = "kwr",
["Kwerba"] = "kwe",
["Kwerba Mamberamo"] = "xwr",
["Kwere"] = "cwe",
["Kwerisa"] = "kkb",
["Kwese"] = "kws",
["Kwesten"] = "kwt",
["Kwini"] = "gww",
["Kwinsu"] = "kuc",
["Tiếng Kwinti"] = "kww",
["Kwoma"] = "kmo",
["Kwomtari"] = "kwo",
["Kyak"] = "bka",
["Kyaka"] = "kyc",
["Kyan-Karyaw Naga"] = "nqq",
["Kyenele"] = "kql",
["Kyenga"] = "tye",
["Kyerung"] = "kgy",
["Kélé"] = "keb",
["Kómnzo"] = "paa-kom",
["La'bi"] = "lbi",
["Laal"] = "gdm",
["Tiếng Laalaa"] = "cae",
["Laba"] = "lau",
["Label"] = "lbb",
["Labir"] = "jku",
["Labo"] = "mwi",
["Labo Phowa"] = "ypb",
["Labu"] = "lbu",
["Labuk-Kinabatangan Kadazan"] = "dtb",
["Lacandon"] = "lac",
["Lachi"] = "lbt",
["Lachiguiri Zapotec"] = "zpa",
["Lachixío Zapotec"] = "zpl",
["Ladji-Ladji"] = "llj",
["Laeko-Libuat"] = "lkl",
["Lafofa"] = "laf",
["Laghu"] = "lgb",
["Laghuu"] = "lgh",
["Lagwan"] = "kot",
["Laha (Indonesia)"] = "lhh",
["Laha (Vietnam)"] = "lha",
["Lahanan"] = "lhn",
["Lahta Karen"] = "kvt",
["Lahu Shi"] = "lhi",
["Lahul Lohar"] = "lhl",
["Lai"] = "cnh",
["Laimbue"] = "lmx",
["Laitu Chin"] = "clj",
["Laiyolo"] = "lji",
["Laka"] = "lak",
["Tiếng Lakalei"] = "lka",
["Lake Miwok"] = "lmw",
["Lakha"] = "lkh",
["Laki"] = "lki",
["Lakkia"] = "lbc",
["Lakon"] = "lkn",
["Lakondê"] = "lkd",
["Lakota Dida"] = "dic",
["Lala (New Guinea)"] = "nrz",
["Lala (South Africa)"] = "bnt-lal",
["Lala-Bisa"] = "leb",
["Lala-Roba"] = "lla",
["Lalana Chinantec"] = "cnl",
["Tiếng Bạch Lạp Mã"] = "lay",
["Lamaholot"] = "slp",
["Lamalera"] = "lmr",
["Lamang"] = "hia",
["Lamatuka"] = "lmq",
["Lamba"] = "lam",
["Lambichhong"] = "lmh",
["Lambya"] = "lai",
["Lame"] = "bma",
["Lamenu"] = "lmu",
["Lamet"] = "lbn",
["Lamja-Dengsa-Tola"] = "ldh",
["Lamkang"] = "lmk",
["Lamma"] = "lev",
["Lamnso'"] = "lns",
["Lamogai"] = "lmg",
["Lampung Api"] = "ljp",
["Lamu"] = "llh",
["Lamu-Lamu"] = "lby",
["Lanas Lobu"] = "ruu",
["Landoma"] = "ldm",
["Lang'e"] = "yne",
["Langam"] = "lnm",
["Langbashe"] = "lna",
["Langi"] = "lag",
["Langnian Buyang"] = "yln",
["Lango (Sudan)"] = "lno",
["Lango (Uganda)"] = "laj",
["Lanima"] = "lnw",
["Lao Naga"] = "nlq",
["Laopang"] = "lbg",
["Laos Sign Language"] = "lso",
["Lapaguía-Guivini Zapotec"] = "ztl",
["Lapine"] = "art-lap",
["Lapuyan Subanun"] = "laa",
["Laragia"] = "lrg",
["Larantuka Malay"] = "lrt",
["Lardil"] = "lbz",
["Larevat"] = "lrv",
["Larike-Wakasihu"] = "alo",
["Laro"] = "lro",
["Larteh"] = "lar",
["Laru"] = "lan",
["Lasgerdi"] = "lsa",
["Lasi"] = "lss",
["Latu"] = "ltu",
["Latvian Sign Language"] = "lsl",
["Lau"] = "llu",
["Laua"] = "luf",
["Lauan"] = "llx",
["Lauje"] = "law",
["Laura"] = "lur",
["Laurentian"] = "lre",
["Tiếng Lutuv"] = "clt",
["Lavatbura-Lamusong"] = "lbv",
["Lawangan"] = "lbx",
["Tiếng Lawi"] = "lvi",
["Lawu"] = "lwu",
["Lawunuia"] = "tgi",
["Layakha"] = "lya",
["Laze"] = "tbq-laz",
["Lealao Chinantec"] = "cle",
["Leco"] = "lec",
["Ledo Kaili"] = "lew",
["Leelau"] = "ldk",
["Lefa"] = "lfa",
["Lega-Mwenga"] = "lgm",
["Lega-Shabunda"] = "lea",
["Legbo"] = "agb",
["Legenyem"] = "lcc",
["Lehali"] = "tql",
["Lehalurup"] = "urr",
["Leinong Naga"] = "lzn",
["Leipon"] = "lek",
["Lela"] = "dri",
["Lelak"] = "llk",
["Lele (Chad)"] = "lln",
["Lele (Congo)"] = "lel",
["Lele (Guinea)"] = "llc",
["Lele (New Guinea)"] = "lle",
["Lelemi"] = "lef",
["Lelepa"] = "lpa",
["Lembena"] = "leq",
["Lemerig"] = "lrz",
["Lemio"] = "lei",
["Lemolang"] = "ley",
["Lemoro"] = "ldj",
["Lenakel"] = "tnl",
["Lendu"] = "led",
["Lengilu"] = "lgi",
["Lengo"] = "lgr",
["Lengola"] = "lej",
["Lenje"] = "leh",
["Lenkau"] = "ler",
["Lenyima"] = "ldg",
["Tiếng León"] = "roa-leo",
["Lepki"] = "lpe",
["Lere"] = "gnh",
["Lese"] = "les",
["Lesing-Gelimi"] = "let",
["Letemboi"] = "nms",
["Leti (Cameroon)"] = "leo",
["Leti (Indonesia)"] = "lti",
["Levuka"] = "lvu",
["Lewo"] = "lww",
["Lewo Eleng"] = "lwe",
["Lewotobi"] = "lwt",
["Leyigha"] = "ayi",
["Lhokpu"] = "lhp",
["Li'o"] = "ljl",
["Liana-Seti"] = "ste",
["Liangmai Naga"] = "njn",
["Liberia Kpelle"] = "xpe",
["Liberian Kreyol"] = "lir",
["Libinza"] = "liz",
["Libon Bikol"] = "lbl",
["Liburnian"] = "xli",
["Libyan Sign Language"] = "lbs",
["Ligbi"] = "lig",
["Ligenza"] = "lgz",
["Lihir"] = "lih",
["Lika"] = "lik",
["Liki"] = "lio",
["Likila"] = "lie",
["Likuba"] = "kxx",
["Likum"] = "lib",
["Likwala"] = "kwc",
["Lilau"] = "lll",
["Limassa"] = "bme",
["Limbu"] = "lif",
["Limbum"] = "lmp",
["Limi"] = "ylm",
["Limilngan"] = "lmc",
["Tiếng Lindu"] = "klw",
["Linear A"] = "lab",
["Tiếng Lâm Cao"] = "onb",
["Lingkhim"] = "lii",
["Lingua Franca Nova"] = "lfn",
["Linngithigh"] = "lnj",
["Tiếng Lipan"] = "apl",
["Lipo"] = "lpo",
["Lisabata-Nuniali"] = "lcs",
["Lisela"] = "lcl",
["Lish"] = "lsh",
["Lishán Didán"] = "trg",
["Literary Chinese"] = "lzh",
["Lithuanian Sign Language"] = "lls",
["Little Swanport"] = "aus-lsw",
["Litzlitz"] = "lzl",
["Lizu"] = "sit-liz",
["Lo-Toga"] = "lht",
["Loarki"] = "lrk",
["Lobala"] = "loq",
["Lobi"] = "lob",
["Lodhi"] = "lbm",
["Logba"] = "lgq",
["Logo"] = "log",
["Logol"] = "lof",
["Logooli"] = "rag",
["Logorik"] = "liu",
["Lokaa"] = "yaz",
["Loko"] = "lok",
["Lokoya"] = "lky",
["Lola"] = "lcd",
["Lolak"] = "llq",
["Lole"] = "llg",
["Lolo"] = "llb",
["Loloda"] = "loa",
["Lolopo"] = "ycl",
["Loma"] = "lom",
["Lomaiviti"] = "lmv",
["Lomakka"] = "loi",
["Lomavren"] = "rmi",
["Lombi"] = "lmi",
["Lombo"] = "loo",
["Lomwe"] = "ngl",
["Loncong"] = "lce",
["Long Phuri Naga"] = "lpn",
["Long Wat"] = "ttw",
["Longgu"] = "lgu",
["Longto"] = "wok",
["Longuda"] = "lnu",
["Loniu"] = "los",
["Lonwolwol"] = "crc",
["Loo"] = "ldo",
["Lopa"] = "lop",
["Lope"] = "yiu",
["Lopi"] = "lov",
["Lopit"] = "lpx",
["Lorang"] = "lrn",
["Lorediakarkar"] = "lnn",
["Tiếng Lorrain"] = "roa-lor",
["Lote"] = "uvl",
["Lotha Naga"] = "njh",
["Lotud"] = "dtr",
["Lotuko"] = "lot",
["Loun"] = "lox",
["Loup A"] = "xlo",
["Loup B"] = "xlb",
["Lovono"] = "vnk",
["Lower Burdekin"] = "xbb",
["Lower Chehalis"] = "cea",
["Lower Grand Valley Dani"] = "dni",
["Lower Nossob"] = "nsb",
["Lower Southern Aranda"] = "axl",
["Lower Ta'oih"] = "tto",
["Tiếng Hạ Tanana"] = "taa",
["Lowland Oaxaca Chontal"] = "clo",
["Lowland Tarahumara"] = "tac",
["Loxicha Zapotec"] = "ztp",
["Lozi"] = "loz",
["Luang"] = "lex",
["Luba-Kasai"] = "lua",
["Lubila"] = "kcc",
["Lubu"] = "lcf",
["Lubuagan Kalinga"] = "knb",
["Luchazi"] = "lch",
["Tiếng Lucumí"] = "luq",
["Lufu"] = "ldq",
["Lugbara"] = "lgg",
["Luguru"] = "ruf",
["Luhu"] = "lcq",
["Tiếng Luhya"] = "luy",
["Luimbi"] = "lum",
["Luiseño"] = "lui",
["Lukpa"] = "dop",
["Lule"] = "ule",
["Lule Sami"] = "smj",
["Lumba-Yakkha"] = "luu",
["Lumbee"] = "lmz",
["Lumbu"] = "lup",
["Lumun"] = "lmd",
["Lun Bawang"] = "lnd",
["Luna"] = "luj",
["Lunanakha"] = "luk",
["Lunda"] = "lun",
["Lungga"] = "lga",
["Luo"] = "luo",
["Luopohe Hmong"] = "hml",
["Luri (Nigeria)"] = "ldd",
["Lusengo"] = "lse",
["Lusi"] = "khl",
["Lusitanian"] = "xls",
["Lutachoni"] = "lts",
["Lutos"] = "ndy",
["Luvale"] = "lue",
["Luwati"] = "luv",
["Luwo"] = "lwo",
["Luyana"] = "lyn",
["Lwalu"] = "lwa",
["Lwel"] = "bnt-lwl",
["Tiếng Lycia"] = "xlc",
["Lyélé"] = "lee",
["Láadan"] = "ldn",
["Láá Láá Bwamu"] = "bwj",
["Ma"] = "msj",
["Ma Manda"] = "skc",
["Ma'di"] = "mhi",
["Ma'ya"] = "slz",
["Tiếng Maay"] = "ymm",
["Maba"] = "mqa",
["Mabaale"] = "mmz",
["Tiếng Mabaan"] = "mfz",
["Mabaka Valley Kalinga"] = "kkg",
["Mabire"] = "muj",
["Maca"] = "mca",
["Macaguaje"] = "mcl",
["Macaguán"] = "mbn",
["Macanese"] = "mzs",
["Macau Pidgin Portuguese"] = "crp-mpp",
["Machame"] = "jmc",
["Machiguenga"] = "mcb",
["Machinere"] = "mpd",
["Machinga"] = "mvw",
["Macoris"] = "nai-mac",
["Macuna"] = "myy",
["Mada (Cameroon)"] = "mxu",
["Mada (Nigeria)"] = "mda",
["Madagascar Sign Language"] = "mzc",
["Madak"] = "mmx",
["Maden"] = "xmx",
["Madhi Madhi"] = "dmd",
["Madi"] = "grg",
["Madngele"] = "zml",
["Madukayang Kalinga"] = "kmd",
["Mae"] = "mme",
["Maek"] = "hmk",
["Maeng Itneg"] = "itt",
["Mafa"] = "maf",
["Mafea"] = "mkv",
["Mag-Anchi Ayta"] = "sgb",
["Mag-Indi Ayta"] = "blx",
["Magahat"] = "mtw",
["Tiếng Magaha"] = "mag",
["Magdalena Peñasco Mixtec"] = "xtm",
["Magiyi"] = "gmg",
["Magoma"] = "gmx",
["Magɨ"] = "gkd",
["Mahasu Pahari"] = "bfz",
["Mahican"] = "mjy",
["Mahongwe"] = "mhb",
["Mahou"] = "mxx",
["Maia"] = "sks",
["Maiadomu"] = "mzz",
["Maiani"] = "tnh",
["Maii"] = "mmm",
["Mailu"] = "mgu",
["Maindo"] = "cwb",
["Mairasi"] = "zrs",
["Maisin"] = "mbq",
["Maiwa (Indonesia)"] = "wmm",
["Maiwa (New Guinea)"] = "mti",
["Maiwala"] = "mum",
["Majang"] = "mpe",
["Majera"] = "xmj",
["Tiếng Majhi"] = "mjz",
["Majhwar"] = "mmj",
["Mak (China)"] = "mkg",
["Mak (Nigeria)"] = "pbl",
["Makaa"] = "mcp",
["Makah"] = "myh",
["Makalero"] = "mjb",
["Makasae"] = "mkz",
["Tiếng Makassar"] = "mak",
["Makassar Malay"] = "mfp",
["Makayam"] = "aup",
["Makhuwa"] = "vmw",
["Makhuwa-Marrevone"] = "xmc",
["Makhuwa-Meetto"] = "mgh",
["Makhuwa-Moniga"] = "mhm",
["Makhuwa-Saka"] = "xsq",
["Makhuwa-Shirima"] = "vmk",
["Maklew"] = "mgf",
["Makolkol"] = "zmh",
["Makonde"] = "kde",
["Maku"] = "xak",
["Maku'a"] = "lva",
["Makuri Naga"] = "jmn",
["Makuráp"] = "mpu",
["Makwe"] = "ymk",
["Makyan Naga"] = "umn",
["Mal"] = "mlf",
["Mal Paharia"] = "mkb",
["Mala (New Guinea)"] = "ped",
["Mala (Nigeria)"] = "ruy",
["Mala Malasar"] = "ima",
["Malaccan Creole Malay"] = "ccm",
["Malalamai"] = "mmt",
["Malalí"] = "sai-mal",
["Malango"] = "mln",
["Malankuravan"] = "mjo",
["Malapandaram"] = "mjp",
["Malaryan"] = "mjq",
["Malas"] = "mkr",
["Malasanga"] = "mqz",
["Malasar"] = "ymr",
["Malavedan"] = "mjr",
["Malawi Lomwe"] = "lon",
["Malawian Sign Language"] = "lws",
["Malayic Dayak"] = "xdy",
["Malaynon"] = "mlz",
["Malaysian Sign Language"] = "xml",
["Malba Birifor"] = "bfo",
["Male"] = "mdc",
["Tiếng Malecite-Passamaquoddy"] = "pqm",
["Maleu-Kilenge"] = "mgl",
["Malfaxal"] = "mlx",
["Malgana"] = "vml",
["Malgbe"] = "mxf",
["Mali"] = "gcc",
["Malibu"] = "sai-mlb",
["Malila"] = "mgq",
["Malimba"] = "mzd",
["Malimpung"] = "mli",
["Malinaltepec Tlapanec"] = "tcf",
["Malol"] = "mbk",
["Maltese Sign Language"] = "mdl",
["Malua Bay"] = "mll",
["Malvi"] = "mup",
["Maléku Jaíka"] = "gut",
["Mam"] = "mam",
["Mama"] = "mma",
["Mamaa"] = "mhf",
["Mamaindé"] = "wmd",
["Mamanwa"] = "mmn",
["Mamara Senoufo"] = "myk",
["Mamasa"] = "mqj",
["Mambae"] = "mgm",
["Mambai"] = "mcs",
["Mamboru"] = "mvd",
["Mambwe-Lungu"] = "mgr",
["Mamuju"] = "mqx",
["Mamulique"] = "emm",
["Mamusi"] = "kdf",
["Mamvu"] = "mdi",
["Man Met"] = "mml",
["Manado Malay"] = "xmm",
["Manam"] = "mva",
["Manambu"] = "mle",
["Manangba"] = "nmm",
["Manangkari"] = "znk",
["Manao"] = "awd-man",
["Manda (Australia)"] = "zma",
["Manda (Tanzania)"] = "mgs",
["Tiếng Mandahuaca"] = "mht",
["Mandaic"] = "mid",
["Mandailing Batak"] = "btm",
["Mandalorian"] = "art-man",
["Mandan"] = "mhq",
["Mandandanyi"] = "zmk",
["Mandar"] = "mdr",
["Mandari"] = "mqu",
["Mandeali"] = "mjl",
["Mander"] = "mqr",
["Mandingo"] = "man",
["Mandjak"] = "mfv",
["Mandobo Atas"] = "aax",
["Mandobo Bawah"] = "bwp",
["Manem"] = "jet",
["Mangala"] = "mem",
["Mangarayi"] = "mpc",
["Mangarevan"] = "mrv",
["Mangayat"] = "myj",
["Mangbetu"] = "mdj",
["Mangbutu"] = "mdk",
["Mangerr"] = "zme",
["Mangga Buang"] = "mmo",
["Mango"] = "mge",
["Mangole"] = "mqc",
["Mangseng"] = "mbh",
["Manigri-Kambolé Ede Nago"] = "xkb",
["Manikion"] = "mnx",
["Manipa"] = "mqp",
["Mankiyali"] = "nlm",
["Manna-Dora"] = "mju",
["Tiếng Mannan"] = "mjv",
["Manombai"] = "woo",
["Tiếng Mansaka"] = "msk",
["Mansoanka"] = "msw",
["Manta"] = "myg",
["Mantsi"] = "nty",
["Manusela"] = "wha",
["Manya"] = "mzj",
["Manyawa"] = "mny",
["Manza"] = "mzv",
["Mao Naga"] = "nbi",
["Mape"] = "mlh",
["Mapena"] = "mnm",
["Mapia"] = "mpy",
["Mapidian"] = "mpw",
["Mapos Buang"] = "bzh",
["Mapoyo"] = "mcg",
["Mapun"] = "sjm",
["Mara"] = "mec",
["Mara Chin"] = "mrh",
["Marachi"] = "lri",
["Maraghei"] = "vmh",
["Maragus"] = "mrs",
["Maram Naga"] = "nma",
["Marama"] = "lrm",
["Tiếng Maranao"] = "mrw",
["Maranungku"] = "zmr",
["Mararit"] = "mgb",
["Maratino"] = "sai-mar",
["Marau"] = "mvr",
["Marawan"] = "awd-mar",
["Marba"] = "mpg",
["Marenje"] = "vmr",
["Marfa"] = "mvu",
["Margany"] = "zmc",
["Marghi South"] = "mfm",
["Margi"] = "mrt",
["Maria"] = "mds",
["Mariaté"] = "awd-mrt",
["Tiếng Maricopa"] = "mrc",
["Maridan"] = "zmd",
["Maridjabin"] = "zmj",
["Marik"] = "dad",
["Marimanindji"] = "zmm",
["Marind"] = "mrz",
["Maring"] = "mbw",
["Maring Naga"] = "nng",
["Maringarr"] = "zmt",
["Marino"] = "mrb",
["Mariri"] = "mqi",
["Maritime Sign Language"] = "nsr",
["Maritsauá"] = "msp",
["Mariyedi"] = "zmy",
["Marka"] = "rkm",
["Markweeta"] = "enb",
["Maroon Spirit Language"] = "cpe-mar",
["Marovo"] = "mvo",
["Marrgu"] = "mhg",
["Marriammu"] = "xru",
["Marrithiyel"] = "mfr",
["Marrucinian"] = "umc",
["Marsian"] = "ims",
["Martha's Vineyard Sign Language"] = "mre",
["Marti Ke"] = "zmg",
["Martu Wangka"] = "mpj",
["Tiếng Martuthunira"] = "vma",
["Marúbo"] = "mzr",
["Masaba"] = "myx",
["Masadiit Itneg"] = "tis",
["Masakará"] = "sai-msk",
["Masalit"] = "mls",
["Masana"] = "mcn",
["Masbate Sorsogon"] = "bks",
["Tiếng Masbatenyo"] = "msb",
["Mashco Piro"] = "cuj",
["Mashi"] = "mho",
["Masimasi"] = "ism",
["Masiwang"] = "bnf",
["Maskelynes"] = "klv",
["Maslam"] = "msv",
["Masmaje"] = "mes",
["Massachusett"] = "wam",
["Massalat"] = "mdg",
["Massep"] = "mvs",
["Matagalpa"] = "mtn",
["Tiếng Matal"] = "mfh",
["Matanawi"] = "sai-mat",
["Matbat"] = "xmt",
["Matengo"] = "mgv",
["Matepi"] = "mqe",
["Matigsalug Manobo"] = "mbt",
["Matipuhy"] = "mzo",
["Matlatzinca"] = "mat",
["Mato"] = "met",
["Mato Grosso Arára"] = "axg",
["Matsés"] = "mcf",
["Mattole"] = "mvb",
["Matukar"] = "mjk",
["Matumbi"] = "mgw",
["Matya Samo"] = "stj",
["Matís"] = "mpq",
["Maung"] = "mph",
["Tiếng Creole Mauritius"] = "mfe",
["Mauritian Sign Language"] = "lsy",
["Mauwake"] = "mhl",
["Mawa"] = "mcw",
["Mawak"] = "mjj",
["Mawan"] = "mcz",
["Mawayana"] = "mzx",
["Mawchi"] = "mke",
["Mawes"] = "mgk",
["Maxakalí"] = "mbl",
["Maxi Gbe"] = "mxl",
["Maya Samo"] = "sym",
["Mayaguduna"] = "xmy",
["Mayangna"] = "yan",
["Mayawali"] = "yxa",
["Maybrat"] = "ayz",
["Mayeka"] = "myc",
["Mayi-Thakurti"] = "xyt",
["Maykulan"] = "mnt",
["Maynas"] = "sai-mys",
["Mayo"] = "mfy",
["Mayogo"] = "mdm",
["Mayoyao Ifugao"] = "ifu",
["Maypure"] = "awd-mpr",
["Mazagway"] = "dkx",
["Mazaltepec Zapotec"] = "zpy",
["Mazatlán Mazatec"] = "vmz",
["Mazatlán Mixe"] = "mzl",
["Mba"] = "mfc",
["Mbala"] = "mdp",
["Mbalanhu"] = "lnb",
["Mbandja"] = "zmz",
["Mbangala"] = "mxg",
["Mbangi"] = "mgn",
["Mbangwe"] = "zmn",
["Mbara (Australia)"] = "mvl",
["Mbara (Chad)"] = "mpk",
["Mbariman-Gudhinma"] = "zmv",
["Mbati"] = "mdn",
["Mbato"] = "gwa",
["Mbay"] = "myb",
["Mbe"] = "mfo",
["Mbe'"] = "mtk",
["Mbelime"] = "mql",
["Mbere"] = "mdt",
["Mbesa"] = "zms",
["Mbiywom"] = "aus-mbi",
["Mbo (Cameroon)"] = "mbo",
["Mbo (Congo)"] = "zmw",
["Mboi"] = "moi",
["Mboko"] = "mdu",
["Mbole"] = "mdq",
["Mbonga"] = "xmb",
["Mbongno"] = "bgu",
["Mbosi"] = "mdw",
["Mbowe"] = "mxo",
["Mbre"] = "mka",
["Mbu'"] = "muc",
["Mbudum"] = "xmd",
["Mbugu"] = "mhd",
["Mbugwe"] = "mgz",
["Mbuko"] = "mqb",
["Mbukushu"] = "mhw",
["Mbula"] = "mna",
["Mbula-Bwazza"] = "mbu",
["Mbule"] = "mlb",
["Mbulungish"] = "mbv",
["Mbum"] = "mdd",
["Mbunda"] = "mck",
["Mbunga"] = "mgy",
["Mburku"] = "bbt",
["Mbuun"] = "zmp",
["Mbwela"] = "mfu",
["Mea"] = "meg",
["Mebu"] = "mjn",
["Mecayapan Nahuatl"] = "nhx",
["Medebur"] = "mjm",
["Medefaidrin"] = "dmf",
["Media Lengua"] = "mue",
["Mednyj Aleut"] = "mud",
["Mefele"] = "mfj",
["Megam"] = "mef",
["Mehek"] = "nux",
["Mehináku"] = "mmh",
["Mekeo"] = "mek",
["Mekmek"] = "mvk",
["Mekwei"] = "msf",
["Mekéns"] = "skf",
["Mel-Khaonh"] = "hkn",
["Mele-Fila"] = "mxe",
["Tiếng Melo"] = "mfx",
["Melpa"] = "med",
["Mendalam Kayan"] = "xkd",
["Mendankwe-Nkwen"] = "mfd",
["Mengaka"] = "xmg",
["Mengen"] = "mee",
["Menien"] = "sai-men",
["Menka"] = "mea",
["Tiếng Menominee"] = "mez",
["Tiếng Mentawai"] = "mwv",
["Menya"] = "mcr",
["Meoswar"] = "mvx",
["Mer"] = "mnu",
["Meramera"] = "mxm",
["Merei"] = "lmb",
["Merey"] = "meq",
["Merlav"] = "mrm",
["Meroitic"] = "xmr",
["Meru"] = "mer",
["Tiếng Mesaka"] = "iyo",
["Mese"] = "mci",
["Mesme"] = "zim",
["Mesmes"] = "mys",
["Mesqan"] = "mvz",
["Messapic"] = "cms",
["Meta'"] = "mgo",
["Metlatónoc Mixtec"] = "mxv",
["Mewari"] = "mtr",
["Mewati"] = "wtm",
["Mexican Sign Language"] = "mfs",
["Meyah"] = "mej",
["Mezontla Popoloca"] = "pbe",
["Tiếng Meänkieli"] = "fit",
["Mfinu"] = "zmf",
["Mfumte"] = "nfu",
["Mgbo"] = "gmz",
["Mian"] = "mpt",
["Miani"] = "pla",
["Micha"] = "yiq",
["Michif"] = "crg",
["Michigamea"] = "cmm",
["Michoacán Nahuatl"] = "ncl",
["Mid Grand Valley Dani"] = "dnt",
["Mid-Southern Banda"] = "bjo",
["Middle Assamese"] = "inc-mas",
["Middle Bengali"] = "inc-mbn",
["Middle Cornish"] = "cnx",
["Middle Gujarati"] = "inc-mgu",
["Middle Kannada"] = "dra-mkn",
["Middle Median"] = "xme-mid",
["Middle Newar"] = "nwx",
["Middle Norwegian"] = "gmq-mno",
["Middle Oriya"] = "inc-mor",
["Middle Watut"] = "mpl",
["Tiếng Wales trung đại"] = "wlm",
["Midob"] = "mei",
["Migaama"] = "mmy",
["Migabac"] = "mpp",
["Miji"] = "sjl",
["Miju"] = "mxj",
["Mikasuki"] = "mik",
["Milang"] = "und-mil",
["Mili"] = "ymh",
["Millcayac"] = "sai-mil",
["Miltu"] = "mlj",
["Miluk"] = "iml",
["Milyan"] = "imy",
["Mimi of Decorse"] = "und-mmd",
["Mimi of Nachtigal"] = "und-mmn",
["Mina"] = "hna",
["Minaean"] = "inm",
["Minang"] = "xrg",
["Tiếng Minangkabau"] = "min",
["Minanibai"] = "mcv",
["Minaveha"] = "mvn",
["Minderico"] = "drc",
["Mindiri"] = "mpn",
["Mingang Doso"] = "mko",
["Mingo"] = "iro-min",
["Minica Huitoto"] = "hto",
["Minidien"] = "wii",
["Minigir"] = "vmg",
["Minjungbal"] = "xjb",
["Minkin"] = "xxm",
["Minoan"] = "omn",
["Minokok"] = "mqq",
["Miraya Bikol"] = "rbl",
["Mire"] = "mvh",
["Mirgan"] = "zrg",
["Miriti"] = "mmv",
["Miriwoong Sign Language"] = "rsm",
["Miriwung"] = "mep",
["Mirpur Panjabi"] = "pmu",
["Misantla Totonac"] = "tlc",
["Miship"] = "mjs",
["Misima-Paneati"] = "mpx",
["Mising"] = "mrg",
["Tiếng Miskito"] = "miq",
["Mitla Zapotec"] = "zaw",
["Mitlatongo Mixtec"] = "vmm",
["Mittu"] = "mwu",
["Mituku"] = "zmq",
["Miu"] = "mpo",
["Miwa"] = "vmi",
["Mixed Great Andamanese"] = "gac",
["Mixifore"] = "mfg",
["Mixtepec Mixtec"] = "mix",
["Mixtepec Zapotec"] = "zpm",
["Miya"] = "mkf",
["Miyobe"] = "soy",
["Mlahsö"] = "lhs",
["Mlap"] = "kja",
["Mlomp"] = "mlo",
["Mmaala"] = "mmu",
["Mmani"] = "buy",
["Mmen"] = "bfm",
["Mo"] = "wkd",
["Mo'da"] = "gbn",
["Moabite"] = "obm",
["Moba"] = "mfq",
["Mobilian"] = "mod",
["Mobumrin Aizi"] = "ahm",
["Mocana"] = "sai-mcn",
["Mochi"] = "old",
["Mochica"] = "omc",
["Mocho"] = "mhc",
["Mocoví"] = "moc",
["Modang"] = "mxd",
["Modole"] = "mqo",
["Moere"] = "mvq",
["Mofu-Gudur"] = "mif",
["Mogum"] = "mou",
["Mohegan-Pequot"] = "xpq",
["Moi (Congo)"] = "mow",
["Moi (Indonesia)"] = "mxn",
["Moikodi"] = "mkp",
["Moingi"] = "mwz",
["Mojave"] = "mov",
["Moji"] = "ymi",
["Mok"] = "mqt",
["Mokerang"] = "mft",
["Mokole"] = "mkl",
["Mokpwe"] = "bri",
["Molale"] = "mbe",
["Tiếng Molbog"] = "pwm",
["Moldova Sign Language"] = "vsi",
["Molengue"] = "bxc",
["Molima"] = "mox",
["Molmo One"] = "aun",
["Molo"] = "zmo",
["Molof"] = "msl",
["Moloko"] = "mlw",
["Mom Jango"] = "ver",
["Moma"] = "myl",
["Momare"] = "msz",
["Mombo Dogon"] = "dmb",
["Mombum"] = "mso",
["Momina"] = "mmb",
["Momuna"] = "mqf",
["Monastic Sign Language"] = "mzg",
["Mondropolon"] = "npn",
["Mondé"] = "mnd",
["Tiếng Mongo"] = "lol",
["Mongol"] = "mgt",
["Mongolian Sign Language"] = "msr",
["Tiếng Mongondow"] = "mog",
["Moni"] = "mnz",
["Monimbo"] = "mom",
["Mono (California)"] = "mnr",
["Mono (Cameroon)"] = "mru",
["Mono (Congo)"] = "mnh",
["Monsang Naga"] = "nmh",
["Montagnais"] = "moe",
["Montana Salish"] = "fla",
["Montol"] = "mtl",
["Monumbo"] = "mxk",
["Monzombo"] = "moj",
["Moo"] = "gwg",
["Moose Cree"] = "crm",
["Mopan Maya"] = "mop",
["Mor (Austronesian)"] = "mhz",
["Mor (Papuan)"] = "moq",
["Moraid"] = "msg",
["Moran"] = "sit-mor",
["Morawa"] = "mze",
["Morelos Nahuatl"] = "nhm",
["Morerebi"] = "xmo",
["Moresada"] = "msx",
["Mori Atas"] = "mzq",
["Mori Bawah"] = "xmz",
["Morigi"] = "mdb",
["Moro"] = "mor",
["Moroccan Amazigh"] = "zgh",
["Moroccan Sign Language"] = "xms",
["Morom"] = "bdo",
["Moronene"] = "mqn",
["Morori"] = "mok",
["Morouas"] = "mrp",
["Mortlockese"] = "mrl",
["Moru"] = "mgd",
["Mosimo"] = "mqv",
["Moskona"] = "mtj",
["Mota"] = "mtt",
["Motembo"] = "tmv",
["Mouk-Aria"] = "mwh",
["Mount Iraya Agta"] = "atl",
["Mount Iriga Agta"] = "agz",
["Mountain Koiari"] = "kpx",
["Mouwase"] = "jmw",
["Movima"] = "mzp",
["Moyadan Itneg"] = "ity",
["Moyon Naga"] = "nmo",
["Mozambican Sign Language"] = "mzy",
["Mpade"] = "mpi",
["Mpalitjanh"] = "xpj",
["Mpi"] = "mpz",
["Mpiemo"] = "mcx",
["Mpiin"] = "bnt-mpi",
["Mpinda"] = "pnd",
["Mpongmpong"] = "mgg",
["Mpoto"] = "mpa",
["Mpotovoro"] = "mvt",
["Mpuono"] = "bnt-mpu",
["Mpur"] = "akc",
["Mro Chin"] = "cmr",
["Mru"] = "mro",
["Mser"] = "kqx",
["Mualang"] = "mtd",
["Mubami"] = "tsx",
["Mubi"] = "mub",
["Mucuchí"] = "sai-muc",
["Muda"] = "ymd",
["Tiếng Mudburra"] = "dmw",
["Muduapa"] = "wiv",
["Muduga"] = "udg",
["Muellama"] = "sai-mue",
["Mufian"] = "aoj",
["Muher"] = "sem-mhr",
["Muinane"] = "bmr",
["Mukha-Dora"] = "mmk",
["Mukulu"] = "moz",
["Mulaha"] = "mfw",
["Mulam"] = "mlm",
["Mulao"] = "giu",
["Mullu Kurumba"] = "kpb",
["Mullukmulluk"] = "mpb",
["Muluridyi"] = "vmu",
["Mum"] = "kqa",
["Mumuye"] = "mzm",
["Tiếng Muna"] = "mnb",
["Munda"] = "unx",
["Tiếng Mundabli"] = "boe",
["Mundang"] = "mua",
["Mundani"] = "mnf",
["Mundat"] = "mmf",
["Mundolinco"] = "art-mun",
["Mundurukú"] = "myu",
["Mungaka"] = "mhk",
["Mungbam"] = "mij",
["Munggui"] = "mth",
["Mungkip"] = "mpv",
["Muniche"] = "myr",
["Munit"] = "mtc",
["Tiếng Munsee"] = "umu",
["Mur Pano"] = "tkv",
["Muratayak"] = "asx",
["Murik (Malaysia)"] = "mxr",
["Murik (New Guinea)"] = "mtf",
["Murkim"] = "rmh",
["Murle"] = "mur",
["Murrinh-Patha"] = "mwf",
["Murui Huitoto"] = "huu",
["Murupi"] = "mqw",
["Muruwari"] = "zmu",
["Musan"] = "mmp",
["Musar"] = "mmi",
["Musasa"] = "smm",
["Musey"] = "mse",
["Musgu"] = "mug",
["Musi"] = "mui",
["Muskum"] = "mje",
["Musom"] = "msu",
["Mussau-Emira"] = "emi",
["Muthuvan"] = "muv",
["Mutu"] = "tuc",
["Muya"] = "mvm",
["Muyang"] = "muy",
["Muyuw"] = "myw",
["Muzi"] = "ymz",
["Muzo"] = "sai-muz",
["Mvanip"] = "mcj",
["Mvuba"] = "mxh",
["Mwaghavul"] = "sur",
["Mwali Comorian"] = "wlc",
["Tiếng Mwan"] = "moa",
["Mwani"] = "wmw",
["Mwatebu"] = "mwa",
["Mwera"] = "mwe",
["Mwimbi-Muthambi"] = "mws",
["Mycenaean Greek"] = "gmy",
["Myene"] = "mye",
["Mysian"] = "yms",
["Mzieme Naga"] = "nme",
["Mághdì"] = "gmd",
["Tiếng Mòcheno"] = "mhn",
["Mün Chin"] = "mwq",
["Mündü"] = "muh",
["N'Ko"] = "nqo",
["Na"] = "nbt",
["Na'vi"] = "art-nav",
["Naaba"] = "nao",
["Naba"] = "mne",
["Nabak"] = "naf",
["Nabi"] = "mty",
["Nachering"] = "ncd",
["Nadruvian"] = "ndf",
["Nadëb"] = "mbj",
["Tiếng Nafaanra"] = "nfr",
["Nafi"] = "srf",
["Nafri"] = "nxx",
["Naga Pidgin"] = "nag",
["Nagarchal"] = "nbg",
["Nage"] = "nxe",
["Nagtipunan Agta"] = "phi-nag",
["Nagu"] = "ngr",
["Nagumi"] = "ngv",
["Nahali"] = "nlx",
["Nahari"] = "nhh",
["Nahavaq"] = "sns",
["Nai"] = "bio",
["Najdi Arabic"] = "ars",
["Naka'ela"] = "nae",
["Nakai"] = "nkj",
["Nakame"] = "nib",
["Nakanai"] = "nak",
["Nakara"] = "nck",
["Nake"] = "nbk",
["Naki"] = "mff",
["Nakwi"] = "nax",
["Nalca"] = "nlc",
["Nali"] = "nss",
["Nalik"] = "nal",
["Nalu"] = "naj",
["Nalögo"] = "nlz",
["Namakura"] = "nmk",
["Namat"] = "nkm",
["Tiếng Nambikwara"] = "nab",
["Nambo"] = "ncm",
["Nambya"] = "nmq",
["Namia"] = "nnm",
["Namiae"] = "nvm",
["Namibian Sign Language"] = "nbs",
["Namla"] = "naa",
["Namo"] = "mxw",
["Namonuito"] = "nmt",
["Namosi-Naitasiri-Serua"] = "bwb",
["Namuyi"] = "nmy",
["Nancere"] = "nnc",
["Nande"] = "nnb",
["Nandi"] = "niq",
["Nanerigé Sénoufo"] = "sen",
["Nanga Dama Dogon"] = "nzz",
["Nankina"] = "nnk",
["Nanti"] = "cox",
["Nanticoke"] = "nnt",
["Nanubae"] = "afk",
["Naolan"] = "nai-nao",
["Napu"] = "npy",
["Nar Phu"] = "npa",
["Nara"] = "nrb",
["Narak"] = "nac",
["Narango"] = "nrg",
["Narau"] = "nxu",
["Narim"] = "loh",
["Naro"] = "nhr",
["Narom"] = "nrm",
["Narragansett"] = "xnt",
["Narungga"] = "nnr",
["Naruo"] = "ylo",
["Nasal"] = "nsy",
["Nasarian"] = "nvh",
["Nasioi"] = "nas",
["Naskapi"] = "nsk",
["Nasu"] = "ywq",
["Natagaimas"] = "nts",
["Natchez"] = "ncz",
["Nateni"] = "ntm",
["Nathembo"] = "nte",
["Natioro"] = "nti",
["Natú"] = "sai-nat",
["Natügu"] = "ntu",
["Nauete"] = "nxa",
["Naukanski"] = "ynk",
["Nauna"] = "ncn",
["Nauo"] = "nwo",
["Navarro-Aragonese"] = "roa-oan",
["Navut"] = "nsw",
["Nawaru"] = "nwr",
["Nawathinehena"] = "nwa",
["Nawdm"] = "nmz",
["Nawuri"] = "naw",
["Nayi"] = "noz",
["Ncane"] = "ncr",
["Nchumbulu"] = "nlu",
["Nda'nda'"] = "nnz",
["Ndai"] = "gke",
["Ndaka"] = "ndk",
["Ndali"] = "ndh",
["Ndam"] = "ndm",
["Ndamba"] = "ndj",
["Ndambomo"] = "nxo",
["Ndasa"] = "nda",
["Ndau"] = "ndc",
["Nde-Gbite"] = "ned",
["Nde-Nsele-Nta"] = "ndd",
["Ndemli"] = "nml",
["Ndendeule"] = "dne",
["Ndengereko"] = "ndg",
["Nding"] = "eli",
["Ndjébbana"] = "djj",
["Ndo"] = "ndp",
["Ndobo"] = "ndw",
["Ndoe"] = "nbb",
["Ndolo"] = "ndl",
["Ndom"] = "nqm",
["Ndombe"] = "ndq",
["Ndoola"] = "ndr",
["Ndrulo"] = "dno",
["Nduga"] = "ndx",
["Ndumu"] = "nmd",
["Ndunda"] = "nuh",
["Ndunga"] = "ndt",
["Ndut"] = "ndv",
["Ndyuka-Trio Pidgin"] = "njt",
["Ndzwani Comorian"] = "wni",
["Nedebang"] = "nec",
["Nefamese"] = "nef",
["Negeri Sembilan Malay"] = "zmi",
["Nehan"] = "nsn",
["Nek"] = "nif",
["Nekgini"] = "nkg",
["Neko"] = "nej",
["Neku"] = "nek",
["Neme"] = "nex",
["Nemi"] = "nem",
["Nen"] = "nqn",
["Nend"] = "anh",
["Nengone"] = "nen",
["Neo"] = "neu",
["Nepalese Sign Language"] = "nsp",
["Nepali Kurux"] = "kxl",
["Nete"] = "net",
["Neve'ei"] = "vnm",
["Neverver"] = "lgk",
["New Caledonian Javanese"] = "jas",
["New River Shasta"] = "nai-nrs",
["New Zealand Sign Language"] = "nzs",
["Neyo"] = "ney",
["Nez Perce"] = "nez",
["Nga La"] = "hlt",
["Ngaanyatjarra"] = "ntj",
["Tiếng Ngadha"] = "nxg",
["Ngadjunmaya"] = "nju",
["Ngadjuri"] = "jui",
["Ngaing"] = "nnf",
["Ngaju"] = "nij",
["Ngala"] = "nud",
["Ngalakan"] = "nig",
["Ngalkbun"] = "ngk",
["Ngam"] = "nmc",
["Ngamambo"] = "nbv",
["Ngambay"] = "sba",
["Ngamini"] = "nmv",
["Ngamo"] = "nbh",
["Ngan'gityemerri"] = "nam",
["Nganakarti"] = "xnk",
["Ngandi"] = "nid",
["Ngando (Central African Republic)"] = "ngd",
["Ngando (Congo)"] = "nxd",
["Ngandyera"] = "nne",
["Ngangam"] = "gng",
["Ngantangarra"] = "ntg",
["Nganyaywana"] = "nyx",
["Ngardi"] = "rxd",
["Ngarigu"] = "xni",
["Ngarinman"] = "nbj",
["Ngarinyin"] = "ung",
["Ngarla"] = "nrk",
["Ngarluma"] = "nrl",
["Ngarrindjeri"] = "nay",
["Ngasa"] = "nsg",
["Ngatik Men's Creole"] = "ngm",
["Ngawn Chin"] = "cnw",
["Ngawun"] = "nxn",
["Ngazidja Comorian"] = "zdj",
["Ngbaka"] = "nga",
["Ngbaka Ma'bo"] = "nbm",
["Ngbaka Manza"] = "ngg",
["Ngbee"] = "jgb",
["Ngbinda"] = "nbd",
["Ngbundu"] = "nuu",
["Ngelima"] = "agh",
["Ngemba"] = "nge",
["Ngen"] = "gnj",
["Ngendelengo"] = "nql",
["Ngeq"] = "ngt",
["Ngete"] = "nnn",
["Nggem"] = "nbq",
["Nggwahyi"] = "ngx",
["Ngie"] = "ngj",
["Ngile"] = "jle",
["Ngindo"] = "nnq",
["Ngiti"] = "niy",
["Tiếng Ngiyambaa"] = "wyb",
["Ngizim"] = "ngi",
["Ngkoth"] = "aus-ngk",
["Ngkâlmpw Kanum"] = "kcd",
["Ngochang"] = "tbq-ngo",
["Ngom"] = "nra",
["Ngombale"] = "nla",
["Ngombe (Central African Republic)"] = "nmj",
["Tiếng Ngombe (Congo)"] = "ngc",
["Ngong"] = "nnx",
["Ngongo"] = "noq",
["Ngoni"] = "ngo",
["Ngoreme"] = "ngq",
["Ngoshie"] = "nsh",
["Ngul"] = "nlo",
["Ngulu"] = "ngp",
["Nguluwan"] = "nuw",
["Ngumbi"] = "nui",
["Ngunawal"] = "xul",
["Ngundi"] = "ndn",
["Ngundu"] = "nue",
["Ngungwel"] = "ngz",
["Ngurmbur"] = "nrx",
["Ngwaba"] = "ngw",
["Ngwe"] = "nwe",
["Ngwo"] = "ngn",
["Ngäbere"] = "gym",
["Nhanda"] = "nha",
["Nhirrpi"] = "hrp",
["Nhuwala"] = "nhf",
["Nicaraguan Creole"] = "bzk",
["Nicaraguan Sign Language"] = "ncs",
["Nicola"] = "ath-nic",
["Niellim"] = "nie",
["Nigeria Mambila"] = "mzk",
["Nigerian Pidgin"] = "pcm",
["Nigerian Sign Language"] = "nsi",
["Nihali"] = "nll",
["Nii"] = "nii",
["Niksek"] = "gbe",
["Nila"] = "nil",
["Nilamba"] = "nim",
["Nimadi"] = "noe",
["Nimanbur"] = "nmp",
["Nimbari"] = "nmr",
["Nimboran"] = "nir",
["Nimi"] = "nis",
["Nimo"] = "niw",
["Nimoa"] = "nmw",
["Ninam"] = "shb",
["Nindi"] = "nxi",
["Ningera"] = "nby",
["Ninggerum"] = "nxr",
["Ningil"] = "niz",
["Ninia Yali"] = "nlk",
["Ninzo"] = "nin",
["Nipsan"] = "nps",
["Nisa"] = "njs",
["Nisenan"] = "nsz",
["Nisga'a"] = "ncg",
["Nisi"] = "yso",
["Niuafo'ou"] = "num",
["Niuatoputapu"] = "nkp",
["Tiếng Nivaclé"] = "cag",
["Niwer Mil"] = "hrc",
["Njalgulgule"] = "njl",
["Njebi"] = "nzb",
["Njen"] = "njj",
["Njerep"] = "njr",
["Njyem"] = "njy",
["Nkami"] = "nkq",
["Nkangala"] = "nkn",
["Nkem-Nkum"] = "isi",
["Nkhumbi"] = "khu",
["Nkongho"] = "nkc",
["Nkoroo"] = "nkx",
["Nkoya"] = "nka",
["Nkukoli"] = "nbo",
["Nkutu"] = "nkw",
["Nnam"] = "nbp",
["Nobonob"] = "gaw",
["Nocamán"] = "nom",
["Nocte Naga"] = "njb",
["Noiri"] = "noi",
["Nokuku"] = "nkk",
["Nomaande"] = "lem",
["Nomane"] = "nof",
["Nomatsiguenga"] = "not",
["Nomlaki"] = "nol",
["Nomu"] = "noh",
["Nonuya"] = "noj",
["Nooksack"] = "nok",
["Noon"] = "snf",
["Noone"] = "nhu",
["Nopala Chatino"] = "cya",
["Norn"] = "nrn",
["Norra"] = "nrr",
["North Ambrym"] = "mmg",
["North Asmat"] = "nks",
["North Awyu"] = "yir",
["North Babar"] = "bcd",
["North Boma"] = "boh",
["North Central Mixe"] = "neq",
["North Efate"] = "llp",
["North Fali"] = "fll",
["North Giziga"] = "gis",
["North Marquesan"] = "mrq",
["North Mesopotamian Arabic"] = "ayp",
["North Mofu"] = "mfk",
["North Muyu"] = "kti",
["North Nuaulu"] = "nni",
["North Picene"] = "nrp",
["North Tairora"] = "tbg",
["North Tanna"] = "tnn",
["North Wahgi"] = "whg",
["North Watut"] = "una",
["Northeast Kiwai"] = "kiw",
["Northeast Maidu"] = "nmu",
["Northeast Pashayi"] = "aee",
["Northeastern Dinka"] = "dip",
["Northeastern Pomo"] = "pef",
["Northern Alta"] = "aqn",
["Northern Bontoc"] = "rbk",
["Tiếng Bắc Catanduanes Bikol"] = "cts",
["Northern Dagara"] = "dgi",
["Northern East Cree"] = "crl",
["Northern Ghale"] = "ghh",
["Northern Grebo"] = "gbo",
["Northern Guiyang Hmong"] = "huj",
["Northern Haida"] = "hdn",
["Northern Huishui Hmong"] = "hmi",
["Northern Kalapuya"] = "nrt",
["Northern Kam"] = "doc",
["Northern Kankanay"] = "xnn",
["Northern Khanty"] = "kca-nor",
["Northern Kissi"] = "kqs",
["Northern Lorung"] = "lbr",
["Northern Mashan Hmong"] = "hmp",
["Northern Muji"] = "ymx",
["Northern Ngbandi"] = "ngb",
["Northern Nuni"] = "nuv",
["Northern Oaxaca Nahuatl"] = "nhy",
["Northern Ohlone"] = "cst",
["Northern One"] = "onr",
["Tiếng Bắc Paiute"] = "pao",
["Northern Pame"] = "pmq",
["Northern Pinghua"] = "cnp",
["Northern Pomo"] = "pej",
["Northern Puebla Nahuatl"] = "ncj",
["Northern Pumi"] = "pmi",
["Northern Qiandong Miao"] = "hea",
["Northern Rengma Naga"] = "nnl",
["Northern Sierra Miwok"] = "nsq",
["Northern Subanen"] = "stb",
["Northern Tarahumara"] = "thh",
["Northern Tepehuan"] = "ntp",
["Northern Tidong"] = "ntd",
["Northern Tlaxiaco Mixtec"] = "xtn",
["Northern Toussian"] = "tsp",
["Northern Tutchone"] = "ttm",
["Northern Valley Yokuts"] = "nai-nvy",
["Tiếng Tây Bắc Gbaya"] = "gya",
["Northwest Maidu"] = "mjd",
["Northwest Oaxaca Mixtec"] = "mxa",
["Northwest Pashayi"] = "glh",
["Northwestern Dinka"] = "diw",
["Northwestern Fars"] = "faz",
["Northwestern Ojibwa"] = "ojb",
["Northwestern Tamang"] = "tmk",
["Norwegian Sign Language"] = "nsl",
["Notre"] = "bly",
["Notsi"] = "ncf",
["Nottoway"] = "ntw",
["Nottoway-Meherrin"] = "nwy",
["Noxilo"] = "art-nox",
["Noy"] = "noy",
["Nsari"] = "asj",
["Nsenga"] = "nse",
["Nshi"] = "nsc",
["Nsong"] = "soo",
["Nsongo"] = "nsx",
["Ntcham"] = "bud",
["Ntomba"] = "nto",
["Ntra'ngith"] = "dgt",
["Nuguria"] = "nur",
["Nuk"] = "noc",
["Nukak Makú"] = "mbr",
["Nukna"] = "klt",
["Nukuini"] = "nuc",
["Nukumanu"] = "nuq",
["Nukunu"] = "nnv",
["Nukunul"] = "xnu",
["Nukuoro"] = "nkr",
["Numana"] = "nbr",
["Numanggang"] = "nop",
["Numbami"] = "sij",
["Nume"] = "tgs",
["Numee"] = "kdk",
["Numidian"] = "nxm",
["Nungali"] = "nug",
["Nunggubuyu"] = "nuy",
["Nungon"] = "paa-nun",
["Nungu"] = "rin",
["Nupbikha"] = "npb",
["Tiếng Nupe"] = "nup",
["Nusa Laut"] = "nul",
["Nusu"] = "nuf",
["Nutabe"] = "cba-nut",
["Nyabwa"] = "nwb",
["Nyaheun"] = "nev",
["Nyakyusa"] = "nyy",
["Nyali"] = "nlj",
["Nyam"] = "nmi",
["Nyamal"] = "nly",
["Nyambo"] = "now",
["Nyamusa-Molo"] = "nwm",
["Nyamwanga"] = "mwn",
["Nyamwezi"] = "nym",
["Nyaneka"] = "nyk",
["Nyang'i"] = "nyp",
["Nyanga (Congo)"] = "nyj",
["Nyanga (Togo)"] = "ayg",
["Nyanga-li"] = "nyc",
["Nyangatom"] = "nnj",
["Nyangbo"] = "nyb",
["Nyangga"] = "nny",
["Nyangumarta"] = "nna",
["Nyankole"] = "nyn",
["Nyaturu"] = "rim",
["Nyawaygi"] = "nyt",
["Nyemba"] = "nba",
["Nyengo"] = "nye",
["Nyenkha"] = "neh",
["Nyigina"] = "nyh",
["Nyiha"] = "nih",
["Nyika"] = "nkt",
["Nyimang"] = "nyi",
["Nyindrou"] = "lid",
["Nyindu"] = "nyg",
["Nyishi"] = "njz",
["Nyiyaparli"] = "xny",
["Nyokon"] = "nvo",
["Nyole (Kenya)"] = "nyd",
["Nyole (Uganda)"] = "nuj",
["Nyong"] = "muo",
["Nyoro"] = "nyo",
["Nyulnyul"] = "nyv",
["Tiếng Nyunga"] = "nys",
["Nyungwe"] = "nyu",
["Nyâlayu"] = "yly",
["Tiếng Nzadi"] = "nzd",
["Nzakambay"] = "nzy",
["Nzakara"] = "nzk",
["Nzanyi"] = "nja",
["Nzima"] = "nzi",
["Nüpode Huitoto"] = "hux",
["Tiếng Nǀuu"] = "ngh",
["O'chi'chi'"] = "xoc",
["Obanliku"] = "bzy",
["Obispeño"] = "obi",
["Oblo"] = "obl",
["Obo Manobo"] = "obo",
["Obokuitai"] = "afz",
["Obolo"] = "ann",
["Obulom"] = "obu",
["Ocotepec Mixtec"] = "mie",
["Ocotlán Zapotec"] = "zac",
["Od"] = "odk",
["Odiai"] = "bhf",
["Odoodee"] = "kkc",
["Odual"] = "odu",
["Odut"] = "oda",
["Ofayé"] = "opy",
["Ofo"] = "ofo",
["Ogbah"] = "ogc",
["Ogbia"] = "ogb",
["Ogbogolo"] = "ogg",
["Ogea"] = "eri",
["Oirata"] = "oia",
["Okiek"] = "oki",
["Oko-Eni-Osayen"] = "oks",
["Oko-Juwoi"] = "okj",
["Okobo"] = "okb",
["Okodia"] = "okd",
["Okolod"] = "kqv",
["Okpamheri"] = "opa",
["Okpe (Northwestern Edo)"] = "okx",
["Okpe (Southwestern Edo)"] = "oke",
["Okpela"] = "atg",
["Oksapmin"] = "opm",
["Oku"] = "oku",
["Okwanuchu"] = "nai-okw",
["Old Avar"] = "oav",
["Old Bengali"] = "inc-obn",
["Tiếng Catalan cổ"] = "roa-oca",
["Tiếng Cornwall cổ"] = "oco",
["Old Gujarati"] = "inc-ogu",
["Old Hindi"] = "inc-ohi",
["Tiếng Hungary cổ"] = "ohu",
["Old Kamta"] = "inc-ork",
["Tiếng Kannada cổ"] = "dra-okn",
["Tiếng Telugu cổ"] = "dra-ote",
["Old Kentish Sign Language"] = "okl",
["Old Leonese"] = "roa-ole",
["Tiếng Navarro-Aragon"] = "roa-ona",
["Tiếng Litva cổ"] = "olt",
["Old Manipuri"] = "omp",
["Old Marathi"] = "omr",
["Old Nubian"] = "onw",
["Old Oriya"] = "inc-oor",
["Tiếng Punjab cổ"] = "inc-opa",
["Tiếng Nam Ả Rập cổ"] = "sem-srb",
["Old Tati"] = "xme-ott",
["Tiếng Tây Tạng cổ"] = "otb",
["Old Welsh"] = "owl",
["Olekha"] = "ole",
["Ollari"] = "gdb",
["Olo"] = "ong",
["Oloma"] = "olm",
["Olrat"] = "olr",
["Olu'bo"] = "lul",
["Olulumo-Ikom"] = "iko",
["Oluta Popoluca"] = "plo",
["Olutsotso"] = "lto",
["Omagua"] = "omg",
["Omba"] = "omb",
["Ombamba"] = "mbm",
["Ombo"] = "oml",
["Ometepec Nahuatl"] = "nht",
["Omi"] = "omi",
["Omotik"] = "omt",
["Omurano"] = "omu",
["Oneida"] = "one",
["Ong"] = "oog",
["Ongota"] = "bxe",
["Onin"] = "oni",
["Onjob"] = "onj",
["Ono"] = "ons",
["Onobasulu"] = "onn",
["Onondaga"] = "ono",
["Ontenu"] = "ont",
["Ontong Java"] = "ojv",
["Oorlams"] = "oor",
["Opao"] = "opo",
["Opata"] = "opt",
["Opuuo"] = "lgn",
["Opón"] = "sai-opo",
["Oraon Sadri"] = "sdr",
["Orejón"] = "ore",
["Oring"] = "org",
["Orizaba Nahuatl"] = "nlv",
["Orléanais"] = "roa-orl",
["Oro"] = "orx",
["Oro Win"] = "orw",
["Oroha"] = "ora",
["Orokaiva"] = "okv",
["Oroko"] = "bdu",
["Orokolo"] = "oro",
["Orowe"] = "bpk",
["Oruma"] = "orr",
["Orya"] = "ury",
["Osamayi"] = "syx",
["Osing"] = "osi",
["Ososo"] = "oso",
["Ot Danum"] = "otd",
["Otank"] = "uta",
["Oti"] = "oti",
["Otomaco"] = "sai-oto",
["Otoro"] = "otr",
["Ottawa"] = "otw",
["Ouma"] = "oum",
["Oune"] = "oue",
["Owa"] = "stn",
["Owenia"] = "wsr",
["Owiniga"] = "owi",
["Oy"] = "oyb",
["Oya'oya"] = "oyy",
["Tiếng Oyda"] = "oyd",
["Ozolotepec Zapotec"] = "zao",
["Pa"] = "ppt",
["Pa Di"] = "pdi",
["Pa'a"] = "pqa",
["Paama"] = "pma",
["Paasaal"] = "sig",
["Pacahuara"] = "pcp",
["Padoe"] = "pdo",
["Paelignian"] = "pgn",
["Paeonian"] = "ine-pae",
["Pagi"] = "pgi",
["Pagibete"] = "pae",
["Tiếng Pagu"] = "pgu",
["Pahanan Agta"] = "apf",
["Tiếng Pothohar"] = "phr",
["Pahi"] = "lgt",
["Pahlavani"] = "phv",
["Pai Tavytera"] = "pta",
["Pai-lang"] = "tbq-plg",
["Paicî"] = "pri",
["Paikoneka"] = "awd-pai",
["Paipai"] = "ppi",
["Pajapan Nahuatl"] = "nhp",
["Pak-Tong"] = "pkg",
["Pakanha"] = "pkn",
["Pakistan Sign Language"] = "pks",
["Tiếng Paku"] = "pku",
["Paku Karen"] = "kpp",
["Pal"] = "abw",
["Palaka Senoufo"] = "plr",
["Palantla Chinantec"] = "cpa",
["Palawan Batak"] = "bya",
["Paleni"] = "pnl",
["Palenquero"] = "pln",
["Palewyami"] = "nai-ply",
["Palikur"] = "plu",
["Paliyan"] = "pcf",
["Pallanganmiddang"] = "pmd",
["Palor"] = "fap",
["Palta"] = "sai-pal",
["Palu'e"] = "ple",
["Paluan"] = "plz",
["Palya Bareli"] = "bpx",
["Pam"] = "pmn",
["Pambia"] = "pmb",
["Pamigua"] = "sai-pam",
["Pamlico"] = "pmk",
["Pamona"] = "pmf",
["Pamosu"] = "hih",
["Pamplona Atta"] = "att",
["Pana (Central Africa)"] = "pnz",
["Pana (West Africa)"] = "pnq",
["Panamanian Sign Language"] = "lsp",
["Panamint"] = "par",
["Panare"] = "pbh",
["Panará"] = "kre",
["Panasuan"] = "psn",
["Panawa"] = "pwb",
["Pande"] = "bkj",
["Pangseng"] = "pgs",
["Pangutaran Sama"] = "slm",
["Pangwa"] = "pbr",
["Panim"] = "pnr",
["Paniya"] = "pcg",
["Pankararé"] = "pax",
["Pankararú"] = "paz",
["Pankhu"] = "pkh",
["Pannei"] = "pnc",
["Panobo"] = "pno",
["Panyi Bai"] = "bfc",
["Panyjima"] = "pnw",
["Panzaleo"] = "sai-pnz",
["Pao"] = "ppa",
["Tiếng Totonac Papantla"] = "top",
["Papapana"] = "ppn",
["Papar"] = "dpp",
["Papasena"] = "pas",
["Papel"] = "pbo",
["Papi"] = "ppe",
["Papitalai"] = "pat",
["Papora"] = "ppu",
["Papua New Guinean Sign Language"] = "pgz",
["Papuan Malay"] = "pmy",
["Papuma"] = "ppm",
["Para Naga"] = "pzn",
["Parachi"] = "prc",
["Tiếng Guarani Paraguay"] = "gug",
["Paraguayan Sign Language"] = "pys",
["Parakanã"] = "pak",
["Paranan"] = "prf",
["Paranawát"] = "paf",
["Paratió"] = "sai-par",
["Tiếng Paraujano"] = "pbg",
["Parawen"] = "prw",
["Pardhan"] = "pch",
["Pardhi"] = "pcl",
["Pare"] = "asa",
["Tiếng Pareci"] = "pab",
["Paredarerme"] = "xpd",
["Parenga"] = "pcj",
["Parya"] = "paq",
["Pará Arára"] = "aap",
["Pará Gavião"] = "gvp",
["Pasi"] = "psq",
["Pass Valley Yali"] = "yac",
["Passé"] = "awd-pas",
["Patagón"] = "sai-ptg",
["Patamona"] = "pbc",
["Patani"] = "ptn",
["Pataxó Hã-Ha-Hãe"] = "pth",
["Patep"] = "ptp",
["Pathiya"] = "pty",
["Patpatar"] = "gfk",
["Pattani"] = "lae",
["Tiếng Mã Lai Pattani"] = "mfa",
["Pattapu"] = "ptq",
["Patwin"] = "pwi",
["Paulohi"] = "plh",
["Paumarí"] = "pad",
["Pauri Bareli"] = "bfb",
["Pauserna"] = "psm",
["Pawaia"] = "pwa",
["Payaguá"] = "sai-pyg",
["Paynamar"] = "pmr",
["Pe"] = "pai",
["Pech"] = "pay",
["Peerapper"] = "xpw",
["Peere"] = "pfe",
["Pei"] = "ppq",
["Pekal"] = "pel",
["Pele-Ata"] = "ata",
["Penang Sign Language"] = "psg",
["Penchal"] = "pek",
["Pendau"] = "ums",
["Pennsylvania German"] = "pdc",
["Penrhyn"] = "pnh",
["Pentlatch"] = "ptw",
["Perai"] = "wet",
["Perema"] = "wom",
["Pericú"] = "nai-per",
["Pero"] = "pip",
["Persian Sign Language"] = "psc",
["Peruvian Sign Language"] = "prl",
["Petapa Zapotec"] = "zpe",
["Petats"] = "pex",
["Peñoles Mixtec"] = "mil",
["Phala"] = "ypa",
["Phana'"] = "phq",
["Phangduwali"] = "phw",
["Phende"] = "pem",
["Philippine Sign Language"] = "psp",
["Philistine"] = "und-phi",
["Phimbi"] = "phm",
["Phola"] = "ypg",
["Pholo"] = "yip",
["Phom"] = "nph",
["Phudagi"] = "phd",
["Phuie"] = "pug",
["Phukha"] = "phh",
["Phuma"] = "ypm",
["Phunoi"] = "pho",
["Phupa"] = "ypp",
["Phupha"] = "yph",
["Phuthi"] = "bnt-phu",
["Phuza"] = "ypz",
["Piamatsina"] = "ptr",
["Piame"] = "pin",
["Piapoco"] = "pio",
["Piaroa"] = "pid",
["Pichinglis"] = "fpe",
["Pichis Ashéninka"] = "cpu",
["Pictish"] = "xpi",
["Picuris"] = "nai-pic",
["Pidgin Delaware"] = "dep",
["Pidgin Iha"] = "ihb",
["Pidgin Onin"] = "onx",
["Pijao"] = "pij",
["Pije"] = "piz",
["Pijin"] = "pis",
["Pileni"] = "piv",
["Pima Bajo"] = "pia",
["Pimbwe"] = "piw",
["Pinai-Hagahai"] = "pnn",
["Pingelapese"] = "pif",
["Pini"] = "pii",
["Pinigura"] = "pnv",
["Pinjarup"] = "pnj",
["Pinji"] = "pic",
["Pinotepa Nacional Mixtec"] = "mio",
["Pintiini"] = "pti",
["Pintupi-Luritja"] = "piu",
["Pirahã"] = "myp",
["Piratapuyo"] = "pir",
["Pirlatapa"] = "bxi",
["Piro"] = "pie",
["Pirriya"] = "xpa",
["Pisabo"] = "pig",
["Pisaflores Tepehua"] = "tpp",
["Piscataway"] = "psy",
["Pisidian"] = "xps",
["Pitcairn-Norfolk"] = "pih",
["Pite Sami"] = "sje",
["Piti"] = "pcn",
["Pitjantjatjara"] = "pjt",
["Pitta-Pitta"] = "pit",
["Piu"] = "pix",
["Piya-Kwonci"] = "piy",
["Tiếng Apache đồng bằng"] = "apk",
["Plains Indian Sign Language"] = "psd",
["Plains Miwok"] = "pmw",
["Plapo Krumen"] = "ktj",
["Playero"] = "gob",
["Pochuri Naga"] = "npo",
["Pochutec"] = "xpo",
["Podoko"] = "pbi",
["Pogali"] = "hkh",
["Pogolo"] = "poy",
["Poitevin-Saintongeais"] = "roa-poi",
["Pokangá"] = "pok",
["Poke"] = "pof",
["Pol"] = "pmm",
["Polci"] = "plj",
["Polish Sign Language"] = "pso",
["Polonombauk"] = "plb",
["Pom"] = "pmo",
["Ponam"] = "ncc",
["Pongu"] = "png",
["Ponyo"] = "npg",
["Poqomam"] = "poc",
["Poqomchi'"] = "poh",
["Porohanon"] = "prh",
["Port Sandwich"] = "psw",
["Port Sorell"] = "xpl",
["Port Vato"] = "ptv",
["Portuguese Sign Language"] = "psr",
["Potiguára"] = "pog",
["Poumei Naga"] = "pmx",
["Pouye"] = "bye",
["Powari"] = "pwr",
["Powhatan"] = "pim",
["Poyanáwa"] = "pyn",
["Primitive Irish"] = "pgl",
["Principense"] = "pre",
["Tiếng Algic nguyên thủy"] = "aql-pro",
["Proto-Amuesha-Chamicuro"] = "awd-amc-pro",
["Proto-Anatolian"] = "ine-ana-pro",
["Proto-Apachean"] = "apa-pro",
["Proto-Arawa"] = "auf-pro",
["Tiếng Arawak nguyên thủy"] = "awd-pro",
["Proto-Armenian"] = "hyx-pro",
["Proto-Arnhem"] = "aus-arn-pro",
["Tiếng Aari nguyên thủy"] = "omv-aro-pro",
["Proto-Atayalic"] = "map-ata-pro",
["Proto-Athabaskan"] = "ath-pro",
["Proto-Atlantic-Congo"] = "alv-pro",
["Tiếng Avar-Andic nguyên thủy"] = "cau-ava-pro",
["Proto-Bantoid"] = "nic-bod-pro",
["Proto-Batak"] = "btk-pro",
["Tiếng Bối-Thái nguyên thủy"] = "qfa-bet-pro",
["Proto-Benue-Congo"] = "nic-bco-pro",
["Proto-Bongo-Bagirmi"] = "csu-bba-pro",
["Proto-Boran"] = "sai-bor-pro",
["Proto-Bua"] = "alv-bua-pro",
["Proto-Bungku-Tolaki"] = "poz-btk-pro",
["Proto-Caddoan"] = "cdd-pro",
["Proto-Cangin"] = "alv-cng-pro",
["Proto-Central Chadic"] = "cdc-cbm-pro",
["Proto-Central Indo-Aryan"] = "inc-cen-pro",
["Proto-Central Jê"] = "sai-cje-pro",
["Proto-Central New South Wales"] = "aus-cww-pro",
["Proto-Central Sudanic"] = "csu-pro",
["Proto-Central Togo"] = "alv-gtm-pro",
["Proto-Chadic"] = "cdc-pro",
["Proto-Chatino"] = "omq-cha-pro",
["Proto-Chibchan"] = "cba-pro",
["Proto-Chimakuan"] = "chi-pro",
["Proto-Chinookan"] = "nai-ckn-pro",
["Proto-Chukotko-Kamchatkan"] = "qfa-cka-pro",
["Proto-Chumash"] = "nai-chu-pro",
["Proto-Cupan"] = "azc-cup-pro",
["Proto-Daju"] = "sdv-daj-pro",
["Proto-Daly"] = "aus-dal-pro",
["Tiếng Dizi nguyên thủy"] = "omv-diz-pro",
["Proto-Eastern Jebel"] = "sdv-eje-pro",
["Proto-Eastern Oti-Volta"] = "nic-eov-pro",
["Proto-Edoid"] = "alv-edo-pro",
["Tiếng Eskimo-Aleut nguyên thủy"] = "esx-pro",
["Proto-Fali"] = "alv-fli-pro",
["Proto-Grassfields"] = "nic-grf-pro",
["Proto-Great Andamanese"] = "qfa-adm-pro",
["Proto-Guang"] = "alv-gng-pro",
["Proto-Gur"] = "nic-gur-pro",
["Proto-Gurunsi"] = "nic-gns-pro",
["Proto-Halmahera-Cenderawasih"] = "poz-hce-pro",
["Proto-Heiban"] = "alv-hei-pro",
["Proto-Highland East Cushitic"] = "cus-hec-pro",
["Proto-Hmong"] = "hmn-pro",
["Proto-Hrusish"] = "sit-hrs-pro",
["Proto-Huitoto-Ocaina"] = "sai-hoc-pro",
["Proto-Hurro-Urartian"] = "qfa-hur-pro",
["Proto-Idomoid"] = "alv-ido-pro",
["Proto-Igboid"] = "alv-igb-pro",
["Proto-Ijoid"] = "ijo-pro",
["Proto-Iwaidjan"] = "aus-wdj-pro",
["Proto-Jukunoid"] = "nic-jkn-pro",
["Proto-Kadu"] = "qfa-kad-pro",
["Proto-Kalamian"] = "phi-kal-pro",
["Proto-Kalapuyan"] = "nai-klp-pro",
["Proto-Kam-Sui"] = "qfa-kms-pro",
["Proto-Kampa"] = "awd-kmp-pro",
["Proto-Kham"] = "sit-kha-pro",
["Proto-Khoe"] = "khi-kho-pro",
["Tiếng Koman nguyên thủy"] = "ssa-kom-pro",
["Proto-Komisenian"] = "ira-kms-pro",
["Tiếng Kra nguyên thủy"] = "qfa-kra-pro",
["Tiếng Kra-Dai nguyên thủy"] = "qfa-tak-pro",
["Proto-Kru"] = "kro-pro",
["Proto-Kuki-Chin"] = "tbq-kuk-pro",
["Proto-Kuliak"] = "ssa-klk-pro",
["Proto-Kurdish"] = "ku-pro",
["Proto-Kwa"] = "alv-kwa-pro",
["Proto-Lalo"] = "tbq-lal-pro",
["Proto-Lampungic"] = "poz-lgx-pro",
["Proto-Lolo-Burmese"] = "tbq-lob-pro",
["Proto-Loloish"] = "tbq-lol-pro",
["Proto-Lower Cross River"] = "nic-lcr-pro",
["Proto-Luish"] = "sit-luu-pro",
["Proto-Maidun"] = "nai-mdu-pro",
["Proto-Mande"] = "dmn-pro",
["Proto-Mangbetu"] = "csu-maa-pro",
["Tiếng Mari nguyên thủy"] = "chm-pro",
["Proto-Masa"] = "cdc-mas-pro",
["Proto-Mazatec"] = "omq-maz-pro",
["Proto-Medo-Parthian"] = "ira-mpr-pro",
["Tiếng Miền nguyên thủy"] = "hmx-mie-pro",
["Proto-Mixe-Zoque"] = "nai-miz-pro",
["Proto-Mixtec"] = "omq-mxt-pro",
["Proto-Mixtecan"] = "omq-mix-pro",
["Proto-Mumuye"] = "alv-mum-pro",
["Proto-Munji-Yidgha"] = "ira-mny-pro",
["Proto-Na-Dene"] = "xnd-pro",
["Proto-Nahuan"] = "azc-nah-pro",
["Proto-Nawiki"] = "awd-nwk-pro",
["Tiếng Nguni nguyên thủy"] = "bnt-ngu-pro",
["Tiếng Niger-Congo nguyên thủy"] = "nic-pro",
["Tiếng Nin-Sahara nguyên thủy"] = "ssa-pro",
["Proto-Nilotic"] = "sdv-nil-pro",
["Proto-Norse"] = "gmq-pro",
["Proto-North Caucasian"] = "ccn-pro",
["Proto-North Halmahera"] = "paa-nha-pro",
["Proto-North Sarawak"] = "poz-swa-pro",
["Proto-Nubian"] = "nub-pro",
["Proto-Numic"] = "azc-num-pro",
["Proto-Nupoid"] = "alv-nup-pro",
["Tiếng Nuristan nguyên thủy"] = "iir-nur-pro",
["Proto-Nyima"] = "sdv-nyi-pro",
["Proto-Nyulnyulan"] = "aus-nyu-pro",
["Proto-Ogoni"] = "nic-ogo-pro",
["Tiếng Omo nguyên thủy"] = "omv-pro",
["Tiếng Önge nguyên thủy"] = "qfa-ong-pro",
["Proto-Ossetic"] = "os-pro",
["Proto-Oti-Volta"] = "nic-ovo-pro",
["Proto-Oto-Manguean"] = "omq-pro",
["Proto-Oto-Pamean"] = "omq-otp-pro",
["Proto-Otomi"] = "oto-otm-pro",
["Proto-Otomian"] = "oto-pro",
["Proto-Paresi-Waura"] = "awd-prw-pro",
["Proto-Plateau"] = "nic-plt-pro",
["Proto-Plateau Penutian"] = "nai-plp-pro",
["Proto-Pnar-Khasi-Lyngngam"] = "aav-pkl-pro",
["Proto-Pomeranian"] = "zlw-pom-pro",
["Proto-Pomo"] = "nai-pom-pro",
["Tiếng Rukai nguyên thủy"] = "dru-pro",
["Tiếng Lưu Cầu nguyên thủy"] = "jpx-ryu-pro",
["Proto-Saka"] = "xsc-sak-pro",
["Proto-Saka-Wakhi"] = "xsc-skw-pro",
["Proto-Sanglechi-Ishkashimi"] = "ira-sgi-pro",
["Proto-Sara"] = "csu-sar-pro",
["Proto-Scythian"] = "xsc-pro",
["Proto-Shughni-Roshani"] = "ira-shr-pro",
["Proto-Shughni-Yazghulami"] = "ira-shy-pro",
["Proto-Shughni-Yazghulami-Munji"] = "ira-sym-pro",
["Proto-Siouan-Catawban"] = "nai-sca-pro",
["Proto-Songhay"] = "son-pro",
["Proto-Sotho-Tswana"] = "bnt-sts-pro",
["Proto-South Sulawesi"] = "poz-ssw-pro",
["Proto-Southern Jê"] = "sai-sje-pro",
["Proto-Sunda-Sulawesi"] = "poz-sus-pro",
["Proto-Ta-Arawak"] = "awd-taa-pro",
["Proto-Takic"] = "azc-tak-pro",
["Proto-Taman"] = "sdv-tmn-pro",
["Proto-Tani"] = "sit-tan-pro",
["Proto-Taranoan"] = "sai-tar-pro",
["Proto-Tatic"] = "xme-ttc-pro",
["Proto-Totozoquean"] = "nai-tot-pro",
["Proto-Trans-New Guinea"] = "ngf-pro",
["Proto-Trique"] = "omq-tri-pro",
["Proto-Tsezian"] = "cau-tsz-pro",
["Proto-Tsimshianic"] = "nai-tsi-pro",
["Tiếng Tupi nguyên thủy"] = "tup-pro",
["Proto-Ubangian"] = "nic-ubg-pro",
["Proto-Upper Cross River"] = "nic-ucr-pro",
["Proto-Utian"] = "nai-utn-pro",
["Tiếng Ute-Aztec nguyên thủy"] = "azc-pro",
["Proto-Volta-Congo"] = "nic-vco-pro",
["Proto-Volta-Niger"] = "alv-von-pro",
["Tiếng Semit Tây nguyên thủy"] = "sem-wes-pro",
["Proto-Western Mande"] = "dmn-mdw-pro",
["Proto-Witotoan"] = "sai-wit-pro",
["Proto-Yeniseian"] = "qfa-yen-pro",
["Proto-Yupik"] = "ypk-pro",
["Proto-Zapotec"] = "omq-zpc-pro",
["Proto-Zapotecan"] = "omq-zap-pro",
["Proto-Zaza-Gorani"] = "ira-zgr-pro",
["Providencia Sign Language"] = "prz",
["Psikye"] = "kvj",
["Puare"] = "pux",
["Pudtol Atta"] = "atp",
["Puebla Mazatec"] = "pbm",
["Puelche"] = "pue",
["Puerto Rican Sign Language"] = "psl",
["Puimei Naga"] = "npu",
["Puinave"] = "pui",
["Puiron"] = "sit-prn",
["Pukapukan"] = "pkp",
["Pulabu"] = "pup",
["Puluwat"] = "puw",
["Puma"] = "pum",
["Tiếng Pumpokol"] = "xpm",
["Pumé"] = "yae",
["Punan Aput"] = "pud",
["Punan Bah-Biau"] = "pna",
["Punan Batu"] = "pnm",
["Punan Merah"] = "puf",
["Punan Merap"] = "puc",
["Punan Tubu"] = "puj",
["Punu"] = "puu",
["Puquina"] = "puq",
["Puragi"] = "pru",
["Purari"] = "iar",
["Purepecha"] = "pua",
["Puri"] = "prr",
["Purik"] = "prx",
["Purisimeño"] = "puy",
["Puruborá"] = "pur",
["Puruhá"] = "sai-prh",
["Purukotó"] = "sai-pur",
["Purum"] = "pub",
["Putai"] = "mfl",
["Putoh"] = "put",
["Putukwam"] = "afe",
["Puyo-Paekche"] = "xpp",
["Pwaamei"] = "pme",
["Pwapwa"] = "pop",
["Pyapun"] = "pcw",
["Pye Krumen"] = "pye",
["Pyemmairre"] = "xpb",
["Pyen"] = "pyy",
["Pykobjê"] = "sai-pyk",
["Pyu"] = "pby",
["Páez"] = "pbb",
["Pááfang"] = "pfa",
["Päri"] = "lkr",
["Pémono"] = "pev",
["Pévé"] = "lme",
["Pökoot"] = "pko",
["Q'anjob'al"] = "kjb",
["Q'eqchi"] = "kek",
["Qabiao"] = "laq",
["Qaqet"] = "byx",
["Qatabanian"] = "xqt",
["Qau"] = "gqu",
["Qila Muji"] = "ymq",
["Tiếng Qimant"] = "ahg",
["Quebec Sign Language"] = "fcs",
["Querétaro Otomi"] = "otq",
["Quetzaltepec Mixe"] = "pxm",
["Queyu"] = "qvy",
["Quiavicuzas Zapotec"] = "zpj",
["Quileute"] = "qui",
["Quimbaya"] = "sai-qmb",
["Quinault"] = "qun",
["Quinigua"] = "nai-qng",
["Quinqui"] = "quq",
["Quioquitani-Quierí Zapotec"] = "ztq",
["Quiotepec Chinantec"] = "chq",
["Quitemo"] = "sai-qtm",
["Tiếng Quốc tế ngữ"] = "eo",
["Rabona"] = "sai-rab",
["Raga"] = "lml",
["Rahambuu"] = "raz",
["Rajah Kabunsuwan Manobo"] = "mqk",
["Raji"] = "rji",
["Rajong"] = "rjg",
["Rakahanga-Manihiki"] = "rkh",
["Ralte"] = "ral",
["Ramandi"] = "tks",
["Ramanos"] = "sai-ram",
["Ramoaaina"] = "rai",
["Ramopa"] = "kjx",
["Rampi"] = "lje",
["Rana Tharu"] = "thr",
["Rang"] = "rax",
["Rangkas"] = "rgk",
["Ranglong"] = "rnl",
["Rao"] = "rao",
["Rapa"] = "ray",
["Rapoisi"] = "kyx",
["Rapting"] = "rpt",
["Rara Bakati'"] = "lra",
["Tiếng Ratagnon"] = "btn",
["Ratahan"] = "rth",
["Rathawi"] = "rtw",
["Rathwi Bareli"] = "bgd",
["Rawa"] = "rwo",
["Rawat"] = "jnl",
["Rawo"] = "rwa",
["Rayón Zoque"] = "zor",
["Razajerdi"] = "rat",
["Razihi"] = "rzh",
["Reang"] = "ria",
["Red Gelao"] = "gir",
["Reel"] = "atu",
["Rejang Kayan"] = "ree",
["Reli"] = "rei",
["Rema"] = "bow",
["Rembarunga"] = "rmb",
["Rembong"] = "reb",
["Remo"] = "rem",
["Remontado Agta"] = "agv",
["Rempi"] = "rmp",
["Remun"] = "lkj",
["Rennellese"] = "mnv",
["Repanbitip"] = "rpn",
["Rer Bare"] = "rer",
["Rerau"] = "rea",
["Rerep"] = "pgk",
["Reshe"] = "res",
["Resígaro"] = "rgr",
["Retta"] = "ret",
["Reyesano"] = "rey",
["Rhine Franconian"] = "gmw-rfr",
["Riang"] = "ril",
["Riantana"] = "ran",
["Ribun"] = "rir",
["Rigwe"] = "iri",
["Rikbaktsa"] = "rkb",
["Rincón Zapotec"] = "zar",
["Ringgou"] = "rgu",
["Ririo"] = "rri",
["Ritarungo"] = "rit",
["Riung"] = "riu",
["Riverain Sango"] = "snj",
["Rogo"] = "rod",
["Roma"] = "rmm",
["Romani Greek"] = "rge",
["Romanian Sign Language"] = "rms",
["Romano-Serbian"] = "rsb",
["Romanova"] = "rmv",
["Romblomanon"] = "rol",
["Rombo"] = "rof",
["Romkun"] = "rmk",
["Ron"] = "cla",
["Ronga"] = "rng",
["Rongga"] = "ror",
["Rongmei Naga"] = "nbu",
["Rongpo"] = "rnp",
["Ronji"] = "roe",
["Roon"] = "rnn",
["Roria"] = "rga",
["Roro"] = "rro",
["Rotokas"] = "roo",
["Rotuman"] = "rtm",
["Roviana"] = "rug",
["Rudbari"] = "rdb",
["Rufiji"] = "rui",
["Ruga"] = "ruh",
["Rukiga"] = "cgg",
["Ruma"] = "ruz",
["Rumu"] = "klq",
["Runga"] = "rou",
["Rungtu"] = "rtc",
["Rungwa"] = "rnw",
["Russenorsk"] = "crp-rsn",
["Russian Sign Language"] = "rsl",
["Ruuli"] = "ruc",
["Ruwund"] = "rnd",
["Rwa"] = "rwk",
["Rwanda-Rundi"] = "rw",
["Réunion Creole French"] = "rcf",
["Sa"] = "sax",
["Sa'a"] = "apb",
["Sa'ban"] = "snv",
["Sa'och"] = "scq",
["Saafi-Saafi"] = "sav",
["Saam"] = "raq",
["Saamia"] = "lsm",
["Saare"] = "uss",
["Saba"] = "saa",
["Tiếng Bisaya Sabah"] = "bsy",
["Sabah Malay"] = "msi",
["Sabanê"] = "sae",
["Sabaot"] = "spy",
["Sabine"] = "sbv",
["Sabir"] = "pml",
["Sabu"] = "hvn",
["Sacapulteco"] = "quv",
["Saep"] = "spd",
["Safaitic"] = "sem-saf",
["Safaliba"] = "saf",
["Safeyoka"] = "apz",
["Safwa"] = "sbk",
["Sagala"] = "sbm",
["Sagalla"] = "tga",
["Sahaptin"] = "nai-spt",
["Sahu"] = "saj",
["Sajau Basap"] = "sjb",
["Sakachep"] = "sch",
["Sakam"] = "skm",
["Sakao"] = "sku",
["Sakata"] = "skt",
["Sake"] = "sak",
["Sala"] = "shq",
["Salampasu"] = "slx",
["Salas"] = "sgu",
["Salchuq"] = "slq",
["Saleman"] = "sau",
["Saliba (Colombia)"] = "slc",
["Saliba (New Guinea)"] = "sbe",
["Salinan"] = "sln",
["Salt-Yui"] = "sll",
["Saluan"] = "loe",
["Salumá"] = "slj",
["Salvadoran Lenca"] = "nai-sln",
["Salvadoran Sign Language"] = "esn",
["Sam"] = "snx",
["Sama"] = "smd",
["Samaritan Aramaic"] = "sam",
["Samaritan Hebrew"] = "smp",
["Samarokena"] = "tmj",
["Samatao"] = "ysd",
["Samba"] = "smx",
["Tiếng Sambali"] = "xsb",
["Sambalpuri"] = "spv",
["Sambe"] = "xab",
["Samberigi"] = "ssx",
["Samburu"] = "saq",
["Tiếng Thát Mai"] = "smh",
["Tiếng Samo"] = "smq",
["Samoan Plantation Pidgin"] = "cpe-spp",
["Samosa"] = "swm",
["Sampang"] = "rav",
["Samre"] = "sxm",
["Samvedi"] = "smv",
["San Agustín Mixtepec Zapotec"] = "ztm",
["San Baltazar Loxicha Zapotec"] = "zpx",
["San Felipe Otlaltepec Popoloca"] = "pow",
["San Jerónimo Tecóatl Mazatec"] = "maa",
["San Juan Atzingo Popoloca"] = "poe",
["San Juan Colorado Mixtec"] = "mjc",
["Tiếng Zapotec San Juan Guelavía"] = "zab",
["San Juan Quiahije Chatino"] = "ctp-san",
["San Juan Teita Mixtec"] = "xtj",
["San Luís Temalacayuca Popoloca"] = "pps",
["San Marcos Tlalcoyalco Popoloca"] = "pls",
["Tiếng Triqui San Martín Itunyoso"] = "trq",
["San Miguel Creole French"] = "scf",
["San Miguel Piedras Mixtec"] = "xtp",
["San Miguel el Grande Mixtec"] = "mig",
["San Pablo Güilá Zapotec"] = "ztu",
["San Pedro Amuzgos Amuzgo"] = "azg",
["San Pedro Quiatoni Zapotec"] = "zpf",
["San Vicente Coatlán Zapotec"] = "zpt",
["Sanapaná"] = "spn",
["Sanaviron"] = "sai-san",
["Sandawe"] = "sad",
["Sanga (Congo)"] = "sng",
["Sanga (Nigeria)"] = "xsn",
["Sanggau"] = "scg",
["Sangil"] = "snl",
["Tiếng Sangir"] = "sxn",
["Sangisari"] = "sgr",
["Sangkong"] = "sgk",
["Sanglechi"] = "sgy",
["Sangtam Naga"] = "nsa",
["Sangu (Gabon)"] = "snq",
["Sangu (Tanzania)"] = "sbp",
["Sani"] = "ysn",
["Sanie"] = "ysy",
["Saniyo-Hiyewe"] = "sny",
["Sankaran Maninka"] = "msc",
["Sansi"] = "ssi",
["Santa Catarina Albarradas Zapotec"] = "ztn",
["Santa Inés Ahuatempan Popoloca"] = "pca",
["Santa Inés Yatzechi Zapotec"] = "zpn",
["Santa Lucía Monteverde Mixtec"] = "mdv",
["Santa María La Alta Nahuatl"] = "nhz",
["Santa María Quiegolani Zapotec"] = "zpi",
["Santa María Zacatepec Mixtec"] = "mza",
["Santa Teresa Cora"] = "cok",
["Santiago Xanica Zapotec"] = "zpr",
["Santo Domingo Albarradas Zapotec"] = "zas",
["Sanumá"] = "xsu",
["Saparua"] = "spr",
["Sapará"] = "sai-sap",
["Sapo"] = "krn",
["Saponi"] = "spi",
["Sapuan"] = "spu",
["Sapé"] = "spc",
["Sar"] = "mwm",
["Sara"] = "sre",
["Sara Kaba"] = "sbz",
["Sara Kaba Deme"] = "kwg",
["Sara Kaba Náà"] = "kwv",
["Sarangani Blaan"] = "bps",
["Sarangani Manobo"] = "mbs",
["Sarasira"] = "zsa",
["Saraveca"] = "sar",
["Tiếng Sarikol"] = "srh",
["Sarli"] = "sdf",
["Sartang"] = "onp",
["Sarua"] = "swy",
["Sarudu"] = "sdu",
["Saruga"] = "sra",
["Tiếng Sasak"] = "sas",
["Sasaru"] = "sxs",
["Sassarese"] = "sdc",
["Satawalese"] = "stw",
["Sateré-Mawé"] = "mav",
["Sathmar Swabian"] = "gmw-stm",
["Saudi Arabian Sign Language"] = "sdl",
["Sauraseni Apabhramsa"] = "inc-sap",
["Saurashtra"] = "saz",
["Sauri"] = "srt",
["Sause"] = "sao",
["Sausi"] = "ssj",
["Savi"] = "sdg",
["Savosavo"] = "svs",
["Sawai"] = "szw",
["Saweru"] = "swr",
["Sawi"] = "saw",
["Sawila"] = "swt",
["Saya"] = "say",
["Sayula Popoluca"] = "pos",
["Scanian"] = "gmq-scy",
["Seba"] = "kdg",
["Seberuang"] = "sbx",
["Sebop"] = "sib",
["Sebuyau"] = "snb",
["Sechelt"] = "sec",
["Sechura"] = "sai-sec",
["Secoya"] = "sey",
["Sedoa"] = "tvw",
["Seenku"] = "sos",
["Segai"] = "sge",
["Segeju"] = "seg",
["Seget"] = "sbg",
["Sehwi"] = "sfw",
["Seim"] = "sim",
["Seimat"] = "ssg",
["Seit-Kaitetu"] = "hik",
["Sekani"] = "sek",
["Sekapan"] = "skp",
["Sekar"] = "skz",
["Seke"] = "skj",
["Sekele"] = "vaj",
["Seki"] = "syi",
["Seko Padang"] = "skx",
["Seko Tengah"] = "sko",
["Sekpele"] = "lip",
["Selangor Sign Language"] = "kgi",
["Selaru"] = "slu",
["Selayar"] = "sly",
["Selee"] = "snw",
["Selepet"] = "spl",
["Selk'nam"] = "ona",
["Selonian"] = "sxl",
["Selungai Murut"] = "slg",
["Seluwasan"] = "sws",
["Sema"] = "nsm",
["Semandang"] = "sdm",
["Sembakung Murut"] = "sbr",
["Semimi"] = "etz",
["Semnani"] = "smy",
["Sempan"] = "xse",
["Tiếng Sena"] = "seh",
["Senara Sénoufo"] = "seq",
["Senaya"] = "syn",
["Sene"] = "sej",
["Sengele"] = "szg",
["Senggi"] = "snu",
["Sengo"] = "spk",
["Sengseng"] = "ssz",
["Tiếng Senhaja de Srair"] = "sjs",
["Sensi"] = "sni",
["Sentani"] = "set",
["Senthang Chin"] = "sez",
["Sentinelese"] = "std",
["Sepa (Indonesia)"] = "spb",
["Sepa (New Guinea)"] = "spe",
["Sepen"] = "spm",
["Sepik Iwam"] = "iws",
["Sepik Mari"] = "mbx",
["Sera"] = "sry",
["Sere"] = "swf",
["Serer"] = "srr",
["Serili"] = "sve",
["Seroa"] = "kqu",
["Serrano"] = "ser",
["Seru"] = "szd",
["Serua"] = "srw",
["Serudung Murut"] = "srk",
["Serui-Laut"] = "seu",
["Seta"] = "stf",
["Setaman"] = "stm",
["Seti"] = "sbi",
["Severn Ojibwa"] = "ojs",
["Sewa Bay"] = "sew",
["Seychellois Creole"] = "crs",
["Sha"] = "scw",
["Shabak"] = "sdb",
["Shabo"] = "sbf",
["Shahmirzadi"] = "srz",
["Shahrudi"] = "shm",
["Shall-Zwall"] = "sha",
["Shama-Sambuga"] = "sqa",
["Shamang"] = "xsh",
["Shambala"] = "ksb",
["Shanenawa"] = "swo",
["Shanga"] = "sho",
["Shangzhai"] = "jih",
["Shaozhou Tuhua"] = "zhx-sht",
["Sharanahua"] = "mcd",
["Shark Bay"] = "ssv",
["Sharwa"] = "swq",
["Shasta"] = "sht",
["Shatt"] = "shj",
["Shau"] = "sqh",
["Shawnee"] = "sjw",
["She"] = "shx",
["Tiếng Shebayo"] = "awd-she",
["Shehri"] = "shv",
["Shekkacho"] = "moy",
["Sheko"] = "she",
["Shelta"] = "sth",
["Shendu"] = "shl",
["Sheni"] = "scv",
["Sherbro"] = "bun",
["Sherdukpen"] = "sdp",
["Tiếng Kham Sheshi"] = "kip",
["Shi"] = "shr",
["Shihhi Arabic"] = "ssh",
["Shiki"] = "gua",
["Shilluk"] = "shk",
["Tiếng Shinasha"] = "bwo",
["Shipibo-Conibo"] = "shp",
["Shixing"] = "sxg",
["Shoo-Minda-Nye"] = "bcv",
["Shoshone"] = "shh",
["Shua"] = "shg",
["Shuar"] = "jiv",
["Shuba"] = "cbq",
["Tiếng Shughnan"] = "sgh",
["Shumashti"] = "sts",
["Shumcho"] = "scu",
["Shuwa-Zamani"] = "ksa",
["Shwai"] = "shw",
["Sialum"] = "slw",
["Siamou"] = "sif",
["Sian"] = "spg",
["Siane"] = "snp",
["Siang"] = "sya",
["Siar-Lak"] = "sjr",
["Sibe"] = "nco",
["Sibu Melanau"] = "sdx",
["Sicanian"] = "sxc",
["Siculo-Arabic"] = "sqr",
["Sidetic"] = "xsd",
["Sie"] = "erg",
["Sierra Leone Sign Language"] = "sgx",
["Sierra Negra Nahuatl"] = "nsu",
["Sierra de Juárez Zapotec"] = "zaa",
["Sighu"] = "sxe",
["Sihan"] = "snr",
["Sika"] = "ski",
["Sikaiana"] = "sky",
["Sikaritai"] = "tty",
["Sikiana"] = "sik",
["Sikule"] = "skh",
["Sila"] = "slt",
["Silacayoapan Mixtec"] = "mks",
["Sileibi"] = "sbq",
["Silimo"] = "wul",
["Siliput"] = "mkc",
["Silopi"] = "xsp",
["Simaa"] = "sie",
["Simba"] = "sbw",
["Simbali"] = "smg",
["Simbari"] = "smb",
["Simbo"] = "sbb",
["Simeku"] = "smz",
["Simeulue"] = "smr",
["Simte"] = "smt",
["Sinacantán"] = "nai-sin",
["Sinagen"] = "siu",
["Sinasina"] = "sst",
["Sinaugoro"] = "snc",
["Sindarin"] = "sjn",
["Sindhi Bhil"] = "sbn",
["Sindihui Mixtec"] = "xts",
["Singa"] = "sgm",
["Singapore Sign Language"] = "sls",
["Singpho"] = "sgp",
["Sinicahua Mixtec"] = "xti",
["Sininkere"] = "skq",
["Sinte Romani"] = "rmo",
["Sinyar"] = "sys",
["Sinúfana"] = "sai-sin",
["Sio"] = "xsi",
["Siona"] = "snn",
["Sipakapense"] = "qum",
["Sira"] = "swj",
["Sirenik"] = "ysr",
["Siri"] = "sir",
["Siriano"] = "sri",
["Sirionó"] = "srq",
["Sirmauri"] = "srx",
["Siroi"] = "ssd",
["Sissala"] = "sld",
["Tiếng Tứ Thổ"] = "sit-sit",
["Siuslaw"] = "sis",
["Sivandi"] = "siy",
["Siwai"] = "siw",
["Siwu"] = "akp",
["Siyin Chin"] = "csy",
["Skagit"] = "ska",
["Skalvian"] = "svx",
["Ske"] = "ske",
["Skou"] = "skv",
["Slavomolisano"] = "svm",
["Slovakian Sign Language"] = "svk",
["Small Flowery Miao"] = "sfm",
["Smärky Kanum"] = "kxq",
["Snohomish"] = "sno",
["So'a"] = "ssq",
["Sobei"] = "sob",
["Sochiapam Chinantec"] = "cso",
["Soga"] = "xog",
["Sok"] = "skk",
["Soko"] = "soc",
["Sokoro"] = "sok",
["Solano"] = "xso",
["Soli"] = "sby",
["Solos"] = "sol",
["Som"] = "smc",
["Somba-Siawari"] = "bmu",
["Somra"] = "ntx",
["Somrai"] = "sor",
["Somray"] = "smu",
["Somyev"] = "kgt",
["Sonaga"] = "ysg",
["Sonde"] = "shc",
["Songe"] = "sop",
["Songlai Chin"] = "csj",
["Songomeno"] = "soe",
["Songoora"] = "sod",
["Sonha"] = "soi",
["Sonia"] = "siq",
["Soninke"] = "snk",
["Soo"] = "teu",
["Sop"] = "urw",
["Sori-Harengan"] = "sbh",
["Sorkhei"] = "sqo",
["Sorothaptic"] = "sxo",
["Sorsogon Ayta"] = "ays",
["Sos Kundi"] = "sdk",
["Sota Kanum"] = "krz",
["Sou"] = "sqq",
["South African Sign Language"] = "sfs",
["South Awyu"] = "aws",
["South Boma"] = "bnt-sbo",
["South Central Banda"] = "lnl",
["South Central Dinka"] = "dib",
["South Efate"] = "erk",
["South Fali"] = "fal",
["South Giziga"] = "giz",
["South Lembata"] = "lmf",
["South Marquesan"] = "mqm",
["South Muyu"] = "kts",
["South Nuaulu"] = "nxl",
["South Tairora"] = "omw",
["South Ucayali Ashéninka"] = "cpy",
["South Watut"] = "mcy",
["Southeast Ambrym"] = "tvk",
["Southeast Babar"] = "vbb",
["Southeast Ijo"] = "ijs",
["Southeast Pashayi"] = "psi",
["Southeast Tasmanian"] = "xpf",
["Southeastern Dinka"] = "dks",
["Southeastern Ixtlán Zapotec"] = "zpd",
["Southeastern Nochixtlán Mixtec"] = "mxy",
["Southeastern Pomo"] = "pom",
["Southeastern Puebla Nahuatl"] = "npl",
["Southeastern Tarahumara"] = "tcu",
["Southern Alta"] = "agy",
["Tiếng Bạch Nam"] = "bfs",
["Southern Birifor"] = "biv",
["Southern Bobo"] = "bwq",
["Southern Bontoc"] = "obk",
["Southern Carrier"] = "caf",
["Southern Catanduanes Bicolano"] = "bln",
["Southern Dagaare"] = "dga",
["Southern East Cree"] = "crj",
["Southern Ghale"] = "ghe",
["Southern Grebo"] = "grj",
["Southern Guiyang Hmong"] = "hmy",
["Southern Haida"] = "hax",
["Southern Hindko"] = "hnd",
["Southern Kalapuya"] = "sxk",
["Southern Kalinga"] = "ksc",
["Southern Khanty"] = "kca-sou",
["Southern Kissi"] = "kss",
["Southern Kiwai"] = "kjd",
["Southern Kurdish"] = "sdh",
["Southern Lolopo"] = "ysp",
["Southern Lorung"] = "lrr",
["Southern Ma'di"] = "snm",
["Southern Mashan Hmong"] = "hma",
["Southern Muji"] = "ymc",
["Southern Ngbandi"] = "nbw",
["Southern Nisu"] = "nsd",
["Southern Nuni"] = "nnw",
["Southern Ohlone"] = "css",
["Southern One"] = "osu",
["Southern Pame"] = "pmz",
["Southern Pinghua"] = "csp",
["Southern Pomo"] = "peq",
["Southern Puebla Mixtec"] = "mit",
["Southern Puget Sound Salish"] = "slh",
["Southern Pumi"] = "pmj",
["Southern Qiandong Miao"] = "hms",
["Tiếng Khương Nam"] = "qxs",
["Southern Rengma Naga"] = "nre",
["Southern Rincon Zapotec"] = "zsr",
["Southern Sama"] = "ssb",
["Southern Samo"] = "sbd",
["Southern Sierra Miwok"] = "skd",
["Southern Tidong"] = "itd",
["Southern Tiwa"] = "tix",
["Southern Toussian"] = "wib",
["Southern Tutchone"] = "tce",
["Southern Valley Yokuts"] = "nai-svy",
["Southwest Gbaya"] = "gso",
["Southwest Palawano"] = "plv",
["Southwest Pashayi"] = "psh",
["Southwest Tanna"] = "nwi",
["Southwestern Bontoc"] = "vbk",
["Southwestern Dinka"] = "dik",
["Southwestern Fars"] = "fay",
["Southwestern Guiyang Hmong"] = "hmg",
["Southwestern Huishui Hmong"] = "hmh",
["Southwestern Nisu"] = "nsv",
["Southwestern Tamang"] = "tsf",
["Southwestern Tarahumara"] = "twr",
["Southwestern Tepehuan"] = "tla",
["Southwestern Tlaxiaco Mixtec"] = "meh",
["Sowa"] = "sww",
["Sowanda"] = "sow",
["Soyaltepec Mazatec"] = "vmp",
["Soyaltepec Mixtec"] = "vmq",
["Spanish Sign Language"] = "ssp",
["Spiti Bhoti"] = "spt",
["Spokane"] = "spo",
["Squamish"] = "squ",
["Sri Lankan Creole Malay"] = "sci",
["Sri Lankan Sign Language"] = "sqs",
["Stod Bhoti"] = "sbu",
["Stoney"] = "sto",
["Suabo"] = "szp",
["Suarmin"] = "seo",
["Suau"] = "swp",
["Suba"] = "sxb",
["Suba-Simbiti"] = "ssc",
["Subi"] = "xsj",
["Subiya"] = "sbs",
["Subtiaba"] = "sut",
["Sudest"] = "tgo",
["Sudovian"] = "xsv",
["Suena"] = "sue",
["Suga"] = "sgi",
["Suganga"] = "sug",
["Sugut Dusun"] = "kzs",
["Suki"] = "sui",
["Suku"] = "sub",
["Sukuma"] = "suk",
["Sukur"] = "syk",
["Sukurum"] = "zsu",
["Sula"] = "szn",
["Sulka"] = "sua",
["Sulod"] = "srg",
["Sulung"] = "suv",
["Suma"] = "sqm",
["Sumariup"] = "siv",
["Sumau"] = "six",
["Sumbawa"] = "smw",
["Sumbwa"] = "suw",
["Sumtu Chin"] = "csv",
["Sunam"] = "ssk",
["Sunum"] = "ymn",
["Sunwar"] = "suz",
["Suoy"] = "syo",
["Supyire"] = "spp",
["Sur"] = "tdl",
["Surbakhal"] = "sbj",
["Surigaonon"] = "sgd",
["Sursurunga"] = "sgz",
["Suruahá"] = "swx",
["Surubu"] = "sde",
["Suruí"] = "sru",
["Suruí Do Pará"] = "mdz",
["Susquehannock"] = "sqn",
["Susu"] = "sus",
["Susuami"] = "ssu",
["Suundi"] = "sdj",
["Suwawa"] = "swu",
["Suyá"] = "suy",
["Swabian"] = "swg",
["Swampy Cree"] = "csw",
["Swedish Sign Language"] = "swl",
["Swiss-French Sign Language"] = "ssr",
["Swiss-German Sign Language"] = "sgg",
["Swiss-Italian Sign Language"] = "slf",
["Swo"] = "sox",
["Syenara Senoufo"] = "shz",
["Sácata"] = "sai-sac",
["São Paulo Kaingáng"] = "zkp",
["Sãotomense"] = "cri",
["Sìcìté Sénoufo"] = "sep",
["T'en"] = "tct",
["Tabaa Zapotec"] = "zat",
["Tabancale"] = "sai-tab",
["Tabaru"] = "tby",
["Tabasco Chontal"] = "chf",
["Tabasco Nahuatl"] = "nhc",
["Tabasco Zoque"] = "zoq",
["Tabla"] = "tnm",
["Tabo"] = "knv",
["Tabriak"] = "tzx",
["Tacahua Mixtec"] = "xtt",
["Tacana"] = "tna",
["Tadaksahak"] = "dsq",
["Tiếng Tadyawan"] = "tdy",
["Tae'"] = "rob",
["Tafi"] = "tcd",
["Tafreshi"] = "xme-taf",
["Tagabawa"] = "bgs",
["Tagakaulu Kalagan"] = "klg",
["Tagbanwa"] = "tbw",
["Tagbu"] = "tbm",
["Tagdal"] = "tda",
["Tagish"] = "tgx",
["Tagwana Senoufo"] = "tgw",
["Tahltan"] = "tht",
["Tai"] = "taw",
["Tai Hang Tong"] = "thc",
["Tai Hongjin"] = "tiz",
["Tai Long"] = "thi",
["Tai Thanh"] = "tmm",
["Tai Ya"] = "cuu",
["Taiap"] = "gpn",
["Taikat"] = "aos",
["Tiếng Nga bồi Taimyr"] = "crp-tpr",
["Tainae"] = "ago",
["Tairuma"] = "uar",
["Taita"] = "dav",
["Tiếng Taivoan"] = "tvx",
["Taiwan Sign Language"] = "tss",
["Taje"] = "pee",
["Tajio"] = "tdj",
["Tajuasohn"] = "tja",
["Takelma"] = "tkm",
["Takia"] = "tbc",
["Takka Apabhramsa"] = "inc-tak",
["Takua"] = "tkz",
["Takuu"] = "nho",
["Takwane"] = "tke",
["Talaud"] = "tld",
["Taliabu"] = "tlv",
["Talieng"] = "tdf",
["Talinga-Bwisi"] = "tlj",
["Talise"] = "tlr",
["Tallán"] = "sai-tal",
["Talodi"] = "tlo",
["Taloki"] = "tlk",
["Talondo'"] = "tln",
["Talu"] = "yta",
["Tama (Chad)"] = "tma",
["Tama (Colombia)"] = "ten",
["Tamagario"] = "tcg",
["Tamambo"] = "mla",
["Taman (Indonesia)"] = "tmn",
["Taman (Myanmar)"] = "tcl",
["Tamanaku"] = "tmz",
["Tamazola Mixtec"] = "vmx",
["Tambas"] = "tdk",
["Tambora"] = "xxt",
["Tambotalo"] = "tls",
["Tambunan Dusun"] = "kzt",
["Tami"] = "tmy",
["Tamnim Citak"] = "tml",
["Tampias Lobu"] = "low",
["Tampulma"] = "tpm",
["Tanacross"] = "tcb",
["Tanahmerah"] = "tcm",
["Tanapag"] = "tpv",
["Tandaganon"] = "tgn",
["Tandia"] = "tni",
["Tanema"] = "tnx",
["Tangale"] = "tan",
["Tangam"] = "sit-tgm",
["Tanggu"] = "tgu",
["Tangko"] = "tkx",
["Tangoa"] = "tgp",
["Tangsa"] = "nst",
["Tanguat"] = "tbs",
["Tanimuca-Retuarã"] = "tnc",
["Tanjijili"] = "uji",
["Tanudan Kalinga"] = "kml",
["Tanzanian Sign Language"] = "tza",
["Tapachultec"] = "nai-tap",
["Taparita"] = "sai-tpr",
["Tapayuna"] = "sai-tap",
["Tapeba"] = "tbb",
["Tapei"] = "afp",
["Tapieté"] = "tpj",
["Tar Gula"] = "kcm",
["Tarairiú"] = "sai-trr",
["Tiếng Tarantino"] = "roa-tar",
["Tarao"] = "tro",
["Taraon"] = "mhu",
["Tareng"] = "tgr",
["Tarjumo"] = "txj",
["Tarok"] = "yer",
["Tarpia"] = "tpf",
["Tartessian"] = "txr",
["Taruma"] = "tdm",
["Tasawaq"] = "twq",
["Tasmate"] = "tmt",
["Tiếng Tat"] = "ttt",
["Tataltepec Chatino"] = "cta",
["Tatana"] = "txx",
["Tataviam"] = "azc-tat",
["Tauade"] = "ttd",
["Taulil"] = "tuh",
["Taupota"] = "tpa",
["Taushiro"] = "trr",
["Tauya"] = "tya",
["Taveta"] = "tvs",
["Tawala"] = "tbo",
["Tawandê"] = "xtw",
["Tawang Monpa"] = "twm",
["Tawasa"] = "nai-taw",
["Taworta"] = "tbp",
["Tawoyan"] = "twy",
["Tawr Chin"] = "tcp",
["Tay Khang"] = "tnu",
["Tayabas Ayta"] = "ayy",
["Tiếng Tayma"] = "sem-tay",
["Tayo"] = "cks",
["Tiếng Taíno"] = "tnq",
["Tboli"] = "tbl",
["Tchitchege"] = "tck",
["Tchumbuli"] = "bqa",
["Te'un"] = "tve",
["Teanu"] = "tkw",
["Tebul Sign Language"] = "tsy",
["Tebul Ure Dogon"] = "dtu",
["Tecpatlán Totonac"] = "tcw",
["Tedaga"] = "tuq",
["Tedim Chin"] = "ctd",
["Tee"] = "tkq",
["Tefaro"] = "tfo",
["Tegali"] = "ras",
["Tehit"] = "kps",
["Tehuelche"] = "teh",
["Teiwa"] = "twe",
["Tejalapan Zapotec"] = "ztt",
["Teke-Fuumu"] = "ifm",
["Teke-Kukuya"] = "kkw",
["Teke-Laali"] = "lli",
["Teke-Tege"] = "teg",
["Teke-Tsaayi"] = "tyi",
["Teke-Tyee"] = "tyx",
["Tektiteko"] = "ttc",
["Tela-Masbuar"] = "tvm",
["Telefol"] = "tlf",
["Teluti"] = "tlt",
["Tembé"] = "tqb",
["Teme"] = "tdo",
["Temein"] = "teq",
["Temi"] = "soz",
["Temne"] = "tem",
["Temoaya Otomi"] = "ott",
["Tempasuk Dusun"] = "tdu",
["Tenango Otomi"] = "otn",
["Tene Kan Dogon"] = "dtk",
["Tenggarong Kutai Malay"] = "vkt",
["Tengger"] = "tes",
["Tenino"] = "tqn",
["Tenis"] = "tns",
["Tennet"] = "tex",
["Teojomulco Chatino"] = "omq-teo",
["Teop"] = "tio",
["Teor"] = "tev",
["Tepecano"] = "tep",
["Tepetotutla Chinantec"] = "cnt",
["Tepeuxila Cuicatec"] = "cux",
["Tepo Krumen"] = "ted",
["Teposcolula Mixtec"] = "omq-tel",
["Tequistlatec"] = "nai-teq",
["Ter Sami"] = "sjt",
["Tera"] = "ttr",
["Terebu"] = "trb",
["Terei"] = "buo",
["Tereno"] = "ter",
["Tereweng"] = "twg",
["Tiếng Teribe"] = "tfr",
["Terik"] = "tec",
["Termanu"] = "twu",
["Ternateño"] = "tmg",
["Tese"] = "keg",
["Teshenawa"] = "twc",
["Tetela"] = "tll",
["Tetelcingo Nahuatl"] = "nhg",
["Tetete"] = "teb",
["Tetserret"] = "tez",
["Tetun Dili"] = "tdt",
["Teushen"] = "sai-teu",
["Teutila Cuicatec"] = "cut",
["Tewa"] = "tew",
["Texcatepec Otomi"] = "otx",
["Texistepec Popoluca"] = "poq",
["Texmelucan Zapotec"] = "zpz",
["Tezoatlán Mixtec"] = "mxb",
["Tha"] = "thy",
["Thachanadan"] = "thn",
["Thado Chin"] = "tcz",
["Thai Sign Language"] = "tsq",
["Thaiphum Chin"] = "cth",
["Thakali"] = "ths",
["Thamudic"] = "sem-tha",
["Thangal Naga"] = "nki",
["Thangmi"] = "thf",
["Thao"] = "ssf",
["Tharaka"] = "thk",
["Tharrgari"] = "dhr",
["Thawa"] = "xtv",
["Thompson"] = "thp",
["Thopho"] = "ytp",
["Thu Lao"] = "tyl",
["Thulung"] = "tdh",
["Thurawal"] = "tbh",
["Thuri"] = "thu",
["Tiagbamrin Aizi"] = "ahi",
["Tiale"] = "mnl",
["Tibea"] = "ngy",
["Ticuna"] = "tca",
["Tidaá Mixtec"] = "mtx",
["Tidore"] = "tvo",
["Tiemacèwè Bozo"] = "boo",
["Tiene"] = "tii",
["Tifal"] = "tif",
["Tigak"] = "tgc",
["Tigon Mbembe"] = "nza",
["Tii"] = "txq",
["Tijaltepec Mixtec"] = "xtl",
["Tikar"] = "tik",
["Tikopia"] = "tkp",
["Tilapa Otomi"] = "otl",
["Tillamook"] = "til",
["Tilquiapan Zapotec"] = "zts",
["Tilung"] = "tij",
["Tima"] = "tms",
["Timbe"] = "tim",
["Timor Pidgin"] = "tvy",
["Timote"] = "sai-tim",
["Timucua"] = "tjm",
["Timugon Murut"] = "tih",
["Tinani"] = "lbf",
["Tingui-Boto"] = "tgv",
["Tinigua"] = "tit",
["Tinoc Kallahan"] = "tne",
["Tinputz"] = "tpz",
["Tiếng Tipai"] = "nai-tip",
["Tippera"] = "tpe",
["Tira"] = "tic",
["Tirahi"] = "tra",
["Tiranige Diga Dogon"] = "tde",
["Tircul"] = "pyx",
["Tiri"] = "cir",
["Tita"] = "tdq",
["Titan"] = "ttv",
["Tiv"] = "tiv",
["Tiwa"] = "lax",
["Tiếng Tiwi"] = "tiw",
["Tiéfo"] = "tiq",
["Tiéyaxo Bozo"] = "boz",
["Tjurruru"] = "tju",
["Tiếng Tepehua Tlachichilco"] = "tpt",
["Tlacoapa Me'phaa"] = "tpl",
["Tlacoatzintepec Chinantec"] = "ctl",
["Tlacolulita Zapotec"] = "zpk",
["Tlahuica"] = "ocu",
["Tlahuitoltepec Mixe"] = "mxp",
["Tlamacazapa Nahuatl"] = "nuz",
["Tlazoyaltepec Mixtec"] = "mqh",
["To"] = "toz",
["To'abaita"] = "mlu",
["Toaripi"] = "tqo",
["Toba"] = "tob",
["Toba Batak"] = "bbc",
["Toba-Maskoy"] = "tmf",
["Tobagonian Creole English"] = "tgh",
["Tobanga"] = "tng",
["Tobati"] = "tti",
["Tobelo"] = "tlb",
["Tobilung"] = "tgb",
["Tobo"] = "tbv",
["Tocantins Asurini"] = "asu",
["Tofanma"] = "tlg",
["Tofin Gbe"] = "tfi",
["Togbo-Vara Banda"] = "tor",
["Togoyo"] = "tgy",
["Tojolabal"] = "toj",
["Toka-Leya"] = "dov",
["Tokano"] = "zuh",
["Tol"] = "jic",
["Tolai"] = "ksd",
["Tolaki"] = "lbw",
["Tolomako"] = "tlm",
["Tolowa"] = "tol",
["Toloza"] = "ytl",
["Toma"] = "tod",
["Tomadino"] = "tdi",
["Tombelala"] = "ttp",
["Tombonuo"] = "txa",
["Tombulu"] = "tom",
["Tomini"] = "txm",
["Tommeginne"] = "xpv",
["Tommo So"] = "dto",
["Tomo Kan Dogon"] = "dtm",
["Tomoip"] = "tqp",
["Tondano"] = "tdn",
["Tonga (Malawi)"] = "tog",
["Tonga (Mozambique)"] = "toh",
["Tonga (Zambia)"] = "toi",
["Tongwe"] = "tny",
["Tonjon"] = "tjn",
["Tiếng Tonkawa"] = "tqw",
["Tonsawang"] = "tnw",
["Tonsea"] = "txs",
["Tontemboan"] = "tnt",
["Toogee"] = "xpx",
["Topoiyo"] = "toy",
["Toposa"] = "toq",
["Toraja-Sa'dan"] = "sda",
["Toram"] = "trj",
["Torau"] = "ttu",
["Toro"] = "tdv",
["Toro So Dogon"] = "dts",
["Toro Tegu Dogon"] = "dtt",
["Toromono"] = "tno",
["Torona"] = "tqr",
["Torres Strait Creole"] = "tcs",
["Torricelli"] = "tei",
["Torricelli Yau"] = "yyu",
["Torá"] = "trz",
["Tosu"] = "sit-tos",
["Totela"] = "ttl",
["Totoli"] = "txe",
["Totomachapan Zapotec"] = "zph",
["Totontepec Mixe"] = "mto",
["Totoro"] = "ttk",
["Touo"] = "tqu",
["Toura"] = "neb",
["Tourangeau"] = "roa-tou",
["Towei"] = "ttn",
["Transylvanian Saxon"] = "gmw-tsx",
["Traveller Danish"] = "rmd",
["Traveller Norwegian"] = "rmg",
["Traveller Scottish"] = "trl",
["Tregami"] = "trm",
["Tremembé"] = "tme",
["Trieng"] = "stg",
["Trimuris"] = "tip",
["Tring"] = "tgq",
["Tringgus"] = "trx",
["Trinidad and Tobago Sign Language"] = "lst",
["Trinidadian Creole English"] = "trf",
["Trinitario"] = "trn",
["Truká"] = "tka",
["Trumai"] = "tpy",
["Ts'ün-Lao"] = "tsl",
["Tsaangi"] = "tsa",
["Tsafiki"] = "cof",
["Tsakwambo"] = "kvz",
["Tsetsaut"] = "txc",
["Tsez"] = "ddo",
["Tshobdun"] = "sit-tsh",
["Tshwa"] = "hio",
["Tsikimba"] = "kdl",
["Tsimané"] = "cas",
["Tsishingini"] = "tsw",
["Tso"] = "ldp",
["Tsogo"] = "tsv",
["Tsotsitaal"] = "fly",
["Tsum"] = "ttz",
["Tsuvadi"] = "tvd",
["Tsuvan"] = "tsh",
["Tswa"] = "tsc",
["Tswapong"] = "two",
["Tubar"] = "tbu",
["Tucano"] = "tuo",
["Tugen"] = "tuy",
["Tugun"] = "tzn",
["Tugutil"] = "tuj",
["Tukpa"] = "tpq",
["Tukudede"] = "tkd",
["Tukumanféd"] = "tkf",
["Tula"] = "tul",
["Tule-Kaweah Yokuts"] = "nai-tky",
["Tulehu"] = "tlu",
["Tulishi"] = "tey",
["Tulu-Bohuai"] = "rak",
["Tulua"] = "aus-tul",
["Tuma-Irumu"] = "iou",
["Tumak"] = "tmc",
["Tumi"] = "kku",
["Tumleo"] = "tmq",
["Tumshuqese"] = "xtq",
["Tumtum"] = "tbr",
["Tumulung Sisaala"] = "sil",
["Tunen"] = "tvu",
["Tungag"] = "lcm",
["Tunggare"] = "trt",
["Tunia"] = "tug",
["Tiếng Tunica"] = "tun",
["Tunisian Arabic"] = "aeb",
["Tiếng Berber Tunisia"] = "sds",
["Tunisian Sign Language"] = "tse",
["Tunjung"] = "tjg",
["Tunumiisut"] = "esx-tut",
["Tunzu"] = "dza",
["Tuotomb"] = "ttf",
["Tuparí"] = "tpr",
["Tupinikin"] = "tpk",
["Tupuri"] = "tui",
["Turaka"] = "trh",
["Turi"] = "trd",
["Turiwára"] = "twt",
["Turka"] = "tuz",
["Turkana"] = "tuv",
["Turkish Sign Language"] = "tsm",
["Turks and Caicos Creole English"] = "tch",
["Tiếng Turoyo"] = "tru",
["Turumsa"] = "tqm",
["Turung"] = "try",
["Tuscarora"] = "tus",
["Tutelo"] = "tta",
["Tutong"] = "ttg",
["Tutsa Naga"] = "tvt",
["Tutuba"] = "tmi",
["Tututepec Mixtec"] = "mtu",
["Tututni"] = "tuu",
["Tuwali Ifugao"] = "ifk",
["Tuwari"] = "tww",
["Tuwuli"] = "bov",
["Tuxináwa"] = "tux",
["Tuxá"] = "tud",
["Tuyuca"] = "tue",
["Twana"] = "twa",
["Twendi"] = "twn",
["Tiếng Tyap"] = "kcg",
["Tyaraity"] = "woa",
["Tyerrernotepanner"] = "xph",
["Tz'utujil"] = "tzj",
["Tzeltal"] = "tzh",
["Tiếng Tzotzil"] = "tzo",
["Tày Tac"] = "tyt",
["Tiếng Tây Bồi"] = "tas",
["Téén"] = "lor",
["Tübatulabal"] = "tub",
["Tiếng U"] = "uuu",
["Uab Meto"] = "aoz",
["Uamué"] = "uam",
["Uare"] = "ksj",
["Ubaghara"] = "byc",
["Ubang"] = "uba",
["Ubi"] = "ubi",
["Ubir"] = "ubr",
["Ucayali-Yurúa Ashéninka"] = "cpb",
["Uda"] = "uda",
["Tiếng Uduk"] = "udu",
["Ufim"] = "ufi",
["Ugandan Sign Language"] = "ugn",
["Ughele"] = "uge",
["Uhami"] = "uha",
["Uisai"] = "uis",
["Ujir"] = "udj",
["Ukaan"] = "kcf",
["Ukhwejo"] = "ukh",
["Ukit"] = "umi",
["Ukpe-Bayobiri"] = "ukp",
["Ukpet-Ehom"] = "akd",
["Ukrainian Sign Language"] = "ukl",
["Ukue"] = "uku",
["Ukuriguma"] = "ukg",
["Ukwa"] = "ukq",
["Ukwuani-Aboh-Ndoni"] = "ukw",
["Ulau-Suain"] = "svb",
["Tiếng Ulch"] = "ulc",
["Uldeme"] = "udl",
["Ulithian"] = "uli",
["Ullatan"] = "ull",
["Ulumanda'"] = "ulm",
["Ulwa"] = "ulw",
["Uma"] = "ppk",
["Uma' Lasan"] = "xky",
["Uma' Lung"] = "ulu",
["Umanakaina"] = "gdn",
["Umatilla"] = "uma",
["Umbindhamu"] = "umd",
["Umbu-Ungu"] = "ubu",
["Umbugarla"] = "umr",
["Tiếng Umbundu"] = "umb",
["Umbuygamu"] = "umg",
["Umeda"] = "upi",
["Umiida"] = "xud",
["Umiray Dumaget Agta"] = "due",
["Umon"] = "umm",
["Umotína"] = "umo",
["Umpila"] = "ump",
["Una"] = "mtg",
["Unami"] = "unm",
["Unas"] = "art-una",
["Unde Kaili"] = "unz",
["Uneme"] = "une",
["Unggaranggu"] = "xun",
["Unggumi"] = "xgu",
["Unserdeutsch"] = "uln",
["Unua"] = "onu",
["Unubahe"] = "unu",
["Uokha"] = "uok",
["Upper Chehalis"] = "cjh",
["Upper Grand Valley Dani"] = "dna",
["Tiếng Thượng Kinabatangan"] = "dmg",
["Upper Kuskokwim"] = "kuu",
["Upper Necaxa Totonac"] = "tku",
["Upper Tanana"] = "tau",
["Upper Taromi"] = "tov",
["Upper Umpqua"] = "xup",
["Ura (New Guinea)"] = "uro",
["Ura (Vanuatu)"] = "uur",
["Uradhi"] = "urf",
["Urali"] = "url",
["Urapmin"] = "urm",
["Urarina"] = "ura",
["Urat"] = "urt",
["Urhobo"] = "urh",
["Uri"] = "uvh",
["Urigina"] = "urg",
["Urim"] = "uri",
["Urimo"] = "urx",
["Uripiv-Wala-Rano-Atchin"] = "upv",
["Urningangg"] = "urc",
["Uru"] = "ure",
["Uru-Eu-Wau-Wau"] = "urz",
["Uru-Pa-In"] = "urp",
["Uruangnirin"] = "urn",
["Uruava"] = "urv",
["Uruguayan Sign Language"] = "ugy",
["Urumi"] = "uru",
["Usaghade"] = "usk",
["Usan"] = "wnu",
["Usarufa"] = "usa",
["Usila Chinantec"] = "cuc",
["Uspanteco"] = "usp",
["Usui"] = "usi",
["Utarmbung"] = "omo",
["Ute"] = "ute",
["Utu"] = "utu",
["Tiếng Uvbie"] = "evh",
["Uwinymil"] = "aus-uwi",
["Uya"] = "usu",
["Uyajitaya"] = "duk",
["Uzekwe"] = "eze",
["Vaagri Booli"] = "vaa",
["Vaghua"] = "tva",
["Vagla"] = "vag",
["Vai"] = "vai",
["Vaiphei"] = "vap",
["Vale"] = "vae",
["Valencian Sign Language"] = "vsv",
["Valle Nacional Chinantec"] = "cvn",
["Valley Maidu"] = "vmv",
["Valman"] = "van",
["Valpei"] = "vlp",
["Vamale"] = "mkt",
["Vame"] = "mlr",
["Vandalic"] = "xvn",
["Vangunu"] = "mpr",
["Vanimo"] = "vam",
["Vanji"] = "ira-wnj",
["Vanuma"] = "vau",
["Vao"] = "vao",
["Varhadi"] = "vah",
["Varisi"] = "vrs",
["Vayu"] = "vay",
["Veddah"] = "ved",
["Vehes"] = "val",
["Vemgo-Mabas"] = "vem",
["Venezuelan Sign Language"] = "vsl",
["Ventureño"] = "veo",
["Vera'a"] = "vra",
["Vestinian"] = "xvs",
["Vidunda"] = "vid",
["Viemo"] = "vig",
["Vilela"] = "vil",
["Vili"] = "vif",
["Villa Viciosa Agta"] = "dyg",
["Vincentian Creole English"] = "svc",
["Virgin Islands Creole"] = "vic",
["Vishavan"] = "vis",
["Viti"] = "vit",
["Vitou"] = "vto",
["Viya"] = "gev",
["Vlax Romani"] = "rmy",
["Volga German"] = "gmw-vog",
["Vono"] = "kch",
["Voro"] = "vor",
["Vracada Apabhramsa"] = "inc-vra",
["Vumbu"] = "vum",
["Vunapu"] = "vnp",
["Vunjo"] = "vun",
["Vute"] = "vut",
["Tiếng Võro"] = "vro",
["Wa"] = "wbm",
["Wa'ema"] = "wag",
["Waama"] = "wwa",
["Waamwang"] = "wmn",
["Wab"] = "wab",
["Wabo"] = "wbb",
["Waboda"] = "kmx",
["Waci Gbe"] = "wci",
["Wadaginam"] = "wdg",
["Waddar"] = "wbq",
["Wadi Wadi"] = "xwd",
["Wadjabangayi"] = "wdy",
["Wadjiginy"] = "wdj",
["Wadjigu"] = "wdu",
["Wae Rana"] = "wrx",
["Waffa"] = "waj",
["Wagawaga"] = "wgb",
["Wagaya"] = "wga",
["Wagdi"] = "wbr",
["Wageman"] = "waq",
["Wagi"] = "fad",
["Wahau Kayan"] = "whu",
["Wahau Kenyah"] = "whk",
["Tiếng Wahgi"] = "wgi",
["Waigali"] = "wbk",
["Waigeo"] = "wgo",
["Waikuri"] = "nai-wai",
["Wailaki"] = "wlk",
["Wailapa"] = "wlr",
["Waima'a"] = "wmh",
["Waimiri-Atroari"] = "atr",
["Wainumá"] = "awd-wai",
["Waioli"] = "wli",
["Waitaká"] = "sai-wai",
["Waja"] = "wja",
["Wajarri"] = "wbv",
["Wajuk"] = "xwj",
["Waka"] = "wav",
["Wakawaka"] = "wkw",
["Wakoná"] = "waf",
["Wala"] = "lgl",
["Walak"] = "wlw",
["Walangama"] = "nlw",
["Wali (Ghana)"] = "wlx",
["Wali (Sudan)"] = "wll",
["Waling"] = "wly",
["Walio"] = "wla",
["Walla Walla"] = "waa",
["Walmajarri"] = "wmt",
["Wam"] = "wmo",
["Wamas"] = "wmc",
["Wambaya"] = "wmb",
["Wambon"] = "wms",
["Wamey"] = "cou",
["Wamin"] = "wmi",
["Wampar"] = "lbq",
["Wampur"] = "waz",
["Wan"] = "wan",
["Wanambre"] = "wnb",
["Wanap"] = "wnp",
["Wancho"] = "nnp",
["Wanda"] = "wbh",
["Wandala"] = "mfi",
["Wandamen"] = "wad",
["Wandarang"] = "wnd",
["Wandji"] = "wdd",
["Wanga"] = "lwg",
["Wanggamala"] = "wnm",
["Wangganguru"] = "wgg",
["Wanggom"] = "wng",
["Wangkayutyuru"] = "wky",
["Wangkumara"] = "xwk",
["Wanham"] = "sai-wnm",
["Wanji"] = "wbi",
["Wanman"] = "wbt",
["Wannu"] = "jub",
["Wano"] = "wno",
["Wantoat"] = "wnc",
["Wanukaka"] = "wnk",
["Wanyi"] = "wny",
["Wané"] = "hwa",
["Wapan"] = "juk",
["Wapishana"] = "wap",
["Wappo"] = "wao",
["Wara"] = "wbf",
["Warao"] = "wba",
["Warapu"] = "wra",
["Waray Sorsogon"] = "srv",
["Tiếng Wardaman"] = "wrr",
["Wardandi"] = "wxw",
["Warembori"] = "wsa",
["Wari'"] = "pav",
["Waris"] = "wrs",
["Waritai"] = "wbe",
["Wariyangga"] = "wri",
["Warkay-Bipim"] = "bgv",
["Warlmanpa"] = "wrl",
["Warlpiri"] = "wbp",
["Warluwara"] = "wrb",
["Warnang"] = "wrn",
["Waropen"] = "wrp",
["Warray"] = "wrz",
["Warrgamay"] = "wgy",
["Warrwa"] = "wwr",
["Waru"] = "wru",
["Warumungu"] = "wrm",
["Waruna"] = "wrv",
["Warungu"] = "wrg",
["Warwar Feni"] = "hrw",
["Wasa"] = "wss",
["Wasco-Wishram"] = "wac",
["Wasembo"] = "gsp",
["Washo"] = "was",
["Waskia"] = "wsk",
["Tiếng Wastek"] = "hus",
["Wasu"] = "wsu",
["Watakataui"] = "wtk",
["Watam"] = "wax",
["Wathaurong"] = "wth",
["Watiwa"] = "wtf",
["Watubela"] = "wah",
["Waube"] = "kop",
["Wauja"] = "wau",
["Wauyai"] = "wuy",
["Wawa"] = "www",
["Wawonii"] = "wow",
["Waxiang"] = "wxa",
["Wayanad Chetti"] = "ctt",
["Wayoró"] = "wyr",
["Wayumará"] = "sai-way",
["Wedau"] = "wed",
["Weh"] = "weh",
["Welaung"] = "weu",
["Weliki"] = "klh",
["Welsh Romani"] = "rmw",
["Wemale"] = "weo",
["Tiếng Wemba-Wemba"] = "xww",
["Weme Gbe"] = "wem",
["Wendat"] = "wdt",
["Weri"] = "wer",
["Wersing"] = "kvw",
["West Albay Bikol"] = "fbl",
["West Ambae"] = "nnd",
["West Central Banda"] = "bbp",
["Tiếng Tây Duyên hải Bajau"] = "bdr",
["West Damar"] = "drn",
["West Greenlandic Pidgin"] = "crp-gep",
["West Lembata"] = "lmj",
["West Masela"] = "mss",
["West Tarangan"] = "txn",
["West Uvean"] = "uve",
["West-Central Limba"] = "lia",
["Western Arrernte"] = "are",
["Western Bolivian Guaraní"] = "gnw",
["Western Bukidnon Manobo"] = "mbb",
["Western Dani"] = "dnw",
["Western Durango Nahuatl"] = "azn",
["Western Fijian"] = "wyy",
["Western Gurung"] = "gvr",
["Western Jicaque"] = "und-wji",
["Western Juxtlahuaca Mixtec"] = "jmx",
["Western Karaboro"] = "kza",
["Western Keres"] = "kjq",
["Western Krahn"] = "krw",
["Western Lalu"] = "ywl",
["Western Maninkakan"] = "mlq",
["Tiếng Mari Tây"] = "mrj",
["Western Mashan Hmong"] = "hmw",
["Western Meohang"] = "raf",
["Western Muria"] = "mut",
["Tiếng Tân Aram Tây"] = "amw",
["Western Ojibwa"] = "ojw",
["Western Panjabi"] = "pnb",
["Western Penan"] = "pne",
["Western Sisaala"] = "ssl",
["Western Subanon"] = "suc",
["Western Tawbuid"] = "twb",
["Western Totonac"] = "tqt",
["Western Tunebo"] = "tnb",
["Western Xwla Gbe"] = "xwl",
["Westrobothnian"] = "gmq-bot",
["Weyewa"] = "wew",
["White Lachi"] = "lwh",
["Whitesands"] = "tnp",
["Wiarumus"] = "tua",
["Wichita"] = "wic",
["Wichí Lhamtés Güisnay"] = "mzh",
["Wichí Lhamtés Nocten"] = "mtp",
["Wichí Lhamtés Vejoz"] = "wlv",
["Wik-Epa"] = "wie",
["Wik-Iiyanh"] = "wij",
["Wik-Keyangan"] = "wif",
["Wik-Me'anha"] = "wih",
["Wik-Mungkan"] = "wim",
["Wik-Ngathana"] = "wig",
["Wikalkan"] = "wik",
["Wikngenchera"] = "wua",
["Wilawila"] = "wil",
["Wintu"] = "wnw",
["Winyé"] = "kst",
["Wipi"] = "gdr",
["Tiếng Wiradjuri"] = "wrh",
["Wiraféd"] = "wir",
["Wirangu"] = "wgu",
["Wiru"] = "wiu",
["Wirö"] = "wpc",
["Wiwa"] = "mbp",
["Tiếng Wiyot"] = "wiy",
["Woccon"] = "xwc",
["Wogamusin"] = "wog",
["Wogeo"] = "woc",
["Woi"] = "wbw",
["Tiếng Woiwurrung"] = "wyi",
["Wojenaka"] = "jod",
["Wolane"] = "wle",
["Wolani"] = "wod",
["Woleaian"] = "woe",
["Womo"] = "wmx",
["Wong-gie"] = "aus-won",
["Wongo"] = "won",
["Woods Cree"] = "cwd",
["Woria"] = "wor",
["Worimi"] = "kda",
["Worodougou"] = "jud",
["Worora"] = "wro",
["Wotapuri-Katarqalai"] = "wsv",
["Woun Meu"] = "noa",
["Wudu"] = "wud",
["Wulguru"] = "aus-wul",
["Wuliwuli"] = "wlu",
["Wulna"] = "wux",
["Wumboko"] = "bqm",
["Wumbvu"] = "wum",
["Wumeng"] = "ywu",
["Wunai Bunu"] = "bwn",
["Wunambal"] = "wub",
["Wurrugu"] = "wur",
["Wusa"] = "yig",
["Wushi"] = "bse",
["Wusi"] = "wsi",
["Wutung"] = "wut",
["Wuvulu-Aua"] = "wuv",
["Wyandot"] = "wya",
["Wára"] = "tci",
["Wãpha"] = "juw",
["Wè Southern"] = "gxx",
["Wè Western"] = "wec",
["Xadani Zapotec"] = "zax",
["Xakriabá"] = "xkr",
["Xanaguía Zapotec"] = "ztg",
["Xaragure"] = "axx",
["Tiếng Xavante"] = "xav",
["Xerénte"] = "xer",
["Xetá"] = "xet",
["Xicotepec de Juárez Totonac"] = "too",
["Xinca"] = "xin",
["Xingú Asuriní"] = "asn",
["Xipaya"] = "xiy",
["Xiri"] = "xii",
["Xiriâna"] = "xir",
["Xishanba Lalo"] = "ywt",
["Xocó"] = "sai-xoc",
["Xokleng"] = "xok",
["Xukurú"] = "xoo",
["Xwela Gbe"] = "xwe",
["Yaa"] = "iyx",
["Tiếng Yaaku"] = "muu",
["Yabarana"] = "yar",
["Yabaâna"] = "ybn",
["Yaben"] = "ybm",
["Yabong"] = "ybo",
["Yabula Yabula"] = "yxy",
["Yace"] = "ekr",
["Yafi"] = "wfg",
["Yagara"] = "yxg",
["Yagaria"] = "ygr",
["Yagomi"] = "ygm",
["Yagua"] = "yad",
["Yagwoia"] = "ygw",
["Yahadian"] = "ner",
["Yahang"] = "rhp",
["Yahuna"] = "ynu",
["Yaka"] = "yaf",
["Yakaikeke"] = "ykk",
["Yakoma"] = "yky",
["Yala"] = "yba",
["Yalahatan"] = "jal",
["Yalakalore"] = "xyl",
["Yalarnnga"] = "ylr",
["Yale"] = "nce",
["Yaleba"] = "ylb",
["Yalunka"] = "yal",
["Yalálag Zapotec"] = "zpu",
["Yamap"] = "ymp",
["Yamba"] = "yam",
["Yambes"] = "ymb",
["Yambeta"] = "yat",
["Yamdena"] = "jmd",
["Yameo"] = "yme",
["Yaminahua"] = "yaa",
["Yamongeri"] = "ymg",
["Yamphu"] = "ybi",
["Yan-nhangu"] = "jay",
["Yana"] = "ynn",
["Yanda"] = "yda",
["Yanda Dogon"] = "dym",
["Yandjibara"] = "xyb",
["Yandruwandha"] = "ynd",
["Yanesha'"] = "ame",
["Yangben"] = "yav",
["Yangkaal"] = "aus-ynk",
["Yangkam"] = "bsx",
["Yangman"] = "jng",
["Yango"] = "yng",
["Yangulam"] = "ynl",
["Yangum Dey"] = "yde",
["Yangum Gel"] = "ygl",
["Yangum Mon"] = "ymo",
["Yankunytjatjara"] = "kdd",
["Yanomamö"] = "guu",
["Yanomámi"] = "wca",
["Yansi"] = "yns",
["Tiếng Yanyuwa"] = "jao",
["Tiếng Yao (châu Phi)"] = "yao",
["Yaosakor Asmat"] = "asy",
["Yaouré"] = "yre",
["Yaqay"] = "jaq",
["Yaqui"] = "yaq",
["Yarawata"] = "yrw",
["Yareba"] = "yrb",
["Yareni Zapotec"] = "zae",
["Yarli"] = "yxl",
["Yarluyandi"] = "yry",
["Yarumá"] = "sai-yar",
["Yarí"] = "yri",
["Yasa"] = "yko",
["Yatay"] = "yty",
["Yatee Zapotec"] = "zty",
["Tiếng Zapotec Yatzachi"] = "zav",
["Yaul"] = "yla",
["Yaur"] = "jau",
["Yautepec Zapotec"] = "zpb",
["Yavitero"] = "yvt",
["Yawa"] = "yva",
["Yawalapití"] = "yaw",
["Yawanawa"] = "ywn",
["Yawarawarga"] = "yww",
["Yaweyuha"] = "yby",
["Yawijibaya"] = "jbw",
["Yawiyo"] = "ybx",
["Yawuru"] = "ywr",
["Yaygir"] = "xya",
["Tiếng Yazghulom"] = "yah",
["Yei"] = "jei",
["Yekhee"] = "ets",
["Yekora"] = "ykr",
["Yelmek"] = "jel",
["Yelogu"] = "ylg",
["Yemba"] = "ybb",
["Yemeni Arabic"] = "ayn",
["Yendang"] = "yen",
["Yeni"] = "yei",
["Yeniche"] = "yec",
["Yerakai"] = "yra",
["Yeretuar"] = "gop",
["Yerukula"] = "yeu",
["Yeskwa"] = "yes",
["Yessan-Mayo"] = "yss",
["Yetfa"] = "yet",
["Yeyi"] = "yey",
["Yil"] = "yll",
["Tiếng Creole Nghi Lan"] = "ycr",
["Yimas"] = "yee",
["Yimchungru Naga"] = "yim",
["Yinbaw Karen"] = "kvu",
["Yinchia"] = "yin",
["Tiếng Yindjibarndi"] = "yij",
["Yindjilandji"] = "yil",
["Yine"] = "pib",
["Yinggarda"] = "yia",
["Yinhawangka"] = "ywg",
["Yiningayi"] = "ygi",
["Yintale Karen"] = "kvy",
["Yinwum"] = "yxm",
["Yir-Yoront"] = "yiy",
["Yirandali"] = "ljw",
["Yis"] = "yis",
["Yitha Yitha"] = "xth",
["Yoba"] = "yob",
["Yocoboué Dida"] = "gud",
["Yoidik"] = "ydk",
["Yoke"] = "yki",
["Yolmo"] = "scp",
["Yolngu Sign Language"] = "ygs",
["Yoloxochitl Mixtec"] = "xty",
["Yom"] = "pil",
["Yombe"] = "yom",
["Yopno"] = "yut",
["Yora"] = "mts",
["Yorta Yorta"] = "xyy",
["Tiếng Mixtec Yosondúa"] = "mpm",
["Younuo Bunu"] = "buh",
["Yout Wam"] = "ytw",
["Yuaga"] = "nua",
["Yucatec Maya Sign Language"] = "msd",
["Yuchi"] = "yuc",
["Yucuañe Mixtec"] = "mvg",
["Yucuna"] = "ycn",
["Yugambal"] = "yub",
["Yugoslavian Sign Language"] = "ysl",
["Yugul"] = "ygu",
["Yuhup"] = "yab",
["Yuki"] = "yuk",
["Yukpa"] = "yup",
["Yukuben"] = "ybl",
["Yulu"] = "yul",
["Yuma"] = "yum",
["Yumana"] = "awd-yum",
["Yupiltepeque"] = "nai-yup",
["Yupua"] = "sai-yup",
["Yuqui"] = "yuq",
["Yuracare"] = "yuz",
["Yuru"] = "ljx",
["Yurumanguí"] = "sai-yur",
["Yurutí"] = "yui",
["Yutanduchi Mixtec"] = "mab",
["Yuwana"] = "yau",
["Yuyu"] = "yxu",
["Yámana"] = "yag",
["Zaachila Zapotec"] = "ztx",
["Zabana"] = "kji",
["Zacatepec Chatino"] = "ctz",
["Zacatlán-Ahuacatlán-Tepetzintla Nahuatl"] = "nhi",
["Zakhring"] = "zkr",
["Zambian Sign Language"] = "zsl",
["Zan Gula"] = "zna",
["Zanaki"] = "zak",
["Zande"] = "zne",
["Zangskari"] = "zau",
["Zangwal"] = "zah",
["Tiếng Zapotec Zaniza"] = "zpw",
["Tiếng Zapotec"] = "zap",
["Zaramo"] = "zaj",
["Zari"] = "zaz",
["Zauzou"] = "zal",
["Tiếng Karen Zayein"] = "kxk",
["Zazao"] = "jaj",
["Zbu"] = "sit-zbu",
["Zeem"] = "zua",
["Zemba"] = "dhm",
["Zeme Naga"] = "nzm",
["Zemgalian"] = "xzm",
["Zenag"] = "zeg",
["Zenzontepec Chatino"] = "czn",
["Zhang-Zhung"] = "xzh",
["Zhire"] = "zhi",
["Zhoa"] = "zhw",
["Zhár"] = "jjr",
["Zia"] = "zia",
["Zialo"] = "zil",
["Zigula"] = "ziw",
["Zimakani"] = "zik",
["Zimba"] = "zmb",
["Zimbabwe Sign Language"] = "zib",
["Zinza"] = "zin",
["Zipser German"] = "gmw-zps",
["Zire"] = "sih",
["Ziriya"] = "zir",
["Zizilivakan"] = "ziz",
["Zo'é"] = "pto",
["Zokhuo"] = "yzk",
["Tiếng Zapotec Zoogocho"] = "zpq",
["Zotung Chin"] = "czt",
["Zou"] = "zom",
["Zulgo-Gemzek"] = "gnd",
["Zumaya"] = "zuy",
["Zuni"] = "zun",
["Zuwara"] = "ber-zuw",
["Zyphe"] = "zyp",
["Záparo"] = "zro",
["biệt ngữ Chinook"] = "chn",
["không xác định ngôn ngữ"] = "und",
["ngôn ngữ ký hiệu Mỹ"] = "ase",
["Tiếng 'Are'are"] = "alu",
["Tiếng A Xương"] = "acn",
["Tiếng A-Hmao"] = "hmd",
["Tiếng Aari"] = "aiw",
["Tiếng Aasax"] = "aas",
["Tiếng Abaga"] = "abg",
["Tiếng Abai"] = "poz-abi",
["Tiếng Abau"] = "aau",
["Tiếng Abaza"] = "abq",
["Tiếng Abidji"] = "abi",
["Tiếng Abinomn"] = "bsa",
["Tiếng Abkhaz"] = "ab",
["Tiếng Abkhaz-Abaza nguyên thủy"] = "cau-abz-pro",
["Tiếng Aceh"] = "ace",
["Tiếng Achawa"] = "aca",
["Tiếng Acheron"] = "acz",
["Tiếng Acholi"] = "ach",
["Tiếng Adangme"] = "ada",
["Tiếng Adja"] = "ajg",
["Tiếng Adygea"] = "ady",
["Tiếng Adzera"] = "adz",
["Tiếng Afar"] = "aa",
["Tiếng Afrikaans"] = "af",
["Tiếng Agawam"] = "alg-aga",
["Tiếng Aghem"] = "agq",
["Tiếng Aghul"] = "agx",
["Tiếng Aghwan"] = "xag",
["Tiếng Ahom"] = "aho",
["Tiếng Ahtna"] = "aht",
["Tiếng Ai Cập"] = "egy",
["Tiếng Ai Cập bình dân"] = "egx-dem",
["Tiếng Aimol"] = "aim",
["Tiếng Ainu"] = "ain",
["Tiếng Aiton"] = "aio",
["Tiếng Ajië"] = "aji",
["Tiếng Aka-Bo"] = "akm",
["Tiếng Aka-Jeru"] = "akj",
["Tiếng Akan"] = "ak",
["Tiếng Akawaio"] = "ake",
["Tiếng Akha"] = "ahk",
["Tiếng Akhvakh"] = "akv",
["Tiếng Akkad"] = "akk",
["Tiếng Aklanon"] = "akl",
["Tiếng Alaba-K’abeena"] = "alw",
["Tiếng Alabama"] = "akz",
["Tiếng Alagwa"] = "wbj",
["Tiếng Alak"] = "alk",
["Tiếng Alawa"] = "alh",
["Tiếng Albani"] = "sq",
["Tiếng Albani nguyên thủy"] = "sqj-pro",
["Tiếng Alchuka"] = "tuw-alk",
["Tiếng Alekano"] = "gah",
["Tiếng Aleut"] = "ale",
["Tiếng Algonquin"] = "alq",
["Tiếng Algonquin nguyên thủy"] = "alg-pro",
["Tiếng Alsea"] = "aes",
["Tiếng Alutor"] = "alr",
["Tiếng Ama"] = "amm",
["Tiếng Amahuaca"] = "amc",
["Tiếng Amaimon"] = "ali",
["Tiếng Amarasi"] = "aaz",
["Tiếng Ambrak"] = "aag",
["Tiếng Amdang"] = "amj",
["Tiếng Amhara"] = "am",
["Tiếng Amis"] = "ami",
["Tiếng Amurdag"] = "amg",
["Tiếng Amuzgo"] = "amu",
["Tiếng Anal"] = "anm",
["Tiếng Andi"] = "ani",
["Tiếng Angika"] = "anp",
["Tiếng Angola"] = "aoa",
["Tiếng Anh"] = "en",
["Tiếng Anh Solombala"] = "crp-slb",
["Tiếng Anh cổ"] = "ang",
["Tiếng Anh trung đại"] = "enm",
["Tiếng Anii"] = "blo",
["Tiếng Ankave"] = "aak",
["Tiếng Anuki"] = "aui",
["Tiếng Anyi"] = "any",
["Tiếng Apache Tây"] = "apw",
["Tiếng Aparaí"] = "apy",
["Tiếng Apinayé"] = "apn",
["Tiếng Aputai"] = "apx",
["Tiếng Aquitani"] = "xaq",
["Tiếng Aragon"] = "an",
["Tiếng Araki"] = "akr",
["Tiếng Arakwal"] = "rkw",
["Tiếng Aram"] = "arc",
["Tiếng Aranadan"] = "aaf",
["Tiếng Araweté"] = "awt",
["Tiếng Archi"] = "aqc",
["Tiếng Arem"] = "aem",
["Tiếng Argobba"] = "agj",
["Tiếng Armenia"] = "hy",
["Tiếng Armenia cổ"] = "xcl",
["Tiếng Armenia trung đại"] = "axm",
["Tiếng Aromania"] = "rup",
["Tiếng Ashraaf"] = "cus-ash",
["Tiếng Askopan"] = "eiv",
["Tiếng Asli nguyên thủy"] = "mkh-asl-pro",
["Tiếng Assam"] = "as",
["Tiếng Assan"] = "xss",
["Tiếng Asturias"] = "ast",
["Tiếng Asur"] = "asr",
["Tiếng Atayal"] = "tay",
["Tiếng Athpariya"] = "aph",
["Tiếng Atikamekw"] = "atj",
["Tiếng Atong (Ấn Độ)"] = "aot",
["Tiếng Auhelawa"] = "kud",
["Tiếng Aukan"] = "djk",
["Tiếng Avar"] = "av",
["Tiếng Avesta"] = "ae",
["Tiếng Avokaya"] = "avu",
["Tiếng Awadh"] = "awa",
["Tiếng Awing"] = "azo",
["Tiếng Awngi"] = "awn",
["Tiếng Axi"] = "yix",
["Tiếng Ayere"] = "aye",
["Tiếng Aymara"] = "ay",
["Tiếng Azerbaijan"] = "az",
["Tiếng Ba Lan"] = "pl",
["Tiếng Ba Lan cổ"] = "zlw-opl",
["Tiếng Ba Na"] = "bdq",
["Tiếng Ba Tư"] = "fa",
["Tiếng Ba Tư cổ"] = "peo",
["Tiếng Ba Tư trung đại"] = "pal",
["Tiếng Ba Tư-Do Thái"] = "jpr",
["Tiếng Babatana"] = "baa",
["Tiếng Babungo"] = "bav",
["Tiếng Babuza"] = "bzg",
["Tiếng Bactria"] = "xbc",
["Tiếng Badaga"] = "bfq",
["Tiếng Badanchi"] = "bau",
["Tiếng Badui"] = "bac",
["Tiếng Bagvalal"] = "kva",
["Tiếng Bahing"] = "bhj",
["Tiếng Bahnar nguyên thủy"] = "mkh-ban-pro",
["Tiếng Bainouk-Gunyuño"] = "bab",
["Tiếng Baiso"] = "bsw",
["Tiếng Bakhtiari"] = "bqi",
["Tiếng Bala"] = "tuw-bal",
["Tiếng Balanta-Ganja"] = "bjt",
["Tiếng Balanta-Kentohe"] = "ble",
["Tiếng Bali"] = "ban",
["Tiếng Baloch"] = "bal",
["Tiếng Balt-Slav nguyên thủy"] = "ine-bsl-pro",
["Tiếng Balti"] = "bft",
["Tiếng Bambara"] = "bm",
["Tiếng Bambassi"] = "myf",
["Tiếng Banjar"] = "bjn",
["Tiếng Bantawa"] = "bap",
["Tiếng Bantu nguyên thủy"] = "bnt-pro",
["Tiếng Baoule"] = "bci",
["Tiếng Barai"] = "bbb",
["Tiếng Barakai"] = "baj",
["Tiếng Bari"] = "bfa",
["Tiếng Baré"] = "bae",
["Tiếng Basaa"] = "bas",
["Tiếng Basay"] = "byq",
["Tiếng Bashkir"] = "ba",
["Tiếng Basketo"] = "bst",
["Tiếng Basque"] = "eu",
["Tiếng Basque nguyên thủy"] = "euq-pro",
["Tiếng Bassa"] = "bsq",
["Tiếng Batak Simalungun"] = "bts",
["Tiếng Batek"] = "btq",
["Tiếng Bats"] = "bbl",
["Tiếng Batuley"] = "bay",
["Tiếng Bayern"] = "bar",
["Tiếng Beja"] = "bej",
["Tiếng Belarus"] = "be",
["Tiếng Belhariya"] = "byw",
["Tiếng Beli"] = "blm",
["Tiếng Bella Coola"] = "blc",
["Tiếng Bellara"] = "brw",
["Tiếng Belnəng"] = "glb",
["Tiếng Bemba"] = "bem",
["Tiếng Bench"] = "bcq",
["Tiếng Bengal"] = "bn",
["Tiếng Berber Bắc Sahara"] = "mzb",
["Tiếng Berber nguyên thủy"] = "ber-pro",
["Tiếng Berber-Do Thái"] = "jbe",
["Tiếng Berik"] = "bkl",
["Tiếng Betawi"] = "bew",
["Tiếng Bezhta"] = "kap",
["Tiếng Bhil"] = "bhb",
["Tiếng Bhil Dungra"] = "duh",
["Tiếng Bhnong"] = "mkh-bhn",
["Tiếng Bhojpur"] = "bho",
["Tiếng Bhumij"] = "aav-bhu",
["Tiếng Bidayuh Biatah"] = "bth",
["Tiếng Bih"] = "ibh",
["Tiếng Bihari"] = "bh",
["Tiếng Bilaspur"] = "kfs",
["Tiếng Bilen"] = "byn",
["Tiếng Birao"] = "brr",
["Tiếng Birhor"] = "biy",
["Tiếng Birjia"] = "bix",
["Tiếng Bishnupriya"] = "bpy",
["Tiếng Bislama"] = "bi",
["Tiếng Bisu"] = "bzi",
["Tiếng Bit"] = "bgk",
["Tiếng Blackfoot"] = "bla",
["Tiếng Blagar"] = "beu",
["Tiếng Blang"] = "blr",
["Tiếng Bodo (Ấn Độ)"] = "brx",
["Tiếng Bodo-Garo nguyên thủy"] = "tbq-bdg-pro",
["Tiếng Boghom"] = "bux",
["Tiếng Bokar"] = "sit-bok",
["Tiếng Bokobaru"] = "bus",
["Tiếng Bondo"] = "bfw",
["Tiếng Boon"] = "bnl",
["Tiếng Borôro"] = "bor",
["Tiếng Botlikh"] = "bph",
["Tiếng Brahui"] = "brh",
["Tiếng Braj"] = "bra",
["Tiếng Breri"] = "brq",
["Tiếng Breton"] = "br",
["Tiếng Breton cổ"] = "obt",
["Tiếng Breton trung đại"] = "xbm",
["Tiếng Britton nguyên thủy"] = "cel-bry-pro",
["Tiếng Bru"] = "bru",
["Tiếng Bru Tây"] = "brv",
["Tiếng Brâu"] = "brb",
["Tiếng Budukh"] = "bdk",
["Tiếng Bughotu"] = "bgt",
["Tiếng Bugis"] = "bug",
["Tiếng Bukhara"] = "bhh",
["Tiếng Bulgar"] = "xbo",
["Tiếng Bulgari"] = "bg",
["Tiếng Bunun"] = "bnn",
["Tiếng Burji"] = "bji",
["Tiếng Burunge"] = "bds",
["Tiếng Burushaski"] = "bsk",
["Tiếng Buryat"] = "bua",
["Tiếng Busa"] = "bqp",
["Tiếng Bushi"] = "buc",
["Tiếng Bách Tế"] = "pkc",
["Tiếng Bảo An"] = "peh",
["Tiếng Bắc Altai"] = "atv",
["Tiếng Bắc Amami Ōshima"] = "ryn",
["Tiếng Bắc Emberá"] = "emp",
["Tiếng Bắc Friesland"] = "frr",
["Tiếng Bắc Iroquois nguyên thủy"] = "iro-nor-pro",
["Tiếng Bắc Mansi"] = "mns-nor",
["Tiếng Bắc Ndebele"] = "nd",
["Tiếng Bắc Nisu"] = "yiv",
["Tiếng Bắc Sami"] = "se",
["Tiếng Bắc Slavey"] = "scs",
["Tiếng Bắc Thái"] = "nod",
["Tiếng Bắc Yukaghir"] = "ykg",
["Tiếng Bắc Âu cổ"] = "non",
["Tiếng Bố Cam"] = "bbh",
["Tiếng Bố Lưu"] = "ply",
["Tiếng Bố Mang"] = "bvp",
["Tiếng Bố Y"] = "pcc",
["Tiếng Bồ Đào Nha"] = "pt",
["Tiếng Bổ trợ Quốc tế"] = "ia",
["Tiếng Ca Dong"] = "kxy",
["Tiếng Ca Tua"] = "kta",
["Tiếng Cahuilla"] = "chl",
["Tiếng Camling"] = "rab",
["Tiếng Canela"] = "ram",
["Tiếng Cao Câu Ly"] = "zkg",
["Tiếng Carib nguyên thủy"] = "sai-car-pro",
["Tiếng Carrier"] = "crx",
["Tiếng Catalan"] = "ca",
["Tiếng Cayuga"] = "cay",
["Tiếng Cebu"] = "ceb",
["Tiếng Celt nguyên thủy"] = "cel-pro",
["Tiếng Celtiberi"] = "xce",
["Tiếng Cerrado nguyên thủy"] = "sai-cer-pro",
["Tiếng Ch'orti'"] = "caa",
["Tiếng Chachi"] = "cbi",
["Tiếng Chagatai"] = "chg",
["Tiếng Chakma"] = "ccp",
["Tiếng Chăm cổ"] = "ocm",
["Tiếng Chamalal"] = "cji",
["Tiếng Chamba"] = "cdh",
["Tiếng Chamicuro"] = "ccc",
["Tiếng Chamorro"] = "ch",
["Tiếng Chatino cao nguyên Tây"] = "ctp",
["Tiếng Chaura"] = "crv",
["Tiếng Chavacano"] = "cbk",
["Tiếng Chechen"] = "ce",
["Tiếng Chepang"] = "cdm",
["Tiếng Cherokee"] = "chr",
["Tiếng Chewong"] = "cwg",
["Tiếng Cheyenne"] = "chy",
["Tiếng Chhattisgarh"] = "hne",
["Tiếng Chibcha"] = "chb",
["Tiếng Chichewa"] = "ny",
["Tiếng Chickasaw"] = "cic",
["Tiếng Chinantec Ojitlán"] = "chj",
["Tiếng Chinantec Ozumacín"] = "chz",
["Tiếng Chinantec Tepinapa"] = "cte",
["Tiếng Chinook"] = "chh",
["Tiếng Chiru"] = "cdf",
["Tiếng Chittagong"] = "ctg",
["Tiếng Chiwere"] = "iow",
["Tiếng Chocangacakha"] = "cgk",
["Tiếng Choctaw"] = "cho",
["Tiếng Chodri"] = "cdi",
["Tiếng Chong"] = "cog",
["Tiếng Chu Ru"] = "cje",
["Tiếng Chukot"] = "ckt",
["Tiếng Chulym"] = "clw",
["Tiếng Chuuk"] = "chk",
["Tiếng Chuvan"] = "xcv",
["Tiếng Chuvash"] = "cv",
["Tiếng Châu Đại Dương nguyên thủy"] = "poz-oce-pro",
["Tiếng Chăm Tây"] = "cja",
["Tiếng Chăm nguyên thủy"] = "cmc-pro",
["Tiếng Chăm Đông"] = "cjm",
["Tiếng Chơ Ro"] = "crw",
["Tiếng Chứt"] = "scb",
["Tiếng Cia-Cia"] = "cia",
["Tiếng Cimbri"] = "cim",
["Tiếng Circassia nguyên thủy"] = "cau-cir-pro",
["Tiếng Co"] = "cua",
["Tiếng Cofán"] = "con",
["Tiếng Comanche"] = "com",
["Tiếng Comoros Maore"] = "swb",
["Tiếng Comox"] = "coo",
["Tiếng Copt"] = "cop",
["Tiếng Cornwall"] = "kw",
["Tiếng Corse"] = "co",
["Tiếng Cree"] = "cr",
["Tiếng Cree đồng bằng"] = "crk",
["Tiếng Creole Hà Lan Berbice"] = "brc",
["Tiếng Creole Jamaica"] = "jam",
["Tiếng Creole Louisiana"] = "lou",
["Tiếng Crow"] = "cro",
["Tiếng Cuman"] = "qwm",
["Tiếng Cupeño"] = "cup",
["Tiếng Cushit nguyên thủy"] = "cus-pro",
["Tiếng Càn-đà-la"] = "pgd",
["Tiếng Cơ Nặc Du Lạc"] = "jiu",
["Tiếng Cơ Tu"] = "ktv",
["Tiếng Cơ Tu Phương"] = "phg",
["Tiếng Cơ Tu Tây"] = "kuf",
["Tiếng Cơ Tu nguyên thủy"] = "mkh-kat-pro",
["Tiếng Cám"] = "gan",
["Tiếng Cờ Lao Trắng"] = "giw",
["Tiếng Daasanach"] = "dsh",
["Tiếng Dabarre"] = "dbr",
["Tiếng Dacia"] = "xdc",
["Tiếng Dadibi"] = "mps",
["Tiếng Dagbani"] = "dag",
["Tiếng Dahalik"] = "dlk",
["Tiếng Dahalo"] = "dal",
["Tiếng Dakota"] = "dak",
["Tiếng Dalmatia"] = "dlm",
["Tiếng Dambi"] = "dac",
["Tiếng Dan"] = "dnj",
["Tiếng Danau"] = "dnu",
["Tiếng Dangaléat"] = "daa",
["Tiếng Danu"] = "dnv",
["Tiếng Danuwar"] = "dhw",
["Tiếng Dargwa"] = "dar",
["Tiếng Dargwa nguyên thủy"] = "cau-drg-pro",
["Tiếng Daur"] = "dta",
["Tiếng Dawro"] = "dwr",
["Tiếng Degema"] = "deg",
["Tiếng Denesuline"] = "chp",
["Tiếng Desiya"] = "dso",
["Tiếng Dhanka"] = "dhn",
["Tiếng Dhivehi"] = "dv",
["Tiếng Dhodia"] = "dho",
["Tiếng Dibabawon"] = "mbd",
["Tiếng Digan"] = "rom",
["Tiếng Digan Tavringer"] = "rmu",
["Tiếng Dinka"] = "din",
["Tiếng Dirasha"] = "gdl",
["Tiếng Ditidaht"] = "dtd",
["Tiếng Dizi"] = "mdx",
["Tiếng Do Thái"] = "he",
["Tiếng Dogri"] = "doi",
["Tiếng Dogrib"] = "dgr",
["Tiếng Dolgan"] = "dlg",
["Tiếng Domari"] = "rmt",
["Tiếng Dongolawi"] = "kzh",
["Tiếng Dravida nguyên thủy"] = "dra-pro",
["Tiếng Dubla"] = "dub",
["Tiếng Dukha"] = "trk-dkh",
["Tiếng Duun"] = "dux",
["Tiếng Duy Ngô Nhĩ"] = "ug",
["Tiếng Duy Ngô Nhĩ cổ"] = "oui",
["Tiếng Dyirbal"] = "dbl",
["Tiếng Dzongkha"] = "dz",
["Tiếng Dzuun"] = "dnn",
["Tiếng Ebla"] = "xeb",
["Tiếng Ebrié"] = "ebr",
["Tiếng Ebughu"] = "ebg",
["Tiếng Ede Idaca"] = "idd",
["Tiếng Ede Nago"] = "nqg",
["Tiếng Edekiri nguyên thủy"] = "alv-edk-pro",
["Tiếng Edo"] = "bin",
["Tiếng Efai"] = "efa",
["Tiếng Efe"] = "efe",
["Tiếng Efik"] = "efi",
["Tiếng Ega"] = "ega",
["Tiếng Eggon"] = "ego",
["Tiếng Ehueun"] = "ehu",
["Tiếng Eipomek"] = "eip",
["Tiếng Eitiep"] = "eit",
["Tiếng Ejagham"] = "etu",
["Tiếng El Molo"] = "elo",
["Tiếng Elam"] = "elx",
["Tiếng Elymi"] = "xly",
["Tiếng Emberá-Chamí"] = "cmi",
["Tiếng Emberá-Tadó"] = "tdc",
["Tiếng Embu"] = "ebu",
["Tiếng Emilia"] = "egl",
["Tiếng Enets lãnh nguyên"] = "enh",
["Tiếng Enets rừng"] = "enf",
["Tiếng Engenni"] = "enn",
["Tiếng Eotile"] = "eot",
["Tiếng Epie"] = "epi",
["Tiếng Erzya"] = "myv",
["Tiếng Esan"] = "ish",
["Tiếng Ese"] = "mcq",
["Tiếng Esimbi"] = "ags",
["Tiếng Eskimo nguyên thủy"] = "esx-esk-pro",
["Tiếng Estonia"] = "et",
["Tiếng Eteocrete"] = "ecr",
["Tiếng Etrusca"] = "ett",
["Tiếng Even"] = "eve",
["Tiếng Evenk"] = "evn",
["Tiếng Ewe"] = "ee",
["Tiếng Fala"] = "fax",
["Tiếng Falisci"] = "xfa",
["Tiếng Faroe"] = "fo",
["Tiếng Fe'fe'"] = "fmp",
["Tiếng Fiji"] = "fj",
["Tiếng Finn nguyên thủy"] = "urj-fin-pro",
["Tiếng Flemish Tây"] = "vls",
["Tiếng Fogaha"] = "ber-fog",
["Tiếng Fon"] = "fon",
["Tiếng Fox"] = "sac",
["Tiếng Franco-Provençal"] = "frp",
["Tiếng Franken Trung"] = "gmw-cfr",
["Tiếng Frisia Saterland"] = "stq",
["Tiếng Frisia cổ"] = "ofs",
["Tiếng Friuli"] = "fur",
["Tiếng Fula"] = "ff",
["Tiếng Fur"] = "fvr",
["Tiếng Ga"] = "gaa",
["Tiếng Gabri"] = "gab",
["Tiếng Gaddang"] = "gad",
["Tiếng Gael Scotland"] = "gd",
["Tiếng Gagauz"] = "gag",
["Tiếng Galati"] = "xga",
["Tiếng Galicia"] = "gl",
["Tiếng Galicia-Bồ Đào Nha"] = "roa-opt",
["Tiếng Gamit"] = "gbl",
["Tiếng Gamo"] = "gmv",
["Tiếng Ganza"] = "gza",
["Tiếng Garasia Adiwasi"] = "gas",
["Tiếng Garasia Rajput"] = "gra",
["Tiếng Garo"] = "grt",
["Tiếng Garre"] = "gex",
["Tiếng Gata'"] = "gaq",
["Tiếng Gawar-Bati"] = "gwt",
["Tiếng Gbe Saxwe"] = "sxw",
["Tiếng Gbe nguyên thủy"] = "alv-gbe-pro",
["Tiếng Gedeo"] = "drs",
["Tiếng German Tây nguyên thủy"] = "gmw-pro",
["Tiếng Scots trung đại"] = "gmw-msc",
["Tiếng German nguyên thủy"] = "gem-pro",
["Tiếng Geʽez"] = "gez",
["Tiếng Ghadames"] = "gha",
["Tiếng Ghomala'"] = "bbj",
["Tiếng Gia Rai"] = "jra",
["Tiếng Gikuyu"] = "ki",
["Tiếng Gilak"] = "glk",
["Tiếng Gimi (Goroka)"] = "gim",
["Tiếng Girirra"] = "gii",
["Tiếng Giẻ"] = "jeh",
["Tiếng Glosa"] = "igs",
["Tiếng Godoberi"] = "gdo",
["Tiếng Gofa"] = "gof",
["Tiếng Gone Dau"] = "goo",
["Tiếng Gorowa"] = "gow",
["Tiếng Goth"] = "got",
["Tiếng Greenland"] = "kl",
["Tiếng Gruzia"] = "ka",
["Tiếng Gruzia cổ"] = "oge",
["Tiếng Gruzia-Do Thái"] = "jge",
["Tiếng Gruzia-Zan nguyên thủy"] = "ccs-gzn-pro",
["Tiếng Guajajára"] = "gub",
["Tiếng Guajá"] = "gvj",
["Tiếng Guanche"] = "gnc",
["Tiếng Guaraní"] = "gn",
["Tiếng Guarani Mbya"] = "gun",
["Tiếng Guarayu"] = "gyr",
["Tiếng Gujarat"] = "gu",
["Tiếng Gulay"] = "gvl",
["Tiếng Gumuz"] = "guk",
["Tiếng Gun"] = "guw",
["Tiếng Gurenne"] = "gur",
["Tiếng Guugu Yimidhirr"] = "kky",
["Tiếng Gwichʼin"] = "gwi",
["Tiếng H'Mông Tương Tây Tây"] = "mmr",
["Tiếng H'Mông-Miền nguyên thủy"] = "hmx-pro",
["Tiếng H'roi"] = "hro",
["Tiếng Hachijō"] = "jpx-hcj",
["Tiếng Hadiyya"] = "hdy",
["Tiếng Haida"] = "hai",
["Tiếng Creole Haiti"] = "ht",
["Tiếng Hajong"] = "haj",
["Tiếng Halba"] = "hlb",
["Tiếng Halkomelem"] = "hur",
["Tiếng Hamer-Banna"] = "amf",
["Tiếng Hanunoo"] = "hnn",
["Tiếng Harari"] = "har",
["Tiếng Hatti"] = "xht",
["Tiếng Hausa"] = "ha",
["Tiếng Haush"] = "sai-hau",
["Tiếng Havasupai-Walapai-Yavapai"] = "yuf",
["Tiếng Hawaii"] = "haw",
["Tiếng Hazara"] = "haz",
["Tiếng Heiltsuk"] = "hei",
["Tiếng Hellen nguyên thủy"] = "grk-pro",
["Tiếng Herero"] = "hz",
["Tiếng Higaonon"] = "mba",
["Tiếng Hiligaynon"] = "hil",
["Tiếng Hindi"] = "hi",
["Tiếng Hindi Fiji"] = "hif",
["Tiếng Hindko Bắc"] = "hno",
["Tiếng Hindustan Caribe"] = "hns",
["Tiếng Hiri Motu"] = "ho",
["Tiếng Hitti"] = "hit",
["Tiếng Hlai"] = "lic",
["Tiếng Hlai nguyên thủy"] = "qfa-lic-pro",
["Tiếng Ho"] = "hoc",
["Tiếng Hoava"] = "hoa",
["Tiếng Hocak"] = "win",
["Tiếng Horpa"] = "ero",
["Tiếng Hozo"] = "hoz",
["Tiếng Hpon"] = "hpo",
["Tiếng Hrê"] = "hre",
["Tiếng Hu"] = "huo",
["Tiếng Hulaulá"] = "huy",
["Tiếng Hungary"] = "hu",
["Tiếng Hunsrik"] = "hrx",
["Tiếng Hunzib"] = "huz",
["Tiếng Hupa"] = "hup",
["Tiếng Hurri"] = "xhu",
["Tiếng Huy"] = "czh",
["Tiếng Hy Lạp"] = "el",
["Tiếng Hy Lạp Cappadocia"] = "cpg",
["Tiếng Hy Lạp Italiot"] = "grk-ita",
["Tiếng Hy Lạp Mariupol"] = "grk-mar",
["Tiếng Hy Lạp Pontos"] = "pnt",
["Tiếng Hy Lạp cổ"] = "grc",
["Tiếng Hyam"] = "jab",
["Tiếng Hà Lan"] = "nl",
["Tiếng Hà Lan Jersey"] = "gmw-jdt",
["Tiếng Hà Lan cổ"] = "odt",
["Tiếng Hà Lan trung đại"] = "dum",
["Tiếng Hà Lăng"] = "hal",
["Tiếng Hà Nhì"] = "hni",
["Tiếng Hán thượng cổ"] = "och",
["Tiếng Hán trung cổ"] = "ltc",
["Tiếng Hán-Tạng nguyên thủy"] = "sit-pro",
["Tiếng Hạ Sorb"] = "dsb",
["Tiếng Hạ Đức"] = "nds",
["Tiếng Hạ Đức Mennonite"] = "pdt",
["Tiếng Hạ Đức trung đại"] = "gml",
["Tiếng Hạ Đức tại Đức"] = "nds-de",
["Tiếng Iaai"] = "iai",
["Tiếng Ibaloi"] = "ibl",
["Tiếng Iban"] = "iba",
["Tiếng Ibatan"] = "ivb",
["Tiếng Ibibio"] = "ibb",
["Tiếng Ibino"] = "ibn",
["Tiếng Ibuoro"] = "ibr",
["Tiếng Iceland"] = "is",
["Tiếng Ido"] = "io",
["Tiếng Ifè"] = "ife",
["Tiếng Igala"] = "igl",
["Tiếng Igbo"] = "ig",
["Tiếng Ikwere"] = "ikw",
["Tiếng Ili Turki"] = "ili",
["Tiếng Ilokano"] = "ilo",
["Tiếng Indo-Bồ Đào Nha"] = "idb",
["Tiếng Indonesia"] = "id",
["Tiếng Indonesia Peranakan"] = "pea",
["Tiếng Ingria"] = "izh",
["Tiếng Ingush"] = "inh",
["Tiếng Inor"] = "ior",
["Tiếng Interlingue"] = "ie",
["Tiếng Intha"] = "int",
["Tiếng Inuit nguyên thủy"] = "esx-inu-pro",
["Tiếng Inuktitut"] = "iu",
["Tiếng Inupiaq"] = "ik",
["Tiếng Iran nguyên thủy"] = "ira-pro",
["Tiếng Iraqw"] = "irk",
["Tiếng Ireland"] = "ga",
["Tiếng Ireland cổ"] = "sga",
["Tiếng Ireland trung đại"] = "mga",
["Tiếng Iroquois nguyên thủy"] = "iro-pro",
["Tiếng Isan"] = "tts",
["Tiếng Isnag"] = "isd",
["Tiếng Isoko"] = "iso",
["Tiếng Istria"] = "ist",
["Tiếng Istria Rumani"] = "ruo",
["Tiếng Italic nguyên thủy"] = "itc-pro",
["Tiếng Itaŋikom"] = "bkm",
["Tiếng Itelmen"] = "itl",
["Tiếng Itonama"] = "ito",
["Tiếng Itsekiri"] = "its",
["Tiếng Itu Mbon Uzo"] = "itm",
["Tiếng Ivatan"] = "ivv",
["Tiếng Iwaidja"] = "ibd",
["Tiếng Ixil"] = "ixl",
["Tiếng Jacaltec"] = "jac",
["Tiếng Jah Hut"] = "jah",
["Tiếng Jamamadí"] = "jaa",
["Tiếng Japhug"] = "sit-jap",
["Tiếng Jaqaru"] = "jqr",
["Tiếng Jarawa"] = "anq",
["Tiếng Java"] = "jv",
["Tiếng Java Caribe"] = "jvn",
["Tiếng Java cổ"] = "kaw",
["Tiếng Javindo"] = "jvd",
["Tiếng Jehai"] = "jhi",
["Tiếng Jeju"] = "jje",
["Tiếng Jiiddu"] = "jii",
["Tiếng Jru'"] = "lbo",
["Tiếng Juang"] = "jun",
["Tiếng Jumjum"] = "jum",
["Tiếng Juǀ'hoan"] = "ktz",
["Tiếng Jylland"] = "jut",
["Tiếng Jê Bắc nguyên thủy"] = "sai-nje-pro",
["Tiếng Jê nguyên thủy"] = "sai-jee-pro",
["Tiếng K'Ho"] = "kpm",
["Tiếng K'iche'"] = "quc",
["Tiếng Kabardia"] = "kbd",
["Tiếng Kabiye"] = "kbp",
["Tiếng Kabyle"] = "kab",
["Tiếng Kachin"] = "kac",
["Tiếng Kadu"] = "zkd",
["Tiếng Kafa"] = "kbr",
["Tiếng Kaingang"] = "kgp",
["Tiếng Kakabai"] = "kqf",
["Tiếng Kalam"] = "gwc",
["Tiếng Kalao"] = "kly",
["Tiếng Kalash"] = "kls",
["Tiếng Kalinga Limos"] = "kmk",
["Tiếng Kalmyk"] = "xal",
["Tiếng Kalo Phần Lan"] = "rmf",
["Tiếng Kamassia"] = "xas",
["Tiếng Kambaata"] = "ktb",
["Tiếng Kanakanavu"] = "xnb",
["Tiếng Kangean"] = "kkv",
["Tiếng Kannada"] = "kn",
["Tiếng Kannauj"] = "bjj",
["Tiếng Kanuri"] = "kr",
["Tiếng Kapampangan"] = "pam",
["Tiếng Kapingamarangi"] = "kpg",
["Tiếng Karachay-Balkar"] = "krc",
["Tiếng Karaim"] = "kdr",
["Tiếng Karajá"] = "kpj",
["Tiếng Karakalpak"] = "kaa",
["Tiếng Karakhanid"] = "xqa",
["Tiếng Karao"] = "kyj",
["Tiếng Karata"] = "kpt",
["Tiếng Karbi"] = "mjw",
["Tiếng Karelia"] = "krl",
["Tiếng Karen Bwe"] = "bwe",
["Tiếng Karen Geba"] = "kvq",
["Tiếng Karen Geko"] = "ghk",
["Tiếng Karen Mobwa"] = "jkm",
["Tiếng Karen Paku"] = "jkp",
["Tiếng Karen S'gaw"] = "ksw",
["Tiếng Karen nguyên thủy"] = "kar-pro",
["Tiếng Kari'na"] = "car",
["Tiếng Kartvelia nguyên thủy"] = "ccs-pro",
["Tiếng Kashaya"] = "kju",
["Tiếng Kashmir"] = "ks",
["Tiếng Kaszëb"] = "csb",
["Tiếng Katang Bắc"] = "ncq",
["Tiếng Kavalan"] = "ckv",
["Tiếng Kavet"] = "krv",
["Tiếng Kawésqar"] = "alc",
["Tiếng Kayapó"] = "txu",
["Tiếng Kayort"] = "kyv",
["Tiếng Kazakh"] = "kk",
["Tiếng Kensiu"] = "kns",
["Tiếng Ket"] = "ket",
["Tiếng Khakas"] = "kjh",
["Tiếng Khalaj"] = "klj",
["Tiếng Khaling"] = "klr",
["Tiếng Kham Gamale"] = "kgj",
["Tiếng Kham Parbate Tây"] = "kjl",
["Tiếng Kham Parbate Đông"] = "kif",
["Tiếng Khamti"] = "kht",
["Tiếng Khamyang"] = "ksu",
["Tiếng Khang Gia"] = "kxs",
["Tiếng Khanty"] = "kca",
["Tiếng Kharia"] = "khr",
["Tiếng Khasa Prakrit"] = "inc-kha",
["Tiếng Khasi"] = "kha",
["Tiếng Khasi nguyên thủy"] = "aav-khs-pro",
["Tiếng Khazar"] = "zkz",
["Tiếng Khengkha"] = "xkf",
["Tiếng Khiamniungan"] = "kix",
["Tiếng Khinalug"] = "kjj",
["Tiếng Khiết Đan"] = "zkt",
["Tiếng Khmer"] = "km",
["Tiếng Khmer Surin"] = "kxm",
["Tiếng Khmer cổ"] = "okz",
["Tiếng Khmer nguyên thủy"] = "mkh-kmr-pro",
["Tiếng Khmer trung đại"] = "xhm",
["Tiếng Khoekhoe"] = "naq",
["Tiếng Khowar"] = "khw",
["Tiếng Khuen"] = "khf",
["Tiếng Khvarshi"] = "khv",
["Tiếng Khwarezm"] = "xco",
["Tiếng Khách Gia"] = "hak",
["Tiếng Kháng"] = "kjm",
["Tiếng Khün"] = "kkh",
["Tiếng Khùa"] = "xhv",
["Tiếng Khơ Mú"] = "kjg",
["Tiếng Khơ Mú nguyên thủy"] = "mkh-khm-pro",
["Tiếng Khương Bắc"] = "cng",
["Tiếng Kickapoo"] = "kic",
["Tiếng Kikai"] = "kzg",
["Tiếng Kili"] = "tuw-kil",
["Tiếng Kim Môn"] = "mji",
["Tiếng Kimbundu"] = "kmb",
["Tiếng Kintaq"] = "knq",
["Tiếng Kiowa"] = "kio",
["Tiếng Kiribati"] = "gil",
["Tiếng Kirike"] = "okr",
["Tiếng Kisan"] = "xis",
["Tiếng Kistane"] = "gru",
["Tiếng Kituba"] = "ktu",
["Tiếng Klallam"] = "clm",
["Tiếng Klingon"] = "tlh",
["Tiếng Knaan"] = "czk",
["Tiếng Kobon"] = "kpw",
["Tiếng Koch"] = "kdq",
["Tiếng Koda"] = "cdz",
["Tiếng Kodava"] = "kfa",
["Tiếng Kohistan"] = "mvy",
["Tiếng Koibal"] = "zkb",
["Tiếng Kok Borok"] = "trp",
["Tiếng Kolami"] = "kfb",
["Tiếng Kolhe"] = "ekl",
["Tiếng Koli Parkar"] = "kvx",
["Tiếng Koli Wadiyara"] = "kxp",
["Tiếng Komi cổ"] = "urj-koo",
["Tiếng Komi-Permyak"] = "koi",
["Tiếng Komi-Zyrian"] = "kpv",
["Tiếng Kongo"] = "kg",
["Tiếng Konkan"] = "kok",
["Tiếng Konso"] = "kxc",
["Tiếng Koonzime"] = "ozm",
["Tiếng Koore"] = "kqy",
["Tiếng Koraga Korra"] = "kfd",
["Tiếng Koraga Mudu"] = "vmd",
["Tiếng Korku"] = "kfq",
["Tiếng Koryak"] = "kpy",
["Tiếng Kosrae"] = "kos",
["Tiếng Kotava"] = "avk",
["Tiếng Kraol"] = "rka",
["Tiếng Krio"] = "kri",
["Tiếng Krung"] = "krr",
["Tiếng Krymchak"] = "jct",
["Tiếng Kryts"] = "kry",
["Tiếng Kudmal"] = "kyw",
["Tiếng Kui Dawik"] = "dwk",
["Tiếng Kukna"] = "kex",
["Tiếng Kullu"] = "kfx",
["Tiếng Kulon-Pazeh"] = "uun",
["Tiếng Kumbewaha"] = "xks",
["Tiếng Kumyk"] = "kum",
["Tiếng Kumzar"] = "zum",
["Tiếng Kundal Shahi"] = "shd",
["Tiếng Kunigami"] = "xug",
["Tiếng Kurmanji"] = "kmr",
["Tiếng Kurtokha"] = "xkz",
["Tiếng Kurumba Attapady"] = "pkr",
["Tiếng Kutch"] = "kfr",
["Tiếng Kuvi"] = "kxv",
["Tiếng Kuy"] = "kdt",
["Tiếng Kw'adza"] = "wka",
["Tiếng Kwak'wala"] = "kwk",
["Tiếng Kwanyama"] = "kj",
["Tiếng Kyakala"] = "tuw-kkl",
["Tiếng Kyrgyz"] = "ky",
["Tiếng Kyrgyz Phú Dụ"] = "trk-fyk",
["Tiếng Kâte"] = "kmg",
["Tiếng La Hủ"] = "lhu",
["Tiếng Ladakh"] = "lbj",
["Tiếng Ladin"] = "lld",
["Tiếng Ladino"] = "lad",
["Tiếng Lahnda"] = "lah",
["Tiếng Lak"] = "lbe",
["Tiếng Lakota"] = "lkt",
["Tiếng Lambadi"] = "lmn",
["Tiếng Lamboya"] = "lmy",
["Tiếng Lanoh"] = "lnh",
["Tiếng Laomian"] = "lwm",
["Tiếng Lar"] = "lrl",
["Tiếng Lasalimu"] = "llm",
["Tiếng Lashi"] = "lsi",
["Tiếng Latgale"] = "ltg",
["Tiếng Latinh"] = "la",
["Tiếng Latundê"] = "ltn",
["Tiếng Latvia"] = "lv",
["Tiếng Lavukaleve"] = "lvk",
["Tiếng Lawa Tây"] = "lcp",
["Tiếng Lawa Đông"] = "lwl",
["Tiếng Laz"] = "lzz",
["Tiếng Lemnos"] = "xle",
["Tiếng Lepcha"] = "lep",
["Tiếng Leponti"] = "xlp",
["Tiếng Lezghi nguyên thủy"] = "cau-lzg-pro",
["Tiếng Lezgi"] = "lez",
["Tiếng Lhao Vo"] = "mhx",
["Tiếng Liabuku"] = "lix",
["Tiếng Libido"] = "liq",
["Tiếng Liguria"] = "lij",
["Tiếng Lillooet"] = "lil",
["Tiếng Limburg"] = "li",
["Tiếng Lingala"] = "ln",
["Tiếng Lishana Deni"] = "lsd",
["Tiếng Lishanid Noshan"] = "aij",
["Tiếng Lisu"] = "lis",
["Tiếng Litva"] = "lt",
["Tiếng Livonia"] = "liv",
["Tiếng Livvi"] = "olo",
["Tiếng Lojban"] = "jbo",
["Tiếng Lokono"] = "arw",
["Tiếng Lombard"] = "lmo",
["Tiếng Lou"] = "loj",
["Tiếng Luba-Katanga"] = "lu",
["Tiếng Luganda"] = "lg",
["Tiếng Lur Bắc"] = "lrc",
["Tiếng Lur Nam"] = "luz",
["Tiếng Lushootseed"] = "lut",
["Tiếng Luwi"] = "xlu",
["Tiếng Luxembourg"] = "lb",
["Tiếng Lydia"] = "xld",
["Tiếng Lyngngam"] = "lyg",
["Tiếng Lyydi"] = "lud",
["Tiếng Lào"] = "lo",
["Tiếng Lô Lô"] = "ii",
["Tiếng Lư Nhân"] = "sit-lrn",
["Tiếng Lự"] = "khb",
["Tiếng M'Nông Nam"] = "mnn",
["Tiếng M'Nông Trung"] = "cmo",
["Tiếng M'Nông Đông"] = "mng",
["Tiếng Ma Thoa"] = "nru",
["Tiếng Ma'anyan"] = "mhy",
["Tiếng Maaka"] = "mew",
["Tiếng Maale"] = "mdy",
["Tiếng Maasai"] = "mas",
["Tiếng Mabang"] = "mde",
["Tiếng Macedoni"] = "mk",
["Tiếng Macedoni cổ đại"] = "xmk",
["Tiếng Macushi"] = "mbc",
["Tiếng Madura"] = "mad",
["Tiếng Magar Tây"] = "mrd",
["Tiếng Magar Đông"] = "mgp",
["Tiếng Magori"] = "zgr",
["Tiếng Maguindanao"] = "mdh",
["Tiếng Mah Meri"] = "mhe",
["Tiếng Mahal"] = "mjx",
["Tiếng Maithil"] = "mai",
["Tiếng Malagasy"] = "mg",
["Tiếng Malayalam"] = "ml",
["Tiếng Malta"] = "mt",
["Tiếng Mampruli"] = "maw",
["Tiếng Man"] = "gv",
["Tiếng Manda (Ấn Độ)"] = "mha",
["Tiếng Mandara"] = "tbf",
["Tiếng Mandinka"] = "mnk",
["Tiếng Mangas"] = "zns",
["Tiếng Manggarai"] = "mqy",
["Tiếng Mangghuer"] = "xgn-mgr",
["Tiếng Manipur"] = "mni",
["Tiếng Mankanya"] = "knf",
["Tiếng Mano"] = "mev",
["Tiếng Mansi nguyên thủy"] = "mns-pro",
["Tiếng Manumanaw"] = "kxf",
["Tiếng Mao Nam"] = "mmd",
["Tiếng Maori"] = "mi",
["Tiếng Mapuche"] = "arn",
["Tiếng Marathi"] = "mr",
["Tiếng Mari Đông"] = "mhr",
["Tiếng Marma"] = "rmz",
["Tiếng Marshall"] = "mh",
["Tiếng Marwar"] = "mwr",
["Tiếng Mator"] = "mtm",
["Tiếng Maya Yucatán"] = "yua",
["Tiếng Maya nguyên thủy"] = "myn-pro",
["Tiếng Mazahua Michoacán"] = "mmc",
["Tiếng Mazahua Trung"] = "maz",
["Tiếng Mazandaran"] = "mzn",
["Tiếng Mbabaram"] = "vmb",
["Tiếng Me'en"] = "mym",
["Tiếng Media cổ"] = "xme-old",
["Tiếng Medumba"] = "byv",
["Tiếng Mehri"] = "gdq",
["Tiếng Memon"] = "mby",
["Tiếng Mende"] = "men",
["Tiếng Meriam"] = "ulk",
["Tiếng Mi'kmaq"] = "mic",
["Tiếng Miami"] = "mia",
["Tiếng Mingrelia"] = "xmf",
["Tiếng Minriq"] = "mnq",
["Tiếng Mintil"] = "mzt",
["Tiếng Miranda"] = "mwl",
["Tiếng Mixtec Chayuco"] = "mih",
["Tiếng Miyako"] = "mvi",
["Tiếng Mizo"] = "lus",
["Tiếng Miến Điện"] = "my",
["Tiếng Miến Điện cổ"] = "obr",
["Tiếng Mlabri"] = "mra",
["Tiếng Mogholi"] = "mhj",
["Tiếng Moglena-Rumani"] = "ruq",
["Tiếng Mohawk"] = "moh",
["Tiếng Moken"] = "mwt",
["Tiếng Mokil"] = "mkj",
["Tiếng Moklen"] = "mkm",
["Tiếng Moksha"] = "mdf",
["Tiếng Mongghul"] = "xgn-mgl",
["Tiếng Mooré"] = "mos",
["Tiếng Mordvin nguyên thủy"] = "urj-mdv-pro",
["Tiếng Morokodo"] = "mgc",
["Tiếng Motu"] = "meu",
["Tiếng Mozarab"] = "mxi",
["Tiếng Muak Sa-aak"] = "ukk",
["Tiếng Munda nguyên thủy"] = "mun-pro",
["Tiếng Mundari"] = "unr",
["Tiếng Munji"] = "mnj",
["Tiếng Mursi"] = "muz",
["Tiếng Muscogee"] = "mus",
["Tiếng Muskogee nguyên thủy"] = "nai-mus-pro",
["Tiếng Mwotlap"] = "mlv",
["Tiếng Mân Bắc"] = "mnp",
["Tiếng Mân Nam"] = "nan",
["Tiếng Mân Trung"] = "czo",
["Tiếng Mân Tuyền Chương"] = "nan-hbl",
["Tiếng Mân nguyên thủy"] = "zhx-min-pro",
["Tiếng Mân Đông"] = "cdo",
["Tiếng Mã Lai"] = "ms",
["Tiếng Mã Lai Ambon"] = "abs",
["Tiếng Mã Lai Baba"] = "mbf",
["Tiếng Mã Lai Brunei"] = "kxd",
["Tiếng Mã Lai Bắc Maluku"] = "max",
["Tiếng Mã Lai cổ"] = "omy",
["Tiếng Mã Lai nguyên thủy"] = "poz-mly-pro",
["Tiếng Mã Lai-Chăm nguyên thủy"] = "poz-mcm-pro",
["Tiếng Mã Lai-Sumbawa nguyên thủy"] = "poz-msa-pro",
["Tiếng Mã Lai-Đa Đảo Trung Đông nguyên thủy"] = "poz-cet-pro",
["Tiếng Mã Lai-Đa Đảo nguyên thủy"] = "poz-pro",
["Tiếng Mã Lai-Đa Đảo Đông nguyên thủy"] = "pqe-pro",
["Tiếng Mã Liềng"] = "pkt",
["Tiếng Mãn Châu"] = "mnc",
["Tiếng Môn"] = "mnw",
["Tiếng Môn Thái"] = "mnw-tha",
["Tiếng Môn cổ"] = "omx",
["Tiếng Môn nguyên thủy"] = "mkh-mnc-pro",
["Tiếng Môn trung đại"] = "mkh-mmn",
["Tiếng Môn-Khmer nguyên thủy"] = "mkh-pro",
["Tiếng Mông"] = "hmf",
["Tiếng Mông Cổ"] = "mn",
["Tiếng Mông Cổ Khamnigan"] = "ykh",
["Tiếng Mông Cổ cổ điển"] = "cmg",
["Tiếng Mông Cổ nguyên thủy"] = "xgn-pro",
["Tiếng Mông Cổ trung đại"] = "xng",
["Tiếng Mông Trắng"] = "mww",
["Tiếng Mơ Nâm"] = "moo",
["Tiếng Mường"] = "mtq",
["Tiếng Mạ"] = "cma",
["Tiếng Mảng"] = "zng",
["Tiếng Na Miểu"] = "neo",
["Tiếng Na Uy"] = "no",
["Tiếng Na Uy (Bokmål)"] = "nb",
["Tiếng Na Uy (Nynorsk)"] = "nn",
["Tiếng Naga Chothe"] = "nct",
["Tiếng Nahuatl"] = "nah",
["Tiếng Nahuatl Temascaltepec"] = "nhv",
["Tiếng Nahuatl cổ điển"] = "nci",
["Tiếng Nakh nguyên thủy"] = "cau-nkh-pro",
["Tiếng Nam Altai"] = "alt",
["Tiếng Nam Amami Ōshima"] = "ams",
["Tiếng Nam Kolami"] = "nit",
["Tiếng Nam Mansi"] = "mns-sou",
["Tiếng Nam Ndebele"] = "nr",
["Tiếng Nam Sami"] = "sma",
["Tiếng Nam Slavey"] = "xsl",
["Tiếng Nam Thái"] = "sou",
["Tiếng Nam Uzbek"] = "uzs",
["Tiếng Nam Yukaghir"] = "yux",
["Tiếng Nam Á nguyên thủy"] = "aav-pro",
["Tiếng Nam Đảo nguyên thủy"] = "map-pro",
["Tiếng Nam Động"] = "kmc",
["Tiếng Nanai"] = "gld",
["Tiếng Napoli"] = "nap",
["Tiếng Nauru"] = "na",
["Tiếng Navajo"] = "nv",
["Tiếng Ndogo"] = "ndz",
["Tiếng Ndonga"] = "ng",
["Tiếng Nefusa"] = "jbn",
["Tiếng Negerhollands"] = "dcr",
["Tiếng Negidal"] = "neg",
["Tiếng Nenets lãnh nguyên"] = "yrk",
["Tiếng Nepal"] = "ne",
["Tiếng Newa"] = "new",
["Tiếng Nga"] = "ru",
["Tiếng Ngalum"] = "szb",
["Tiếng Nganasan"] = "nio",
["Tiếng Ngas"] = "anc",
["Tiếng Ngiemboon"] = "nnh",
["Tiếng Ngomba"] = "jgo",
["Tiếng Nguồn"] = "nuo",
["Tiếng Ngô"] = "wuu",
["Tiếng Ngũ Đồn"] = "wuh",
["Tiếng Nha Lang"] = "yrn",
["Tiếng Nheengatu"] = "yrl",
["Tiếng Nhu Nhiên"] = "qfa-xgx-rou",
["Tiếng Nhĩ Tô"] = "ers",
["Tiếng Nhật"] = "ja",
["Tiếng Nhật Bản nguyên thủy"] = "jpx-pro",
["Tiếng Nhật cổ"] = "ojp",
["Tiếng Nias"] = "nia",
["Tiếng Nicobar Car"] = "caq",
["Tiếng Nicobar Nam"] = "nik",
["Tiếng Nicobar Trung"] = "ncb",
["Tiếng Nicobar nguyên thủy"] = "aav-nic-pro",
["Tiếng Niue"] = "niu",
["Tiếng Nivkh"] = "niv",
["Tiếng Nkari"] = "nkz",
["Tiếng Nkonya"] = "nko",
["Tiếng Nobiin"] = "fia",
["Tiếng Nogai"] = "nog",
["Tiếng Noreia"] = "nrc",
["Tiếng Norman"] = "nrf",
["Tiếng Novgorod cổ"] = "zle-ono",
["Tiếng Novial"] = "nov",
["Tiếng Nubaca"] = "baf",
["Tiếng Nubi"] = "kcn",
["Tiếng Nuer"] = "nus",
["Tiếng Nuu-chah-nulth"] = "nuk",
["Tiếng Nyah Kur"] = "cbn",
["Tiếng Nyaw"] = "nyw",
["Tiếng Nyeu"] = "nyl",
["Tiếng Nùng"] = "nut",
["Tiếng Nùng Vẻn"] = "enc",
["Tiếng Nạp Tây"] = "nxq",
["Tiếng Nữ Chân"] = "juc",
["Tiếng O'odham"] = "ood",
["Tiếng Ocaina"] = "oca",
["Tiếng Occitan"] = "oc",
["Tiếng Occitan cổ"] = "pro",
["Tiếng Ogbronuagum"] = "ogu",
["Tiếng Oirat"] = "xwo",
["Tiếng Ojibwe"] = "oj",
["Tiếng Okanagan"] = "oka",
["Tiếng Okinawa"] = "ryu",
["Tiếng Okinoerabu"] = "okn",
["Tiếng Olukumi"] = "ulb",
["Tiếng Omaha-Ponca"] = "oma",
["Tiếng Omok"] = "omk",
["Tiếng Oriya"] = "or",
["Tiếng Oriya Adiwasi"] = "ort",
["Tiếng Orma"] = "orc",
["Tiếng Ormu"] = "orz",
["Tiếng Ormur"] = "oru",
["Tiếng Oroch"] = "oac",
["Tiếng Orok"] = "oaa",
["Tiếng Oromo"] = "om",
["Tiếng Oromo Nam"] = "gax",
["Tiếng Oromo Đông"] = "hae",
["Tiếng Oroqen"] = "orh",
["Tiếng Osage"] = "osa",
["Tiếng Osatu"] = "ost",
["Tiếng Osci"] = "osc",
["Tiếng Ossetia"] = "os",
["Tiếng Ossetia cổ"] = "oos",
["Tiếng Otomi Mezquital"] = "ote",
["Tiếng Otuke"] = "otu",
["Tiếng Pa Kô"] = "pac",
["Tiếng Pa'O"] = "blk",
["Tiếng Paharia Kumarbhag"] = "kmj",
["Tiếng Paharia Sauria"] = "mjt",
["Tiếng Paite"] = "pck",
["Tiếng Paiwan"] = "pwn",
["Tiếng Pakan nguyên thủy"] = "mkh-pkn-pro",
["Tiếng Pala"] = "plq",
["Tiếng Palau"] = "pau",
["Tiếng Palaung Ruching"] = "pce",
["Tiếng Palaung Rumai"] = "rbb",
["Tiếng Palaung Shwe"] = "pll",
["Tiếng Palaung nguyên thủy"] = "mkh-pal-pro",
["Tiếng Palawano Brooke's Point"] = "plw",
["Tiếng Pali"] = "pi",
["Tiếng Pama-Nyungar nguyên thủy"] = "aus-pam-pro",
["Tiếng Pancana"] = "pnp",
["Tiếng Panchpargania"] = "tdb",
["Tiếng Pangasinan"] = "pag",
["Tiếng Pangwala"] = "pgg",
["Tiếng Papiamento"] = "pap",
["Tiếng Parauk"] = "prk",
["Tiếng Parthia"] = "xpr",
["Tiếng Pashtun"] = "ps",
["Tiếng Pathan nguyên thủy"] = "ira-pat-pro",
["Tiếng Pauna"] = "pnk",
["Tiếng Pawnee"] = "paw",
["Tiếng Pazeh"] = "pzh",
["Tiếng Pear"] = "pcb",
["Tiếng Pear nguyên thủy"] = "mkh-pea-pro",
["Tiếng Pecheneg"] = "xpc",
["Tiếng Pela"] = "bxd",
["Tiếng Pemon"] = "aoc",
["Tiếng Pengo"] = "peg",
["Tiếng Perm nguyên thủy"] = "urj-prm-pro",
["Tiếng Petjo"] = "pey",
["Tiếng Phai"] = "prt",
["Tiếng Phake"] = "phk",
["Tiếng Phalura"] = "phl",
["Tiếng Phi-Á nguyên thủy"] = "afa-pro",
["Tiếng Philippines nguyên thủy"] = "phi-pro",
["Tiếng Phoenicia"] = "phn",
["Tiếng Phong-Kniang"] = "pnx",
["Tiếng Phrygia"] = "xpg",
["Tiếng Phu Thái"] = "pht",
["Tiếng Phuan"] = "phu",
["Tiếng Pháp"] = "fr",
["Tiếng Pháp cổ"] = "fro",
["Tiếng Pháp trung đại"] = "frm",
["Tiếng Phạn"] = "sa",
["Tiếng Phần Lan"] = "fi",
["Tiếng Phổ Hiền"] = "cpx",
["Tiếng Phổ cổ"] = "prg",
["Tiếng Picard"] = "pcd",
["Tiếng Piceni Nam"] = "spx",
["Tiếng Piemonte"] = "pms",
["Tiếng Pilagá"] = "plg",
["Tiếng Pinyin"] = "pny",
["Tiếng Pipil"] = "ppl",
["Tiếng Pnar"] = "pbv",
["Tiếng Pohnpei"] = "pon",
["Tiếng Polabia"] = "pox",
["Tiếng Ponosakan"] = "pns",
["Tiếng Popoluca cao nguyên"] = "poi",
["Tiếng Potawatomi"] = "pot",
["Tiếng Prakrit"] = "pra",
["Tiếng Prakrit Ashoka"] = "inc-ash",
["Tiếng Prakrit Niya"] = "pra-niy",
["Tiếng Prakrit Paisaci"] = "inc-psc",
["Tiếng Prakrit Saurasen"] = "psu",
["Tiếng Prasuni"] = "prn",
["Tiếng Pucikwar"] = "apq",
["Tiếng Punic"] = "xpu",
["Tiếng Punjab"] = "pa",
["Tiếng Puyuma"] = "pyu",
["Tiếng Pwo Bắc"] = "pww",
["Tiếng Pwo Phrae"] = "kjt",
["Tiếng Pwo Tây"] = "pwo",
["Tiếng Pwo Đông"] = "kjp",
["Tiếng Pà Thẻn"] = "pha",
["Tiếng Pọng"] = "hnu",
["Tiếng Qashqai"] = "qxq",
["Tiếng Quan Thoại"] = "cmn",
["Tiếng Quapaw"] = "qua",
["Tiếng Quechua"] = "qu",
["Tiếng Quenya"] = "qya",
["Tiếng Quiripi"] = "qyp",
["Tiếng Quảng Đông"] = "yue",
["Tiếng Ra Glai Bắc"] = "rog",
["Tiếng Ra Glai Cát Gia"] = "roc",
["Tiếng Ra Glai Nam"] = "rgs",
["Tiếng Rabha"] = "rah",
["Tiếng Raetia"] = "xrr",
["Tiếng Rajasthan"] = "raj",
["Tiếng Rajbanshi"] = "rjs",
["Tiếng Rakhine"] = "rki",
["Tiếng Rama"] = "rma",
["Tiếng Rangpur"] = "rkt",
["Tiếng Rapa Nui"] = "rap",
["Tiếng Rarotonga"] = "rar",
["Tiếng Rasawa"] = "rac",
["Tiếng Raute"] = "rau",
["Tiếng Ravula"] = "yea",
["Tiếng Rawang"] = "raw",
["Tiếng Rejang"] = "rej",
["Tiếng Rendille"] = "rel",
["Tiếng Rohingya"] = "rhg",
["Tiếng Romagnol"] = "rgn",
["Tiếng Romansh"] = "rm",
["Tiếng Rukai"] = "dru",
["Tiếng Rumani"] = "ro",
["Tiếng Rungus"] = "drg",
["Tiếng Rusnak"] = "rsk",
["Tiếng Rusyn"] = "rue",
["Tiếng Ruthenia cổ"] = "zle-ort",
["Tiếng Rutul"] = "rut",
["Tiếng Rơ Măm"] = "rmx",
["Tiếng Rơ Ngao"] = "ren",
["Tiếng Saanich"] = "str",
["Tiếng Saaroa"] = "sxr",
["Tiếng Saba"] = "xsa",
["Tiếng Sabüm"] = "sbo",
["Tiếng Sadri"] = "sck",
["Tiếng Saek"] = "skb",
["Tiếng Saho"] = "ssy",
["Tiếng Saisiyat"] = "xsy",
["Tiếng Sakizaya"] = "szy",
["Tiếng Salar"] = "slr",
["Tiếng Salish nguyên thủy"] = "sal-pro",
["Tiếng Sami Akkala"] = "sia",
["Tiếng Sami Inari"] = "smn",
["Tiếng Sami Kildin"] = "sjd",
["Tiếng Sami Skolt"] = "sms",
["Tiếng Sami Ume"] = "sju",
["Tiếng Sami nguyên thủy"] = "smi-pro",
["Tiếng Samoa"] = "sm",
["Tiếng Samogitia"] = "sgs",
["Tiếng Samoyed nguyên thủy"] = "syd-pro",
["Tiếng Samtao"] = "stu",
["Tiếng Sango"] = "sg",
["Tiếng Santal"] = "sat",
["Tiếng Saposa"] = "sps",
["Tiếng Saraiki"] = "skr",
["Tiếng Saramacca"] = "srm",
["Tiếng Sardegna"] = "sc",
["Tiếng Saxon cổ"] = "osx",
["Tiếng Scots"] = "sco",
["Tiếng Sebat Bet Gurage"] = "sgw",
["Tiếng Selkup"] = "sel",
["Tiếng Semai"] = "sea",
["Tiếng Semaq Beri"] = "szc",
["Tiếng Semelai"] = "sza",
["Tiếng Semit nguyên thủy"] = "sem-pro",
["Tiếng Semnam"] = "ssm",
["Tiếng Seneca"] = "see",
["Tiếng Senni Koyraboro"] = "ses",
["Tiếng Senoufo Nyarafolo"] = "sev",
["Tiếng Serbia-Croatia"] = "sh",
["Tiếng Seri"] = "sei",
["Tiếng Seze"] = "sze",
["Tiếng Shan"] = "shn",
["Tiếng Sherpa"] = "xsr",
["Tiếng Shina"] = "scl",
["Tiếng Shina Kohistan"] = "plk",
["Tiếng Sholaga"] = "sle",
["Tiếng Shompen"] = "sii",
["Tiếng Shona"] = "sn",
["Tiếng Shor"] = "cjs",
["Tiếng Shuswap"] = "shs",
["Tiếng Sicel"] = "scx",
["Tiếng Sicily"] = "scn",
["Tiếng Sidamo"] = "sid",
["Tiếng Sikkim"] = "sip",
["Tiếng Silesia"] = "szl",
["Tiếng Siltʼe"] = "stv",
["Tiếng Sindh"] = "sd",
["Tiếng Bidayuh Bau"] = "sne",
["Tiếng Sinhala"] = "si",
["Tiếng Sioux nguyên thủy"] = "sio-pro",
["Tiếng Siraya"] = "fos",
["Tiếng Sissano"] = "sso",
["Tiếng Siwi"] = "siz",
["Tiếng Skepi"] = "skw",
["Tiếng Slav Giáo hội"] = "zls-chs",
["Tiếng Slav Giáo hội cổ"] = "cu",
["Tiếng Slav nguyên thủy"] = "sla-pro",
["Tiếng Slav Đông cổ"] = "orv",
["Tiếng Slovak"] = "sk",
["Tiếng Slovene"] = "sl",
["Tiếng Slovincia"] = "zlw-slv",
["Tiếng Socotra"] = "sqt",
["Tiếng Sogdia"] = "sog",
["Tiếng Sogdia nguyên thủy"] = "ira-sgc-pro",
["Tiếng Sokna"] = "swn",
["Tiếng Solon"] = "tuw-sol",
["Tiếng Solong"] = "aaw",
["Tiếng Somali"] = "so",
["Tiếng Sonsorol"] = "sov",
["Tiếng Sora"] = "srb",
["Tiếng Soran"] = "ckb",
["Tiếng Sotho"] = "st",
["Tiếng Sotho Bắc"] = "nso",
["Tiếng Soyot"] = "trk-soy",
["Tiếng Sranan Tongo"] = "srn",
["Tiếng Sumer"] = "sux",
["Tiếng Sunda"] = "su",
["Tiếng Sunda cổ"] = "osn",
["Tiếng Suri"] = "suq",
["Tiếng Surjapur"] = "sjp",
["Tiếng Svan"] = "sva",
["Tiếng Swahili"] = "sw",
["Tiếng Swazi"] = "ss",
["Tiếng Sylhet"] = "syl",
["Tiếng Syriac cổ điển"] = "syc",
["Tiếng Sán Chay"] = "mlc",
["Tiếng Séc"] = "cs",
["Tiếng Séc cổ"] = "zlw-ocs",
["Tiếng Sô"] = "sss",
["Tiếng Taabwa"] = "tap",
["Tiếng Tabasaran"] = "tab",
["Tiếng Tachawit"] = "shy",
["Tiếng Tagal Murut"] = "mvv",
["Tiếng Tagalog"] = "tl",
["Tiếng Tagoi"] = "tag",
["Tiếng Tahiti"] = "ty",
["Tiếng Tai Loi"] = "tlq",
["Tiếng Tai Tây Nam nguyên thủy"] = "tai-swe-pro",
["Tiếng Tajik"] = "tg",
["Tiếng Tal"] = "tal",
["Tiếng Tala"] = "tak",
["Tiếng Talossa"] = "tzl",
["Tiếng Talysh"] = "tly",
["Tiếng Tamang Gorkha Đông"] = "tge",
["Tiếng Tamang Tây"] = "tdg",
["Tiếng Tamang Đông"] = "taj",
["Tiếng Tamazight Trung Atlas"] = "tzm",
["Tiếng Tamil"] = "ta",
["Tiếng Tamil cổ"] = "oty",
["Tiếng Tamki"] = "tax",
["Tiếng Tammari"] = "tbz",
["Tiếng Tampuan"] = "tpu",
["Tiếng Tanchangya"] = "tnv",
["Tiếng Tangkhul Naga"] = "nmf",
["Tiếng Tangut"] = "txg",
["Tiếng Tanimbili"] = "tbe",
["Tiếng Taos"] = "twf",
["Tiếng Tapirapé"] = "taf",
["Tiếng Tara Baka"] = "bdh",
["Tiếng Tariana"] = "tae",
["Tiếng Tarifit"] = "rif",
["Tiếng Tashelhit"] = "shi",
["Tiếng Tat-Do Thái"] = "jdt",
["Tiếng Tatar"] = "tt",
["Tiếng Tatar Crưm"] = "crh",
["Tiếng Tatar Siberia"] = "sty",
["Tiếng Tatuyo"] = "tav",
["Tiếng Taungyo"] = "tco",
["Tiếng Tause"] = "tad",
["Tiếng Tausug"] = "tsg",
["Tiếng Tavoy"] = "tvn",
["Tiếng Tay Dọ"] = "tyj",
["Tiếng Taz"] = "zhx-taz",
["Tiếng Telugu"] = "te",
["Tiếng Tem"] = "kdh",
["Tiếng Temiar"] = "tea",
["Tiếng Temoq"] = "tmo",
["Tiếng Ten'edn"] = "tnz",
["Tiếng Tenharim"] = "pah",
["Tiếng Tepehuan Đông Nam"] = "stp",
["Tiếng Teressa"] = "tef",
["Tiếng Ternate"] = "tft",
["Tiếng Tetum"] = "tet",
["Tiếng Thavưng"] = "thm",
["Tiếng Thracia"] = "txh",
["Tiếng Thác Bạt"] = "qfa-xgx-tuo",
["Tiếng Thái"] = "th",
["Tiếng Thái Hàng Tổng"] = "tpo",
["Tiếng Thái Lai"] = "tjl",
["Tiếng Thái Na"] = "tdd",
["Tiếng Thái Trắng"] = "twh",
["Tiếng Thái Song"] = "soa",
["Tiếng Thái nguyên thủy"] = "tai-pro",
["Tiếng Thái Đen"] = "blt",
["Tiếng Thái Đỏ"] = "tyr",
["Tiếng Thượng Sorb"] = "hsb",
["Tiếng Thổ"] = "tou",
["Tiếng Thổ Dục Hồn"] = "qfa-xgx-tuh",
["Tiếng Thổ Gia Bắc"] = "tji",
["Tiếng Thổ Gia Nam"] = "tjs",
["Tiếng Thổ Nhĩ Kỳ"] = "tr",
["Tiếng Thổ Nhĩ Kỳ Anatolia cổ"] = "trk-oat",
["Tiếng Thổ Nhĩ Kỳ Gagauz Balkan"] = "bgx",
["Tiếng Thổ Nhĩ Kỳ Ottoman"] = "ota",
["Tiếng Thụy Điển"] = "sv",
["Tiếng Thụy Điển cổ"] = "gmq-osw",
["Tiếng Thủy"] = "swi",
["Tiếng Tiang"] = "tbj",
["Tiếng Tigre"] = "tig",
["Tiếng Tigrinya"] = "ti",
["Tiếng Tindi"] = "tin",
["Tiếng Tiruray"] = "tiy",
["Tiếng Tiên Ti"] = "qfa-xgx-xbi",
["Tiếng Tlingit"] = "tli",
["Tiếng Tobi"] = "tox",
["Tiếng Tochari A"] = "xto",
["Tiếng Tochari B"] = "txb",
["Tiếng Tochari nguyên thủy"] = "ine-toc-pro",
["Tiếng Tocho"] = "taz",
["Tiếng Toda"] = "tcx",
["Tiếng Tofa"] = "kim",
["Tiếng Tok Pisin"] = "tpi",
["Tiếng Tokelau"] = "tkl",
["Tiếng Toki Pona"] = "tok",
["Tiếng Tokunoshima"] = "tkn",
["Tiếng Tonga"] = "to",
["Tiếng Tooro"] = "ttj",
["Tiếng Torwali"] = "trw",
["Tiếng Toto"] = "txo",
["Tiếng Tráng Tả Giang"] = "zzj",
["Tiếng Trió"] = "tri",
["Tiếng Triều Châu"] = "nan-tws",
["Tiếng Triều Tiên"] = "ko",
["Tiếng Triều Tiên cổ"] = "oko",
["Tiếng Triều Tiên nguyên thủy"] = "qfa-kor-pro",
["Tiếng Triều Tiên trung đại"] = "okm",
["Tiếng Truku"] = "trv",
["Tiếng Trung Bikol"] = "bcl",
["Tiếng Trung Mansi"] = "mns-cen",
["Tiếng Trung Nahuatl"] = "nhn",
["Tiếng Trung Nahuatl Huasteca"] = "nch",
["Tiếng Trung Quốc"] = "zh",
["Tiếng Trà Động"] = "cdy",
["Tiếng Trác Ni"] = "cda",
["Tiếng Tráng"] = "za",
["Tiếng Tráng Nông"] = "zhn",
["Tiếng Tráng Đức Tĩnh"] = "zyg",
["Tiếng Trát Bá"] = "zhb",
["Tiếng Tsakhur"] = "tkr",
["Tiếng Tsakonia"] = "tsd",
["Tiếng Tsamai"] = "tsb",
["Tiếng Tsat"] = "huq",
["Tiếng Tshangla"] = "tsj",
["Tiếng Tsimshian"] = "tsi",
["Tiếng Tsonga"] = "ts",
["Tiếng Tsou"] = "tsu",
["Tiếng Tsuut'ina"] = "srs",
["Tiếng Tswana"] = "tn",
["Tiếng Tuamotu"] = "pmt",
["Tiếng Tuareg"] = "tmh",
["Tiếng Tukang Besi Bắc"] = "khc",
["Tiếng Tukang Besi Nam"] = "bhq",
["Tiếng Tuki"] = "bag",
["Tiếng Tulu"] = "tcy",
["Tiếng Tumbuka"] = "tum",
["Tiếng Tungus nguyên thủy"] = "tuw-pro",
["Tiếng Tunni"] = "tqq",
["Tiếng Tupi"] = "tpn",
["Tiếng Tupi cổ"] = "tpw",
["Tiếng Tupi-Guarani nguyên thủy"] = "tup-gua-pro",
["Tiếng Turk Khorasan"] = "kmz",
["Tiếng Turk Khorezm"] = "zkh",
["Tiếng Turk cổ"] = "otk",
["Tiếng Turk nguyên thủy"] = "trk-pro",
["Tiếng Turkmen"] = "tk",
["Tiếng Tuva"] = "tyv",
["Tiếng Tuvalu"] = "tvl",
["Tiếng Tà Mun"] = "aav-tam",
["Tiếng Tà Ôi Thượng"] = "tth",
["Tiếng Tày"] = "tyz",
["Tiếng Tày Sa Pa"] = "tys",
["Tiếng Tân Aram Assyria"] = "aii",
["Tiếng Tân Aram Do Thái Barzani"] = "bjf",
["Tiếng Tây Abenaki"] = "abe",
["Tiếng Tây Ban Nha"] = "es",
["Tiếng Tây Ban Nha cổ"] = "osp",
["Tiếng Tây Bắc Kavkaz nguyên thủy"] = "cau-nwc-pro",
["Tiếng Tây Frisia"] = "fy",
["Tiếng Tây Huasteca Nahuatl"] = "nhw",
["Tiếng Tây Kayah"] = "kyu",
["Tiếng Tây Makian"] = "mqs",
["Tiếng Tây Tạng"] = "bo",
["Tiếng Tây Tạng cổ điển"] = "xct",
["Tiếng Tây Yugur"] = "ybe",
["Tiếng Tích Bá"] = "sjo",
["Tiếng Tơ Đrá"] = "tdr",
["Tiếng Tương"] = "hsn",
["Tiếng Chaima"] = "ciy",
["Tiếng Ubykh"] = "uby",
["Tiếng Udi"] = "udi",
["Tiếng Udihe"] = "ude",
["Tiếng Udmurt"] = "udm",
["Tiếng Ugarit"] = "uga",
["Tiếng Ugong"] = "ugo",
["Tiếng Ugria nguyên thủy"] = "urj-ugr-pro",
["Tiếng Ukraina"] = "uk",
["Tiếng Umbria"] = "xum",
["Tiếng Uneapa"] = "bbn",
["Tiếng Urak Lawoi'"] = "urk",
["Tiếng Ural nguyên thủy"] = "urj-pro",
["Tiếng Urartu"] = "xur",
["Tiếng Urdu"] = "ur",
["Tiếng Urubú-Kaapor"] = "urb",
["Tiếng Urum"] = "uum",
["Tiếng Ushojo"] = "ush",
["Tiếng Uzbek"] = "uz",
["Tiếng Vaghri"] = "vgr",
["Tiếng Varli"] = "vav",
["Tiếng Vasavi"] = "vas",
["Tiếng Venda"] = "ve",
["Tiếng Veneti"] = "xve",
["Tiếng Veneto"] = "vec",
["Tiếng Veps"] = "vep",
["Tiếng Việt"] = "vi",
["Tiếng Việt trung cổ"] = "mkh-mvi",
["Tiếng Việt-Mường nguyên thủy"] = "mkh-vie-pro",
["Tiếng Volapük"] = "vo",
["Tiếng Volsci"] = "xvo",
["Tiếng Vot"] = "vot",
["Tiếng Vurës"] = "msn",
["Tiếng Waata"] = "ssn",
["Tiếng Waimaha"] = "bao",
["Tiếng Waiwai"] = "waw",
["Tiếng Wakhi"] = "wbl",
["Tiếng Wales"] = "cy",
["Tiếng Wallis"] = "wls",
["Tiếng Wallon"] = "wa",
["Tiếng Wambule"] = "wme",
["Tiếng Waneci"] = "wne",
["Tiếng War-Jaintia"] = "aml",
["Tiếng Waray"] = "war",
["Tiếng Warekena"] = "gae",
["Tiếng Warji"] = "wji",
["Tiếng Wayampi"] = "oym",
["Tiếng Wayana"] = "way",
["Tiếng Wayuu"] = "guc",
["Tiếng Wewaw"] = "wea",
["Tiếng Wobé"] = "wob",
["Tiếng Wolaytta"] = "wal",
["Tiếng Wolio"] = "wlo",
["Tiếng Wolof"] = "wo",
["Tiếng Wotu"] = "wtw",
["Tiếng Wymysorys"] = "wym",
["Tiếng Xamtanga"] = "xan",
["Tiếng Xhosa"] = "xh",
["Tiếng Xinh Mun"] = "puo",
["Tiếng Xtiêng"] = "sti",
["Tiếng Xtiêng Bù Đeh"] = "stt",
["Tiếng Xârâcùù"] = "ane",
["Tiếng Xơ Đăng"] = "sed",
["Tiếng Yaeyama"] = "rys",
["Tiếng Yaghnob"] = "yai",
["Tiếng Yakan"] = "yka",
["Tiếng Yakima"] = "yak",
["Tiếng Yakkha"] = "ybh",
["Tiếng Yakut"] = "sah",
["Tiếng Yami"] = "tao",
["Tiếng Yao (Nam Mĩ)"] = "sai-yao",
["Tiếng Yap"] = "yap",
["Tiếng Yapunda"] = "yev",
["Tiếng Ye'kwana"] = "mch",
["Tiếng Yele"] = "yle",
["Tiếng Yemsa"] = "jnj",
["Tiếng Yevan"] = "yej",
["Tiếng Yiddish"] = "yi",
["Tiếng Yidgha"] = "ydg",
["Tiếng Yidiny"] = "yii",
["Tiếng Yiwom"] = "gek",
["Tiếng Yogad"] = "yog",
["Tiếng Yola"] = "yol",
["Tiếng Yonaguni"] = "yoi",
["Tiếng Yong"] = "yno",
["Tiếng Yongkom"] = "yon",
["Tiếng Yoron"] = "yox",
["Tiếng Yoruba"] = "yo",
["Tiếng Yoruba nguyên thủy"] = "alv-yor-pro",
["Tiếng Yoy"] = "yoy",
["Tiếng Yugh"] = "yug",
["Tiếng Yukaghir nguyên thủy"] = "qfa-yuk-pro",
["Tiếng Yup'ik"] = "esu",
["Tiếng Yuri"] = "sai-yri",
["Tiếng Yurok"] = "yur",
["Tiếng Zaghawa"] = "zag",
["Tiếng Zaiwa"] = "atb",
["Tiếng Zarma"] = "dje",
["Tiếng Zarphat"] = "zrp",
["Tiếng Zay"] = "zwa",
["Tiếng Zayse-Zergulla"] = "zay",
["Tiếng Zaza"] = "zza",
["Tiếng Zeeland"] = "zea",
["Tiếng Zenaga"] = "zen",
["Tiếng Zirenkel"] = "zrn",
["Tiếng Zulu"] = "zu",
["Tiếng Zumbun"] = "jmb",
["Tiếng Äynu"] = "aib",
["Tiếng Ê Đê"] = "rad",
["Tiếng Ông Bối nguyên thủy"] = "qfa-onb-pro",
["Tiếng Övdal"] = "ovd",
["Tiếng Ý"] = "it",
["Tiếng Ý-Do Thái"] = "itk",
["Tiếng Đa Đảo hạt nhân nguyên thủy"] = "poz-pnp-pro",
["Tiếng Đa Đảo nguyên thủy"] = "poz-pol-pro",
["Tiếng Đa Đảo Đông nguyên thủy"] = "poz-pep-pro",
["Tiếng Đan Mạch"] = "da",
["Tiếng Đan Mạch cổ"] = "gmq-oda",
["Tiếng Đài Sơn"] = "zhx-tai",
["Tiếng Đông Abenaki"] = "aaq",
["Tiếng Đông Bontoc"] = "ebk",
["Tiếng Đông Bắc Kavkaz nguyên thủy"] = "cau-nec-pro",
["Tiếng Đông Can"] = "dng",
["Tiếng Đông Futuna"] = "fud",
["Tiếng Đông Hương"] = "sce",
["Tiếng Đông Khanty"] = "kca-eas",
["Tiếng Đông Yugur"] = "yuy",
["Tiếng Đường Uông"] = "zhx-twa",
["Tiếng Độc Long"] = "duu",
["Tiếng Đức"] = "de",
["Tiếng Đức Alemanni"] = "gsw",
["Tiếng Đức cao địa cổ"] = "goh",
["Tiếng Đức cao địa trung đại"] = "gmh",
["Tiếng Đức Đông Trung"] = "gmw-ecg",
["Tiếng Ơ Đu"] = "tyh",
["Tiếng Ưu Miền"] = "ium",
["Tiếng ǃXóõ"] = "nmn",
["Tiếng Ả Rập"] = "ar",
["Tiếng Ả Rập Ai Cập"] = "arz",
["Tiếng Ả Rập Algérie"] = "arq",
["Tiếng Ả Rập Bắc Levant"] = "apc",
["Tiếng Ả Rập Hijazi"] = "acw",
["Tiếng Ả Rập Juba"] = "pga",
["Tiếng Ả Rập Libya"] = "ayl",
["Tiếng Ả Rập Maroc"] = "ary",
["Tiếng Ả Rập Nam Levant"] = "ajp",
["Tiếng Ả Rập Oman"] = "acx",
["Tiếng Ả Rập Sudan"] = "apd",
["Tiếng Ả Rập Síp"] = "acy",
["Tiếng Ả Rập Tajikistan"] = "abh",
["Tiếng Ả Rập Tchad"] = "shu",
["Tiếng Ả Rập Uzbekistan"] = "auz",
["Tiếng Ả Rập vùng Vịnh"] = "afb",
["Tiếng Ấn-Arya nguyên thủy"] = "inc-pro",
["Tiếng Ấn-Iran nguyên thủy"] = "iir-pro",
["Tiếng Ấn-Âu nguyên thủy"] = "ine-pro",
["Tiếng Ỹaroamë"] = "yro",
["Àhàn"] = "ahn",
["Áncá"] = "acb",
["Ömie"] = "aom",
["Tiếng Önge"] = "oon",
["Đa ngữ"] = "mul",
["ǀXam"] = "xam",
["ǁAni"] = "hnh",
["ǁGana"] = "gnk",
["ǁXegwi"] = "xeg",
["ǂHoan"] = "huc",
["ǃKung"] = "khi-kun",
["Tiếng Bắc Selkup"] = "sel-nor",
["Tiếng Nam Selkup"] = "sel-sou",
["Tiếng Selkup nguyên thủy"] = "sel-pro",
["Tiếng Slovak cổ"] = "zlw-osk",
["Proto-Central Naga"] = "sit-aao-pro",
["Tiếng Bạch nguyên thủy"] = "sit-bai-pro",
["Bangru"] = "sit-ban",
["Proto-Bodish"] = "sit-bdi-pro",
["Tiếng Tứ Xuyên"] = "zhx-sic",
["Tiếng Quảng Lâm"] = "aav-qal",
}
a5b2jyi90ghzfkuymbtwzg8vydkftyc
trí giả
0
282190
2350157
2350000
2026-05-04T15:29:00Z
TheHighFighter2
42988
/* */
2350157
wikitext
text/x-wiki
{{also|trị giá}}
=={{langname|vi}}==
==={{ĐM|etym}}===
{{vi-etym-sino|智|[[khôn]]; [[thông minh]]|者|[[người]]}}.
==={{ĐM|pron}}===
{{vi-pron}}
==={{ĐM|noun}}===
{{vi-noun}}
# Người có [[trình độ]] [[học vấn]] [[uyên thâm]], [[hiểu biết]] [[sâu rộng]].
#: {{ux|vi|Những bậc '''trí giả'''.}}
ot5klrhk5b2ay41zhs2r65fgmm2pynd
Mô đun:place/placetypes
828
282248
2350135
2350127
2026-05-04T12:19:56Z
TheHighFighter2
42988
2350135
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true for testing
local m_locations = require("Module:place/locations")
local m_links = require("Module:links")
local m_table = require("Module:table")
local m_strutils = require("Module:string utilities")
local debug_track_module = "Module:debug/track"
local en_utilities_module = "Module:en-utilities"
local dump = mw.dumpObject
local insert = table.insert
local concat = table.concat
local internal_error = m_locations.internal_error
export.internal_error = internal_error
local process_error = m_locations.process_error
export.process_error = process_error
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local ucfirst = m_strutils.ucfirst
local ulower = m_strutils.lower
local rmatch = m_strutils.match
local split = m_strutils.split
--[==[ intro:
This module contains placetype data used by [[Module:place]] and {{tl|place}}, along with a significant amount of code
to work with both placetypes and locations, as well as some placename-related info (FIXME: Consider moving it to
[[Module:place/locations]]). See also [[Module:place/locations]], which has definitions of all known locations. You must
currently load this module using {{cd|require()}}, not using {{cd|mw.loadData()}}.
In particular, it contains two fundamental and tricky functions:
# `get_placetype_equivs`, which finds the equivalent placetypes to look under in order to find a given property, and in
the process correctly handles placetypes with qualifiers (including qualifiers that act similar to "type-raising"
operators in that they do something non-trivial to the placetype to their right) as well as form-of directives and
fallbacks.
# `find_matching_holonym_location`, which looks up a holonym to find a matching known location, but in the process
checks holonyms to the right to make sure there isn't a clash between the user-specified containing holonyms and the
containers of the known location being considered. This is done to prevent overcategorizing when either there are two
known locations with the same name (e.g. Birmingham in England and Birmingham, Alabama in the US), or more generally
two locations with the same name, one of which is a known location but where the other is not (e.g. we're processing
non-known-location Mérida, Spain and don't want it categorized like known location Mérida, Yucatán, Mexico).
Both of these functions are invoked repeatedly, and probably are invoked several times on the same inputs and as a
result are candidates for memoization to speed up the operation of {{tl|place}}.
]==]
------------------------------------------------------------------------------------------
-- Basic utilities --
------------------------------------------------------------------------------------------
--[==[
Return true if `force_cat` is set either in this module or in [[Module:place/locations]].
]==]
function export.get_force_cat()
return export.force_cat or m_locations.force_cat
end
-- Add the page to a tracking "category". To see the pages in the "category",
-- go to [[Wiktionary:Tracking/place/PAGE]] and click on "What links here".
local function track(page)
require(debug_track_module)("place/" .. page)
return true
end
function export.remove_links_and_html(text)
text = m_links.remove_links(text)
return text:gsub("<.->", "")
end
--[==[
Return the singular version of a maybe-plural placetype, or nil if not plural. This correctly handles placetypes with
irregular plurals such as `kibbutzim` plural of `kibbutz` by looking up in a table constructed from the `plural` values
specified in `placetype_data`. If a special plural value is not found, the regular singularization algorithm in
[[Module:en-utilities]] is invoked, which reverses the y -> ies change after vowels and the 'es' addition after sh/ch/x,
and otherwise just subtracts a final 's' (which will incorrectly generate 'passe' for plural 'passes'; FIXME: consider
changing this for words ending in '-sses'). If the generated singular is the same as the passed-in value, nil is
returned.
]==]
function export.maybe_singularize_placetype(placetype)
if not placetype then
return nil
end
if export.plural_placetype_to_singular[placetype] then
return export.plural_placetype_to_singular[placetype]
end
local retval = require(en_utilities_module).singularize(placetype)
if retval == placetype then
return nil
end
return retval
end
-- Return the correct plural of a placetype, and (if `do_ucfirst` is given) make the first letter uppercase. We first
-- look up the plural in `placetype_data`, falling back to pluralize() in [[Module:en-utilities]], which is almost
-- always correct.
function export.pluralize_placetype(placetype, do_ucfirst)
local ptdata = export.placetype_data[placetype]
if ptdata and ptdata.plural then
placetype = ptdata
else
placetype = placetype
end
if do_ucfirst then
return ucfirst(placetype)
else
return placetype
end
end
--[==[
Get the data associated with a placetype, which may be in its singular or plural form. If `from_category` is specified,
we also look for category-only placetypes (generally plural) followed by `!`. Return three values: (a) the placetype
under which the data can be looked up (i.e. in its singular form if the passed-in `placetype` is plural and did not
match a category-only placetype followed by `!`); (b) the placetype data structure; (c) the type of `placetype` match
that occurred, one of `"direct"` if the canonical placetype is the same as the passed-in `placetype` and also the same
as the key under which `ptdata` was looked up, or `"direct-category"` if the `ptdata` was looked up under a key formed
from the passed-in `placetype` by adding `!`, or `"plural"` if the `ptdata` was looked up under the singularized version
of the plural passed-in `placetype`.
]==]
function export.get_placetype_data(placetype, from_category)
local ptdata = export.placetype_data[placetype]
if ptdata then
return placetype, ptdata, "direct"
end
if from_category then
ptdata = export.placetype_data[placetype .. "!"]
if ptdata then
return placetype .. "!", ptdata, "direct-category"
end
end
local sg_placetype = export.maybe_singularize_placetype(placetype)
if sg_placetype then
ptdata = export.placetype_data[sg_placetype]
if ptdata then
return sg_placetype, ptdata, "plural"
end
end
return nil
end
--[==[
Check for special pseudo-placetypes that should be ignored for categorization purposes.
]==]
function export.placetype_is_ignorable(placetype)
return placetype == "and" or placetype == "or" or placetype:find("^%(")
end
function export.resolve_placetype_aliases(placetype)
return export.placetype_aliases[placetype] or placetype
end
--[==[
Return a property from `placetype_data` for a given placetype. If the placetype isn't found in `placetype_data`, or the
key isn't found in the placetype's entry in `placetype_data`, return nil.
]==]
function export.get_placetype_prop(placetype, key)
-- Usually we are called on equivalent placetypes returned from `get_placetype_equivs`, in which case placetype
-- aliases have been resolved, but sometimes not, e.g. when fetching the indefinite article in
-- get_placetype_article(). `resolve_placetype_aliases` is just a simple lookup and it doesn't hurt to do it twice.
placetype = export.resolve_placetype_aliases(placetype)
if export.placetype_data[placetype] then
return export.placetype_data[placetype][key]
else
return nil
end
end
--[==[
Given a placetype, split the placetype into one or more potential ''splits'', each consisting of a three-element list
{ {``prev_qualifiers``, ``this_qualifier``, ``reduced_placetype``}}, i.e.
# the concatenation of zero or more previously-recognized qualifiers on the left, normally canonicalized (if there are
zero such qualifiers, the value will be nil);
# a single recognized qualifier, normally canonicalized (if there is no qualifier, the value will be nil);
# the "reduced placetype" on the right.
Splitting between the qualifier in (2) and the reduced placetype in (3) happens at each space character, proceeding from
left to right, and stops if a qualifier isn't recognized. All placetypes are canonicalized by checking for aliases
in `placetype_aliases`, but no other checks are made as to whether the reduced placetype is recognized. Canonicalization
of qualifiers does not happen if `no_canon_qualifiers` is specified.
For example, given the placetype `"small beachside unincorporated community"`, the return value will be
{ {
{nil, nil, "small beachside unincorporated community"},
{nil, "small", "beachside unincorporated community"},
{"small", "[[beachfront]]", "unincorporated community"},
{"small [[beachfront]]", "[[unincorporated]]", "community"},
}}
Here, `"beachside"` is canonicalized to `"[[beachfront]]"` and `"unincorporated"` is canonicalized to
`"[[unincorporated]]"`, in both cases according to the entry in `placetype_qualifiers`.
On the other hand, if given `"small former haunted community"`, the return value will be
{ {
{nil, nil, "small former haunted community"},
{nil, "small", "former haunted community"},
{"small", "former", "haunted community"},
}}
because `"small"` and `"former"` but not `"haunted"` are recognized as qualifiers.
Finally, if given `"former adr"`, the return value will be
{ {
{nil, nil, "former adr"},
{nil, "former", "administrative region"},
}}
because `"adr"` is a recognized placetype alias for `"administrative region"`.
]==]
function export.split_qualifiers_from_placetype(placetype, no_canon_qualifiers)
local splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
local prev_qualifier = nil
while true do
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if canon == nil then
break
end
local new_qualifier = qualifier
if type(canon) == "table" then
canon = canon.link
end
if not no_canon_qualifiers and canon ~= false then
if canon == true then
new_qualifier = "[[" .. qualifier .. "]]"
else
new_qualifier = canon
end
end
insert(splits, {prev_qualifier, new_qualifier, export.resolve_placetype_aliases(reduced_placetype)})
prev_qualifier = prev_qualifier and prev_qualifier .. " " .. new_qualifier or new_qualifier
placetype = reduced_placetype
else
break
end
end
return splits
end
--[==[
Given a `placetype` (which may be pluralized), return an ordered list of equivalent placetypes to look under to find the
placetype's properties (such as the category or categories to be inserted). The return value is actually an ordered list
of objects of the form `{qualifier=``qualifier``, placetype=``equiv_placetype``}` where ``equiv_placetype`` is a
placetype whose properties to look up, derived from the passed-in placetype or from a contiguous subsequence of the
words in the passed-in placetype (always including the rightmost word in the placetype, i.e. we successively chop off
qualifier words from the left and use the remainder to find equivalent placetypes). ``qualifier`` is the remaining words
not part of the subsequence used to find ``equiv_placetype``; or nil if all words in the passed-in placetype were used
to find ``equiv_placetype``. (FIXME: This qualifier is not currently used anywhere.) Only placetypes for which there is
an entry in `placetype_data` are included. The placetype passed in is always checked first, and will form the first
entry if it exists in `placetype_data`.
'''NOTE:''' This is a tricky function as it implements handling of (a) qualifiers, (b) fallback logic, (c)
"type-raising" qualifiers such as `former`/`ancient`/etc. as well as `fictional` and `mythological`, and (d) form-of
directives, which act somewhat similarly to `former`, and allows interaction between more than one of these
simultaneously (e.g. official names of former places, which have their own categorization).
If {{tl|place}} gets too slow, one potential speedup is to memoize the results of this function, as it appears to be
getting called more than once on the same inputs. Another similar potential speedup is to memoize the results of
`iterate_matching_holonym_location()`.
For example, given the placetype `left tributary`, the following placetype/qualifier combinations are checked in turn:
```
{qualifier = nil, placetype="left tributary"}
{qualifier = "left", placetype="tributary"}
{qualifier = "left", placetype="river"}
```
and the return value will be
{ {
{qualifier = "left", placetype="tributary"},
{qualifier = "left", placetype="river"},
}}
The algorithm first enters the placetype itself into the list, then checks for `left tributary` as a recognized
placetype in `placetype_data` and doesn't find it, so it doesn't enter it into the returned list (if it found it, it
would add it as well as any fallbacks directly after it). It then splits off the recognized qualifier `left` to form the
''reduced placetype'' `tributary`, which is entered into the list because it is found in `placetype_data`. Then, because
it has a fallback `river`, which exists in `placetype_data`, the fallback is entered next.
Another example is `small rural fraziones` (where a ''frazione'' is type of subdivision of a ''comune'' or municipality,
often specifically an outlying hamlet). the placetype/qualifier combinations checked are:
```
{qualifier = nil, placetype="small rural fraziones"}
{qualifier = nil, placetype="small rural frazione"}
{qualifier = "small", placetype="rural fraziones"}
{qualifier = "small", placetype="rural frazione"}
{qualifier = "small [[rural]]", placetype="fraziones"}
{qualifier = "small [[rural]]", placetype="frazione"}
{qualifier = "small [[rural]]", placetype="hamlet"}
{qualifier = "small [[rural]]", placetype="village"}
```
The return value ends up as
{qualifier = "small [[rural]]", placetype="frazione"},
{qualifier = "small [[rural]]", placetype="hamlet"},
{qualifier = "small [[rural]]", placetype="village"},
}}
Here, because the result of singularizing `fraziones` returns a different value from the placetype itself, that
singularized value is checked after the original plural value. Also, in the process of splitting off qualifiers,
they are canonicalized if the entry in `placetype_qualifiers` says to do so; in this case, links are placed around
`rural`. Finally, `frazione` has `hamlet` as its fallback, which in turn has `village` as its fallback, so both
fallbacks end up being returned.
`no_fallback`, if set, disables returning equivalent placetypes based on the `fallback` setting for a placetype. This is
used in the first of two loops in find_placetype_cat_specs() in [[Module:place]] to prefer exact matches for placetypes
such as barangays with later holonyms to matches based on a fallback such as `neighborhood` with an earlier holonym.
See the comment in that function in [[Module:place]] for a more detailed explanation of why this is needed. Only the
placetype itself, and any reduced placetypes created by chopping off recognized qualifiers at the beginning, are
returned; but we do not return reduced placetypes if a containing placetype exists in `placetype_data`. (For example,
`"overseas territory"` has a fallback `"dependent territory"`, and `"overseas"` is also a recognized qualifier. When
`no_fallback` is in place, without the above proviso, we would return `"overseas territory"` followed by `"territory"`
with the incorrect effect of classifying an `"overseas territory"` of the United Kingdom such as `"Gibraltar"` under
[[:Category:Territories of the United Kingdom]] instead of [[:Category:Dependent territories of the United Kingdom]].)
As an exception, if `historical`, `ancient`, `former` or the like are found, they proceed ignoring `no_fallback`,
because it seems tricky to handle them correctly in the presence of `no_fallback`, and historical/former placetypes
rarely occur with exact match category specs anyway.
`no_split_qualifiers` prevents splitting off recognized qualifiers and returning the remainder of the placetype as an
equivalent placetype. Only the passed-in placetype, and any fallbacks, will be returned. This is used in
[[Module:category tree/topic cat/data/Places]] when looking up placetypes found in categories. Such placetypes won't
have qualifiers and so it doesn't make sense to try and look for them.
`from_category`, if set, causes category-only placetypes (those ending in `!`) to also be checked.
`form_of_directive`, if set, causes the specified form-of directive (e.g. `FORMER_NAME_OF`) to be prepended to checked
placetypes, their directive-specific type (e.g. `FORMER_NAME_OF_type`), and their classes (`class`) to get the
appropriate placetypes to check for form-of-directive categories. It falls back to the prepended generic `place` as a
placetype, e.g. `FORMER_NAME_OF place`, if nothing else matches.
`no_check_for_inherently_former` is used internally to prevent an infinite loop when checking for `inherently_former`.
`register_former_as_non_former` is a major hack used in `get_bare_categories` to deal with the mismatch between e.g.
known location `Yugoslavia` declaring itself a `country` but definitions of it declaring it a `former country`. It
causes the non-former version of the specified placetype to be included in the returned equivalents along with the
former placetypes. [FIXME: This should apply only to the entries in `former_countries` but it's tricky to do that now;
fix this in the known-location refactor. -- The known-location refactor is already done but we haven't yet fixed this.]
]==]
function export.get_placetype_equivs(placetype, props)
local no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former
local form_of_directive
if props then
no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former =
props.no_fallback, props.no_split_qualifiers, props.no_check_for_inherently_former, props.from_category,
props.register_former_as_non_former
form_of_directive = props.form_of_directive
end
local equivs = {}
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. `qualifier` is
-- the preceding qualifier to insert into `equivs` along with the placetype (see comment at top of function). If
-- `from_category` is given, we also check for a category-specific entry consisting of the placetype followed by
-- `!`, and in all cases we also check to see if `placetype` is plural, and if so, insert the singularized version
-- along with its fallbacks (if any) in `placetype_data`. `form_of_prefix` is a form-of prefix such as
-- `OFFICIAL_NAME_OF`. If specified, we check the fallbacks of `placetype` without the prefix but then insert into
-- `equivs` the prefixed placetype. This way, if the user says e.g. {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}},
-- we will correctly categorize into [[:Category:Official names of countries]], rather than only trying to look up
-- `OFFICIAL_NAME_OF island country` and failing, falling back ultimately to [[:Category:Official names of places]].
local function insert_placetype_and_fallbacks(qualifier, placetype, form_of_prefix)
local function insert_equiv(pt)
if form_of_prefix then
-- Let's say the user says {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}} and we have
-- no entry for `OFFICIAL_NAME_OF island country` but we do for `OFFICIAL_NAME_OF country` (which we end
-- up processing because `island country` falls back to `country`), and that entry in turn is defined
-- using a fallback. We have to insert that fallback-of-fallback, and the easiest/cleanest way of
-- handling this is by calling ourselves recursively.
insert_placetype_and_fallbacks(qualifier, form_of_prefix .. " " .. pt)
else
insert(equivs, {qualifier=qualifier, placetype=pt})
end
end
-- Insert the placetype, along with any fallbacks.
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if ptdata then
insert_equiv(canon_placetype)
if no_fallback then
return
end
local first_placetype = #equivs + 1
local prev_placetype = nil
while true do
local pt_value = export.placetype_data[canon_placetype]
if not pt_value then
internal_error("Fallback value %s specified for placetype %s but is not in `placetype_data`",
canon_placetype, prev_placetype)
end
if pt_value.fallback then
insert_equiv(pt_value.fallback)
local last_placetype = #equivs
if last_placetype - first_placetype >= 10 then
local fallback_loop = {}
for i = first_placetype, last_placetype do
insert(fallback_loop, equivs[i].placetype)
end
internal_error("Apparent loop in fallback chain: %s", table.concat(fallback_loop, " -> "))
end
prev_placetype = canon_placetype
canon_placetype = pt_value.fallback
else
break
end
end
end
end
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. This is a
-- wrapper around the more basic `insert_placetype_and_fallbacks()` which handles form-of directives. If there is no
-- form-of directive, this function directly calls `insert_placetype_and_fallbacks()`. We do things this way so that
-- form-of directives correctly combine with `former`-type qualifiers. Note that we also have special backups for
-- form-of directives that check `DIRECTIVE place` (and before that, `DIRECTIVE FORMER/ANCIENT place` is there's a
-- `former`-type directive); these backups live outside this function because we want them done once, late, rather
-- than in each invocation of `process_and_insert_placetype()`.
local function process_and_insert_placetype(qualifier, reduced_placetype)
if form_of_directive then
-- First check for e.g. `OFFICIAL_NAME_OF island country` and its fallbacks; then we look for fallbacks of
-- `island country` and check e.g. `OFFICIAL_NAME_OF country` and its fallbacks. All of this is handled by
-- `insert_placetype_and_fallbacks()` with appropriate parameters. After that, check the general class of
-- the directive, e.g. `subpolity` if something like `district` is given. (Eventually, we check for
-- `OFFICIAL_NAME_OF place` as a backup, but this happens at the end outside the loop over qualifiers.)
insert_placetype_and_fallbacks(qualifier, reduced_placetype, form_of_directive)
if not no_fallback then
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype)
local directive_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, form_of_directive .. "_type") or
export.get_placetype_prop(pt, "class") end
)
if not directive_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s in conjunction with form-of directive %s, placetype data " ..
'located but directive-specific type property %s missing, and so is "class"; ' ..
"placetypes searched are %s", reduced_placetype, form_of_directive,
form_of_directive .. "_type", reduced_placetype_equivs)
else
-- This should be allowed, as we allow unrecognized placetypes in general.
end
elseif directive_type ~= "!" then
insert_placetype_and_fallbacks(qualifier, directive_type, form_of_directive)
end
end
else
insert_placetype_and_fallbacks(qualifier, reduced_placetype)
end
end
-- Successively split off recognized qualifiers and loop over successively greater sets of qualifiers from the left
-- (unless `no_split_qualifiers` is specified, in which case we don't check for qualifiers).
local splits
if no_split_qualifiers then
splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
else
splits = export.split_qualifiers_from_placetype(placetype)
end
for _, split in ipairs(splits) do
local prev_qualifier, this_qualifier, reduced_placetype = unpack(split, 1, 3)
-- If a special "former" qualifier like `former` or `historical` isn't present, and
-- `no_check_for_inherently_former` is not given (this flag is used to avoid infinite loops), check for
-- "inherently former" placetypes like `satrapy` and `treaty port` that always refer to no-longer-existing
-- placetypes, and handle accordingly.
local unlinked_this_qualifier
if this_qualifier and this_qualifier:find("%[") then
unlinked_this_qualifier = export.remove_links_and_html(this_qualifier)
else
unlinked_this_qualifier = this_qualifier
end
local former_qualifiers = this_qualifier and export.former_qualifiers[unlinked_this_qualifier] or nil
if not former_qualifiers and not no_check_for_inherently_former then
former_qualifiers = export.get_equiv_placetype_prop(reduced_placetype,
function(pt) return export.get_placetype_prop(pt, "inherently_former") end,
{no_check_for_inherently_former = true})
end
-- If a special "former" qualifier like `former` or `historical` is present, map it to the appropriate internal
-- qualifiers (`ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
-- qualifiers), fetch the `former_type` property, and treat the placetype as if a concatenation of the mapped
-- qualifier(s) and the value of `former_type`. For example, if `medieval village` is given, we map `medieval`
-- to `ANCIENT` and `FORMER`, and `village` to its `former_type` of `settlement`, and enter the placetypes
-- `ANCIENT settlement` and `FORMER settlement` (in that order) into `equivs`. If the placetype following the
-- "former" qualifier is recognized in `placetype_data` but has no `former_type` and no fallback with a
-- `former_type` specified, it is an internal error; but if the placetype isn't recognized (e.g. something like
-- `former greenhouse` is specified and we don't have an entry for `greenhouse`), just track the occurrence and
-- don't enter anything into `equivs`.
if former_qualifiers then
-- FIXME: Should we respect `no_fallback` here? My instinct says no.
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype, {
no_check_for_inherently_former = true
})
local former_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, "former_type") or
export.get_placetype_prop(pt, "class") end
)
if not former_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s, placetype data located but `former_type` missing; " ..
"placetypes searched are %s", reduced_placetype, reduced_placetype_equivs)
else
-- Enable error when we've verified there aren't any examples.
track("bad-former-placetype")
track("bad-former-placetype/" .. reduced_placetype)
--process_error("For placetype '%s', unrecognized placetype following 'former'-type " ..
-- "qualifier; searched placetype(s) %s", reduced_placetype, dump(reduced_placetype_equivs))
end
elseif former_type ~= "!" then
-- First check directly for `ANCIENT/FORMER` + the original following placetype. This makes it possible
-- for (e.g.) former provinces of the Roman empire to be categorized specially.
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. reduced_placetype)
end
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. former_type)
end
-- HACK! See explanation above for `register_former_as_non_former`.
if register_former_as_non_former then
process_and_insert_placetype(prev_qualifier, reduced_placetype)
end
-- If we're processing a form-of directive, after doing everything else we do
-- `DIRECTIVE ANCIENT/FORMER place` e.g. `OFFICIAL_NAME_OF FORMER place` as a backup.
if form_of_directive and not no_fallback then
for _, former_qualifier in ipairs(former_qualifiers) do
insert_placetype_and_fallbacks(prev_qualifier, form_of_directive .. " " .. former_qualifier ..
" place")
end
end
-- Don't continue processing equivs. The reason is probably the same as the `break` below for
-- qualifier_to_placetype_equivs[]; categories for `former BLAH` are set using `default`, and
-- non-former equivs will otherwise take precedence.
break
end
end
-- Then see if the rightmost split-off qualifier is in qualifier_to_placetype_equivs
-- (e.g. 'fictional *' -> 'fictional location'). If so, add the mapping.
if this_qualifier and export.qualifier_to_placetype_equivs[unlinked_this_qualifier] then
insert(equivs, {
qualifier=prev_qualifier,
placetype=export.qualifier_to_placetype_equivs[unlinked_this_qualifier]
})
-- Don't continue processing equivs; otherwise, if we specify 'mythological city', even though the
-- equivalent entry for 'mythological location' gets inserted ahead of the entry for 'city', the
-- latter ends up generating the category because the category for 'mythological location' is set as
-- the default value, which is used only when no non-default category can be found.
break
end
-- Finally, join the rightmost split-off qualifier to the previously split-off qualifiers to form a combined
-- qualifier, and add it along with reduced_placetype and any mapping in placetype_data for reduced_placetype.
-- NOTE: The first time through this loop, both `prev_qualifier` and `this_qualifier` are nil, and this inserts
-- the full placetype into `equivs`.
local qualifier = prev_qualifier and prev_qualifier .. " " .. this_qualifier or this_qualifier
process_and_insert_placetype(qualifier, reduced_placetype)
-- If `no_fallback` and there's an entry in `placetype_data` for this placetype, don't include any reduced
-- placetypes to avoid the "overseas territory treated as a territory" issue describe above.
if no_fallback then
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(reduced_placetype, from_category)
if canon_placetype then
break
end
end
end
-- If we're processing a form-of directive, after doing everything else we do `DIRECTIVE place` e.g.
-- `OFFICIAL_NAME_OF place` as a backup; but only if either the placetype as a whole is recognized or the placetype
-- begins with a recognized qualifier. This latter check is to avoid categorizing into e.g.
-- [[Category:en:Former names of places]] in an invocation like
-- {{place|en|@former name of:Democratic Republic of the Congo|country|r/Central Africa|;|used from 1971–1997}};
-- the `used from 1971–1997` gets treated as a placetype and we're called on it.
if form_of_directive and not no_fallback and (splits[2] or export.get_placetype_data(placetype, from_category)) then
insert_placetype_and_fallbacks(nil, form_of_directive .. " place")
end
return equivs
end
function export.get_equiv_placetype_prop_from_equivs(equivs, fun, continue_on_nil_only)
for _, equiv in ipairs(equivs) do
local retval = fun(equiv.placetype)
if continue_on_nil_only and retval ~= nil or not continue_on_nil_only and retval then
return retval, equiv
end
end
return nil, nil
end
--[==[
Given a placetype `placetype` and a function `fun` of one argument, iteratively call the function on equivalent
placetypes fetched from `get_placetype_equivs` until the function returns a non-falsy value (i.e. not {nil} or {false});
but if `continue_on_nil_only` is specified, the iterations continue until the function returns non non-{nil} value.
FIXME: We should make `continue_on_nil_only` the default; but this requires changing some callers.) When `fun` returns a
non-falsy or non-{nil} value, `get_equiv_placetype_prop` returns two values: the value returned by `fun` and the
equivalent placetype that triggered the non-falsy (or non-{nil}) return value. If `fun` never returns a non-falsy (or
non-{nil}) value, `get_equiv_placetype_prop` returns {nil} for both return values. If `placetype` is passed in as {nil},
the return value is the result of calling `fun` on {nil} (whatever it is) with {nil} for the second return value.
]==]
function export.get_equiv_placetype_prop(placetype, fun, props)
if not placetype then
return fun(nil), nil
end
return export.get_equiv_placetype_prop_from_equivs(export.get_placetype_equivs(placetype, props), fun,
props and props.continue_on_nil_only)
end
--[==[
Return the article that is used with an entry placetype. We proceed as follows:
# See if there is a recognized qualifier at the beginning that specifies an article (including `false` for no article).
This takes precedence over anything else, so that e.g. `various capitals` gets no article rather than "`the"`.
# Then check the placetype or any equivalent placetype for the `entry_placetype_use_the` property, indicating that
`"the"` should be used.
# Otherwise we look to see if the placetype itself (not any equivalents, even those involving deleting a qualifier from
the beginning) has an entry in `placetype_data` that specifies the indefinite article using `entry_placetype_use_the`
(principally for use with placetypes like `union territory`).
# Otherwise, we use [[Module:en-utilities]] to apply the standard algorithm to generate `"an"` for words beginning with
a vowel and `"a"` otherwise.
If `ucfirst` is true, the first letter of the article is made upper-case.
]==]
function export.get_placetype_article(placetype, ucfirst)
local art
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if type(canon) == "table" then
art = canon.article
end
end
if art == false then
return art
end
if art == nil then
local placetype_use_the = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "entry_placetype_use_the") end)
if placetype_use_the then
art = "tên"
else
art = export.get_placetype_prop(placetype, "entry_placetype_indefinite_article")
if not art then
art = require(en_utilities_module).get_indefinite_article(placetype)
end
end
end
if ucfirst then
art = m_strutils.ucfirst(art)
end
return art
end
--[==[
Return the preposition that should be used after `placetype` when occurring as an entry placetype or in categories
(e.g. `city >in< France` but `country >of< South America`). The preposition defaults to `"của"` if not specified.
]==]
function export.get_placetype_entry_preposition(placetype)
local pt_prep = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "preposition") end
)
return pt_prep or "của"
end
--[==[
Given a place desc (see top of file) and a holonym object (see top of file), add a key/value into the place desc's
`holonyms_by_placetype` field corresponding to the placetype and placename of the holonym. For example, corresponding
to the holonym "c/Italy", a key with the list value {"Italy"} will be added to the place desc's
`holonyms_by_placetype` field. If there is already a key with that place type, the new placename will be added to the
end of the value's list.
]==]
function export.key_holonym_into_place_desc(place_desc, holonym)
if not holonym.placetype then
return
end
-- Key in equivalent placetypes, so that e.g. `cities/San Francisco` gets keyed under `city`; but don't do
-- fallbacks, as it doesn't seem correct for the "do other holonyms of the same placetype" algorithm to do holonyms
-- of different types just because they have the same fallback.
local equiv_placetypes = export.get_placetype_equivs(holonym.placetype, {no_fallback = true})
local unlinked_placename = holonym.unlinked_placename
for _, equiv in ipairs(equiv_placetypes) do
local placetype = equiv.placetype
if not place_desc.holonyms_by_placetype then
place_desc.holonyms_by_placetype = {}
end
if not place_desc.holonyms_by_placetype[placetype] then
place_desc.holonyms_by_placetype[placetype] = {unlinked_placename}
else
insert(place_desc.holonyms_by_placetype[placetype], unlinked_placename)
end
end
end
--[=[
Construct a formatted link from the raw link spec `link` given the canonical singular placetype `sg_placetype`. If the
placetype was originally plural, `orig_placetype` should contain this plural value; otherwise it should be nil. This
will construct the appropriate type of link that displays as `orig_placetype` (or otherwise `sg_placetype`) but links to
whatever the `link` spec specifies (which may be `sg_placetype`, a Wikipedia article, etc.). `ptdata` is the placetype
data structure for the placetype, and `from_category` indicates that we are generating the description of a category
(otherwise we are generating the display form of an entry placetype).
]=]
local function make_placetype_link(link, sg_placetype, orig_placetype, ptdata, from_category, noerror)
if not from_category and ptdata.disallow_in_entries then
if noerror then
return "[not meant to be specified directly, with warning: " .. ptdata.disallow_in_entries .. "]"
else
process_error("Placetype %s is not meant to be specified directly: " .. ptdata.disallow_in_entries, sg_placetype)
end
end
if link == nil then
internal_error("Placetype data present for placetype %s but no link= setting given", sg_placetype)
elseif link == true then
if orig_placetype then
return ("[[%s|%s]]"):format(sg_placetype, orig_placetype)
else
return ("[[%s]]"):format(sg_placetype)
end
elseif link == false then
process_error("Placetype %s is not meant to be specified directly, but is only for internal use", sg_placetype)
elseif link == "w" then
return ("[[w:%s|%s]]"):format(sg_placetype, orig_placetype or sg_placetype)
elseif link == "separately" then
if orig_placetype then
local sg_words = split(sg_placetype, " ")
local orig_words = split(orig_placetype, " ")
if #sg_words ~= #orig_words then
internal_error("Can't construct 'separately' link for plural placetype %s as original placetype %s " ..
"has different number of words", orig_placetype, sg_placetype)
else
for i = 1, #sg_words do
if sg_words[i] == orig_words[i] then
sg_words[i] = ("[[%s]]"):format(sg_words[i])
else
sg_words[i] = ("[[%s|%s]]"):format(sg_words[i], orig_words[i])
end
end
return concat(sg_words, " ")
end
else
return (sg_placetype:gsub("([^ ]+)", "[[%1]]"))
end
elseif link:find("^%+") then
link = link:sub(2) -- discard initial +
return ("[[%s|%s]]"):format(link, orig_placetype or sg_placetype)
elseif not orig_placetype then
return link
else
return link
end
end
--[==[
Get the display form of a placetype by looking it up in `placetype_data`. If the placetype is recognized, or is the
plural of a recognized placetype, the corresponding linked display form is returned (with plural placetypes displaying
as plural but linked to the singular form of the placetype). Otherwise, return nil. If we're generating the description
of a category, `category_type` should be set to one of `"top-level"` (for top-level categories like
[[:Category:Neighborhoods]]), `"noncity"` (for non-city categories like [[:Category:Neighborhoods in Illinois, USA]]) or
`"city"` (for city categories like [[:Category:Neighborhoods of Chicago]]). Otherwise, we're generating the description
for use in formatting a {{tl|place}} call, and category-only placetypes ending in `!` will be ignored, along with
special `category_link*` settings. `return_full` is used along with `category_type` and will preferably return the
"full" variant of category link settings, i.e. `full_category_link*`; if they don't exist, the `category_link*` value is
prepended with `"names of"`. `noerror` says to not throw an error when encountering entry placetypes that would be
disallowed.
]==]
function export.get_placetype_display_form(placetype, category_type, return_full, noerror)
local from_category = not not category_type
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if canon_placetype then
local raw_link
local function is_linked_string(str)
return type(str) == "string" and str:find("%[%[")
end
if category_type then
local fetched_full
local function fetch_maybe_full(prop)
local retval = ptdata["full_" .. prop]
if retval ~= nil then
if return_full then
return retval, true
else
internal_error("Saw full_" .. prop .. "=%s but `return_full` not set, can't handle", retval)
end
end
return ptdata[prop], false
end
local function maybe_prefix(str)
if return_full and not fetched_full then
return "names of " .. str
else
return str
end
end
-- Careful with `false` as possible value.
if category_type == "top-level" then
raw_link, fetched_full = fetch_maybe_full("category_link_top_level")
elseif category_type == "noncity" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_noncity")
elseif category_type == "city" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_city")
else
internal_error('Unrecognized value for `category_type` %s, should be "top-level", "noncity" or "city"',
category_type)
end
if type(raw_link) == "string" then
return maybe_prefix(raw_link), ptdata
elseif raw_link ~= nil then
return raw_link, ptdata
end
raw_link, fetched_full = fetch_maybe_full("category_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
if ptmatch == "plural" then
raw_link, fetched_full = fetch_maybe_full("plural_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
end
if raw_link == nil then
raw_link, fetched_full = fetch_maybe_full("link")
end
if raw_link == false then
return raw_link, ptdata
end
return maybe_prefix(make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror)), ptdata
else
if ptmatch == "plural" then
raw_link = ptdata.plural_link
if raw_link == false then
process_error("Placetype %s cannot appear plural", placetype)
end
if is_linked_string(raw_link) then
return raw_link, ptdata
end
end
if raw_link == nil then
raw_link = ptdata.link
end
return make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror), ptdata
end
end
return nil
end
local function resolve_unlinked_placename_display_aliases(placetype, placename)
local equiv_placetypes = export.get_placetype_equivs(placetype)
for i, equiv in ipairs(equiv_placetypes) do
equiv_placetypes[i] = equiv.placetype
end
local all_display_aliases_found = {}
local all_others_found = {}
for group, key, spec in m_locations.iterate_matching_location {
placetypes = equiv_placetypes,
placename = placename,
alias_resolution = "display",
} do
if spec.alias_of and spec.display then
insert(all_display_aliases_found, {group, key, spec, spec.display_as_full})
else
insert(all_others_found, {group, key, spec})
end
end
if not all_display_aliases_found[1] then
return placename
elseif all_display_aliases_found[2] then
internal_error("Found multiple matching display aliases for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
elseif all_others_found[1] then
internal_error("Found a display alias along with other possible meanings for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
else
local group, key, spec, as_full = unpack(all_display_aliases_found[1])
local full, elliptical = m_locations.key_to_placename(group, key)
return as_full and full or elliptical
end
end
--[==[
If `placename` of type `placetype` is a display alias, convert it to its canonical form; otherwise, return unchanged.
Display aliases transform certain placenames into canonical displayed forms. For example, if any of `country/US`,
`country/USA` or `country/United States of America` (or `c/US`, etc.) are given, the result will be displayed as
`United States`.
'''NOTE''': Display aliases change what is displayed from what the editor wrote in the Wikitext. As a result, they
should (a) be non-political in nature, and (b) not involve a change where the word `the` needs to be added or removed.
For example, normalizing `US` and `USA` to `United States` for display purposes is OK but normalizing `Burma` to
`Myanmar` is not (instead a cat alias should be used) because the terms `Burma` and `Myanmar` have clear political
connotations. Similarly, we have a display alias that maps the old name of `Macedonia` as a country (but not a region!)
to `North Macedonia`, but `Republic of Macedonia` is mapped to `North Macedonia` only as a cat alias because the two
terms differ in their use of `the`. (For example, if we had a display alias mapping `Republic of Macedonia` to
`North Macedonia`, the call {{tl|place|en|the <<capital city>> of the <<c/Republic of Macedonia>>}} would wrongly
display as `the [[capital city]] of the [[North Macedonia]]`.) Generally, display normalizations tend to involve
alternative forms (e.g. abbreviations, ellipses, foreign spellings) where the normalization improves clarity and
consistency.
]==]
function export.resolve_placename_display_aliases(placetype, placename)
-- If the placename is a link, apply the alias inside the link.
-- This pattern matches both piped and unpiped links. If the link is not piped, the second capture (linktext) will
-- be empty.
local link, linktext = rmatch(placename, "^%[%[([^|%[%]]+)|?([^|%[%]]-)%]%]$")
if link then
if linktext ~= "" then
local alias = resolve_unlinked_placename_display_aliases(placetype, linktext)
return "[[" .. link .. "|" .. alias .. "]]"
else
local alias = resolve_unlinked_placename_display_aliases(placetype, link)
return "[[" .. alias .. "]]"
end
else
return resolve_unlinked_placename_display_aliases(placetype, placename)
end
end
--[==[
Generate the "prefixed" version of a bare key, i.e. prefix it with `the` if correct for this key.
]==]
function export.get_prefixed_key(key, spec)
if spec.the then
return "the " .. key
else
return key
end
end
-- Necessary for use by [[Module:place]]. FIXME: Reorganize the modules so this isn't necessary.
export.iterate_matching_location = m_locations.iterate_matching_location
--[=[
Iterator that iterates over holonyms in `place_desc`. If `first_holonym_index` is given, start iterating at the
specified holonym and stop either when there are no more holonyms or a holonym with modifier `:also` is found. If
`first_holonym_index` is nil or omitted, iterate over all holonyms regardless. If `include_raw_text_holonyms` is
specified, raw text holonyms (those not of the form `placetype/placename`) are returned as well; they can be identified
by the fact that the `placetype` field in the holonym structure is nil. Two values are returned at each iteration, the
holonym index and holonym structure, similar to `ipairs()`.
]=]
function export.get_holonyms_to_check(place_desc, first_holonym_index, include_raw_text_holonyms)
local stop_at_also = not not first_holonym_index
return function(place_desc, index)
while true do
index = index + 1
local this_holonym = place_desc.holonyms[index]
-- If we were passed in a starting holonym index, go up to but not including a holonym marked with `:also`
-- (continue_cat_loop); the categorization code will then restart the loop at that holonym. That holonym
-- will have `:also` marked on it, so make sure not to stop immediately if the first holonym is marked with
-- `:also`.
if not this_holonym or stop_at_also and index > first_holonym_index and this_holonym.continue_cat_loop then
return nil
end
-- If not placetype, we're processing raw text, which we normally want to skip.
if include_raw_text_holonyms or this_holonym.placetype then
return index, this_holonym
end
end
end, place_desc, first_holonym_index and first_holonym_index - 1 or 0
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, iterate over all
such known locations, returning for each location the corresponding key, spec and group as well as the trail of
ancestral containers. Unlike `iterate_matching_location()`, this specifically checks that there is no mismatch between
the location's containers at any level and any of the following holonyms in the {{tl|place}} spec. The fields in `data`
are:
* `holonym_placetype`: The placetype of the holonym. It can actually be a list of possible placetypes, as with
`iterate_matching_location()`.
* `holonym_placename`: The placename of the holonym.
* `holonym_index`: The index of the holonym among the holonyms in `place_desc`, or nil if the holonym is not among the
holonyms in `place_desc`. (If a holonym index is given, we check for container mismatches among the holonyms
following the specified index, stopping either when encountering a holonym marked with modifier `:also` or, if none
exist, when we run out of holonyms. If no holonym index is given, we check all holonyms for container mismatches.)
* `place_desc`: Description of the place; used for the holonyms, to check for container mismatches.
Returns four values: the location group, the canonical key by which the location is known, the spec object describing
the location and the trail of ancestral containers for the location. The first three values are the same as for
`iterate_matching_location`.
]==]
function export.iterate_matching_holonym_location(data)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
local matching_location_iterator = m_locations.iterate_matching_location {
placetypes = holonym_placetype,
placename = holonym_placename,
}
return function()
while true do
local group, key, spec = matching_location_iterator()
if not group then
return nil
end
local container_trail = {}
-- For each level of container, check that there are no mismatches (i.e. other location of the same
-- placetype) mentioned. We allow a mismatch at a given level if there's also a match with the container
-- at that level. For example, in the case of Kansas City, defined in [[Module:place/locations]] as a city
-- in Missouri, if we define it as {{tl|place|city|s/Missouri,Kansas}}, we ignore the mismatching state of
-- Kansas because the correct state of Missouri was also mentioned. But imagine we are defining Newark,
-- Delaware as {{tl|place|city|s/Delaware|c/US}} and (as is the case) we have an entry for Newark, New
-- Jersey in [[Module:place/locations]]. Just because the containing location `US` matches isn't enough,
-- because Newark, NJ also has New Jersey as a containing location and there's a mismatch at that level. If
-- there are no mismatches at any level we assume we're dealing with the right known location.
--
-- If at a given level there are multiple containing locations, we count a match if any holonym matches any
-- containing location, and a mismatch only if a holonym exists of the same placetype that doesn't match any
-- containing location.
local containers_mismatch = false
for containers in m_locations.iterate_containers(group, key, spec) do
insert(container_trail, containers)
local match_at_level = false
local mismatch_at_level = false
for other_holonym_index, other_holonym in export.get_holonyms_to_check(place_desc,
holonym_index and holonym_index + 1 or nil) do
local other_source_holonym = other_holonym.augmented_from_holonym
if other_source_holonym and other_source_holonym.placetype == holonym_placetype and
other_source_holonym.unlinked_placename ~= holonym_placename then
-- Ignore holonyms added during the augmentation process for other holonyms of the same
-- placetype as the placetype of the holonym we're considering. See comment in
-- augment_holonyms_with_container() for why we do this.
-- continue; grrr, no 'continue' in Lua
else
local holonym_matches_at_level = false
local holonym_exists_with_same_placetype = false
for _, container in ipairs(containers) do
if not container.spec.no_check_holonym_mismatch then
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
local placetypes = container.spec.placetype
if type(placetypes) ~= "table" then
placetypes = {placetypes}
end
local placetype_equivs = {}
for _, pt in ipairs(placetypes) do
m_table.extend(placetype_equivs, export.get_placetype_equivs(pt))
end
local this_holonym_matches = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype and
(other_holonym.unlinked_placename == full_container_placename or
other_holonym.unlinked_placename == elliptical_container_placename)
end
)
if this_holonym_matches then
holonym_matches_at_level = true
break
end
local this_holonym_exists_with_same_placetype = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype
end
)
if this_holonym_exists_with_same_placetype then
-- We seem to have a mismatch at this level. But before we decide conclusively that this
-- is the case, check to see whether the putative mismatch is an alias and matches when
-- we resolve the alias.
for oh_group, oh_key, oh_spec, oh_container_trail in
export.iterate_matching_holonym_location {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = place_desc,
} do
local oh_full_placename, oh_elliptical_placename =
m_locations.key_to_placename(oh_group, oh_key)
if oh_full_placename == full_container_placename or
oh_elliptical_placename == elliptical_container_placename then
-- Alias matched when resolved.
this_holonym_matches = true
break
end
end
if this_holonym_matches then
-- Alias matched above when resolved.
holonym_matches_at_level = true
break
else
-- Not an alias, or doesn't match when resolved. We have a true mismatch.
holonym_exists_with_same_placetype = true
end
end
end
end
if holonym_matches_at_level then
match_at_level = true
break
end
if holonym_exists_with_same_placetype then
mismatch_at_level = true
end
end
end
if not match_at_level and mismatch_at_level then
containers_mismatch = true
break
end
end
if not containers_mismatch then
return group, key, spec, container_trail
end
end
end
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, find and return the
corresponding key, spec and group as well as the trail of ancestral containers. This is like
`iterate_matching_holonym_location()` but throws an error if more than one location matches. (An example where this
would happen is {{tl|place|en|neighborhood|city/Newcastle}}, because there are two known locations named Newcastle. To
fix this, specify additional following disambiguating holonyms, e.g.
{{tl|place|en|neighborhood|city/Newcastle|s/New South Wales}}.
]==]
function export.find_matching_holonym_location(data)
local all_found = {}
for group, key, spec, container_trail in export.iterate_matching_holonym_location(data) do
insert(all_found, {group, key, spec, container_trail})
end
if not all_found[1] then
return nil
elseif all_found[2] then
local holonym_placetype = data.holonym_placetype
if type(holonym_placetype) == "table" then
holonym_placetype = concat(holonym_placetype, ",")
end
local found_keys = {}
for _, found in ipairs(all_found) do
local _, key, _, _ = unpack(found)
insert(found_keys, key)
end
error(("Found multiple matching locations for holonym '%s/%s'; specify disambiguating context in the " ..
"containing holonyms: %s"):format(holonym_placetype, data.holonym_placename, dump(found_keys)))
else
return unpack(all_found[1])
end
end
------------------------------------------------------------------------------------------
-- Placename and placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
This is a map from aliases to their canonical forms. Any placetypes appearing as keys here will be mapped to their
canonical forms in all respects, including the display form. Contrast entries in 'placetype_data' with a fallback, which
applies to categorization and other processes but not to display.
The most important aliases are for holonym placetypes, particularly those that occur often such as "country", "state",
"province" and the like. Particularly long placetypes that mostly occur as entry placetypes (e.g.
"census-designated place") can be given abbreviations, but it is generally preferred to spell out the entry placetype.
Note also that we purposely avoid certain abbreviations that would be ambiguous (e.g. "d", which could variously be
interpreted as "department", "district" or "division").
]==]
export.placetype_aliases = {
["acomm"] = "autonomous community",
["adr"] = "administrative region",
["adterr"] = "administrative territory", -- Pakistan
["aobl"] = "autonomous oblast",
["aokr"] = "autonomous okrug",
["ap"] = "autonomous province",
["apref"] = "autonomous prefecture",
["aprov"] = "autonomous province",
["ar"] = "autonomous region",
["arch"] = "archipelago",
["arep"] = "autonomous republic",
["aterr"] = "autonomous territory",
["atu"] = "autonomous territorial unit",
["bor"] = "borough",
["c"] = "quốc gia",
["can"] = "canton",
["carea"] = "council area",
["cc"] = "constituent country",
["cdblock"] = "community development block",
["cdep"] = "Crown dependency",
["CDP"] = "census-designated place",
["cdp"] = "census-designated place",
["clcity"] = "county-level city",
["co"] = "county",
["cobor"] = "county borough",
["colcity"] = "county-level city",
["coll"] = "collectivity",
["comm"] = "community",
["cont"] = "lục địa",
["contr"] = "continental region",
["contregion"] = "continental region",
["cpar"] = "civil parish",
["damun"] = "direct-administered municipality",
["dep"] = "dependency",
["department capital"] = "departmental capital",
["dept"] = "department",
["depterr"] = "dependent territory",
["dist"] = "district",
["distmun"] = "district municipality",
["div"] = "division",
["emp"] = "empire",
["fpref"] = "French prefecture",
["gov"] = "governorate",
["govnat"] = "governorate",
["home-rule city"] = "home rule city",
["home-rule municipality"] = "home rule municipality",
["inner-city area"] = "inner city area",
["ires"] = "Indian reservation",
["isl"] = "island",
["lbor"] = "London borough",
["lga"] = "local government area",
["lgarea"] = "local government area",
["lgd"] = "local government district",
["lgdist"] = "local government district",
["metbor"] = "metropolitan borough",
["metcity"] = "metropolitan city",
["metmun"] = "metropolitan municipality",
["mtn"] = "mountain",
["mun"] = "municipality",
["mundist"] = "municipal district",
["nonmetropolitan county"] = "non-metropolitan county",
["obl"] = "oblast",
["okr"] = "okrug",
["p"] = "province",
["par"] = "parish",
["parmun"] = "parish municipality",
["pen"] = "peninsula",
["plcity"] = "prefecture-level city",
["plcolony"] = "Polish colony",
["pref"] = "prefecture",
["prefcity"] = "prefecture-level city",
["preflcity"] = "prefecture-level city",
["prov"] = "province",
["r"] = "region",
["range"] = "mountain range",
["rcm"] = "regional county municipality",
["rcomun"] = "regional county municipality",
["rdist"] = "regional district",
["rep"] = "republic",
["rhrom"] = "rural hromada",
["riv"] = "river",
["rmun"] = "regional municipality",
["robor"] = "royal borough",
["romp"] = "Roman province",
["runit"] = "regional unit",
["rurmun"] = "rural municipality",
["s"] = "state",
["sar"] = "special administrative region",
["shrom"] = "settlement hromada",
["spref"] = "subprefecture",
["sprefcity"] = "sub-prefectural city",
["sprovcity"] = "subprovincial city",
["submet city"] = "sub-metropolitan city",
["submetropolitan city"] = "sub-metropolitan city",
["sub-prefecture-level city"] = "sub-prefectural city",
["sub-provincial city"] = "subprovincial city",
["sub-provincial district"] = "subprovincial district",
["terr"] = "territory",
["terrauth"] = "territorial authority",
["twp"] = "township",
["twpmun"] = "township municipality",
["uauth"] = "unitary authority",
["ucomm"] = "unincorporated community",
["udist"] = "unitary district",
["uhrom"] = "urban hromada",
["uterr"] = "union territory",
["utwpmun"] = "united township municipality",
["val"] = "valley",
["vdc"] = "village development committee",
["vil"] = "village",
["voi"] = "voivodeship",
["wcomm"] = "Welsh community",
}
local no_link_def_article = {link = false, article = ""}
local no_link_no_article = {link = false, article = false}
--[==[ var:
These qualifiers can be prepended onto any placetype and will be handled correctly. For example, the placetype
`large city` will be displayed as `large <nowiki>[[city]]</nowiki>` and categorized as if `city` were specified. If the
value in the following table is a string, the qualifier will display according to the string. If the value is `true`,
the qualifier will be linked to its corresponding Wiktionary entry. If the value is `false`, the qualifier will not be
linked but will appear as-is. Note that these qualifiers do not override placetypes with entries elsewhere that contain
those same qualifiers. For example, the entry for `inland sea` in `placetype_data` will apply in preference to treating
`inland sea` as equivalent to `sea`.
]==]
export.placetype_qualifiers = {
-- generic qualifiers
["huge"] = false,
["tiny"] = false,
["large"] = false,
["big"] = false,
["mid-size"] = false,
["mid-sized"] = false,
["small"] = false,
["sizable"] = false,
["important"] = false,
["long"] = false,
["short"] = false,
["major"] = false,
["minor"] = false,
["high"] = false,
["tall"] = false,
["low"] = false,
["left"] = false, -- left tributary
["right"] = false, -- right tributary
["modern"] = false, -- for use in opposition to "ancient" in another definition
-- "former" qualifiers
["abandoned"] = true,
["ancient"] = true,
["deserted"] = true,
["extinct"] = true,
["former"] = false,
["historic"] = "historical",
["historical"] = true,
["medieval"] = true,
["mediaeval"] = true,
["ruined"] = true,
["traditional"] = true,
-- sea qualifiers
["coastal"] = true,
["inland"] = true, -- note, we also have an entry in placetype_data for 'inland sea' to get a link to [[inland sea]]
["maritime"] = true,
["overseas"] = true,
["seaside"] = true,
["beachfront"] = true,
["beachside"] = true,
["riverside"] = true,
-- lake qualifiers
["freshwater"] = true,
["saltwater"] = true,
["endorheic"] = true,
["oxbow"] = true,
["ox-bow"] = "[[oxbow]]", -- [[ox-bow]] is a red link
["tidal"] = true,
-- land qualifiers
["hilltop"] = true,
["hilly"] = true,
["insular"] = true,
["peninsular"] = true,
["chalk"] = true,
["karst"] = true,
["limestone"] = true,
["mountainous"] = true,
["mountaintop"] = true,
["alpine"] = true,
["volcanic"] = true, -- for an island
-- political status qualifiers
["autonomous"] = true,
["incorporated"] = true,
["special"] = true,
["unincorporated"] = true,
["coterminous"] = true,
-- monetary status/etc. qualifiers
["fashionable"] = true,
["wealthy"] = true,
["affluent"] = true,
["declining"] = true,
-- city vs. rural qualifiers
["urban"] = true,
["suburban"] = true,
["exurban"] = true,
["outlying"] = true,
["remote"] = true,
["rural"] = true,
["outback"] = true,
["inner"] = false,
["inner-city"] = true,
["central"] = false,
["outer"] = false,
-- land use qualifiers
["residential"] = true,
["agricultural"] = true,
["business"] = true,
["commercial"] = true,
["industrial"] = true,
-- business use qualifiers
["railroad"] = true,
["railway"] = true,
["farming"] = true,
["fishing"] = true,
["mining"] = true,
["logging"] = true,
["cattle"] = true,
-- tourism use qualifiers
["resort"] = true, -- note, we also have 'resort city' and 'resort town', that take precedecne
["spa"] = true, -- note, we also have 'spa city' and 'spa town', that take precedecne
["ski"] = true, -- note, we also have 'ski resort city' and 'ski resort town', that take precedecne
-- religious qualifiers
["holy"] = true,
["sacred"] = true,
["religious"] = true,
["secular"] = true,
-- qualifiers for nonexistent places
["claimed"] = false,
["fictional"] = true,
["legendary"] = true,
["mythical"] = true,
["mythological"] = true,
-- directional qualifiers
["northern"] = false,
["southern"] = false,
["eastern"] = false,
["western"] = false,
["north"] = false,
["south"] = false,
["east"] = false,
["west"] = false,
["northeastern"] = false,
["southeastern"] = false,
["northwestern"] = false,
["southwestern"] = false,
["northeast"] = false,
["southeast"] = false,
["northwest"] = false,
["southwest"] = false,
-- seasonal qualifiers
["summer"] = true, -- e.g. for 'summer capital'
["winter"] = true,
-- legal status qualifiers
-- FIXME: Two-word qualifiers don't work yet. But you can enter "de-facto" and it's canonicalized to [[de facto]].
["official"] = true,
["unofficial"] = true,
["de facto"] = true, -- 'de facto capital'
["de-facto"] = "[[de facto]]", -- [[de-facto]] is a red link
["de jure"] = true, -- 'de jure capital'
["de-jure"] = "[[de jure]]", -- [[de-jure]] is a red link
-- NOTE: 'unrecognized/unrecognised' are handled as placetypes 'unrecognized country', 'unrecognized state'
-- misc. qualifiers
["planned"] = true,
["chartered"] = true,
["landlocked"] = true,
["uninhabited"] = true,
-- superlative qualifiers
["first"] = no_link_def_article,
["second"] = no_link_def_article, -- for "second largest" etc.
["third"] = no_link_def_article,
["fourth"] = no_link_def_article,
["last"] = no_link_def_article,
["only"] = no_link_def_article,
["sole"] = no_link_def_article,
["main"] = no_link_def_article,
["largest"] = no_link_def_article,
["biggest"] = no_link_def_article,
["smallest"] = no_link_def_article,
["shortest"] = no_link_def_article,
["longest"] = no_link_def_article,
["tallest"] = no_link_def_article,
["highest"] = no_link_def_article,
["lowest"] = no_link_def_article,
["leftmost"] = no_link_def_article,
["rightmost"] = no_link_def_article,
["innermost"] = no_link_def_article,
["outermost"] = no_link_def_article,
["northernmost"] = no_link_def_article,
["southernmost"] = no_link_def_article,
["westernmost"] = no_link_def_article,
["easternmost"] = no_link_def_article,
["northwesternmost"] = no_link_def_article,
["southwesternmost"] = no_link_def_article,
["northeasternmost"] = no_link_def_article,
["southeasternmost"] = no_link_def_article,
-- several/various
["several"] = no_link_no_article,
["various"] = no_link_no_article,
["numerous"] = no_link_no_article,
["multiple"] = no_link_no_article,
["many"] = no_link_no_article,
["other"] = no_link_no_article,
}
--[==[ var:
In this table, the key qualifiers should be treated the same as the value qualifiers for categorization purposes. This
is overridden by `placetype_data` and `qualifier_to_placetype_equivs`.
]==]
export.former_qualifiers = {
["abandoned"] = {"FORMER"},
["ancient"] = {"ANCIENT", "FORMER"},
["former"] = {"FORMER"},
["extinct"] = {"FORMER"},
["historic"] = {"FORMER"},
["historical"] = {"FORMER"},
["medieval"] = {"ANCIENT", "FORMER"},
["mediaeval"] = {"ANCIENT", "FORMER"},
["ruined"] = {"ANCIENT", "FORMER"},
["traditional"] = {"FORMER"},
}
--[==[ var:
In this table, any placetypes containing these qualifiers that do not occur in `placetype_data` should be mapped to the
specified placetypes for categorization purposes. Entries here are overridden by `placetype_data`.
]==]
export.qualifier_to_placetype_equivs = {
["fictional"] = "fictional location",
["legendary"] = "mythological location",
["mythical"] = "mythological location",
["mythological"] = "mythological location",
-- For e.g. Taiwan as a "claimed province" of China; parts of Belize as claimed by Guatemala; various islands
-- claimed by various parties in East Asia. FIXME: We should conditionalize on what is being claimed since there are
-- also claimed capitals, e.g. Israel and Palestine claim Jerusalem as their capital.
["claimed"] = "claimed political division",
}
--[==[ var:
Mapping from placetypes to the corresponding plural category-only placetype for a capital of that placetype. The reverse
mapping also exists.
]==]
export.placetype_to_capital_cat = {
["autonomous community"] = "autonomous community capitals",
["canton"] = "cantonal capitals",
["comarca"] = "comarca capitals",
["country"] = "national capitals",
-- The following are not obviously different from 'county seats' but the latte terminology is used in the US.
["county"] = "county capitals",
["department"] = "departmental capitals",
["district"] = "district capitals",
["division"] = "division capitals",
["emirate"] = "emirate capitals",
["governorate"] = "governorate capitals",
["hromada"] = "hromada capitals",
["krai"] = "krai capitals",
["metropolitan city"] = "metropolitan city capitals",
["municipality"] = "municipal capitals",
["oblast"] = "oblast capitals",
["okrug"] = "okrug capitals",
["prefecture"] = "prefectural capitals",
["province"] = "provincial capitals",
["raion"] = "raion capitals",
["regency"] = "regency capitals",
["region"] = "regional capitals",
["regional unit"] = "regional unit capitals",
["republic"] = "republic capitals",
["state"] = "state capitals",
["territory"] = "territorial capitals",
["voivodeship"] = "voivodeship capitals",
}
--[==[ var:
This contains placenames that should be preceded by an article (almost always "the"). '''NOTE''': There are multiple
ways that placenames can come to be preceded by "the":
# Listed here.
# Given in [[Module:place/locations]] with an initial "the". All such placenames are added to this map by the code
just below the map.
# The placetype of the placename has `holonym_use_the = true` in its placetype_data.
# A regex in placename_the_re matches the placename.
Note that "the" is added only before the first holonym in a place description.
]==]
export.placename_article = {
-- This should only contain info that can't be inferred from [[Module:place/locations]].
["archipelago"] = {
["Cyclades"] = "the",
["Dodecanese"] = "the",
},
["country"] = {
["Holy Roman Empire"] = "the",
},
["empire"] = {
["Holy Roman Empire"] = "the",
},
["island"] = {
["North Island"] = "the",
["South Island"] = "the",
},
["region"] = {
["Balkans"] = "the",
["Russian Far East"] = "the",
["Caribbean"] = "the",
["Caucasus"] = "the",
["Middle East"] = "the",
["New Territories"] = "the",
["North Caucasus"] = "the",
["South Caucasus"] = "the",
["West Bank"] = "the",
["Gaza Strip"] = "the",
},
["valley"] = {
["San Fernando Valley"] = "the",
},
}
--[==[ var:
Regular expressions to apply to determine whether we need to put 'the' before a holonym. The key "*" applies to all
holonyms, otherwise only the regexes for the holonym's placetype apply.
]==]
export.placename_the_re = {
-- We don't need entries for peninsulas, seas, oceans, gulfs or rivers
-- because they have holonym_use_the = true.
["*"] = {"^Isle of ", " Islands$", " Mountains$", " Empire$", " Country$", " Region$", " District$", "^City of "},
["bay"] = {"^Vịnh của "},
["lake"] = {"^Hồ của "},
["country"] = {"^Republic of ", " Republic$"},
["republic"] = {"^Republic of ", " Republic$"},
["region"] = {"^Vùng của "},
["river"] = {"^Sông của "},
["local government area"] = {"^Shire of "},
["county"] = {"^Shire of "},
["Indian reservation"] = {" Reservation", " Nation"},
["tribal jurisdictional area"] = {" Reservation", " Nation"},
}
--[==[ var:
If any of the following holonyms are present, the associated holonyms are automatically added to the end of the list of
holonyms for categorization (but not display) purposes.
]==]
export.cat_implications = {
["region"] = {
["Eastern Europe"] = {"continent/Europe"},
["Central Europe"] = {"continent/Europe"},
["Western Europe"] = {"continent/Europe"},
["South Europe"] = {"continent/Europe"},
["Southern Europe"] = {"continent/Europe"},
["Northern Europe"] = {"continent/Europe"},
["Northeast Europe"] = {"continent/Europe"},
["Northeastern Europe"] = {"continent/Europe"},
["Southeast Europe"] = {"continent/Europe"},
["Southeastern Europe"] = {"continent/Europe"},
["North Caucasus"] = {"continent/Europe"},
["South Caucasus"] = {"continent/Asia"},
["South Asia"] = {"continent/Asia"},
["Southern Asia"] = {"continent/Asia"},
["East Asia"] = {"continent/Asia"},
["Eastern Asia"] = {"continent/Asia"},
["Central Asia"] = {"continent/Asia"},
["West Asia"] = {"continent/Asia"},
["Western Asia"] = {"continent/Asia"},
["Southeast Asia"] = {"continent/Asia"},
["North Asia"] = {"continent/Asia"},
["Northern Asia"] = {"continent/Asia"},
["Anatolia"] = {"continent/Asia"},
["Asia Minor"] = {"continent/Asia"},
["Mesopotamia"] = {"continent/Asia"},
["North Africa"] = {"continent/Africa"},
["Central Africa"] = {"continent/Africa"},
["West Africa"] = {"continent/Africa"},
["East Africa"] = {"continent/Africa"},
["Southern Africa"] = {"continent/Africa"},
["Central America"] = {"continent/Central America"},
["Caribbean"] = {"continent/North America"},
["Polynesia"] = {"continent/Oceania"},
["Micronesia"] = {"continent/Oceania"},
["Melanesia"] = {"continent/Oceania"},
["Siberia"] = {"country/Russia", "continent/Asia"},
["Russian Far East"] = {"country/Russia", "continent/Asia"},
["South Wales"] = {"constituent country/Wales", "continent/Europe"},
["Balkans"] = {"continent/Europe"},
["West Bank"] = {"country/Palestine", "continent/Asia"},
["Gaza"] = {"country/Palestine", "continent/Asia"},
["Gaza Strip"] = {"country/Palestine", "continent/Asia"},
}
}
------------------------------------------------------------------------------------------
-- Category and display handlers --
------------------------------------------------------------------------------------------
local function city_type_cat_handler(data)
local entry_placetype = data.entry_placetype
local generic_before_non_cities = export.get_placetype_prop(entry_placetype, "generic_before_non_cities")
if not generic_before_non_cities then
internal_error("city_type_cat_handler called on placetype %s that doesn't have a `generic_before_non_cities`" ..
" setting", entry_placetype)
end
local plural_entry_placetype = export.pluralize_placetype(entry_placetype)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and not spec.is_city then
-- Categorize both in key, and in the larger polity that the key is part of, e.g. [[Hirakata]] goes in both
-- "Cities in Osaka Prefecture" and "Cities in Japan". (But don't do the latter if no_container_cat is set.)
local cap_plural_entry_placetype = ucfirst(plural_entry_placetype)
local retcats = {("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(key, spec))}
if container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(container.key, container.spec)))
end
end
return retcats
end
end
local function capital_city_cat_handler(data, non_city)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
-- The first time we're called we want to return something; otherwise we will be called for later-mentioned
-- holonyms, which can result in wrongly classifying into e.g. `National capitals`. Simulate the loop in
-- find_placetype_cat_specs() over holonyms so we get the proper `Cities in ...` categories as well as the capital
-- category/categories we add below.
local retcats
if not non_city and place_desc.holonyms then
for h_index, holonym in export.get_holonyms_to_check(place_desc, holonym_index) do
local h_placetype, h_placename = holonym.placetype, holonym.unlinked_placename
retcats = city_type_cat_handler {
entry_placetype = "city",
holonym_placetype = h_placetype,
holonym_placename = h_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if retcats then
break
end
end
end
if not retcats then
retcats = {}
end
-- Now find the appropriate capital-type category for the placetype of the holonym, e.g. 'State capitals'. If we
-- recognize the holonym among the known holonyms in [[Module:place/locations]], also add a category like 'State
-- capitals of the United States'. Truncate e.g. 'autonomous region' to 'region', 'union territory' to 'territory'
-- when looking up the type of capital category, if we can't find an entry for the holonym placetype itself (there's
-- an entry for 'autonomous community').
local capital_cat = export.placetype_to_capital_cat[holonym_placetype]
if not capital_cat then
capital_cat = export.placetype_to_capital_cat[holonym_placetype:gsub("^.* ", "")]
end
if capital_cat then
capital_cat = ucfirst(capital_cat)
local inserted_specific_variant_cat = false
if holonym_index then
-- Now find the first recognized holonym location. We don't stop when :also is seen because of the common pattern
-- where we use :also to specify that a given city is the capital at multiple surrounding levels.
local matching_group, matching_key, matching_spec, matching_container_trail, matching_holonym_index
for h_index = holonym_index, #place_desc.holonyms do
if place_desc.holonyms[h_index].placetype then
matching_group, matching_key, matching_spec, matching_container_trail = export.find_matching_holonym_location {
holonym_placetype = place_desc.holonyms[h_index].placetype,
holonym_placename = place_desc.holonyms[h_index].unlinked_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if matching_group then
matching_holonym_index = h_index
break
end
end
end
if matching_holonym_index == holonym_index then
if matching_container_trail[1] and not matching_spec.no_container_cat then
for _, container in ipairs(matching_container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
elseif matching_holonym_index then
-- Check to make sure that the holonym placetype we were called on is listed among the
-- divtypes of the location we found.
local function insert_specific_variant_if_possible(key, spec)
return export.get_equiv_placetype_prop(holonym_placetype, function(pt)
local plural_holonym_placetype = export.pluralize_placetype(pt)
local saw_matching_div
if spec.divs then
local divs = spec.divs
if type(divs) ~= "table" then
divs = {divs}
end
for _, div in ipairs(divs) do
if type(div) ~= "table" then
div = {type = div}
end
if plural_holonym_placetype == div.type then
saw_matching_div = true
break
end
end
end
if saw_matching_div then
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(key, spec)))
return true
end
return false
end)
end
if insert_specific_variant_if_possible(matching_key, matching_spec) then
inserted_specific_variant_cat = true
elseif not matching_spec.no_container_cat then
for _, containers in ipairs(matching_container_trail) do
local saw_no_container_cat = false
for _, container in ipairs(containers) do
if insert_specific_variant_if_possible(container.key, container.spec) then
inserted_specific_variant_cat = true
break
end
saw_no_container_cat = saw_no_container_cat or container.spec.no_container_cat
end
if inserted_specific_variant_cat or saw_no_container_cat then
break
end
end
end
end
else
-- This happens when in an invocation like {{place|en|capital city|s/Haryana,Punjab}} for
-- [[Chandigarh]]. We fall back to older code that doesn't depend on the holonym index existing.
-- FIXME: This may not be necessary. In the example just given, when processing Haryana we add to
-- [[:Category:en:State capitals of India]], and nothing extra gets added when processing Punjab.
-- Possibly we can just skip this case entirely.
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
end
if not inserted_specific_variant_cat then
insert(retcats, capital_cat)
end
else
-- We didn't recognize the holonym placetype; just put in 'Capital cities'.
insert(retcats, "Capital cities")
end
return retcats
end
--[=[
This is invoked specially for all placetypes (see the `*` placetype key at the bottom of `placetype_data`). This is used
in two ways:
# To add pages to generic holonym categories like [[:Category:en:Places in Merseyside, England]] (and
[[:Category:en:Places in England]]) for any pages that have `co/Merseyside` as their holonym.
# To categorize demonyms in bare placename categories like [[:Category:en:Merseyside, England]] if the demonym
description mentions `co/Merseyside` and doesn't mention a more specific placename that also has a category. (In this
case there are none, but we can have demonyms at multiple levels, e.g. in France for individual villages, departments,
administrative regions, and for the entire country, and for example we only want to categorize a demonym into
[[:Category:France]] if no more specific category applies.) Unlike when invoked from {{tl|place}}, a demonym
invocation only adds the most specific holonym category and not the category of any containing polity (hence if we
add [[:Category:en:Merseyside, England]] we won't also add [[:Category:England]]).
This code also handles cities; e.g. for the first use case above, it would be used to add a page that has `city/Boston`
as a holonym to [[:Category:en:Places in Boston]], along with [[:Category:en:Places in Massachusetts, USA]] and
[[:Category:en:Places in the United States]]. The city handler tries to deal with the possibility of multiple cities
having the same name. For example, the code in [[Module:place/locations]] knows about the city of [[Columbus]],
[[Ohio]], which has containing polities `Ohio` (a state) and `the United States` (a country). If either containing
polity is mentioned, the handler proceeds to return the key `Columbus` (along with `Ohio, USA` and `the United States`).
Otherwise, if any other state or country is mentioned, the handler returns nothing, and otherwise it assumes the
mentioned city is the one we're considering and returns `Columbus` etc. This works correctly if the place only mentions
Ohio and a holonym for a Columbus in a different country is encountered, because of the function
`augment_holonyms_with_container`, which adds the US as a holonym when Ohio is encountered.
The single parameter `data` is as in category handlers. The return value is a list of categories (without the preceding
language code).
]=]
local function generic_place_cat_handler(data)
local from_demonym = data.from_demonym
local retcats = {}
local function insert_retkey(key, spec)
if from_demonym then
insert(retcats, key)
else
insert(retcats, ("Địa danh của %s"):format(export.get_prefixed_key(key, spec)))
end
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
if not spec.no_generic_place_cat then
-- This applies to continents and continental regions.
insert_retkey(key, spec)
end
-- Categorize both in key, and in the larger location(s) that the key is part of, e.g. [[Hirakata]] goes in
-- both [[Category:Places in Osaka Prefecture, Japan]] and [[Category:Places in Japan]]. But not when
-- no_container_cat is set (e.g. for 'United Kingdom').
if not spec.no_container_cat then
for _, container_set in ipairs(container_trail) do
local stop_adding_containers = false
for _, container in ipairs(container_set) do
if not container.spec.no_generic_place_cat then
insert_retkey(container.key, container.spec)
end
if container.spec.no_container_cat then
stop_adding_containers = true
end
end
if stop_adding_containers then
break
end
end
end
return retcats
end
end
--[==[
Special category handler run for all placetypes that checks for specified division placetypes of known locations and
categorizes appropriately.
]==]
function export.political_division_cat_handler(data)
if data.from_demonym then
return
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
local divlists = {}
if spec.divs then
insert(divlists, spec.divs)
end
if spec.addl_divs then
insert(divlists, spec.addl_divs)
end
for _, divlist in ipairs(divlists) do
if type(divlist) ~= "table" then
divlist = {divlist}
end
for _, div in ipairs(divlist) do
if type(div) == "string" then
div = {type = div}
end
local sgdiv = export.maybe_singularize_placetype(div.type) or div.type
local prep = div.prep or "of"
local cat_as = div.cat_as or div.type
if type(cat_as) ~= "table" then
cat_as = {cat_as}
end
if not export.placetype_data[sgdiv] then
internal_error("Placetype %s associated with known location key %s and data %s not found in " ..
"`placetype_data`", sgdiv, key, spec)
end
if sgdiv == data.entry_placetype then
local retcats = {}
for _, pt_cat in ipairs(cat_as) do
if type(pt_cat) == "string" then
pt_cat = {type = pt_cat}
end
local pt_prep = pt_cat.prep or prep
insert(retcats, ucfirst(pt_cat.type) .. " " .. pt_prep .. " " ..
export.get_prefixed_key(key, spec))
end
return retcats
end
end
end
end
end
--[==[
This is used to add pages to "bare" categories like [[:Category:en:Georgia, USA]] for `[[Georgia]]` and any
foreign-language terms that are translations of the state of Georgia. We look at the page title (or its overridden value
in {{para|pagename}}) as well as the glosses in {{para|t}}/{{para|t2}} etc., various extra-info values such as the
modern names in {{para|modern}}, and any values specified using a form-of directive. We need to pay attention to the
entry placetypes specified so we don't overcategorize; e.g. the US state of Georgia is `[[Джорджия]]` in Russian but the
country of Georgia is `[[Грузия]]`, and if we just looked for matching names, we'd get both Russian terms categorized
into both [[:Category:ru:Georgia, USA]] and [[:Category:ru:Georgia]]. We also need to check the containing holonyms to
make sure there isn't a mismatch (so we don't e.g. categorize Newark, Delaware in [[:Category:en:Newark]], which is
intended for Newark, New Jersey).
]==]
function export.get_bare_categories(args, overall_place_spec)
local bare_cats = {}
local place_descs = overall_place_spec.descs
local possible_placetypes_by_place_desc = {}
for i, place_desc in ipairs(place_descs) do
possible_placetypes_by_place_desc[i] = {}
for _, placetype in ipairs(place_desc.placetypes) do
if not export.placetype_is_ignorable(placetype) then
local equivs = export.get_placetype_equivs(placetype, {register_former_as_non_former = true})
for _, equiv in ipairs(equivs) do
insert(possible_placetypes_by_place_desc[i], equiv.placetype)
end
end
end
end
local function check_term(term)
-- Treat Wikipedia links like local ones.
term = term:gsub("%[%[w:", "[["):gsub("%[%[wikipedia:", "[[")
term = export.remove_links_and_html(term)
term = term:gsub("^ ", "")
for i, place_desc in ipairs(place_descs) do
-- Iterate over all matching locations in case there are multiple, as with Delhi defined as
-- {{place|en|megacity/and/union territory|c/India|containing the national capital [[New Delhi]]}}.
for group, key, spec, container_trail in export.iterate_matching_holonym_location {
holonym_placetype = possible_placetypes_by_place_desc[i],
holonym_placename = term,
place_desc = place_desc,
} do
insert(bare_cats, key)
end
end
end
-- FIXME: Should we only do the following if the language is English (requires that the lang is passed in)?
-- We should always do it if `pagename` is given (as it is with {{tcl}}) but maybe not otherwise unless 1=en. There
-- are cases like [[Ankara]] = English name for capital of Turkey, but also the name in various languages for the
-- capital of Ghana (= English [[Accra]]). But this should get caught by mismatching the containing country. The
-- advantage of checking when the language isn't English is we catch those places that fail to give an English
-- translation but where the translation happens to be the same as the other-language spelling. However, I don't
-- know how often this situation occurs.
check_term(args.pagename or mw.loadData("Module:headword/data").pagename)
for _, t in ipairs(args.t) do
check_term(t)
end
local function check_termobj_list(terms)
for _, term in ipairs(terms) do
if term.eq then
check_term(term.eq)
end
if term.alt or term.term then
check_term(term.alt or term.term)
end
end
end
for _, extra_info_terms in ipairs(overall_place_spec.extra_info) do
local arg = extra_info_terms.arg
if arg == "modern" or arg == "now" or arg == "full" or arg == "short" then
check_termobj_list(extra_info_terms.terms)
end
end
for _, directive in ipairs(overall_place_spec.directives) do
check_termobj_list(directive.terms)
end
return bare_cats
end
--[==[
This is used to augment the holonyms associated with a place description with the containing polities. For example,
given the following:
`# {{tl|place|en|subprefecture|pref/Hokkaido}}.`
We auto-add Japan as another holonym so that the term gets categorized into [[:Category:Subprefectures of Japan]].
To avoid over-categorizing we need to check to make sure no other countries are specified as holonyms.
]==]
function export.augment_holonyms_with_container(place_descs)
for _, place_desc in ipairs(place_descs) do
if place_desc.holonyms then
-- This ends up containing a copy of the original holonyms, with the augmented holonyms inserted in their
-- appropriate position. We don't just put them at the end because some holonyms have use the `:also`
-- modifier, which causes category processing to restart at that point after generating categories for a
-- preceding holonym, and we don't want the preceding holonym's augmented holonyms interfering with
-- categorization of a later holonym. We proceed from right to left, and each time we augment, we copy
-- the holonyms with the augmented holonym(s) inserted appropriately and replace the place description's
-- holonyms with the augmented ones before the next iteration. The reason for this is so that e.g.
-- {{place|neighborhood|city/Birmingham|co/West Midlands|cc/England}} doesn't throw an error during the
-- augmentation process due to 'Birmingham' referring to two known locations (in England and Alabama). If
-- we go left to right, we will throw an ambiguity error on `city/Birmingham` because code to exclude
-- Birmingham, Alabama needs `c/United Kingdom` present (to cause a mismatch with `c/United States`),
-- which isn't yet present as the augmentation code hasn't gotten to `cc/England` yet. For similar
-- reasons, we need to include the augmented holonyms in the holonyms considered in the next iteration
-- rather than modifying the place description once at athe end.
for i = #place_desc.holonyms, 1, -1 do
local holonym = place_desc.holonyms[i]
if holonym.placetype and not export.placetype_is_ignorable(holonym.placetype) then
local group, key, spec, container_trail = export.find_matching_holonym_location {
holonym_placetype = holonym.placetype,
holonym_placename = holonym.unlinked_placename,
holonym_index = i,
place_desc = place_desc,
}
if group and container_trail[1] and not spec.no_auto_augment_container then
local augmented_holonyms = {}
for j = 1, i do
insert(augmented_holonyms, place_desc.holonyms[j])
end
for _, containers in ipairs(container_trail) do
local any_no_auto_augment_container = false
for _, container in ipairs(containers) do
any_no_auto_augment_container = any_no_auto_augment_container or
container.spec.no_auto_augment_container
local containing_type = container.spec.placetype
if type(containing_type) == "table" then
-- If the containing type is a list, use the first element as the canonical variant.
containing_type = containing_type[1]
end
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
-- Don't side-effect holonyms while processing them.
local new_holonym = {
-- By the time we run, the display has already been generated so we don't need to
-- set display_placename.
placetype = containing_type,
-- placename_to_key() for the group should correctly handle both full and elliptical
-- placenames, but the full placename seems less likely to be ambiguous. FIXME: We
-- should just store the key directly and use it when available to avoid having to
-- convert key to placename and back to key.
unlinked_placename = full_container_placename,
-- Indicate that this is an augmented holonym, and was derived from the specified
-- holonym. In iterate_matching_holonym_location(), we ignore augmented holonyms
-- derived from holonyms that are different from the holonym we're searching for but
-- of the same placetype. This is to correctly handle a situation like
-- {{place|river|dept/Ardèche,Gard,Vaucluse,Bouches-du-Rhône|c/France}}. Here,
-- `Ardèche` is in `r/Auvergne-Rhône-Alpes`, while `Gard` is in `r/Occitania` and
-- the other two are in `r/Provence-Alpes-Côte d'Azur`. Augmenting proceeds from
-- right to left, so after it adds `r/Provence-Alpes-Côte d'Azur` to
-- `Bouches-du-Rhône`, Vaucluse gets augmented correctly but `Gard` fails to match
-- in find_matching_holonym_location() because of the mismatch between augmented
-- `r/Provence-Alpes-Côte d'Azur` and actual `r/Occitania`. Similarly, all later
-- calls to find_matching_holonym_location() fail to match `Gard` (and likewise
-- `Ardèche`) against any known location. To deal with this, we mark augmented
-- holoynms as being augmented due to a source holonym, and when processing a given
-- holonym, ignore augmented holonyms from other holonyms of the same placetype.
-- The restriction to the same placetype is so that `Birmingham` still gets
-- correctly disambiguated to Birmingham, England in the example given above near
-- the top of this function, using the augmented holonym `c/United Kingdom` added by
-- the specified `cc/England` (whose placetype `constituent country` differs from
-- the placetype `city` of Birmingham).
augmented_from_holonym = holonym,
}
insert(augmented_holonyms, new_holonym)
-- But it is safe to modify other parts of the place_desc.
export.key_holonym_into_place_desc(place_desc, new_holonym)
end
if any_no_auto_augment_container then
break
end
end
for j = i + 1, #place_desc.holonyms do
insert(augmented_holonyms, place_desc.holonyms[j])
end
place_desc.holonyms = augmented_holonyms
end
end
end
end
end
end
-- Cat handler for district, areas, neighborhoods and suburbs. Districts are tricky because they can either be political
-- divisions or city neighborhoods. Areas similarly can be political divisions (rarely; specifically, in Kuwait), city
-- neighborhoods or larger geographical areas/regions. We handle this as follows:
-- (1) `placetype_data` cat entries for specific countries or country divisions take precedence over cat_handlers, so if
-- the user says {{tl|place|district|s/Maharashtra|c/India}}, we won't even be called because there is an entry that
-- categorizes into [[:Category|Districts of Maharashtra, India]].
-- (2) If we're called, we check the holonym we're called on to see if it is a recognized city, e.g. if we're called
-- using {{tl|place|district|city/Mumbai|s/Maharashtra|c/India}}. If so, we categorize under e.g.
-- [[:Category:Neighbourhoods of Mumbai]]. (Choosing the spelling "neighbourhoods" because we're in India.)
-- (3) If we're called and the holonym is not a recognized city, we check if the placetype has has_neighborhoods set.
-- If so, it's "city-like" and we categorize under the first containing polity that we recognize. For example, if
-- we're called using {{tl|place|district|town/Northampton|co/Hampshire|s/Massachusetts|c/US}}, we should recognize
-- town as "city-like" and categorize under [[:Category:Neighborhoods in Massachusetts]]. (Note "in" not "of", and
-- note the spelling "neighborhoods" because we're in the US.)
-- (4) If the holonym is not city-like, we do nothing. If there's a city or city-like placetype farther up (e.g. we're
-- called as {{tl|place|district|ward/Foo|mun/Bar|...}}), we will handle the city-like entity according to (2) or
-- (3) when called on that holonym. Otherwise either the categorization in (1) takes place or there's no
-- categorization.
local function district_neighborhood_cat_handler(data)
local function get_plural_entry_placetype(location_spec, container_trail)
if data.entry_placetype == "suburb" then
return "Suburbs"
else
-- Check for `british_spelling` setting on the spec itself or any container.
local uses_british_spelling = location_spec.british_spelling
if uses_british_spelling == nil and container_trail then
for _, container_set in ipairs(container_trail) do
local must_outer_break = false
for _, container in ipairs(container_set) do
if container.spec.british_spelling ~= nil then
uses_british_spelling = container.spec.british_spelling
must_outer_break = true
break
end
end
if must_outer_break then
break
end
end
end
return uses_british_spelling and "Neighbourhoods" or "Neighborhoods"
end
end
-- First check the immediate holonym to see if it's a city or a city-like top-level entity (Hong Kong, Bonaire,
-- etc.)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and spec.is_city then
return {get_plural_entry_placetype(spec, container_trail) .. " of " .. export.get_prefixed_key(key, spec)}
end
-- If the entry placetype is neighbo(u)rhood, assume it is a neighborhood even if there isn't a city-like
-- entity father up the chain. (E.g. due to a mistaken use of m/ instead of mun/ for municipality.)
local has_neighborhoods
local entry_placetype = data.entry_placetype
if entry_placetype == "neighborhood" or entry_placetype == "neighbourhood" or entry_placetype == "suburb" then
has_neighborhoods = true
else
-- Otherwise, make sure the current holonym is city-like.
has_neighborhoods = export.get_equiv_placetype_prop(data.holonym_placetype, function(pt)
return export.get_placetype_prop(pt, "has_neighborhoods")
end, {continue_on_nil_only = true})
end
if has_neighborhoods then
-- Loop up the holonyms, looking for city and city-like entities in case of e.g. [[Sepulveda]] written
-- {{place|en|neighborhood|valley/San Fernando Valley|city/Los Angeles|s/California|c/USA}}
-- but also look for a recognizable poldiv, and if so categorize as "Neighborhoods in POLDIV". We need
-- to start with the current holonym, which is especially important for neighborhoods and suburbs that
-- may have the first holonym be a recognizable province, etc. but can't hurt otherwise. (Previously
-- we skipped the first/current holonym.)
for other_holonym_index, other_holonym in export.get_holonyms_to_check(data.place_desc,
data.holonym_index) do
local other_holonym_data = {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = data.place_desc,
}
local group, key, spec, container_trail = export.find_matching_holonym_location(other_holonym_data)
if group and not spec.is_former_place then
return {get_plural_entry_placetype(spec, container_trail) .. (spec.is_city and " of " or " in ") ..
export.get_prefixed_key(key, spec)}
end
end
end
end
function export.check_already_seen_string(holonym_placename, already_seen_strings)
local canon_placename = ulower(m_links.remove_links(holonym_placename))
if type(already_seen_strings) ~= "table" then
already_seen_strings = {already_seen_strings}
end
for _, already_seen_string in ipairs(already_seen_strings) do
if canon_placename:find(already_seen_string) then
return true
end
end
return false
end
-- Prefix display handler that adds a prefix such as "Metropolitan Borough of " to the display
-- form of holonyms. We make sure the holonym doesn't contain the prefix or some variant already.
-- We do this by checking if any of the strings in ALREADY_SEEN_STRINGS, either a single string or
-- a list of strings, or the prefix if ALREADY_SEEN_STRINGS is omitted, are found in the holonym
-- placename, ignoring case and links. If the prefix isn't already present, we create a link that
-- uses the raw form as the link destination but the prefixed form as the display form, unless the
-- holonym already has a link in it, in which case we just add the prefix.
local function prefix_display_handler(prefix, holonym_placename, already_seen_strings)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(prefix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return prefix .. " " .. holonym_placename
end
return prefix .. " [[" .. holonym_placename .. "]]"
end
-- Suffix display handler that adds a suffix such as " parish" to the display form of holonyms.
-- Works identically to prefix_display_handler but for suffixes instead of prefixes.
local function suffix_display_handler(suffix, holonym_placename, already_seen_strings, include_suffix_in_link)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(suffix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return holonym_placename .. " " .. suffix
end
if include_suffix_in_link then
return "[[" .. holonym_placename .. " " .. suffix .. "]]"
else
return "[[" .. holonym_placename .. "]] " .. suffix
end
end
-- Display handler for boroughs. New York City boroughs are display as-is. Others are suffixed
-- with "borough".
local function borough_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.new_york_boroughs[unlinked_placename] then
-- Hack: don't display "borough" after the names of NYC boroughs
return holonym_placename
end
return suffix_display_handler("borough", holonym_placename)
end
local function county_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
-- Display handler for Irish counties. Irish counties are displayed as e.g. "County [[Cork]]".
if m_locations.ireland_counties["Hạt " .. unlinked_placename .. ", Ireland"] or
m_locations.northern_ireland_counties["Hạt " .. unlinked_placename .. ", Bắc Ireland"] then
return prefix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Taiwanese counties. Taiwanese counties are displayed as e.g. "[[Chiayi]] County".
if m_locations.taiwan_counties[unlinked_placename .. ", Đài Loan"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Romanian counties. Romanian counties are displayed as e.g. "[[Cluj]] County".
if m_locations.romania_counties[unlinked_placename .. ", România"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- FIXME, we need the same for US counties but need to key off the country, not the specific county.
-- Others are displayed as-is.
return holonym_placename
end
-- Display handler for prefectures. Japanese prefectures are displayed as e.g. "[[Fukushima]] Prefecture".
-- Others are displayed as e.g. "[[Fthiotida]] prefecture".
local function prefecture_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
local suffix = m_locations.japan_prefectures[unlinked_placename .. ", Nhật Bản"] and "Prefecture" or "prefecture"
return suffix_display_handler(suffix, holonym_placename)
end
-- Display handler for provinces of Bulgaria, Iran, Laos, North and South Korea, Thailand, Turkey and Vietnam. Recognized
-- provinces are displayed as e.g. "[[Gyeonggi]] Province" or "[[Antalya]] Province". Others are displayed as-is.
local function province_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if
m_locations.bulgaria_provinces[unlinked_placename .. ", Bulgaria"] or
m_locations.iran_provinces[unlinked_placename .. ", Iran"] or
m_locations.laos_provinces[unlinked_placename .. ", Lào"] or
m_locations.north_korea_provinces[unlinked_placename .. ", Cộng hòa Dân chủ Nhân dân Triều Tiên"] or
m_locations.south_korea_provinces[unlinked_placename .. ", Hàn Quốc"] or
m_locations.thailand_provinces[unlinked_placename .. ", Thái Lan"] or
m_locations.turkey_provinces[unlinked_placename .. ", Thổ Nhĩ Kỳ"] or
m_locations.vietnam_provinces[unlinked_placename .. ", Việt Nam"] then
return suffix_display_handler("Province", holonym_placename)
end
return holonym_placename
end
-- Display handler for Nigerian states. Nigerian states are display as "[[Kano]] State". Others are displayed as-is.
local function state_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.nigeria_states[unlinked_placename .. ", Nigeria"] then
return suffix_display_handler("State", holonym_placename)
end
return holonym_placename
end
-- Display handler for voivodeships. Display as e.g. [[Subcarpathian Voivodeship]].
local function voivodesip_display_handler(holonym_placetype, holonym_placename)
return suffix_display_handler("Voivodeship", holonym_placename, nil, "include_suffix_in_link")
end
------------------------------------------------------------------------------------------
-- Placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
Main placetype data structure. This specifies, for each canonicalized placetype, various properties. The keys are
placetypes (in the singular, except for category-only placetypes, which are plural and followed by `!`), and the value
is a table of properties. The `"*"` key is special and is used for adding "generic" categories of the form
`Places in ``location`` `; it runs for all entry placetypes. Keys in the form of plural placetypes followed by `!` are
used only in [[Module:category tree/topic cat/data/Places]] for specifying the properties of categories containing the
specified placetype, esp. bare categories like [[:Category:States and territories]] (rather than qualified categories
like [[:Category:States and territories of Australia]]).
Keys under the value table for a given placetype of are two types: ''property keys'' (which specify the value of
specific properties) and ''categorization keys'' (which tell how to categorize certain sorts of holonyms if the
placetype in question occurs as an entry placetype). Categorization keys are either the special value `default` or are
wildcard strings with a slash in them, such as `"country/*"`. Note that only wildcard strings are currently allowed
directly in the placetype data; everything else is handled through category handlers, either per-placetype or special
(such as `political_division_cat_handler`). The algorithm for how category keys and handlers are used to generate
categories is described at the top of [[Module:place]].
There are several recognized property keys, of various types:
1. The following link-related property keys are recognized:
* `link`: '''Required''' except in category-only placetypes ending in `!`. Describes how to link and display the
placetype in the formatted description when occurring as an entry placetype. Also used for formatting pluralized
placetypes (which may occur in entry placetypes, esp. new-format ones, such as `two <<islands>>`) and may occur in
categories). The possible values are:
*# `true`: Link to the same-named Wiktionary entry. This creates a raw link, e.g. `<nowiki>[[city]]</nowiki>`, which is
converted to an English-specific link by JavaScript postprocessing. If the placetype is plural, this creates a
two-part raw link e.g. `<nowiki>[[city|cities]]</nowiki>`.
*# `"w"`: Link to the same-named Wikipedia entry. This creates a two-part link, e.g.
`<nowiki>[[w:census town|census town]]</nowiki>`, or `<nowiki>[[w:census town|census towns]]</nowiki>` if the
placetype is given plural.
*# `"+..."`: Create a two-part link to the entry following the `+` sign. For example, if `cercle` specifies
`"+w:cercles of Mali"`, a two-part link `<nowiki>[[w:cercles of Mali|cercle]]</nowiki>` will be generated, or
`<nowiki>[[w:cercles of Mali|cercles]]</nowiki>` if plural `cercles` is specified.
*# `"separately"`: Link each word separately. For example, if `administrative territory` specifies `"separately"`, it
will be linked as `<nowiki>[[administrative]] [[territory]]</nowiki>`, or as
`<nowiki>[[administrative]] [[territory|territories]]</nowiki>` if plural `administrative territories` is given.
*# another string: Use that string directly. If the placetype is plural, `pluralize()` in [[Module:en-utilities]] is
called on the string, which will correctly pluralize most strings, including those with links in them. (If there
are multiple links, the display form of the last link is pluralized.)
*# `false`: This placetype is not allowed as an entry placetype. An error will be thrown if this placetype is given as
an entry placetype. This is specified for internal-use placetypes, especially placetypes used in conjunction with
the qualifiers `former`, `ancient`, `historical` and such.
* `plural_link`: If specified and the placetype is plural, use the value in place of generating a pluralized version of
the link spec in `link`. Most commonly, this is either a string with links in it (which is used directly) or the
value `false`, indicating that the placetype cannot occur plural. (This is used for example by `caplc`, which displays
as `<nowiki>[[capital]] and [[large]]st [[city]]</nowiki>`, where a plural version doesn't make sense.) Generally if
this is specified, `plural` also needs to be specified to give a special placetype plural; this situation occurs
especially with multiword placetypes where something other than the last word is pluralized. An example is
`town with bystatus`, whose plural is `towns with bystatus`, which needs to be explicitly given. This example uses
`link = <nowiki>"[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>` ({{m|nb|bystatus}}) is a Norwegian
Bokmål word, and template calls aren't currently permitted in link strings), along with
`plural_link = <nowiki>"[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>`.
* `category_link`: Spec indicating how to display the placetype when occurring in category descriptions. Defaults to
the value of `link`, and in turn is overridden by more specific `category_link_*` keys; see below. Category-only
placetypes (which are plural and end in `!`) usually use `category_link` in preference to `link`. The value of
`category_link` can be any of the types of specs given above, but most commonly is a plural string with links in it,
spelling out the description; in this case it is used directly. When both `category_link` and `link` are given, the
value in `category_link` is typically longer and more descriptive. For example, `polity` uses `link = true`, which
just generates a link `<nowiki>[[polity]]</nowiki>` or plural `<nowiki>[[polity|polities]]</nowiki>`, but specifies a
separate `category_link = <nowiki>"[[independent]] or [[semi-]][[independent]] [[polity|polities]]"</nowiki>`, which
clarifies in the category description what a polity is.
* `category_link_top_level`: Spec indicating how to display top-level (bare/unqualified) categories, i.e. categories
where the placetype is not followed by `in ``location`` ` or `of ``location`` `. If given, this overrides
`category_link` for this type of category.
* `category_link_before_noncity`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` does not refer to a city. If given, this overrides
`category_link` for this type of category.
* `category_link_before_city`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` refer to a city. If given, this overrides `category_link` for
this type of category. An example where this is given is `neighborhood`, which uses the following specs:<ol>
<li>`link = true`</li>
<li>`category_link = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]"</nowiki>`</li>
<li>`category_link_before_city = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions"</nowiki>`</li>
</ol> This has the effect of making the entry placetype `neighborhood` display as just
`<nowiki>[[neighborhood]]</nowiki>`, while e.g. a category like `Neighborhoods of Chicago` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[Chicago]], ...</nowiki>` and a category like
`Neighborhoods in Illinois, USA` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]] in [[Illinois]], ...</nowiki>`.
* `disallow_in_entries`: If specified, this placetype cannot occur as an entry placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
* `disallow_in_holonyms`: If specified, this placetype cannot occur as a holonym placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
2. There is currently one fallback-related property key recognized:
* `fallback`: If specified, its value is a placetype which will be used for categorization purposes if no categories
get added using the placetype itself. As an example, `branch` sets a fallback of `river` but also sets
`preposition = "of"`, meaning that {{tl|place|en|branch|riv/Mississippi}} displays as `a branch of the Mississippi`
(whereas `river` itself uses the preposition `in`), but otherwise categorizes the same as `river`. A more complex
example is `area`, which sets a fallback of `geographic and cultural area` and also sets a category handler that
checks for cities or city-like entities (e.g. boroughs) occurring as holonyms and categorizes the toponym under
[[:Category:Neighborhoods of CITY]] (for recognized cities) or otherwise [[:Category:Neighborhoods of POLDIV]] (for
the nearest containing recognized location). In addition, `area` is set as a political division of Kuwait, meaning if
`c/Kuwait` occurs as holonym, the toponym is categorized under [[:Category:Areas of Kuwait]]. If none of these
categories trigger, the fallback of `geographic and cultural area` will take effect, and the toponym will be
categorized as e.g. [[:Category:Geographic and cultural areas of England]].
3. There is currently one property to control irregular plurals of placetypes:
* `plural`: If specified, its value is the plural of the placetype. Otherwise, the default pluralization algorithm in
[[Module:en-utilities]] applies (which correctly pluralizes most words, including those ending in `-y`, `-ch`, `-sh`,
`-x`, etc.). The value of `plural` is also used when converting a pluralized placetype into its singular equivalent;
for example, since the placetype `kibbutz` has `plural = "kibbutzim"`, the placetype `kibbutzim` will be recognized
as a plural and singularized to `kibbutz`. For this reason, it's occasionally necessary to specify a `plural` value
even when the default pluralization algorithm works correctly, if the default singularization algorithm won't
correctly reverse the pluralization (as with `pass` and other terms ending in `-ss`).
4. The following property keys relate to generating categories for entry placetypes and specifying the parents of those
categories:
* `class`: The general class of placetype. This is used for various purposes: (a) to categorize placetypes preceded by
a qualifier such as `former`, `ancient`, `medieval` or `historical` (note that these placetypes are not all treated
alike); (b) to determine the parent category of bare placetype categories (e.g. [[:Category:Villages]] for placetype
`village`); (c) to determine whether to add a parent category `political divisions of specific countries` to
qualified placetype categories (e.g. [[:Category:Villages in Mali]]). The possible values are:
*# `polity`: a more-or-less sovereign/independent polity, such as a country, kingdom or empire.
*# `subpolity`: a non-sovereign division of a polity, above the level of an individual settlement.
*# `settlement`: a city or smaller equivalent, such as a village. This also includes administrative divisions of a
settlement, such as wards and barangays.
*# `non-admin settlement`: similar to a settlement but without administrative or political significance, such as an
unincorporated community, farm or neighborhood.
*# `capital`: a settlement that is a capital. A former capital is generally still in existence, just not the capital
any more.
*# `natural feature`: any non-man-made feature, such as a lake, mountain, island, ocean, etc.
*# `man-made structure`: a man-made feature below the level of a neighborhood, such as a house, airport, university,
metro station, park or the like.
*# `geographic region`: a geographic or cultural region or area that has no administrative significance. These may vary
greatly in size but typically have some sort of cultural significance (possibly historical). The `former`, `ancient`,
etc. qualifier has no effect on the category of these placetypes.
*# `generic place`: a place that isn't further qualified into any specific subtype.
* `former_type`: The class of placetype used for categorizing placetypes preceded by a qualifier such as `former`,
`ancient`, `medieval` or `historical`. The possible values are the same as for `class` but with the addition of
`dependent territory` (for colonies, protectorates and the like) and `!` (ignore the historical/former/ancient/etc.
qualifier; used e.g. with `fictional location` and `mythological location`). If not specified, the value of `class`
is used. When a qualifier such as `former`, `ancient`, `medieval` or `historical` is encountered (specifically, those
in `former_qualifiers`), it is mapped using `former_qualifiers` to the appropriate internal qualifier or qualifiers
(one or both of `ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
qualifiers), which is prepended to the value of `former_type` or `class` to form a placetype whose properties are
looked up to determine how to categorize the toponym in question. For example, if `medieval village` is given, we map
`medieval` to `ANCIENT` and `FORMER`, and `village` to its `class` of `settlement`, and enter the placetypes
`ANCIENT settlement` and `FORMER settlement` (in that order) into the list of equivalent placetypes returned by
`get_placetype_equivs`. In this case, there is an entry in `placetype_data` for `ANCIENT settlement`, so its default
category spec `Ancient settlements` is used as the category. If on the other hand `medieval kingdom` is given, where
`kingdom` has a `class` value `polity`, we first look up `ANCIENT polity`, see there is no entry in `placetype_data`
for it, and then look up `FORMER polity`, which exists and has a default category spec `Former polities`, which is
used as the category. Note that if the placetype following the "former" qualifier is recognized in `placetype_data`
but has no `former_type` or `class` and no fallback with a `former_type` or `class` specified, it is an internal
error; but if the placetype isn't recognized (e.g. something like `former greenhouse` is specified and we don't have
an entry for `greenhouse`), we just track the occurrence and end up not categorizing.
* `bare_category_parent`: This specifies the first parent category of a bare placetype category named according to the
placetype in question (e.g. [[:Category:Atolls]] for placetype `atoll`, or [[:Category:Named buildings]] for
placetype `named buildings!`). If not specified, the first parent category is determined by the value of `class`,
using the mapping `class_to_bare_category_parent` in [[Module:category tree/topic cat/data/Places]].
* `addl_bare_category_parents`: Extra parent categories to add a bare placetype category to (see `bare_category_parent`
just above).
* `bare_category_breadcrumb`: Breadcrumb for bare placetype categories. Also used as the sort key of
`bare_category_parent` if it is a string.
* `inherently_former`: If specified and the given placetype is used as an entry placetype, act as if `former` or
`ancient` (depending on the value of `inherently_former`) were prefixed to the placetype. This is for placetypes that
always refer to no-longer-existing entities, such as `satrapy` and `treaty port`. The value of `inherently_former` is
a list of internal qualifiers (one or more of `ANCIENT` and/or `FORMER`), just as for `former_qualifiers`, and the
implementation is the same.
* `cat_handler`: Handler used to generate the categories to add a given toponym to, if its entry placetype is the
placetype in question. Generally the `cat_handler` function checks the holonyms specified in order to determine which
category or categories to generate. For example, `district_neighborhood_cat_handler` handles placetypes `district`,
`neighborhood`, `subdivision`, `suburb` and the like, and either adds the toponym to a category like
`Neighborhoods of ``city`` ` (if a recognized city is given as a holonym), or otherwise a category like
`Neighborhoods in ``location`` ` (for the first recognized non-city location given as a holonym, if an unrecognized
city or city-like entity is given before the recognized non-city). The algorithm that runs the category handlers
iterates over holonyms from left to right, running the `cat_handler` function on each holonym in turn until one or
more categories are returned; see below for more specifics. (Note that countries for which e.g. a `district` is a
political division do not get the corresponding category added by the `district_neighborhood_cat_handler` function but
by `political_division_cat_handler`.) `cat_handler` functions are called with one argument, `data`, describing the
resolved entry placetype (i.e. after resolving placetype aliases and fallbacks) and the holonym being processed. The
return value should be a list of category specs (categories minus the langcode prefix, with `+++` standing for the
holonym key, or the value `true`, which stands for ` ``Placetypes`` in/of ``Holonym`` `, i.e. the pluralized placetype
with the appropriate preposition as specified in `placetype_data`). `data` contains the following fields:
** `entry_placetype`: the resolved entry placetype for the entry placetype being processed (i.e. it will always have an
entry in `placetype_data` but may not be the original placetype given by the user);
** `holonym_placetype` and `holonym_placename`: the holonym placetype and placename being processed;
** `holonym_index`: the index of the holonym being processed, or {nil} if we're handling an overriding holonym (FIXME:
we will change the overriding holonym algorithm so there will be an index even when processing overriding holonyms);
** `place_desc`: a full description of the {{tl|place}} call, as specified at the top of [[Module:place]];
** `from_demonym`: If set, we are called from [[Module:demonym]], triggered by {{tl|demonym-adj}} or
{{tl|demonym-noun}}, instead of being triggered by {{tl|place}}.
* `has_neighborhoods`: If `true`, the specified placetype is city-like. This is used in the
`district_neighborhood_cat_handler` to determine whether to add a category such as `Neighborhoods in ``location`` `;
see the section just above on `cat_handler`.
5. The following preposition-related property keys are recognized:
* `preposition`: The preposition used after this placetype when it occurs as an entry placetype. Defaults to `"in"`.
* `generic_before_non_cities`: If specified, the appropriate category description handler in
[[Module:category tree/topic cat/data/Places]] will recognize categories of the form
` ``Placetype`` in/of ``location`` ` for the specified placetype and preposition, if ``location`` is a non-city. This
is used to generate descriptions for categories added by category handlers and by explicit category specs in the
placetype data. All placetypes that specify `generic_before_non_cities` or `generic_before_cities` *MUST* also specify
a value for `class` so that the category tree code can determine whether it's a political or non-political division.
* `generic_before_cities`: Like `generic_before_non_cities` but for locations referring to cities.
6. The following property keys control the auto-addition of affixes when formatting holonyms of a particular placetype:
* `affix_type`: If specified, add the placetype as an affix before or after holonyms of this placetype. Possible values
are:
*# `"pref"` (the holonym will display as `(the) placetype of Holonym`, where `the` appears when the holonym directly
follows an entry placetype);
*# `"Pref"` (same as `"pref"` but the placetype is capitalized; each word is capitalized if there are multiple);
*# `"suf"` (the holonym will display as `Holonym placetype`);
*# `"Suf"` (the holonym will display as `Holonym Placetype`, i.e. same as `"suf"` but the placetype is capitalized).
* `suffix`: String to use in place of the placetype itself when the placetype is displayed as a suffix after a holonym.
Note that `suffix` can be used independently of `affix_type` because the user can also request a suffix explicitly
using a syntax like `adr:suf/Occitania`, which will display as `Occitania region` because the placetype
`administrative region` specifies `suffix = "region"`.
* `prefix`: Like `suffix` but for use when the placetype is displayed as a prefix before the holonym.
* `affix`: Like `suffix` and `prefix` but for use when the placetype is displayed as an affix either before or after the
holonym. If both `suffix` or `prefix` and `affix` are given for a single placetype, `suffix` or `prefix` take
precedence.
* `no_affix_strings`: String or list of strings that, if they occur in the holonym, suppress the addition of any affix
requested using `affix_type`. Defaults to the placetype itself. For example, `autonomous okrug` specifies
`affix_type = "Suf"` so that `aokr/Nenets` displays as `Nenets Autonomous Okrug`, but also specifies
`no_affix_strings = "okrug"` so that `aokr/Nenets Okrug` or `aokr/Nenets Autonomous Okrug` displays as specified,
without a redundant `Autonomous Okrug` added. Matching is case-insensitive but whole-word.
* `display_handler`: A function of two arguments, `holonym_placetype` and `holonym_placename` (specifying a holonym).
Its return value is a string specifying the display form of the holonym.
7. The following property keys control the indefinite and definite articles used before entry placetypes and/or holonyms
of the specified placetype.
* `entry_placetype_use_the`: Use `"the"` before this placetype when it occurs as an entry placetype.
* `entry_placetype_indefinite_article`: Indefinite article used before this placetype when it occurs as an entry
placetype (usually `"a"`, specifically for placetypes beginning with u- that don't take the indefinite article
`"an"`). Defaults to the appropriate indefinite article (`"a"` or `"an"` depending on whether the placetype begins
with a vowel). Overridden by `entry_placetype_use_the`, and unlike for most properties, does not apply to equivalent
placetypes (i.e. fallbacks or those formed by removing a qualifier from the beginning); only to the exact placetype
specified.
* `holonym_use_the`: Use `"the"` before holonyms of this placetype.
'''NOTE:'''
# The `link` property must be specified on all placetypes, except those ending in `!` (category-only placetypes), which
must have either `link` or `category_link` specified.
# Either the `class` or `former_type` property must be specified on all placetypes not ending in `!` that do not have a
fallback (if a placetype has a fallback and omits the `class` and `former_type` properties, they are taken from the
fallback). An internal error will result if a placetype has no `class` or `former_type` property derivable either
directly or through a fallback, if an attempt is made to categorize a former/ancient/historical/etc. entity of this
placetype.
# It is possible to have multiple levels of fallback (e.g. `frazione` falls back to `hamlet`, which falls back
to `village`). Fallback loops will cause an internal error. All placetypes specified as fallbacks must exist in
`placetype_data` or an internal error occurs.
]==]
export.placetype_data = {
--[=[
If you need to sort the following, do this (using Vim):
1. Make sure all full-line comments are within the { ... } table, or are moved after and on the same line as single-line
entries.
2. Make sure the table uses tabs everywhere for indent, and not spaces.
3. Mark the top of the table with `ma`, go to the bottom and execute the following two lines in sequence:
:'a,.s/\n/\\n/g
:s/\\n\(\t\[\)/\r\1/g
The first command converts every newline to a literal `\n` sequence, so the whole thing becomes a single line, while
the second command restores the newlines before the beginning of each entry. The effect is to convert all entries to
a single line while not losing any information. (Potentially a negative lookahead could be used to do it all in one
command.)
4. Execute the following to sort:
:'a,.!perl -pe 's/^(\t\[")(.*?)(".*)$/$2 @@@ $1$2$3/' | sort -f | perl -pe 's/.*? @@@ //'
Note that a simple `sort -f` (where `-f` means case-insensitive) would almost work, but it would sort "hill station"
before "hill" and "county borough" before "county" because the space after e.g. "hill station" sorts before the
quotation mark after e.g. "hill". The above command deals with this by extracting the key, prepending it followed by
` @@@ `, sorting, and then removing key (the classic decorate-sort-undecorate pattern).
5. Put the table back to multi-line format by marking the top of the table with `ma`, going to the bottom and executing
:'a,.s/\\n/\r/g
Note that for some reason, in order to get a match a newline in the left side of a replacement, you must use \n, but
to insert a newline in the right sode of a replacement you must use \r.
]=]
["*"] = {
link = false,
cat_handler = generic_place_cat_handler,
},
["administrative atoll"] = {
-- Maldives
link = "+w:administrative divisions of the Maldives",
preposition = "of",
class = "subpolity",
},
["administrative capital"] = {
link = "w",
fallback = "capital city",
},
["administrative center"] = {
link = "w",
fallback = "non-city capital",
},
["administrative centre"] = {
link = "w",
fallback = "administrative center",
},
["administrative county"] = {
link = "w",
fallback = "county",
},
["administrative district"] = {
link = "w",
fallback = "district",
},
["administrative headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["administrative region"] = {
link = true,
preposition = "của",
suffix = "region", -- but prefix is still "administrative region (of)"
fallback = "region",
class = "subpolity",
},
["administrative seat"] = {
link = "w",
fallback = "administrative centre",
},
["administrative territory"] = {
link = "separately",
preposition = "of",
suffix = "territory", -- but prefix is still "administrative territory (of)"
fallback = "territory",
class = "subpolity",
},
["administrative unit"] = {
-- Grrr, it's difficult to generalize about "administrative units". In Albania, "administrative unit" is an
-- official term for a city-level division of municipalities; Wikipedia renders it using the more practical term
-- "commune". In Pakistan, "administrative unit" is a collective term used to refer to all the different types
-- of first-level divisions (four provinces, one federal territory, and two "disputed territories", i.e. Azad
-- Kashmir and Gilgit-Balistan, that are variously described). For this reason, we set no fallback, but we need
-- to include this so that it can be used as a placetype for Albania, categorizing as communes.
link = "w",
class = "subpolity",
},
["administrative village"] = {
link = "w",
preposition = "of",
has_neighborhoods = true,
class = "settlement",
},
["aimag"] = {
-- used in Mongolia, Russia and China (Inner Mongolia); in Mongolia, equivalent to a province;
-- in China, equivalent to a prefecture (below a province); in Russia, equivalent to a municipal district.
link = "w",
fallback = "prefecture",
},
["airport"] = {
link = true,
class = "man-made structure",
default = {true},
},
["alliance"] = {
link = true,
fallback = "confederation",
},
["archipelago"] = {
link = true,
fallback = "island",
},
["area"] = {
link = true,
preposition = "of",
fallback = "geographic and cultural area",
-- Areas can either be administrative divisions (specifically of Kuwait) or geographic areas. Assume the former
-- when categorizing 'Areas' but the latter when handling e.g. 'historical area'.
class = "subpolity",
former_type = "geographic region",
cat_handler = district_neighborhood_cat_handler,
},
["arm"] = {
link = true,
preposition = "of",
class = "natural feature",
default = {"Seas"},
},
["arrondissement"] = {
link = true,
preposition = "of",
-- FIXME!!! Grrrrr!!! In some countries, arrondissements are divisions of cities; in others, they are divisions
-- of departments or provinces. Need to conditionalize on the country for both of the following.
class = "subpolity",
has_neighborhoods = true,
},
["associated province"] = {
link = "separately",
fallback = "province",
},
["atoll"] = {
-- FIXME! Atolls are administrative divisions of the Maldives but natural features elsewhere. Need to
-- conditionalize `class` on the country. See also `administrative atoll`.
link = true,
class = "natural feature",
bare_category_parent = "islands",
default = {true},
},
["autonomous city"] = {
link = "w",
preposition = "of",
fallback = "city",
has_neighborhoods = true,
},
["autonomous community"] = {
-- Spain; refers to regional entities, not village-like entities, as might be expected from "community"
link = true,
preposition = "of",
class = "subpolity",
},
["autonomous island"] = {
-- Comoros; seems like an administrative atoll of the Maldives.
link = "+w:autonomous islands of Comoros",
preposition = "of",
class = "subpolity",
},
["autonomous oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "oblast",
class = "subpolity",
},
["autonomous okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "okrug",
class = "subpolity",
},
["autonomous prefecture"] = {
link = true,
fallback = "prefecture",
},
["autonomous province"] = {
link = "w",
fallback = "province",
},
["autonomous region"] = {
link = "w",
preposition = "of",
fallback = "administrative region",
-- "administrative region" sets an affix of "region" but we want to display as "Tibet Autonomous Region"
-- if the user writes 'ar:Suf/Tibet'.
affix = "autonomous region",
},
["autonomous republic"] = {
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territorial unit"] = {
-- Moldova; only two of them, one for Gagauzia and one for Transnistria.
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territory"] = {
link = "w",
fallback = "dependent territory",
},
["bailiwick"] = {
-- Jersey, etc.
link = true,
fallback = "polity",
},
["barangay"] = {
-- Philippines
link = true,
class = "settlement",
-- Barangays are formal administrative divisions of a city rather than informal neighborhoods, but can use
-- some of the properties of a neighborhood.
fallback = "neighborhood",
},
["barrio"] = {
-- Spanish-speaking countries; Philippines
link = true,
-- FIXME: Not completely correct, in some countries barrios are formal administrative divisions of a city.
-- `class` will need to conditionalize on the country to be completely correct.
fallback = "neighborhood",
},
["basin"] = {
link = true,
fallback = "lake",
},
["bay"] = {
link = true,
preposition = "of",
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["beach"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"water"},
default = {true},
},
["beach resort"] = {
link = "w",
fallback = "resort town",
},
["bishopric"] = {
link = true,
fallback = "polity",
},
["bodies of water!"] = {
-- FIXME: This is (maybe?) a type category not a name category. There should be an option for this. We need to
-- straighten out the type vs. name vs. related-to issue.
category_link = "[[body of water|bodies of water]]",
class = "natural feature",
addl_bare_category_parents = {"landforms", "ecosystems", "water"},
},
["borough"] = {
link = true,
preposition = "of",
display_handler = borough_display_handler,
has_neighborhoods = true,
-- "former borough" could be a former settlement or a former part of a city but seems more likely to
-- be a former subpolity, particularly in England. FIXME, we really need a handler to take care of this
-- properly.
class = "subpolity",
-- Grr, some boroughs are city-like but some (e.g. in Britain) may be larger.
},
["borough seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["branch"] = {
link = true,
preposition = "of",
fallback = "river",
},
["bridge"] = {
link = true,
class = "man-made structure",
default = {"Named bridges"},
},
["building"] = {
link = true,
class = "man-made structure",
default = {"Named buildings"},
},
["built-up area"] = {
link = "w",
fallback = "area",
},
["burgh"] = {
link = true,
fallback = "borough",
},
["business park"] = {
link = true,
fallback = "park",
},
["caliphate"] = {
link = true,
fallback = "polity",
},
["canton"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["cape"] = {
link = true,
fallback = "headland",
},
["capital"] = {
link = true,
fallback = "capital city",
},
["capital city"] = {
link = true,
category_link = "[[capital city|capital cities]]: the [[seat of government|seats of government]] for a country or [[political]] [[division]] of a country",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
bare_category_parent = "cities",
cat_handler = capital_city_cat_handler,
default = {true},
-- The following is necessary so that e.g. [[Melbourne]] defined as {{place|en|capital city|s/Victoria|c/Australia}}
-- gets categorized in the bare category [[Category:en:Melbourne]]; otherwise placetype 'capital city' wouldn't
-- match against the placetype 'city' of Melbourne.
fallback = "city",
},
["caplc"] = {
link = "[[capital]] and [[large]]st [[city]]",
plural_link = false,
fallback = "capital city",
},
["captaincy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["caravan city"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"ANCIENT", "FORMER"},
},
["castle"] = {
link = true,
fallback = "building",
},
["cathedral city"] = {
link = true,
fallback = "city",
},
["cattle station"] = {
-- Australia
link = true,
fallback = "farm",
},
["census area"] = {
link = true,
affix_type = "Suf",
has_neighborhoods = true,
class = "non-admin settlement",
},
["census-designated place"] = {
-- United States
link = true,
class = "non-admin settlement",
},
["census division"] = {
-- Canada
link = "w",
preposition = "of",
class = "subpolity",
},
["census town"] = {
link = "w",
fallback = "town",
},
["central business district"] = {
link = true,
fallback = "neighborhood",
},
["cercle"] = {
-- Mali
link = "+w:cercles of Mali",
preposition = "of",
class = "subpolity",
},
["ceremonial county"] = {
link = true,
fallback = "county",
},
["chain of islands"] = {
link = "[[chain]] of [[island]]s",
plural = "chains of islands",
plural_link = "[[chain]]s of [[island]]s",
fallback = "island",
},
["channel"] = {
link = true,
fallback = "strait",
},
["charter community"] = {
-- Northwest Territories, Canada
link = "w",
fallback = "village",
},
["city"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["city-state"] = {
link = true,
category_link = "[[sovereign]] [[microstate]]s consisting of a single [[city]] and [[w:dependent territory|dependent territories]]",
has_neighborhoods = true,
class = "settlement",
["continent/*"] = {"City-states", "Cities in +++", "Quốc gia của +++", "National capitals"},
default = {"City-states", "Cities", "Quốc gia", "National capitals"},
},
["civil parish"] = {
-- Mostly England; similar to municipalities
link = true,
preposition = "of",
affix_type = "suf",
has_neighborhoods = true,
class = "subpolity",
},
["claimed political division"] = {
link = "[[claim]]ed [[political]] [[division]]",
class = "subpolity",
default = {true},
},
["co-capital"] = {
link = "[[co-]][[capital]]",
fallback = "capital city",
},
["coal city"] = {
link = "+w:coal town",
fallback = "city",
},
["coal town"] = {
link = "w",
fallback = "town",
},
["collectivity"] = {
link = "w",
preposition = "of",
-- No default; these are weird one-off governmental divisions in France (esp. for overseas collectivities)
class = "subpolity",
},
["colony"] = {
link = true,
fallback = "dependent territory",
},
["comarca"] = {
-- per Wikipedia: traditional region or local administrative division found in Portugal, Spain, and some of
-- their former colonies, like Brazil, Nicaragua, and Panama. In the Valencian Community, for example, it
-- sits between municipalities and provinces, something like a county or district.
link = true,
preposition = "of",
class = "subpolity",
},
["commandery"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["commonwealth"] = {
link = true,
preposition = "of",
-- No default; applies specifically to Puerto Rico
class = "subpolity",
},
["commune"] = {
link = true,
fallback = "municipality",
},
["community"] = {
link = true,
category_link = "[[community|communities]] of all sizes",
fallback = "village",
},
["community development block"] = {
-- in India; appears to be similar to a rural municipality; groups several villages, unclear if there will be
-- neighborhoods so I'm not setting `has_neighborhoods` for now
link = "w",
affix_type = "suf",
no_affix_strings = "block",
class = "subpolity",
},
["comune"] = {
-- Italy, Switzerland
link = true,
fallback = "municipality",
},
["condominium"] = {
link = true,
fallback = "polity",
},
["confederacy"] = {
link = true,
fallback = "confederation",
},
["confederation"] = {
link = true,
fallback = "polity",
},
["constituency"] = {
-- currently we have them as political divisions of Namibia but many countries have them
link = true,
preposition = "of",
class = "subpolity",
},
["constituent country"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["constituent part"] = {
link = "separately",
preposition = "of",
class = "subpolity",
},
["constituent republic"] = {
-- Of Russia, Yugoslavia, etc.
link = "separately",
preposition = "of",
class = "subpolity",
},
["counties and county-level cities!"] = {
-- This is used when grouping counties and county-level cities under prefecture-level cities in China.
category_link = "[[county|counties]] and [[county-level city|county-level cities]]",
class = "subpolity",
},
["continent"] = {
link = true,
category_link = false, -- can't occur as a bare category
class = "natural feature",
default = {"Continents and continental regions"},
},
["continental region"] = {
link = "separately",
category_link = false, -- can't occur as a bare category
class = "geographic region",
fallback = "continent",
},
["continents and continental regions!"] = {
category_link = "[[continent]]s and [[continent]]-[[level]] [[region]]s (e.g. [[Polynesia]])",
class = "geographic region",
},
["council area"] = {
link = true,
-- in Scotland; similar to a county
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["quốc gia"] = {
link = true,
class = "polity",
["continent/*"] = {true, "Quốc gia"},
default = {true},
},
["country-like entities!"] = {
category_link = "[[polity|polities]] not normally considered [[country|countries]] but treated similarly for categorization purposes; typically, [[unrecognized]] [[de-facto]] countries or [[w:dependent territory|dependent territories]]",
class = "polity",
},
["county"] = {
link = true,
preposition = "of",
display_handler = county_display_handler,
class = "subpolity",
},
["county borough"] = {
link = true,
-- in Wales; similar to a county
preposition = "of",
affix_type = "suf",
fallback = "borough",
class = "subpolity",
},
["county seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["county town"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
fallback = "town",
has_neighborhoods = true,
class = "capital",
},
["county-administered city"] = {
-- In Taiwan, per Wikipedia similar to a Taiwanese township or district, which is a small city.
-- NOT anything like a "county-level city" in PR China, which is a county masquerading as a city.
link = "w",
fallback = "city",
has_neighborhoods = true,
class = "settlement",
},
["county-controlled city"] = {
-- Taiwan
link = "w",
fallback = "county-administered city",
},
["county-level city"] = {
-- PR China
link = "w",
fallback = "prefecture-level city",
},
["crater lake"] = {
link = true,
fallback = "lake",
},
["creek"] = {
link = true,
fallback = "stream",
},
["Crown colony"] = {
link = "+crown colony",
fallback = "crown colony",
},
["crown colony"] = {
link = true,
fallback = "colony",
},
["Crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["cultural area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["cultural region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["delegation"] = {
-- Tunisia
link = "+w:delegations of Tunisia",
preposition = "of",
class = "subpolity",
},
["department"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["departmental capital"] = {
link = "separately",
fallback = "capital city",
},
["dependency"] = {
link = true,
fallback = "dependent territory",
},
["dependent territory"] = {
link = "w",
preposition = "of",
class = "subpolity",
former_type = "dependent territory",
bare_category_parent = "political divisions",
["country/*"] = {true},
default = {true},
},
["desert"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"ecosystems"},
default = {true},
},
["deserted mediaeval village"] = {
link = "w",
fallback = "deserted medieval village",
},
["deserted medieval village"] = {
link = "w",
fallback = "ANCIENT settlement",
},
["direct-administered municipality"] = {
-- China
link = "+w:direct-administered municipalities of China",
fallback = "municipality",
},
["direct-controlled municipality"] = {
-- several countries
link = "w",
fallback = "municipality",
},
["distributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["district"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- Grrr! FIXME! Here is where we need handlers for `class`. Using similar logic to
-- district_neighborhood_cat_handler, we need to check if we're below or above a city to determine if the class
-- is "settlement" or "subpolity".
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
-- No default. Countries for which districts are political divisions will get entries.
},
["districts and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Portugal.
category_link = "[[district]]s and [[autonomous region]]s",
class = "subpolity",
},
["districts and autonomous territorial units!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Moldova.
category_link = "[[district]]s and [[w:autonomous territorial unit|autonomous territorial unit]]s",
class = "subpolity",
},
["district capital"] = {
link = "separately",
fallback = "capital city",
},
["district headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["district municipality"] = {
-- In Canada, a district municipality is equivalent to a rural municipality and won't have neighborhoods; in
-- South Africa, district municipalities group local municipalities and hence won't have neighborhoods.
link = "w",
preposition = "of",
affix_type = "suf",
no_affix_strings = {"district", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["division"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["division capital"] = {
link = "separately",
fallback = "capital city",
},
["dome"] = {
link = true,
fallback = "mountain",
},
["dormant volcano"] = {
link = true,
fallback = "volcano",
},
["duchy"] = {
link = true,
fallback = "polity",
},
["emirate"] = {
link = true,
preposition = "of",
-- FIXME: Can be subpolities (of the United Arab Emirates).
fallback = "polity",
},
["empire"] = {
link = true,
fallback = "polity",
},
["enclave"] = {
link = true,
preposition = "of",
-- Enclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["entity"] = {
-- Bosnia and Herzegovina
link = "+w:entities of Bosnia and Herzegovina",
preposition = "of",
class = "subpolity",
},
["escarpment"] = {
link = true,
fallback = "mountain",
},
["ethnographic region"] = {
-- used in Lithuania
link = "+w:ethnographic regions of Lithuania",
fallback = "geographic and cultural area",
},
["exclave"] = {
link = true,
preposition = "of",
-- exclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["external territory"] = {
link = "separately",
fallback = "dependent territory",
},
["farm"] = {
link = true,
class = "non-admin settlement",
default = {"Farms and ranches"},
},
["farms and ranches!"] = {
category_link = "[[farm]]s and [[ranch]]es",
class = "non-admin settlement",
},
["federal city"] = {
link = "w",
preposition = "of",
fallback = "city",
},
["federal district"] = {
link = true,
preposition = "of",
-- Might have neighborhoods as federal districts are often cities (e.g. Mexico City)
has_neighborhoods = true,
class = "settlement",
},
["federal subject"] = {
-- In Russia; a generic term for first-level administrative divisions (republics, oblasts, okrugs, krais,
-- autonomous okrugs and autonomous oblasts).
link = "w",
preposition = "of",
class = "subpolity",
},
["federal territory"] = {
link = "w",
fallback = "territory",
},
["fictional location"] = {
link = "separately",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "places",
default = {true},
},
["First Nations reserve"] = {
-- Canada
link = "[[First Nations]] [[w:Indian reserve|reserve]]",
-- Wikipedia uses "Indian reserve"; presumably that is the legal term
fallback = "Indian reserve",
class = "subpolity",
},
["fjord"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["footpath"] = {
link = true,
fallback = "road",
},
["forest"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"ecosystems", "forestry"},
default = {true},
},
["fort"] = {
link = true,
fallback = "building",
},
["fortress"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- fortresses -> fortresse, so put an entry here to ensure we singularize correctly.
plural = "fortresses",
fallback = "building",
},
["frazione"] = {
link = "w",
fallback = "hamlet",
},
["freeway"] = {
link = true,
fallback = "road",
},
["French prefecture"] = {
link = "[[w:prefectures in France|prefecture]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["geographic and cultural area"] = {
link = "+w:cultural area",
-- `generic_before_non_cities` is used when generating the category description of categories of the format
-- `Geographic and cultural areas of PLACE`. `preposition` is used when generating {{place}} description and
-- categories for any placetype that falls back to `geographic and cultural area`.
generic_before_non_cities = "of",
preposition = "of",
class = "geographic region",
bare_category_parent = "places",
["country/*"] = {true},
["constituent country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["geographic area"] = {
link = "+w:geographic region",
fallback = "geographic and cultural area",
},
["geographic region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geopolitical zone"] = {
-- Nigeria
link = true,
preposition = "of",
class = "subpolity",
},
["gewog"] = {
-- Bhutan
link = true,
preposition = "of",
class = "subpolity",
},
["ghost town"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
bare_category_parent = "former settlements",
cat_handler = city_type_cat_handler,
default = {true},
},
["glen"] = {
link = true,
fallback = "valley",
},
["governorate"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["greater administrative region"] = {
-- China (former division)
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["gromada"] = {
-- Poland (former division)
link = "w",
preposition = "of",
affix_type = "Pref",
class = "subpolity",
inherently_former = {"FORMER"},
},
["group of islands"] = {
link = "[[group]] of [[island]]s",
plural = "groups of islands",
plural_link = "[[group]]s of [[island]]s",
fallback = "island group",
},
["gulf"] = {
link = true,
preposition = "of",
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["hamlet"] = {
link = true,
fallback = "village",
},
["harbor city"] = {
link = "separately",
fallback = "city",
},
["harbor town"] = {
link = "separately",
fallback = "town",
},
["harbour city"] = {
link = "separately",
fallback = "city",
},
["harbour town"] = {
link = "separately",
fallback = "town",
},
["headland"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["headquarters"] = {
link = "w",
fallback = "administrative centre",
},
["heath"] = {
link = true,
fallback = "moor",
},
["hemisphere"] = {
link = true,
entry_placetype_use_the = true,
fallback = "continental region",
},
["highway"] = {
link = true,
fallback = "road",
},
["hill"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["hill station"] = {
link = "w",
fallback = "town",
},
["hill town"] = {
link = "w",
fallback = "town",
},
["historic region"] = {
-- provided only for the link
link = "+w:historical region",
fallback = "FORMER geographic region",
},
["historical county"] = {
-- needed for historical counties of England/etc.
link = "+w:historic county",
fallback = "FORMER subpolity",
},
["historical region"] = {
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["home rule city"] = {
link = "w",
fallback = "city",
},
["home rule municipality"] = {
link = "w",
fallback = "municipality",
},
["hot spring"] = {
link = true,
fallback = "spring",
},
["house"] = {
link = true,
fallback = "building",
},
["housing estate"] = {
-- not the same as a housing project (i.e. public housing)
link = true,
-- not exactly the case but approximately
fallback = "neighborhood",
},
["hromada"] = {
-- Ukraine
link = "w",
disallow_in_entries = "Use placetype 'urban hromada', 'rural hromada' or 'settlement hromada' in place of bare 'hromada'",
disallow_in_holonyms = "Use placetype 'urban hromada'/'uhrom', 'rural hromada'/'rhrom' or 'settlement hromada'/'shrom' in place of bare 'hromada'",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["inactive volcano"] = {
link = "w",
fallback = "dormant volcano",
},
["independent city"] = {
link = true,
fallback = "city",
},
["independent town"] = {
link = "+independent city",
fallback = "town",
},
["Indian reservation"] = {
link = "w",
-- In the US. Also known as "Native American reservation" or "domestic dependent nation", and the reservations
-- themselves often use the term "nation" in their official name (e.g. the "Navajo Nation"). But Wikipedia puts
-- the article at [[w:Indian reservation]] and uses that term when describing e.g. what the Navajo Nation is,
-- so this must still be the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["Indian reserve"] = {
link = "w",
-- In Canada. "First Nations reserve" sounds more modern/PC but Wikipedia uses "Indian reserve"; presumably that
-- is still the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["inland sea"] = {
-- note, we also have 'inland' as a qualifier
link = true,
fallback = "sea",
},
["inner city area"] = {
link = "[[inner city]] [[area]]",
fallback = "neighborhood",
},
["island"] = {
link = true,
preposition = "of",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["island country"] = {
-- FIXME: The following should map to both 'island' and 'country'.
link = "w",
fallback = "country",
},
["island group"] = {
link = "separately",
fallback = "island",
},
["island municipality"] = {
link = "w",
fallback = "municipality",
},
["islet"] = {
link = "w",
fallback = "island",
},
["Israeli settlement"] = {
link = "w",
class = "settlement",
default = {true},
},
["judicial capital"] = {
link = "w",
fallback = "capital city",
},
["khanate"] = {
link = true,
fallback = "polity",
},
["kibbutz"] = {
link = true,
plural = "kibbutzim",
class = "non-admin settlement",
default = {true},
},
["kingdom"] = {
link = true,
fallback = "monarchy",
},
["krai"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["lake"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["landforms!"] = {
category_link = "[[landform]]s",
bare_category_parent = "places",
addl_bare_category_parents = {"Earth"},
},
["largest city"] = {
link = "[[large]]st [[city]]",
entry_placetype_use_the = true,
fallback = "city",
has_neighborhoods = true,
},
["league"] = {
link = true,
fallback = "confederation",
},
["legislative capital"] = {
link = "separately",
fallback = "capital city",
},
["library"] = {
link = true,
fallback = "building",
},
["lieutenancy area"] = {
-- used in the United Kingdom; per Wikipedia:
-- In England, lieutenancy areas are colloquially known as the ceremonial counties, although this phrase does
-- not appear in any legislation referring to them. The lieutenancy areas of Scotland are subdivisions of
-- Scotland that are more or less based on the counties of Scotland, making use of the major cities as separate
-- entities.[2] In Wales, the lieutenancy areas are known as the preserved counties of Wales and are based on
-- those used for lieutenancy and local government between 1974 and 1996. The lieutenancy areas of Northern
-- Ireland correspond to the six counties and two former county boroughs.[3]
link = "w",
fallback = "ceremonial county",
},
["local authority district"] = {
link = "w",
fallback = "local government district",
},
["local government area"] = {
-- Australia
link = "w",
preposition = "of",
class = "subpolity",
},
["local council"] = {
-- Malta; similar to municipalities
link = "+w:local councils of Malta",
preposition = "of",
fallback = "municipality",
},
["local government district"] = {
link = "w",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local government district with borough status"] = {
link = "[[w:local government district|local government district]] with [[w:borough status|borough status]]",
plural = "local government districts with borough status",
plural_link = "[[w:local government district|local government districts]] with [[w:borough status|borough status]]",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local urban district"] = {
link = "w",
fallback = "unincorporated community",
},
["locality"] = {
link = "+w:locality (settlement)",
-- not necessarily true, but usually is the case
fallback = "village",
},
["London borough"] = {
link = "w",
preposition = "of",
affix_type = "pref",
affix = "borough",
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["macroregion"] = {
link = true,
fallback = "region",
},
["man-made structures!"] = {
category_link = "[[w:geographical feature#Engineered constructs|man-made structures]] such as [[airport]]s, [[university|universities]] and [[metro station]]s",
bare_category_parent = "places",
},
["manor"] = {
-- FIXME: or is this more like a farm?
link = true,
fallback = "building",
},
["marginal sea"] = {
link = true,
preposition = "of",
fallback = "sea",
},
["market city"] = {
link = "+market town",
fallback = "city",
},
["market town"] = {
link = true,
fallback = "town",
},
["massif"] = {
link = true,
fallback = "mountain",
},
["megacity"] = {
link = true,
fallback = "city",
},
["metro station"] = {
link = true,
class = "man-made structure",
},
["metropolitan borough"] = {
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"borough", "city"},
fallback = "local government district",
has_neighborhoods = true,
},
["metropolitan city"] = {
-- These exist e.g. in Italy and are more like municipalities or even provinces than cities.
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"metropolitan", "city"},
class = "subpolity",
},
["metropolitan county"] = {
link = true,
fallback = "county",
},
["metropolitan municipality"] = {
-- In South Africa, metropolitan municipalities group local municipalities and are like districts, between
-- provinces and municipalities.
-- In Turkey, metropolitan municipalities are provinces-level.
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"metropolitan", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["microdistrict"] = {
-- residential complex in post-Soviet states
link = true,
fallback = "neighborhood",
},
["micronations!"] = {
-- FIXME, merge with microstate
category_link = "[[micronation]]s",
bare_category_parent = "quốc gia",
},
["microstate"] = {
link = true,
fallback = "country",
},
["military base"] = {
link = "w",
class = "settlement", -- or "man-made structure"?
default = {true},
},
["minster town"] = {
-- England
link = "separately",
fallback = "town",
},
["monarchy"] = {
link = true,
fallback = "polity",
},
["moor"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "ecosystems"},
default = {true},
},
["moorland"] = {
link = true,
fallback = "moor",
},
["motorway"] = {
link = true,
fallback = "road",
},
["mountain"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["mountain indigenous district"] = {
-- Taiwan
link = "+w:district (Taiwan)",
fallback = "district",
},
["mountain indigenous township"] = {
-- Taiwan
link = "+w:township (Taiwan)",
fallback = "township",
},
["mountain pass"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "mountain passes",
class = "natural feature",
addl_bare_category_parents = {"mountains"},
default = {true},
},
["mountain range"] = {
link = true,
fallback = "mountain",
},
["mountainous region"] = {
link = "separately",
fallback = "region",
},
["mukim"] = {
-- Malaysia, Brunei, Indonesia, Singapore
link = true,
preposition = "of",
class = "subpolity",
},
["municipal district"] = {
link = "w",
-- meaning varies depending on the country; for now, assume no neighborhoods.
-- FIXME: has_neighborhoods might have to be a function that looks at the containing holonyms.
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "municipality",
},
["municipality"] = {
link = true,
preposition = "of",
has_neighborhoods = true,
class = "subpolity",
},
["municipality with city status"] = {
link = "[[municipality]] with [[w:city status|city status]]",
plural = "municipalities with city status",
plural_link = "[[municipality|municipalities]] with [[w:city status|city status]]",
fallback = "municipality",
},
["museum"] = {
link = true,
fallback = "building",
},
["mythological location"] = {
link = "separately",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "places",
default = {true},
},
["named bridges!"] = {
category_link = "notable [[bridge]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"bridges"},
},
["named buildings!"] = {
category_link = "notable [[house]]s, [[library|libraries]] and other [[building]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"buildings"},
},
["named roads!"] = {
category_link = "notable [[road]]s, [[highway]]s, [[trail]]s and similar linear structures",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"roads"},
},
["national capital"] = {
link = "w",
fallback = "capital city",
},
["national park"] = {
link = true,
fallback = "park",
},
["đặc điểm tự nhiên!"] = {
category_link = "tổng hợp các yếu tố vật chất hình thành tồn tại",
bare_category_parent = "địa danh",
},
["neighborhood"] = {
-- The majority of the properties here apply to both `neighborhoods` and `neighbourhoods`; the choice of which
-- one to use is made by district_neighborhood_cat_handler() based on the value of `british_spelling` for the
-- location (city, political division, etc.) of the holonym that follows the word "neighbo(u)hoods" in the
-- category name. It does *NOT* depend on whether the {{place}} call uses "neighborhoods" or "neighbourhoods".
-- (In general it can't, because other things like "urban areas", "districts", "subdivisions" and the like also
-- categorize as neighbo(u)rhoods.)
link = true,
-- See below. These are used by category handlers in [[Module:category tree/topic cat/data/Places]].
generic_before_non_cities = "in",
generic_before_cities = "of",
-- The following text is suitable for the top-level description of a neighborhood as well as categories of the
-- form `Neighborhoods in POLDIV` e.g. `Neighborhoods in Illinois, USA` but not for categories of the form
-- `Neighborhoods of Chicago`, where we'd get "... and other subportions of [[city|cities]] of [[Chicago]]".
category_link = "[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighborhood]]s, [[district]]s and other subportions",
-- NOTE: This setting is needed for administrative divisions like barangays that fall back to `neighborhood`,
-- when set in [[Module:place/locations]] for a specific country (e.g. the Philippines). The above settings
-- for `generic_before_non_cities` and `generic_before_cities` are used by category handlers in
-- [[Module:category tree/topic cat/data/Places]] for `Neighborhoods in POLDIV` and `Neighborhoods of CITY`
-- categories. In fact, district_neighborhood_cat_handler() does not currently pay attention to them, but
-- generates "of" before cities and "in" before non-cities regardless. (FIXME: We should change that.)
preposition = "of",
class = "non-admin settlement",
cat_handler = district_neighborhood_cat_handler,
},
["neighbourhood"] = {
link = true,
category_link = "[[neighbourhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighbourhood]]s, [[district]]s and other subportions",
fallback = "neighborhood",
},
["new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
preposition = "in",
class = "subpolity", --?
},
["new town"] = {
link = true,
fallback = "town",
},
["non-city capital"] = {
link = "[[capital]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
cat_handler = function(data)
return capital_city_cat_handler(data, "non-city")
end,
-- FIXME, do we need the following?
default = {true},
},
["non-metropolitan county"] = {
link = "w",
fallback = "county",
},
["non-metropolitan district"] = {
link = "w",
fallback = "local government district",
},
["non-sovereign kingdom"] = {
-- especially in Africa and Asia
link = "+w:non-sovereign monarchy",
generic_before_non_cities = "in",
class = "subpolity",
["country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["non-sovereign monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["oblasts and autonomous republics!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Ukraine.
category_link = "[[oblast]]s and [[w:autonomous republic|autonomous republic]]s",
class = "subpolity",
},
["ocean"] = {
link = true,
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"seas", "bodies of water"},
default = {true},
},
["okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["overseas collectivity"] = {
link = "w",
fallback = "collectivity",
},
["overseas department"] = {
link = "w",
fallback = "department",
},
["overseas territory"] = {
link = "w",
fallback = "dependent territory",
},
["parish"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["parish municipality"] = {
-- in Quebec, often similar to a rural village; the famous [[Saint-Louis-du-Ha! Ha!]] is one of them.
link = "+w:parish municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true,
},
["parish seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
class = "capital",
has_neighborhoods = true,
},
["park"] = {
link = true,
class = "man-made structure",
default = {true},
},
["pass"] = {
link = "+mountain pass",
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "passes",
fallback = "mountain pass",
},
["path"] = {
link = true,
fallback = "road",
},
["peak"] = {
link = true,
fallback = "mountain",
},
["peninsula"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["periphery"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["địa danh!"] = {
generic_before_non_cities = "của",
generic_before_cities = "của",
class = "generic place",
category_link = "[[place]]s of all sorts",
-- `category_link_top_level` control the description used in the top-level [[Category:Places]] and
-- language-specific variants such as [[Category:en:Places]]. The actual text for a language-spefic variant is
-- "{{{langname}}} names of [[geographical]] [[place]]s of all sorts; [[toponym]]s." where the "names of"
-- portion is automatically generated by the appropriate handler in
-- [[Module:category tree/topic cat/data/Places]].
category_link_top_level = "[[geographical]] [[place]]s of all sorts; [[toponym]]s",
bare_category_parent = "tên",
},
["planned community"] = {
-- Include this so we don't categorize 'planned community' into villages, as 'community' does.
link = true,
class = "settlement",
has_neighborhoods = true,
},
["plateau"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
-- FIXME: Should generate both "Plateaus" and the appropriate 'geographic and cultural area' category
},
["Polish colony"] = {
link = "[[w:colony (Poland)|colony]]",
affix_type = "suf",
affix = "colony",
fallback = "village",
has_neighborhoods = true,
},
["political divisions!"] = {
category_link = "[[political]] [[division]]s and [[subdivision]]s, such as [[state]]s, [[province]]s, [[county|counties]] or [[district]]s",
bare_category_parent = "places",
},
["tổ chức chính trị"] = {
link = true,
category_link = "[[independent]] or [[semi-]][[independent]] [[polity|polities]]",
class = "polity",
bare_category_parent = "địa danh",
default = {true},
},
["populated place"] = {
link = "+w:populated place",
-- not necessarily true, but usually is the case
fallback = "village",
},
["port"] = {
link = true,
class = "man-made structure",
default = {true},
},
["port city"] = {
-- FIXME: should categorize into "Ports" as well as "Cities"
link = true,
fallback = "city",
},
["port town"] = {
-- FIXME: should categorize into "Ports" as well as "Towns"
link = "w",
fallback = "town",
},
["prefecture"] = {
-- FIXME! `prefecture` is like a county in Japan and elsewhere but a department capital city in France.
-- May need `has_neighborhoods` to be a function.
link = true,
preposition = "of",
display_handler = prefecture_display_handler,
class = "subpolity",
},
["prefecture-level city"] = {
-- China; they are huge entities with a central city; not cities themselves.
link = "w",
preposition = "of",
class = "subpolity",
},
["preserved county"] = {
-- In Wales; they are former counties enshrined in law; there are 8 of them and each consists of one or more
-- "principal areas" (styled as "counties" or "county boroughs"), of which there are 22.
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["primary area"] = {
-- a grouping of "districts" (neighborhoods) in Gothenburg, Sweden
link = "+w:sv:primärområde",
fallback = "neighborhood",
},
["principality"] = {
link = true,
fallback = "monarchy",
},
["promontory"] = {
link = true,
fallback = "headland",
},
["protectorate"] = {
link = true,
fallback = "dependent territory",
},
["province"] = {
link = true,
preposition = "of",
display_handler = province_display_handler,
class = "subpolity",
},
["provinces and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case China.
category_link = "[[province]]s and [[autonomous region]]s",
class = "subpolity",
},
["provinces and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Canada and Pakistan.
category_link = "[[province]]s and [[territory|territories]]",
class = "subpolity",
},
["provincial capital"] = {
link = true,
fallback = "capital city",
},
["raion"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["ranch"] = {
link = true,
fallback = "farm",
},
["range"] = {
-- FIXME: Where is this used? Is it a mountain range?
link = true,
holonym_use_the = true,
class = "natural feature",
},
["regency"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["region"] = {
link = true,
preposition = "of",
-- If 'region' isn't a specific administrative division, fall back to 'geographic and cultural area'
fallback = "geographic and cultural area",
-- "former region" is a subpolity but traditional/historic(al)/ancient/medieval/etc. is a geographic region
class = "geographic region",
},
["regional capital"] = {
link = "separately",
fallback = "capital city",
},
["regional county municipality"] = {
-- Quebec
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"municipality", "county"},
fallback = "municipality",
},
["regional district"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "district",
},
["regional municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
},
["regional unit"] = {
link = "w",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["registration county"] = {
-- Used in Scotland for land registration purposes; formerly used in England, Wales and Ireland for statistical
-- purposes (registration of births, deaths and marriages, and for the output of census information).
link = "w",
fallback = "county",
},
["republic"] = {
-- Of Russia, Yugoslavia, etc. "Republics" in general are sovereign but we use "country" in that case.
link = true,
fallback = "constituent republic",
},
["research base"] = {
link = "+w:research station",
fallback = "research station",
},
["research station"] = {
link = "w",
class = "non-admin settlement", -- or "man-made structure"?
default = {true},
},
["reservoir"] = {
link = true,
fallback = "lake",
},
["residential area"] = {
link = "separately",
fallback = "neighborhood",
},
["resort city"] = {
link = "w",
fallback = "city",
},
["resort town"] = {
link = "w",
fallback = "town",
},
["river"] = {
link = true,
generic_before_non_cities = "in",
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
cat_handler = city_type_cat_handler,
["continent/*"] = {true},
default = {true},
},
["river island"] = {
link = "w",
fallback = "island",
},
["road"] = {
link = true,
class = "man-made structure",
default = {"Named roads"},
},
["Roman province"] = {
-- FIXME! Eliminate this in favor of 'former province|emp/Roman Empire'
link = "w",
default = {"Provinces of the Roman Empire"},
class = "subpolity",
},
["royal borough"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"royal", "borough"},
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["royal burgh"] = {
link = true,
fallback = "borough",
},
["royal capital"] = {
link = "w",
fallback = "capital city",
},
["rural committee"] = {
-- Hong Kong; a group of villages
link = "w",
affix_type = "Suf",
has_neighborhoods = true,
class = "settlement",
},
["rural community"] = {
-- New Brunswick
link = "+w:list of municipalities in New_Brunswick#Rural communities",
fallback = "municipality",
},
["rural hromada"] = {
link = "[[rural]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["rural municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
has_neighborhoods = true, --?
},
["rural township"] = {
-- Taiwan
link = "+w:rural township (Taiwan)",
fallback = "township",
},
["sanctuary"] = {
link = true,
fallback = "temple",
},
["satrapy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["sea"] = {
link = true,
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["seaport"] = {
link = true,
fallback = "port",
},
["seat"] = {
link = true,
fallback = "administrative centre",
},
["self-administered area"] = {
-- Myanmar (groups self-administered divisions and zones)
link = "+w:self-administered zone",
preposition = "of",
class = "subpolity",
},
["self-administered division"] = {
-- Myanmar (only one of them: Wa Self-Administered Division)
link = "w",
fallback = "self-administered area",
},
["self-administered zone"] = {
-- Myanmar (five of them)
link = "w",
fallback = "self-administered area",
},
["separatist state"] = {
link = "separately",
fallback = "unrecognized country",
},
["settlement"] = {
link = true,
category_link = "[[settlement]]s such as [[city|cities]], [[village]]s and [[farm]]s",
bare_category_parent = "places",
-- not necessarily true, but usually is the case
fallback = "village",
},
["settlement hromada"] = {
link = "[[w:Populated places in Ukraine#Rural settlements|settlement]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["sheading"] = {
-- Isle of Man
link = true,
fallback = "district",
},
["sheep station"] = {
-- Australia
link = true,
fallback = "farm",
},
["shire"] = {
link = true,
fallback = "county",
},
["shire county"] = {
link = "w",
fallback = "county",
},
["shire town"] = {
link = true,
fallback = "county seat",
},
["ski resort city"] = {
link = "[[ski resort]] [[city]]",
fallback = "city",
},
["ski resort town"] = {
link = "[[ski resort]] [[town]]",
fallback = "town",
},
["spa city"] = {
link = "+w:spa town",
fallback = "city",
},
["spa town"] = {
link = "w",
fallback = "town",
},
["space station"] = {
link = true,
fallback = "research station",
},
["special administrative region"] = {
-- in China; in practice they are city-like (Hong Kong, Macau); also [[Oecusse]] in East Timor is formally a
-- "special administrative region"; North Korea had one such region planned (Sinuiju) but abandoned; Indonesia
-- has similar "special regions" of Jakarta, Yogyakarta and Aceh; and South Sudan has three "special
-- administrative areas"
link = "+w:special administrative regions of China",
preposition = "of",
class = "subpolity",
has_neighborhoods = true, --?
-- no suffix since places in Hong Kong or Macau are listed without China, except Hong Kong and Macau themselves
-- they also contain regions (or areas), e.g. [[Kowloon]], so it would be confusing
suffix = "",
},
["special collectivity"] = {
link = "w",
fallback = "collectivity",
},
["special municipality"] = {
-- formerly linked to the Taiwan article but there are also special municipalities of the Netherlands
link = "w",
fallback = "municipality",
},
["special ward"] = {
-- Tokyo
link = true,
fallback = "municipality",
},
["spit"] = {
link = true,
fallback = "peninsula",
},
["spring"] = {
link = true,
class = "natural feature",
default = {true},
},
["star"] = {
link = true,
class = "natural feature",
default = {true},
},
["state"] = {
link = true,
preposition = "of",
class = "subpolity",
-- 'former/historical state' could refer either to a state of a country (a division) or a state = sovereign
-- entity. The latter appears more common (e.g. in various "ancient states" of East Asia).
former_type = "polity",
},
["states and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Australia.
category_link = "[[state]]s and [[territory|territories]]",
class = "subpolity",
},
["states and union territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case India.
category_link = "[[state]]s and [[union territory|union territories]]",
class = "subpolity",
},
["state capital"] = {
link = true,
fallback = "capital city",
},
["state park"] = {
link = true,
fallback = "park",
},
["state-level new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
fallback = "new area",
},
["statistical region"] = {
-- Slovenia
link = true,
fallback = "administrative region",
},
["statutory city"] = {
link = "w",
fallback = "city",
},
["statutory town"] = {
link = "w",
fallback = "town",
},
["strait"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["stream"] = {
link = true,
fallback = "river",
},
["street"] = {
link = true,
fallback = "road",
},
["strip"] = {
link = true,
fallback = "geographic region",
},
["strip of land"] = {
link = "[[strip]] of [[land]]",
plural = "strips of land",
plural_link = "[[strip]]s of [[land]]",
fallback = "geographic region",
},
["sub-metropolitan city"] = {
link = "+w:List of cities in Nepal#Sub-metropolitan cities",
fallback = "city",
},
["sub-prefectural city"] = {
link = "w",
fallback = "subprovincial city",
},
["subdistrict"] = {
link = true,
preposition = "of",
has_neighborhoods = true, --?
-- FIXME: subdistricts can be neighborhood-like (of Jakarta) or larger (in China); need a handler
class = "subpolity",
default = {true},
},
["subdivision"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- FIXME: subdivisions can be neighborhood-like or larger; need a handler
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
},
["submerged ghost town"] = {
-- FIXME: Consider just having "submerged" as a qualifier.
link = "[[submerged]] [[ghost town]]",
fallback = "ghost town",
},
["subnational kingdom"] = {
link = "+w:subnational monarchy",
fallback = "non-sovereign kingdom",
},
["subnational monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["subprefecture"] = {
link = true,
affix_type = "suf",
preposition = "of",
class = "subpolity",
},
["subprovince"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["subprovincial city"] = {
link = "w",
-- China; special status given to certain prefecture-level cities
fallback = "prefecture-level city",
},
["subprovincial district"] = {
link = "w",
-- China; special status given to Binhai New Area and Pudong New Area, which are county-level districts
preposition = "of",
class = "subpolity",
},
["subregion"] = {
link = true,
fallback = "geographic region",
},
["suburb"] = {
link = true,
-- The following text is suitable for the top-level description of a suburb as well as categories of the form
-- 'Suburbs in POLDIV' e.g. 'Suburbs in Illinois, USA' but not for categories of the form 'Suburbs of Chicago',
-- where we'd get "[[suburb]]s of [[city|cities]] of [[Chicago]]".
category_link = "[[suburb]]s of [[city|cities]]",
category_link_before_city = "[[suburb]]s",
-- See comments under "neighborhood" for the following three settings. They are used by
-- [[Module:category tree/topic cat/data/Places]] for generating the text of 'Suburbs in/of PLACE' categories
-- but currently ignored by district_neighborhood_cat_handler (which actually generates the categories for a
-- given page), which hardcodes "in" for non-cities and "of" for cities. (FIXME: Change this.)
generic_before_non_cities = "in",
generic_before_cities = "of",
preposition = "of",
has_neighborhoods = true, --?
class = "non-admin settlement", --?
cat_handler = district_neighborhood_cat_handler,
},
["suburban area"] = {
link = "w",
fallback = "suburb",
},
["subway station"] = {
link = "w",
fallback = "metro station",
},
["sum"] = {
-- In China, Mongolia, Russia; something like a county in Mongolia but a township in China (Inner Mongolia),
-- and equivalent to a [[selsoviet]] in the parts of Russia where it's in use (a rural council, below a raion).
link = "+w:sum (administrative division)",
-- This fallback is somewha arbitrary. We could use "county" but that has a display handler
-- which we don't want to be active (FIXME: If the display handler would be active, that's a bug).
fallback = "division",
},
["supercontinent"] = {
link = true,
fallback = "continent",
},
["tehsil"] = {
link = true,
affix_type = "suf",
no_affix_strings = {"tehsil", "tahsil"},
class = "subpolity",
},
["temple"] = {
link = true,
fallback = "building",
},
["territorial authority"] = {
link = "w",
fallback = "district",
},
["territory"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["theme"] = {
link = "+w:theme (Byzantine district)",
preposition = "of",
class = "subpolity",
},
["town"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["town with bystatus"] = {
-- can't use templates in links currently
link = "[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]",
plural = "towns with bystatus",
plural_link = "[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]",
fallback = "town",
},
["township"] = {
link = true,
has_neighborhoods = true,
class = "settlement", --?
default = {true},
},
["township municipality"] = {
-- Quebec
link = "+w:township municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["traditional county"] = {
link = true,
fallback = "county",
},
["traditional region"] = {
-- FIXME: Verify this works. Same for 'historic(al) region'.
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["trail"] = {
link = true,
fallback = "road",
},
["treaty port"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"FORMER"},
},
["tributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["underground station"] = {
link = "w",
fallback = "metro station",
},
["unincorporated area"] = {
link = "w",
-- I don't know if this fallback makes sense everywhere.
fallback = "unincorporated community",
},
["unincorporated community"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
},
["unincorporated territory"] = {
link = "w",
fallback = "territory",
},
["union territory"] = {
-- India
link = true,
preposition = "of",
entry_placetype_indefinite_article = "a",
class = "subpolity",
},
["unitary authority"] = {
-- UK, New Zealand
link = true,
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["unitary district"] = {
link = "w",
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["united township municipality"] = {
-- Quebec
link = "+w:united township municipality (Quebec)",
entry_placetype_indefinite_article = "a",
fallback = "township municipality",
has_neighborhoods = true, --?
},
["university"] = {
link = true,
entry_placetype_indefinite_article = "a",
class = "man-made structure",
default = {true},
},
["unrecognised country"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized and nearly unrecognized countries!"] = {
category_link = "[[de facto]] [[independent]] [[state]]s with little or no {{w|international recognition}}",
bare_category_parent = "country-like entities",
},
["unrecognized country"] = {
link = "w",
class = "polity",
default = {"Unrecognized and nearly unrecognized countries"},
},
["unrecognised state"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized state"] = {
link = "w",
fallback = "unrecognized country",
},
["urban area"] = {
link = "separately",
fallback = "neighborhood",
},
["urban hromada"] = {
link = "[[urban]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["urban service area"] = {
-- A strange beast existing in Alberta; technically a type of hamlet but in practice used for much larger
-- cities and treated equivalent to a city. (There are only two of them, [[Fort McMurray]] and [[Sherwood Park]]).
link = "w",
fallback = "city",
},
["urban township"] = {
link = "w",
fallback = "township",
},
["urban-type settlement"] = {
-- appears to be a particular type of small urban settlement in post-Soviet states,
-- had an administrative function.
link = "w",
fallback = "town",
},
["valley"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "water"},
default = {true},
},
["viceroyalty"] = {
-- in essence, a type of colony
link = true,
fallback = "dependent territory",
},
["village"] = {
link = true,
generic_before_non_cities = "in",
category_link = "[[village]]s, [[hamlet]]s, and other small [[community|communities]] and [[settlement]]s",
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["village development committee"] = {
-- former administrative structure in Nepal; also exists in India but not as a formal unit
link = "+w:village development committee (Nepal)",
inherently_former = {"FORMER"},
fallback = "village",
},
["village municipality"] = {
-- Quebec
link = "+w:village municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["voivodeship"] = {
-- Poland
link = true,
display_handler = voivodeship_display_handler,
preposition = "of",
class = "subpolity",
},
["volcano"] = {
link = true,
plural = "volcanoes",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true, "Mountains"},
},
["ward"] = {
link = true,
class = "settlement",
-- Wards are formal administrative divisions of a city but have some properties of neighborhoods.
fallback = "neighborhood",
},
["watercourse"] = {
link = true,
fallback = "channel",
},
["Welsh community"] = {
-- Wales
link = "[[w:community (Wales)|community]]",
preposition = "of",
affix_type = "suf",
affix = "community",
has_neighborhoods = true,
class = "settlement",
},
["zone"] = {
-- administrative division of Ethiopia, Qatar, Nepal, India
link = "+w:zone#Place names",
preposition = "of",
class = "subpolity",
},
----------------------------------------------------------------------------------------------
-- Categories for former places --
----------------------------------------------------------------------------------------------
["ANCIENT capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
-- FIXME: Consider removing 'ancient settlements' here. Ancient capitals, like former capitals, often still
-- exist but just aren't the capital any more. Maybe we should have an 'Ancient capitals' category.
default = {"Ancient settlements", "Former capitals"},
},
["ANCIENT non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "ANCIENT settlement",
},
["ANCIENT settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Ancient settlements"},
},
["ancient settlements!"] = {
category_link = "former [[city|cities]], [[town]]s and [[village]]s that existed in [[antiquity]]",
bare_category_parent = "former settlements",
},
["FORMER capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
default = {"Former capitals"},
},
["former capitals!"] = {
category_link = "former [[capital]] [[city|cities]] and [[town]]s",
bare_category_parent = "settlements",
},
["former counties and county-level cities!"] = {
-- For categorizing former counties and county-level cities of China
category_link = "no-longer existing [[county|counties]] and [[county-level city|county-level cities]]",
bare_category_breadcrumb = "counties and county-level cities",
bare_category_parent = "former political divisions",
},
["FORMER county"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER county-level city"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["former countries and country-like entities!"] = {
category_link = "[[country|countries]] and similar [[polity|polities]] that no longer exist",
bare_category_breadcrumb = "countries and country-like entities",
bare_category_parent = "former polities",
},
["FORMER country"] = {
link = false,
class = "polity",
default = {"Former countries and country-like entities"},
},
["former dependent territories!"] = {
category_link = "[[w:dependent territory|dependent territories]] (colonies, dependencies, protectorates, etc.) that no longer exist",
bare_category_breadcrumb = "dependent territories",
bare_category_parent = "former political divisions",
},
["FORMER dependent territory"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former dependent territories"},
},
["former districts!"] = {
-- For categorizing former districts of China
category_link = "no-longer-existing [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "former political divisions",
},
["FORMER district"] = {
-- For categorizing former districts of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER geographic region"] = {
link = false,
fallback = "geographic and cultural area",
},
["FORMER man-made structure"] = {
link = false,
class = "man-made structure",
default = {"Former man-made structures"},
},
["former man-made structures!"] = {
category_link = "man-made structures such as [[airport]]s and [[park]]s that no longer exist",
bare_category_breadcrumb = "man-made structures",
bare_category_parent = "former places",
},
["former municipalities!"] = {
-- For categorizing former municipalities of the Netherlands
category_link = "no-longer-existing [[municipality|municipalities]]",
bare_category_breadcrumb = "municipalities",
bare_category_parent = "former political divisions",
},
["FORMER municipality"] = {
-- For categorizing former municipalities of the Netherlands
link = false,
fallback = "FORMER subpolity",
},
["FORMER natural feature"] = {
link = false,
class = "natural feature",
default = {"Former natural features"},
},
["former natural features!"] = {
category_link = "natural features such as [[lake]]s, [[river]]s and [[island]]s that no longer exist",
bare_category_breadcrumb = "natural features",
bare_category_parent = "former places",
},
["FORMER non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "FORMER settlement",
},
["former places!"] = {
category_link = "[[place]]s of all sorts that no longer exist",
bare_category_breadcrumb = "former",
bare_category_parent = "places",
},
["former political divisions!"] = {
category_link = "[[political]] [[division]]s (states, provinces, counties, etc.) that no longer exist",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former places",
},
["former polities!"] = {
category_link = "[[polity|polities]] (countries, kingdoms, empires, etc.) that no longer exist",
bare_category_breadcrumb = "polities",
bare_category_parent = "former places",
},
["FORMER polity"] = {
link = false,
class = "polity",
default = {"Former polities"},
},
["former prefectures!"] = {
-- For categorizing former prefectures of China
category_link = "no-longer-existing [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "former political divisions",
},
["FORMER prefecture"] = {
-- For categorizing former prefectures of China
link = false,
fallback = "FORMER subpolity",
},
["former provinces!"] = {
-- For categorizing former provinces of China, etc.
category_link = "no-longer-existing [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "former political divisions",
},
["FORMER province"] = {
-- For categorizing ancient/historical/former provinces of the Roman Empire
link = false,
fallback = "FORMER subpolity",
},
["former region"] = {
-- A former region is considered a former political division, but not a 'historical/traditional/etc.' region.
link = "separately",
preposition = "of",
inherently_former = {"FORMER"},
class = "subpolity",
},
["FORMER settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Former settlements"},
},
["former settlements!"] = {
category_link = "[[city|cities]], [[town]]s and [[village]]s that no longer exist or have been merged or reclassified",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former political divisions",
},
["FORMER subpolity"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former political divisions"},
},
----------------------------------------------------------------------------------------------
-- form-of categories --
----------------------------------------------------------------------------------------------
---------- Abbreviations ----------
["abbreviations of counties!"] = {
-- For categorizing abbreviations of counties of e.g. England
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[county|counties]]",
bare_category_breadcrumb = "counties",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of places",
},
["abbreviations of departments!"] = {
-- For categorizing abbreviations of departments of e.g. France
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[department]]s",
bare_category_breadcrumb = "departments",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of districts!"] = {
-- For categorizing abbreviations of districts of e.g. ???
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of divisions!"] = {
-- For categorizing abbreviations of divisions of e.g. Bangladesh
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[division]]s",
bare_category_breadcrumb = "divisions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of former countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of former places",
},
["abbreviations of former places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "abbreviations of places", sort = "former"}},
},
["abbreviations of places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "places",
},
["abbreviations of political divisions!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[political]] [[division]]s",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "abbreviations of places",
},
["abbreviations of prefectures!"] = {
-- For categorizing abbreviations of prefectures of e.g. Japan
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces!"] = {
-- For categorizing abbreviations of provinces of e.g. Canada
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s and [[territory|territories]]",
bare_category_breadcrumb = "provinces and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of regions!"] = {
-- For categorizing abbreviations of regions of e.g. Italy
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[administrative region]]s",
bare_category_breadcrumb = "regions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states!"] = {
-- For categorizing abbreviations of states of e.g. the United States
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[territory|territories]]",
bare_category_breadcrumb = "states and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and union territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[union territory|union territories]]",
bare_category_breadcrumb = "states and union territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[territory|territories]]",
bare_category_breadcrumb = "territories",
bare_category_parent = "abbreviations of political divisions",
},
["ABBREVIATION_OF country"] = {
link = false,
default = {"Abbreviations of countries"},
},
["ABBREVIATION_OF county"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF department"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF district"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF division"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF FORMER country"] = {
link = false,
default = {"Abbreviations of former countries"},
},
["ABBREVIATION_OF FORMER place"] = {
link = false,
default = {"Abbreviations of former places"},
},
["ABBREVIATION_OF place"] = {
link = false,
default = {"Abbreviations of places"},
},
["ABBREVIATION_OF prefecture"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF province"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF region"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF state"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF subpolity"] = {
link = false,
default = {"Abbreviations of political divisions"},
},
["ABBREVIATION_OF territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF union territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
---------- Archaic forms ----------
["archaic forms of places!"] = {
full_category_link = "{{glossary|archaic}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "archaic forms",
bare_category_parent = "places",
},
["ARCHAIC_FORM_OF place"] = {
link = false,
default = {"Archaic forms of places"},
},
---------- Clippings ----------
["clippings of places!"] = {
full_category_link = "{{glossary|clipping}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "clippings",
bare_category_parent = "places",
},
["CLIPPING_OF place"] = {
link = false,
default = {"Clippings of places"},
},
---------- Dated forms ----------
["dated forms of places!"] = {
full_category_link = "{{glossary|dated}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "dated forms",
bare_category_parent = "places",
},
["DATED_FORM_OF place"] = {
link = false,
default = {"Dated forms of places"},
},
---------- Derogatory names ----------
["derogatory names for cities!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[city|cities]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["derogatory names for continents!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for continents"},
},
["derogatory names for countries!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for countries"},
},
["derogatory names for places!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[place]]s",
bare_category_breadcrumb = "derogatory names",
bare_category_parent = "nicknames for places",
},
["derogatory names for states!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for states"},
},
["DEROGATORY_NAME_FOR capital"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR city"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR continent"] = {
link = false,
default = {"Derogatory names for continents"},
},
["DEROGATORY_NAME_FOR country"] = {
link = false,
default = {"Derogatory names for countries"},
},
["DEROGATORY_NAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR place"] = {
link = false,
default = {"Derogatory names for places"},
},
["DEROGATORY_NAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR state"] = {
link = false,
default = {"Derogatory names for states"},
},
["DEROGATORY_NAME_FOR town"] = {
link = false,
default = {"Derogatory names for cities"},
},
---------- Ellipses ----------
["ellipses of places!"] = {
full_category_link = "{{glossary|ellipsis|ellipses}} of [[name]]s of [[place]]s",
bare_category_breadcrumb = "ellipses",
bare_category_parent = "places",
},
["ELLIPSIS_OF place"] = {
link = false,
default = {"Ellipses of places"},
},
---------- Former long-form names ----------
["former long-form names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former long-form names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "long-form"}},
},
["former long-form names of places!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form",
bare_category_parent = "former names of places",
},
["FORMER_LONG_FORM_OF country"] = {
link = false,
default = {"Former long-form names of countries"},
},
["FORMER_LONG_FORM_OF place"] = {
link = false,
default = {"Former long-form names of places"},
},
---------- Former names ----------
["former names of capitals!"] = {
full_category_link = "[[former]] [[name]]s of [[capital city|capital cities]] that generally still exist but under a different name",
bare_category_breadcrumb = "capitals",
bare_category_parent = "former names of settlements",
},
["former names of countries!"] = {
full_category_link = "[[former]] [[name]]s of [[country|countries]] that generally still exist but under a different name",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former names of places",
},
["former names of places!"] = {
full_category_link = "[[former]] [[name]]s of [[place]]s that generally still exist but under a different name",
bare_category_breadcrumb = "former names",
bare_category_parent = "places",
},
["former names of political divisions!"] = {
full_category_link = "[[former]] [[name]]s of [[political]] [[division]]s (states, provinces, counties, etc.) that generally still exist but under a different name",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former names of places",
},
["former names of polities!"] = {
full_category_link = "[[former]] [[name]]s of [[polity|polities]] (e.g. [[country|countries]]) that generally still exist but under a different name",
bare_category_breadcrumb = "polities",
bare_category_parent = "former names of places",
},
["former names of settlements!"] = {
full_category_link = "[[former]] [[name]]s of [[city|cities]], [[town]]s, [[village]]s, etc. that generally still exist but under a different name",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former names of political divisions",
},
["FORMER_NAME_OF capital"] = {
link = false,
default = {"Former names of capitals"},
},
["FORMER_NAME_OF country"] = {
link = false,
default = {"Former names of countries"},
},
["FORMER_NAME_OF place"] = {
link = false,
default = {"Former names of places"},
},
["FORMER_NAME_OF polity"] = {
link = false,
default = {"Former names of polities"},
},
["FORMER_NAME_OF region"] = {
link = false,
fallback = "FORMER_NAME_OF subpolity",
},
["FORMER_NAME_OF settlement"] = {
link = false,
default = {"Former names of settlements"},
},
["FORMER_NAME_OF subpolity"] = {
link = false,
default = {"Former names of political divisions"},
},
---------- Former nicknames ----------
["former nicknames for cities!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[city|cities]], e.g. the [[Eternal City]] for [[Kyoto]] during the {{w|Heian period}} ({{circa2|800–1100|short=yes}} {{AD}})",
bare_category_breadcrumb = "cities",
bare_category_parent = "former nicknames for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["former nicknames for places!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "former",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {{name = "former names of places", sort = "nicknames"}},
},
["FORMER_NICKNAME_FOR capital"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR city"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR place"] = {
link = false,
default = {"Former nicknames for places"},
},
["FORMER_NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR town"] = {
link = false,
default = {"Former nicknames for cities"},
},
---------- Former official names ----------
["former official names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former official names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "official"}},
},
["former official names of places!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "former names of places",
},
["FORMER_OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Former official names of countries"},
},
["FORMER_OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Former official names of places"},
},
---------- Long-form names ----------
["long-form names of countries!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "long-form names of places",
},
["long-form names of places!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form names",
bare_category_parent = "places",
},
["LONG_FORM_OF country"] = {
link = false,
default = {"Long-form names of countries"},
},
["LONG_FORM_OF place"] = {
link = false,
default = {"Long-form names of places"},
},
---------- Nicknames ----------
["nicknames for cities!"] = {
full_category_link = "[[nickname]]s for [[city|cities]], e.g. the [[Big Apple]] for [[New York City]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"cities"},
},
["nicknames for continents!"] = {
full_category_link = "[[nickname]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"continents"},
},
["nicknames for countries!"] = {
full_category_link = "[[nickname]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"quốc gia"},
},
["nicknames for places!"] = {
full_category_link = "[[nickname]]s for [[place]]s",
bare_category_breadcrumb = "places",
bare_category_parent = "nicknames",
addl_bare_category_parents = {"places"},
},
["nicknames for states!"] = {
-- For categorizing nicknames for states of e.g. the United States
full_category_link = "[[nicknames]] for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"states"},
},
["NICKNAME_FOR capital"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR city"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR continent"] = {
link = false,
default = {"Nicknames for continents"},
},
["NICKNAME_FOR country"] = {
link = false,
default = {"Nicknames for countries"},
},
["NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR place"] = {
link = false,
default = {"Nicknames for places"},
},
["NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR state"] = {
link = false,
default = {"Nicknames for states"},
},
["NICKNAME_FOR town"] = {
link = false,
default = {"Nicknames for cities"},
},
---------- Obsolete forms ----------
["obsolete forms of places!"] = {
full_category_link = "{{glossary|obsolete}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "obsolete forms",
bare_category_parent = "places",
},
["OBSOLETE_FORM_OF place"] = {
link = false,
default = {"Obsolete forms of places"},
},
---------- Official names ----------
["official names of countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of places",
},
["official names of former countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of former places",
},
["official names of former places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "official names",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "official names of places", sort = "former"}},
},
["official names of places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official names",
bare_category_parent = "places",
},
["OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Official names of countries"},
},
["OFFICIAL_NAME_OF FORMER country"] = {
link = false,
default = {"Official names of former countries"},
},
["OFFICIAL_NAME_OF FORMER place"] = {
link = false,
default = {"Official names of former places"},
},
["OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Official names of places"},
},
---------- Official nicknames ----------
["official nicknames for places!"] = {
full_category_link = "[[official]] [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for places",
},
["official nicknames for states!"] = {
-- For categorizing official nicknames for states of e.g. the United States
full_category_link = "[[official]] [[nicknames]] for [[state]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for states",
addl_bare_category_parents = {"states"},
},
["OFFICIAL_NICKNAME_FOR place"] = {
link = false,
default = {"Official nicknames for places"},
},
["OFFICIAL_NICKNAME_FOR state"] = {
link = false,
default = {"Official nicknames for states"},
},
}
export.plural_placetype_to_singular = {}
for sg_placetype, spec in pairs(export.placetype_data) do
if spec.plural then
export.plural_placetype_to_singular[spec.plural] = sg_placetype
end
end
return export
gc39toiwf5lfonuktowt62tjtbve7b7
2350205
2350135
2026-05-05T04:02:55Z
Hiyuune
50834
2350205
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true for testing
local m_locations = require("Module:place/locations")
local m_links = require("Module:links")
local m_table = require("Module:table")
local m_strutils = require("Module:string utilities")
local debug_track_module = "Module:debug/track"
local en_utilities_module = "Module:en-utilities"
local dump = mw.dumpObject
local insert = table.insert
local concat = table.concat
local internal_error = m_locations.internal_error
export.internal_error = internal_error
local process_error = m_locations.process_error
export.process_error = process_error
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local ucfirst = m_strutils.ucfirst
local ulower = m_strutils.lower
local rmatch = m_strutils.match
local split = m_strutils.split
--[==[ intro:
This module contains placetype data used by [[Module:place]] and {{tl|place}}, along with a significant amount of code
to work with both placetypes and locations, as well as some placename-related info (FIXME: Consider moving it to
[[Module:place/locations]]). See also [[Module:place/locations]], which has definitions of all known locations. You must
currently load this module using {{cd|require()}}, not using {{cd|mw.loadData()}}.
In particular, it contains two fundamental and tricky functions:
# `get_placetype_equivs`, which finds the equivalent placetypes to look under in order to find a given property, and in
the process correctly handles placetypes with qualifiers (including qualifiers that act similar to "type-raising"
operators in that they do something non-trivial to the placetype to their right) as well as form-of directives and
fallbacks.
# `find_matching_holonym_location`, which looks up a holonym to find a matching known location, but in the process
checks holonyms to the right to make sure there isn't a clash between the user-specified containing holonyms and the
containers of the known location being considered. This is done to prevent overcategorizing when either there are two
known locations with the same name (e.g. Birmingham in England and Birmingham, Alabama in the US), or more generally
two locations with the same name, one of which is a known location but where the other is not (e.g. we're processing
non-known-location Mérida, Spain and don't want it categorized like known location Mérida, Yucatán, Mexico).
Both of these functions are invoked repeatedly, and probably are invoked several times on the same inputs and as a
result are candidates for memoization to speed up the operation of {{tl|place}}.
]==]
------------------------------------------------------------------------------------------
-- Basic utilities --
------------------------------------------------------------------------------------------
--[==[
Return true if `force_cat` is set either in this module or in [[Module:place/locations]].
]==]
function export.get_force_cat()
return export.force_cat or m_locations.force_cat
end
-- Add the page to a tracking "category". To see the pages in the "category",
-- go to [[Wiktionary:Tracking/place/PAGE]] and click on "What links here".
local function track(page)
require(debug_track_module)("place/" .. page)
return true
end
function export.remove_links_and_html(text)
text = m_links.remove_links(text)
return text:gsub("<.->", "")
end
--[==[
Return the singular version of a maybe-plural placetype, or nil if not plural. This correctly handles placetypes with
irregular plurals such as `kibbutzim` plural of `kibbutz` by looking up in a table constructed from the `plural` values
specified in `placetype_data`. If a special plural value is not found, the regular singularization algorithm in
[[Module:en-utilities]] is invoked, which reverses the y -> ies change after vowels and the 'es' addition after sh/ch/x,
and otherwise just subtracts a final 's' (which will incorrectly generate 'passe' for plural 'passes'; FIXME: consider
changing this for words ending in '-sses'). If the generated singular is the same as the passed-in value, nil is
returned.
]==]
function export.maybe_singularize_placetype(placetype)
if not placetype then
return nil
end
if export.plural_placetype_to_singular[placetype] then
return export.plural_placetype_to_singular[placetype]
end
local retval = require(en_utilities_module).singularize(placetype)
if retval == placetype then
return nil
end
return retval
end
-- Return the correct plural of a placetype, and (if `do_ucfirst` is given) make the first letter uppercase. We first
-- look up the plural in `placetype_data`, falling back to pluralize() in [[Module:en-utilities]], which is almost
-- always correct.
function export.pluralize_placetype(placetype, do_ucfirst)
local ptdata = export.placetype_data[placetype]
if ptdata and ptdata.plural then
placetype = ptdata
else
placetype = placetype
end
if do_ucfirst then
return ucfirst(placetype)
else
return placetype
end
end
--[==[
Get the data associated with a placetype, which may be in its singular or plural form. If `from_category` is specified,
we also look for category-only placetypes (generally plural) followed by `!`. Return three values: (a) the placetype
under which the data can be looked up (i.e. in its singular form if the passed-in `placetype` is plural and did not
match a category-only placetype followed by `!`); (b) the placetype data structure; (c) the type of `placetype` match
that occurred, one of `"direct"` if the canonical placetype is the same as the passed-in `placetype` and also the same
as the key under which `ptdata` was looked up, or `"direct-category"` if the `ptdata` was looked up under a key formed
from the passed-in `placetype` by adding `!`, or `"plural"` if the `ptdata` was looked up under the singularized version
of the plural passed-in `placetype`.
]==]
function export.get_placetype_data(placetype, from_category)
local ptdata = export.placetype_data[placetype]
if ptdata then
return placetype, ptdata, "direct"
end
if from_category then
ptdata = export.placetype_data[placetype .. "!"]
if ptdata then
return placetype .. "!", ptdata, "direct-category"
end
end
local sg_placetype = export.maybe_singularize_placetype(placetype)
if sg_placetype then
ptdata = export.placetype_data[sg_placetype]
if ptdata then
return sg_placetype, ptdata, "plural"
end
end
return nil
end
--[==[
Check for special pseudo-placetypes that should be ignored for categorization purposes.
]==]
function export.placetype_is_ignorable(placetype)
return placetype == "and" or placetype == "or" or placetype:find("^%(")
end
function export.resolve_placetype_aliases(placetype)
return export.placetype_aliases[placetype] or placetype
end
--[==[
Return a property from `placetype_data` for a given placetype. If the placetype isn't found in `placetype_data`, or the
key isn't found in the placetype's entry in `placetype_data`, return nil.
]==]
function export.get_placetype_prop(placetype, key)
-- Usually we are called on equivalent placetypes returned from `get_placetype_equivs`, in which case placetype
-- aliases have been resolved, but sometimes not, e.g. when fetching the indefinite article in
-- get_placetype_article(). `resolve_placetype_aliases` is just a simple lookup and it doesn't hurt to do it twice.
placetype = export.resolve_placetype_aliases(placetype)
if export.placetype_data[placetype] then
return export.placetype_data[placetype][key]
else
return nil
end
end
--[==[
Given a placetype, split the placetype into one or more potential ''splits'', each consisting of a three-element list
{ {``prev_qualifiers``, ``this_qualifier``, ``reduced_placetype``}}, i.e.
# the concatenation of zero or more previously-recognized qualifiers on the left, normally canonicalized (if there are
zero such qualifiers, the value will be nil);
# a single recognized qualifier, normally canonicalized (if there is no qualifier, the value will be nil);
# the "reduced placetype" on the right.
Splitting between the qualifier in (2) and the reduced placetype in (3) happens at each space character, proceeding from
left to right, and stops if a qualifier isn't recognized. All placetypes are canonicalized by checking for aliases
in `placetype_aliases`, but no other checks are made as to whether the reduced placetype is recognized. Canonicalization
of qualifiers does not happen if `no_canon_qualifiers` is specified.
For example, given the placetype `"small beachside unincorporated community"`, the return value will be
{ {
{nil, nil, "small beachside unincorporated community"},
{nil, "small", "beachside unincorporated community"},
{"small", "[[beachfront]]", "unincorporated community"},
{"small [[beachfront]]", "[[unincorporated]]", "community"},
}}
Here, `"beachside"` is canonicalized to `"[[beachfront]]"` and `"unincorporated"` is canonicalized to
`"[[unincorporated]]"`, in both cases according to the entry in `placetype_qualifiers`.
On the other hand, if given `"small former haunted community"`, the return value will be
{ {
{nil, nil, "small former haunted community"},
{nil, "small", "former haunted community"},
{"small", "former", "haunted community"},
}}
because `"small"` and `"former"` but not `"haunted"` are recognized as qualifiers.
Finally, if given `"former adr"`, the return value will be
{ {
{nil, nil, "former adr"},
{nil, "former", "administrative region"},
}}
because `"adr"` is a recognized placetype alias for `"administrative region"`.
]==]
function export.split_qualifiers_from_placetype(placetype, no_canon_qualifiers)
local splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
local prev_qualifier = nil
while true do
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if canon == nil then
break
end
local new_qualifier = qualifier
if type(canon) == "table" then
canon = canon.link
end
if not no_canon_qualifiers and canon ~= false then
if canon == true then
new_qualifier = "[[" .. qualifier .. "]]"
else
new_qualifier = canon
end
end
insert(splits, {prev_qualifier, new_qualifier, export.resolve_placetype_aliases(reduced_placetype)})
prev_qualifier = prev_qualifier and prev_qualifier .. " " .. new_qualifier or new_qualifier
placetype = reduced_placetype
else
break
end
end
return splits
end
--[==[
Given a `placetype` (which may be pluralized), return an ordered list of equivalent placetypes to look under to find the
placetype's properties (such as the category or categories to be inserted). The return value is actually an ordered list
of objects of the form `{qualifier=``qualifier``, placetype=``equiv_placetype``}` where ``equiv_placetype`` is a
placetype whose properties to look up, derived from the passed-in placetype or from a contiguous subsequence of the
words in the passed-in placetype (always including the rightmost word in the placetype, i.e. we successively chop off
qualifier words from the left and use the remainder to find equivalent placetypes). ``qualifier`` is the remaining words
not part of the subsequence used to find ``equiv_placetype``; or nil if all words in the passed-in placetype were used
to find ``equiv_placetype``. (FIXME: This qualifier is not currently used anywhere.) Only placetypes for which there is
an entry in `placetype_data` are included. The placetype passed in is always checked first, and will form the first
entry if it exists in `placetype_data`.
'''NOTE:''' This is a tricky function as it implements handling of (a) qualifiers, (b) fallback logic, (c)
"type-raising" qualifiers such as `former`/`ancient`/etc. as well as `fictional` and `mythological`, and (d) form-of
directives, which act somewhat similarly to `former`, and allows interaction between more than one of these
simultaneously (e.g. official names of former places, which have their own categorization).
If {{tl|place}} gets too slow, one potential speedup is to memoize the results of this function, as it appears to be
getting called more than once on the same inputs. Another similar potential speedup is to memoize the results of
`iterate_matching_holonym_location()`.
For example, given the placetype `left tributary`, the following placetype/qualifier combinations are checked in turn:
```
{qualifier = nil, placetype="left tributary"}
{qualifier = "left", placetype="tributary"}
{qualifier = "left", placetype="river"}
```
and the return value will be
{ {
{qualifier = "left", placetype="tributary"},
{qualifier = "left", placetype="river"},
}}
The algorithm first enters the placetype itself into the list, then checks for `left tributary` as a recognized
placetype in `placetype_data` and doesn't find it, so it doesn't enter it into the returned list (if it found it, it
would add it as well as any fallbacks directly after it). It then splits off the recognized qualifier `left` to form the
''reduced placetype'' `tributary`, which is entered into the list because it is found in `placetype_data`. Then, because
it has a fallback `river`, which exists in `placetype_data`, the fallback is entered next.
Another example is `small rural fraziones` (where a ''frazione'' is type of subdivision of a ''comune'' or municipality,
often specifically an outlying hamlet). the placetype/qualifier combinations checked are:
```
{qualifier = nil, placetype="small rural fraziones"}
{qualifier = nil, placetype="small rural frazione"}
{qualifier = "small", placetype="rural fraziones"}
{qualifier = "small", placetype="rural frazione"}
{qualifier = "small [[rural]]", placetype="fraziones"}
{qualifier = "small [[rural]]", placetype="frazione"}
{qualifier = "small [[rural]]", placetype="hamlet"}
{qualifier = "small [[rural]]", placetype="village"}
```
The return value ends up as
{qualifier = "small [[rural]]", placetype="frazione"},
{qualifier = "small [[rural]]", placetype="hamlet"},
{qualifier = "small [[rural]]", placetype="village"},
}}
Here, because the result of singularizing `fraziones` returns a different value from the placetype itself, that
singularized value is checked after the original plural value. Also, in the process of splitting off qualifiers,
they are canonicalized if the entry in `placetype_qualifiers` says to do so; in this case, links are placed around
`rural`. Finally, `frazione` has `hamlet` as its fallback, which in turn has `village` as its fallback, so both
fallbacks end up being returned.
`no_fallback`, if set, disables returning equivalent placetypes based on the `fallback` setting for a placetype. This is
used in the first of two loops in find_placetype_cat_specs() in [[Module:place]] to prefer exact matches for placetypes
such as barangays with later holonyms to matches based on a fallback such as `neighborhood` with an earlier holonym.
See the comment in that function in [[Module:place]] for a more detailed explanation of why this is needed. Only the
placetype itself, and any reduced placetypes created by chopping off recognized qualifiers at the beginning, are
returned; but we do not return reduced placetypes if a containing placetype exists in `placetype_data`. (For example,
`"overseas territory"` has a fallback `"dependent territory"`, and `"overseas"` is also a recognized qualifier. When
`no_fallback` is in place, without the above proviso, we would return `"overseas territory"` followed by `"territory"`
with the incorrect effect of classifying an `"overseas territory"` of the United Kingdom such as `"Gibraltar"` under
[[:Category:Territories of the United Kingdom]] instead of [[:Category:Dependent territories of the United Kingdom]].)
As an exception, if `historical`, `ancient`, `former` or the like are found, they proceed ignoring `no_fallback`,
because it seems tricky to handle them correctly in the presence of `no_fallback`, and historical/former placetypes
rarely occur with exact match category specs anyway.
`no_split_qualifiers` prevents splitting off recognized qualifiers and returning the remainder of the placetype as an
equivalent placetype. Only the passed-in placetype, and any fallbacks, will be returned. This is used in
[[Module:category tree/topic cat/data/Places]] when looking up placetypes found in categories. Such placetypes won't
have qualifiers and so it doesn't make sense to try and look for them.
`from_category`, if set, causes category-only placetypes (those ending in `!`) to also be checked.
`form_of_directive`, if set, causes the specified form-of directive (e.g. `FORMER_NAME_OF`) to be prepended to checked
placetypes, their directive-specific type (e.g. `FORMER_NAME_OF_type`), and their classes (`class`) to get the
appropriate placetypes to check for form-of-directive categories. It falls back to the prepended generic `place` as a
placetype, e.g. `FORMER_NAME_OF place`, if nothing else matches.
`no_check_for_inherently_former` is used internally to prevent an infinite loop when checking for `inherently_former`.
`register_former_as_non_former` is a major hack used in `get_bare_categories` to deal with the mismatch between e.g.
known location `Yugoslavia` declaring itself a `country` but definitions of it declaring it a `former country`. It
causes the non-former version of the specified placetype to be included in the returned equivalents along with the
former placetypes. [FIXME: This should apply only to the entries in `former_countries` but it's tricky to do that now;
fix this in the known-location refactor. -- The known-location refactor is already done but we haven't yet fixed this.]
]==]
function export.get_placetype_equivs(placetype, props)
local no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former
local form_of_directive
if props then
no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former =
props.no_fallback, props.no_split_qualifiers, props.no_check_for_inherently_former, props.from_category,
props.register_former_as_non_former
form_of_directive = props.form_of_directive
end
local equivs = {}
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. `qualifier` is
-- the preceding qualifier to insert into `equivs` along with the placetype (see comment at top of function). If
-- `from_category` is given, we also check for a category-specific entry consisting of the placetype followed by
-- `!`, and in all cases we also check to see if `placetype` is plural, and if so, insert the singularized version
-- along with its fallbacks (if any) in `placetype_data`. `form_of_prefix` is a form-of prefix such as
-- `OFFICIAL_NAME_OF`. If specified, we check the fallbacks of `placetype` without the prefix but then insert into
-- `equivs` the prefixed placetype. This way, if the user says e.g. {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}},
-- we will correctly categorize into [[:Category:Official names of countries]], rather than only trying to look up
-- `OFFICIAL_NAME_OF island country` and failing, falling back ultimately to [[:Category:Official names of places]].
local function insert_placetype_and_fallbacks(qualifier, placetype, form_of_prefix)
local function insert_equiv(pt)
if form_of_prefix then
-- Let's say the user says {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}} and we have
-- no entry for `OFFICIAL_NAME_OF island country` but we do for `OFFICIAL_NAME_OF country` (which we end
-- up processing because `island country` falls back to `country`), and that entry in turn is defined
-- using a fallback. We have to insert that fallback-of-fallback, and the easiest/cleanest way of
-- handling this is by calling ourselves recursively.
insert_placetype_and_fallbacks(qualifier, form_of_prefix .. " " .. pt)
else
insert(equivs, {qualifier=qualifier, placetype=pt})
end
end
-- Insert the placetype, along with any fallbacks.
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if ptdata then
insert_equiv(canon_placetype)
if no_fallback then
return
end
local first_placetype = #equivs + 1
local prev_placetype = nil
while true do
local pt_value = export.placetype_data[canon_placetype]
if not pt_value then
internal_error("Fallback value %s specified for placetype %s but is not in `placetype_data`",
canon_placetype, prev_placetype)
end
if pt_value.fallback then
insert_equiv(pt_value.fallback)
local last_placetype = #equivs
if last_placetype - first_placetype >= 10 then
local fallback_loop = {}
for i = first_placetype, last_placetype do
insert(fallback_loop, equivs[i].placetype)
end
internal_error("Apparent loop in fallback chain: %s", table.concat(fallback_loop, " -> "))
end
prev_placetype = canon_placetype
canon_placetype = pt_value.fallback
else
break
end
end
end
end
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. This is a
-- wrapper around the more basic `insert_placetype_and_fallbacks()` which handles form-of directives. If there is no
-- form-of directive, this function directly calls `insert_placetype_and_fallbacks()`. We do things this way so that
-- form-of directives correctly combine with `former`-type qualifiers. Note that we also have special backups for
-- form-of directives that check `DIRECTIVE place` (and before that, `DIRECTIVE FORMER/ANCIENT place` is there's a
-- `former`-type directive); these backups live outside this function because we want them done once, late, rather
-- than in each invocation of `process_and_insert_placetype()`.
local function process_and_insert_placetype(qualifier, reduced_placetype)
if form_of_directive then
-- First check for e.g. `OFFICIAL_NAME_OF island country` and its fallbacks; then we look for fallbacks of
-- `island country` and check e.g. `OFFICIAL_NAME_OF country` and its fallbacks. All of this is handled by
-- `insert_placetype_and_fallbacks()` with appropriate parameters. After that, check the general class of
-- the directive, e.g. `subpolity` if something like `district` is given. (Eventually, we check for
-- `OFFICIAL_NAME_OF place` as a backup, but this happens at the end outside the loop over qualifiers.)
insert_placetype_and_fallbacks(qualifier, reduced_placetype, form_of_directive)
if not no_fallback then
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype)
local directive_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, form_of_directive .. "_type") or
export.get_placetype_prop(pt, "class") end
)
if not directive_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s in conjunction with form-of directive %s, placetype data " ..
'located but directive-specific type property %s missing, and so is "class"; ' ..
"placetypes searched are %s", reduced_placetype, form_of_directive,
form_of_directive .. "_type", reduced_placetype_equivs)
else
-- This should be allowed, as we allow unrecognized placetypes in general.
end
elseif directive_type ~= "!" then
insert_placetype_and_fallbacks(qualifier, directive_type, form_of_directive)
end
end
else
insert_placetype_and_fallbacks(qualifier, reduced_placetype)
end
end
-- Successively split off recognized qualifiers and loop over successively greater sets of qualifiers from the left
-- (unless `no_split_qualifiers` is specified, in which case we don't check for qualifiers).
local splits
if no_split_qualifiers then
splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
else
splits = export.split_qualifiers_from_placetype(placetype)
end
for _, split in ipairs(splits) do
local prev_qualifier, this_qualifier, reduced_placetype = unpack(split, 1, 3)
-- If a special "former" qualifier like `former` or `historical` isn't present, and
-- `no_check_for_inherently_former` is not given (this flag is used to avoid infinite loops), check for
-- "inherently former" placetypes like `satrapy` and `treaty port` that always refer to no-longer-existing
-- placetypes, and handle accordingly.
local unlinked_this_qualifier
if this_qualifier and this_qualifier:find("%[") then
unlinked_this_qualifier = export.remove_links_and_html(this_qualifier)
else
unlinked_this_qualifier = this_qualifier
end
local former_qualifiers = this_qualifier and export.former_qualifiers[unlinked_this_qualifier] or nil
if not former_qualifiers and not no_check_for_inherently_former then
former_qualifiers = export.get_equiv_placetype_prop(reduced_placetype,
function(pt) return export.get_placetype_prop(pt, "inherently_former") end,
{no_check_for_inherently_former = true})
end
-- If a special "former" qualifier like `former` or `historical` is present, map it to the appropriate internal
-- qualifiers (`ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
-- qualifiers), fetch the `former_type` property, and treat the placetype as if a concatenation of the mapped
-- qualifier(s) and the value of `former_type`. For example, if `medieval village` is given, we map `medieval`
-- to `ANCIENT` and `FORMER`, and `village` to its `former_type` of `settlement`, and enter the placetypes
-- `ANCIENT settlement` and `FORMER settlement` (in that order) into `equivs`. If the placetype following the
-- "former" qualifier is recognized in `placetype_data` but has no `former_type` and no fallback with a
-- `former_type` specified, it is an internal error; but if the placetype isn't recognized (e.g. something like
-- `former greenhouse` is specified and we don't have an entry for `greenhouse`), just track the occurrence and
-- don't enter anything into `equivs`.
if former_qualifiers then
-- FIXME: Should we respect `no_fallback` here? My instinct says no.
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype, {
no_check_for_inherently_former = true
})
local former_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, "former_type") or
export.get_placetype_prop(pt, "class") end
)
if not former_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s, placetype data located but `former_type` missing; " ..
"placetypes searched are %s", reduced_placetype, reduced_placetype_equivs)
else
-- Enable error when we've verified there aren't any examples.
track("bad-former-placetype")
track("bad-former-placetype/" .. reduced_placetype)
--process_error("For placetype '%s', unrecognized placetype following 'former'-type " ..
-- "qualifier; searched placetype(s) %s", reduced_placetype, dump(reduced_placetype_equivs))
end
elseif former_type ~= "!" then
-- First check directly for `ANCIENT/FORMER` + the original following placetype. This makes it possible
-- for (e.g.) former provinces of the Roman empire to be categorized specially.
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. reduced_placetype)
end
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. former_type)
end
-- HACK! See explanation above for `register_former_as_non_former`.
if register_former_as_non_former then
process_and_insert_placetype(prev_qualifier, reduced_placetype)
end
-- If we're processing a form-of directive, after doing everything else we do
-- `DIRECTIVE ANCIENT/FORMER place` e.g. `OFFICIAL_NAME_OF FORMER place` as a backup.
if form_of_directive and not no_fallback then
for _, former_qualifier in ipairs(former_qualifiers) do
insert_placetype_and_fallbacks(prev_qualifier, form_of_directive .. " " .. former_qualifier ..
" place")
end
end
-- Don't continue processing equivs. The reason is probably the same as the `break` below for
-- qualifier_to_placetype_equivs[]; categories for `former BLAH` are set using `default`, and
-- non-former equivs will otherwise take precedence.
break
end
end
-- Then see if the rightmost split-off qualifier is in qualifier_to_placetype_equivs
-- (e.g. 'fictional *' -> 'fictional location'). If so, add the mapping.
if this_qualifier and export.qualifier_to_placetype_equivs[unlinked_this_qualifier] then
insert(equivs, {
qualifier=prev_qualifier,
placetype=export.qualifier_to_placetype_equivs[unlinked_this_qualifier]
})
-- Don't continue processing equivs; otherwise, if we specify 'mythological city', even though the
-- equivalent entry for 'mythological location' gets inserted ahead of the entry for 'city', the
-- latter ends up generating the category because the category for 'mythological location' is set as
-- the default value, which is used only when no non-default category can be found.
break
end
-- Finally, join the rightmost split-off qualifier to the previously split-off qualifiers to form a combined
-- qualifier, and add it along with reduced_placetype and any mapping in placetype_data for reduced_placetype.
-- NOTE: The first time through this loop, both `prev_qualifier` and `this_qualifier` are nil, and this inserts
-- the full placetype into `equivs`.
local qualifier = prev_qualifier and prev_qualifier .. " " .. this_qualifier or this_qualifier
process_and_insert_placetype(qualifier, reduced_placetype)
-- If `no_fallback` and there's an entry in `placetype_data` for this placetype, don't include any reduced
-- placetypes to avoid the "overseas territory treated as a territory" issue describe above.
if no_fallback then
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(reduced_placetype, from_category)
if canon_placetype then
break
end
end
end
-- If we're processing a form-of directive, after doing everything else we do `DIRECTIVE place` e.g.
-- `OFFICIAL_NAME_OF place` as a backup; but only if either the placetype as a whole is recognized or the placetype
-- begins with a recognized qualifier. This latter check is to avoid categorizing into e.g.
-- [[Category:en:Former names of places]] in an invocation like
-- {{place|en|@former name of:Democratic Republic of the Congo|country|r/Central Africa|;|used from 1971–1997}};
-- the `used from 1971–1997` gets treated as a placetype and we're called on it.
if form_of_directive and not no_fallback and (splits[2] or export.get_placetype_data(placetype, from_category)) then
insert_placetype_and_fallbacks(nil, form_of_directive .. " place")
end
return equivs
end
function export.get_equiv_placetype_prop_from_equivs(equivs, fun, continue_on_nil_only)
for _, equiv in ipairs(equivs) do
local retval = fun(equiv.placetype)
if continue_on_nil_only and retval ~= nil or not continue_on_nil_only and retval then
return retval, equiv
end
end
return nil, nil
end
--[==[
Given a placetype `placetype` and a function `fun` of one argument, iteratively call the function on equivalent
placetypes fetched from `get_placetype_equivs` until the function returns a non-falsy value (i.e. not {nil} or {false});
but if `continue_on_nil_only` is specified, the iterations continue until the function returns non non-{nil} value.
FIXME: We should make `continue_on_nil_only` the default; but this requires changing some callers.) When `fun` returns a
non-falsy or non-{nil} value, `get_equiv_placetype_prop` returns two values: the value returned by `fun` and the
equivalent placetype that triggered the non-falsy (or non-{nil}) return value. If `fun` never returns a non-falsy (or
non-{nil}) value, `get_equiv_placetype_prop` returns {nil} for both return values. If `placetype` is passed in as {nil},
the return value is the result of calling `fun` on {nil} (whatever it is) with {nil} for the second return value.
]==]
function export.get_equiv_placetype_prop(placetype, fun, props)
if not placetype then
return fun(nil), nil
end
return export.get_equiv_placetype_prop_from_equivs(export.get_placetype_equivs(placetype, props), fun,
props and props.continue_on_nil_only)
end
--[==[
Return the article that is used with an entry placetype. We proceed as follows:
# See if there is a recognized qualifier at the beginning that specifies an article (including `false` for no article).
This takes precedence over anything else, so that e.g. `various capitals` gets no article rather than "`the"`.
# Then check the placetype or any equivalent placetype for the `entry_placetype_use_the` property, indicating that
`"the"` should be used.
# Otherwise we look to see if the placetype itself (not any equivalents, even those involving deleting a qualifier from
the beginning) has an entry in `placetype_data` that specifies the indefinite article using `entry_placetype_use_the`
(principally for use with placetypes like `union territory`).
# Otherwise, we use [[Module:en-utilities]] to apply the standard algorithm to generate `"an"` for words beginning with
a vowel and `"a"` otherwise.
If `ucfirst` is true, the first letter of the article is made upper-case.
]==]
function export.get_placetype_article(placetype, ucfirst)
local art
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if type(canon) == "table" then
art = canon.article
end
end
if art == false then
return art
end
if art == nil then
local placetype_use_the = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "entry_placetype_use_the") end)
if placetype_use_the then
art = "tên"
else
art = export.get_placetype_prop(placetype, "entry_placetype_indefinite_article")
if not art then
art = require(en_utilities_module).get_indefinite_article(placetype)
end
end
end
if ucfirst then
art = m_strutils.ucfirst(art)
end
return art
end
--[==[
Return the preposition that should be used after `placetype` when occurring as an entry placetype or in categories
(e.g. `city >in< France` but `country >of< South America`). The preposition defaults to `"của"` if not specified.
]==]
function export.get_placetype_entry_preposition(placetype)
local pt_prep = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "preposition") end
)
return pt_prep or "của"
end
--[==[
Given a place desc (see top of file) and a holonym object (see top of file), add a key/value into the place desc's
`holonyms_by_placetype` field corresponding to the placetype and placename of the holonym. For example, corresponding
to the holonym "c/Italy", a key with the list value {"Italy"} will be added to the place desc's
`holonyms_by_placetype` field. If there is already a key with that place type, the new placename will be added to the
end of the value's list.
]==]
function export.key_holonym_into_place_desc(place_desc, holonym)
if not holonym.placetype then
return
end
-- Key in equivalent placetypes, so that e.g. `cities/San Francisco` gets keyed under `city`; but don't do
-- fallbacks, as it doesn't seem correct for the "do other holonyms of the same placetype" algorithm to do holonyms
-- of different types just because they have the same fallback.
local equiv_placetypes = export.get_placetype_equivs(holonym.placetype, {no_fallback = true})
local unlinked_placename = holonym.unlinked_placename
for _, equiv in ipairs(equiv_placetypes) do
local placetype = equiv.placetype
if not place_desc.holonyms_by_placetype then
place_desc.holonyms_by_placetype = {}
end
if not place_desc.holonyms_by_placetype[placetype] then
place_desc.holonyms_by_placetype[placetype] = {unlinked_placename}
else
insert(place_desc.holonyms_by_placetype[placetype], unlinked_placename)
end
end
end
--[=[
Construct a formatted link from the raw link spec `link` given the canonical singular placetype `sg_placetype`. If the
placetype was originally plural, `orig_placetype` should contain this plural value; otherwise it should be nil. This
will construct the appropriate type of link that displays as `orig_placetype` (or otherwise `sg_placetype`) but links to
whatever the `link` spec specifies (which may be `sg_placetype`, a Wikipedia article, etc.). `ptdata` is the placetype
data structure for the placetype, and `from_category` indicates that we are generating the description of a category
(otherwise we are generating the display form of an entry placetype).
]=]
local function make_placetype_link(link, sg_placetype, orig_placetype, ptdata, from_category, noerror)
if not from_category and ptdata.disallow_in_entries then
if noerror then
return "[not meant to be specified directly, with warning: " .. ptdata.disallow_in_entries .. "]"
else
process_error("Placetype %s is not meant to be specified directly: " .. ptdata.disallow_in_entries, sg_placetype)
end
end
if link == nil then
internal_error("Placetype data present for placetype %s but no link= setting given", sg_placetype)
elseif link == true then
if orig_placetype then
return ("[[%s|%s]]"):format(sg_placetype, orig_placetype)
else
return ("[[%s]]"):format(sg_placetype)
end
elseif link == false then
process_error("Placetype %s is not meant to be specified directly, but is only for internal use", sg_placetype)
elseif link == "w" then
return ("[[w:%s|%s]]"):format(sg_placetype, orig_placetype or sg_placetype)
elseif link == "separately" then
if orig_placetype then
local sg_words = split(sg_placetype, " ")
local orig_words = split(orig_placetype, " ")
if #sg_words ~= #orig_words then
internal_error("Can't construct 'separately' link for plural placetype %s as original placetype %s " ..
"has different number of words", orig_placetype, sg_placetype)
else
for i = 1, #sg_words do
if sg_words[i] == orig_words[i] then
sg_words[i] = ("[[%s]]"):format(sg_words[i])
else
sg_words[i] = ("[[%s|%s]]"):format(sg_words[i], orig_words[i])
end
end
return concat(sg_words, " ")
end
else
return (sg_placetype:gsub("([^ ]+)", "[[%1]]"))
end
elseif link:find("^%+") then
link = link:sub(2) -- discard initial +
return ("[[%s|%s]]"):format(link, orig_placetype or sg_placetype)
elseif not orig_placetype then
return link
else
return link
end
end
--[==[
Get the display form of a placetype by looking it up in `placetype_data`. If the placetype is recognized, or is the
plural of a recognized placetype, the corresponding linked display form is returned (with plural placetypes displaying
as plural but linked to the singular form of the placetype). Otherwise, return nil. If we're generating the description
of a category, `category_type` should be set to one of `"top-level"` (for top-level categories like
[[:Category:Neighborhoods]]), `"noncity"` (for non-city categories like [[:Category:Neighborhoods in Illinois, USA]]) or
`"city"` (for city categories like [[:Category:Neighborhoods of Chicago]]). Otherwise, we're generating the description
for use in formatting a {{tl|place}} call, and category-only placetypes ending in `!` will be ignored, along with
special `category_link*` settings. `return_full` is used along with `category_type` and will preferably return the
"full" variant of category link settings, i.e. `full_category_link*`; if they don't exist, the `category_link*` value is
prepended with `"names of"`. `noerror` says to not throw an error when encountering entry placetypes that would be
disallowed.
]==]
function export.get_placetype_display_form(placetype, category_type, return_full, noerror)
local from_category = not not category_type
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if canon_placetype then
local raw_link
local function is_linked_string(str)
return type(str) == "string" and str:find("%[%[")
end
if category_type then
local fetched_full
local function fetch_maybe_full(prop)
local retval = ptdata["full_" .. prop]
if retval ~= nil then
if return_full then
return retval, true
else
internal_error("Saw full_" .. prop .. "=%s but `return_full` not set, can't handle", retval)
end
end
return ptdata[prop], false
end
local function maybe_prefix(str)
if return_full and not fetched_full then
return "names of " .. str
else
return str
end
end
-- Careful with `false` as possible value.
if category_type == "top-level" then
raw_link, fetched_full = fetch_maybe_full("category_link_top_level")
elseif category_type == "noncity" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_noncity")
elseif category_type == "city" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_city")
else
internal_error('Unrecognized value for `category_type` %s, should be "top-level", "noncity" or "city"',
category_type)
end
if type(raw_link) == "string" then
return maybe_prefix(raw_link), ptdata
elseif raw_link ~= nil then
return raw_link, ptdata
end
raw_link, fetched_full = fetch_maybe_full("category_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
if ptmatch == "plural" then
raw_link, fetched_full = fetch_maybe_full("plural_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
end
if raw_link == nil then
raw_link, fetched_full = fetch_maybe_full("link")
end
if raw_link == false then
return raw_link, ptdata
end
return maybe_prefix(make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror)), ptdata
else
if ptmatch == "plural" then
raw_link = ptdata.plural_link
if raw_link == false then
process_error("Placetype %s cannot appear plural", placetype)
end
if is_linked_string(raw_link) then
return raw_link, ptdata
end
end
if raw_link == nil then
raw_link = ptdata.link
end
return make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror), ptdata
end
end
return nil
end
local function resolve_unlinked_placename_display_aliases(placetype, placename)
local equiv_placetypes = export.get_placetype_equivs(placetype)
for i, equiv in ipairs(equiv_placetypes) do
equiv_placetypes[i] = equiv.placetype
end
local all_display_aliases_found = {}
local all_others_found = {}
for group, key, spec in m_locations.iterate_matching_location {
placetypes = equiv_placetypes,
placename = placename,
alias_resolution = "display",
} do
if spec.alias_of and spec.display then
insert(all_display_aliases_found, {group, key, spec, spec.display_as_full})
else
insert(all_others_found, {group, key, spec})
end
end
if not all_display_aliases_found[1] then
return placename
elseif all_display_aliases_found[2] then
internal_error("Found multiple matching display aliases for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
elseif all_others_found[1] then
internal_error("Found a display alias along with other possible meanings for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
else
local group, key, spec, as_full = unpack(all_display_aliases_found[1])
local full, elliptical = m_locations.key_to_placename(group, key)
return as_full and full or elliptical
end
end
--[==[
If `placename` of type `placetype` is a display alias, convert it to its canonical form; otherwise, return unchanged.
Display aliases transform certain placenames into canonical displayed forms. For example, if any of `country/US`,
`country/USA` or `country/United States of America` (or `c/US`, etc.) are given, the result will be displayed as
`United States`.
'''NOTE''': Display aliases change what is displayed from what the editor wrote in the Wikitext. As a result, they
should (a) be non-political in nature, and (b) not involve a change where the word `the` needs to be added or removed.
For example, normalizing `US` and `USA` to `United States` for display purposes is OK but normalizing `Burma` to
`Myanmar` is not (instead a cat alias should be used) because the terms `Burma` and `Myanmar` have clear political
connotations. Similarly, we have a display alias that maps the old name of `Macedonia` as a country (but not a region!)
to `North Macedonia`, but `Republic of Macedonia` is mapped to `North Macedonia` only as a cat alias because the two
terms differ in their use of `the`. (For example, if we had a display alias mapping `Republic of Macedonia` to
`North Macedonia`, the call {{tl|place|en|the <<capital city>> of the <<c/Republic of Macedonia>>}} would wrongly
display as `the [[capital city]] of the [[North Macedonia]]`.) Generally, display normalizations tend to involve
alternative forms (e.g. abbreviations, ellipses, foreign spellings) where the normalization improves clarity and
consistency.
]==]
function export.resolve_placename_display_aliases(placetype, placename)
-- If the placename is a link, apply the alias inside the link.
-- This pattern matches both piped and unpiped links. If the link is not piped, the second capture (linktext) will
-- be empty.
local link, linktext = rmatch(placename, "^%[%[([^|%[%]]+)|?([^|%[%]]-)%]%]$")
if link then
if linktext ~= "" then
local alias = resolve_unlinked_placename_display_aliases(placetype, linktext)
return "[[" .. link .. "|" .. alias .. "]]"
else
local alias = resolve_unlinked_placename_display_aliases(placetype, link)
return "[[" .. alias .. "]]"
end
else
return resolve_unlinked_placename_display_aliases(placetype, placename)
end
end
--[==[
Generate the "prefixed" version of a bare key, i.e. prefix it with `the` if correct for this key.
]==]
function export.get_prefixed_key(key, spec)
if spec.the then
return key
else
return key
end
end
-- Necessary for use by [[Module:place]]. FIXME: Reorganize the modules so this isn't necessary.
export.iterate_matching_location = m_locations.iterate_matching_location
--[=[
Iterator that iterates over holonyms in `place_desc`. If `first_holonym_index` is given, start iterating at the
specified holonym and stop either when there are no more holonyms or a holonym with modifier `:also` is found. If
`first_holonym_index` is nil or omitted, iterate over all holonyms regardless. If `include_raw_text_holonyms` is
specified, raw text holonyms (those not of the form `placetype/placename`) are returned as well; they can be identified
by the fact that the `placetype` field in the holonym structure is nil. Two values are returned at each iteration, the
holonym index and holonym structure, similar to `ipairs()`.
]=]
function export.get_holonyms_to_check(place_desc, first_holonym_index, include_raw_text_holonyms)
local stop_at_also = not not first_holonym_index
return function(place_desc, index)
while true do
index = index + 1
local this_holonym = place_desc.holonyms[index]
-- If we were passed in a starting holonym index, go up to but not including a holonym marked with `:also`
-- (continue_cat_loop); the categorization code will then restart the loop at that holonym. That holonym
-- will have `:also` marked on it, so make sure not to stop immediately if the first holonym is marked with
-- `:also`.
if not this_holonym or stop_at_also and index > first_holonym_index and this_holonym.continue_cat_loop then
return nil
end
-- If not placetype, we're processing raw text, which we normally want to skip.
if include_raw_text_holonyms or this_holonym.placetype then
return index, this_holonym
end
end
end, place_desc, first_holonym_index and first_holonym_index - 1 or 0
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, iterate over all
such known locations, returning for each location the corresponding key, spec and group as well as the trail of
ancestral containers. Unlike `iterate_matching_location()`, this specifically checks that there is no mismatch between
the location's containers at any level and any of the following holonyms in the {{tl|place}} spec. The fields in `data`
are:
* `holonym_placetype`: The placetype of the holonym. It can actually be a list of possible placetypes, as with
`iterate_matching_location()`.
* `holonym_placename`: The placename of the holonym.
* `holonym_index`: The index of the holonym among the holonyms in `place_desc`, or nil if the holonym is not among the
holonyms in `place_desc`. (If a holonym index is given, we check for container mismatches among the holonyms
following the specified index, stopping either when encountering a holonym marked with modifier `:also` or, if none
exist, when we run out of holonyms. If no holonym index is given, we check all holonyms for container mismatches.)
* `place_desc`: Description of the place; used for the holonyms, to check for container mismatches.
Returns four values: the location group, the canonical key by which the location is known, the spec object describing
the location and the trail of ancestral containers for the location. The first three values are the same as for
`iterate_matching_location`.
]==]
function export.iterate_matching_holonym_location(data)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
local matching_location_iterator = m_locations.iterate_matching_location {
placetypes = holonym_placetype,
placename = holonym_placename,
}
return function()
while true do
local group, key, spec = matching_location_iterator()
if not group then
return nil
end
local container_trail = {}
-- For each level of container, check that there are no mismatches (i.e. other location of the same
-- placetype) mentioned. We allow a mismatch at a given level if there's also a match with the container
-- at that level. For example, in the case of Kansas City, defined in [[Module:place/locations]] as a city
-- in Missouri, if we define it as {{tl|place|city|s/Missouri,Kansas}}, we ignore the mismatching state of
-- Kansas because the correct state of Missouri was also mentioned. But imagine we are defining Newark,
-- Delaware as {{tl|place|city|s/Delaware|c/US}} and (as is the case) we have an entry for Newark, New
-- Jersey in [[Module:place/locations]]. Just because the containing location `US` matches isn't enough,
-- because Newark, NJ also has New Jersey as a containing location and there's a mismatch at that level. If
-- there are no mismatches at any level we assume we're dealing with the right known location.
--
-- If at a given level there are multiple containing locations, we count a match if any holonym matches any
-- containing location, and a mismatch only if a holonym exists of the same placetype that doesn't match any
-- containing location.
local containers_mismatch = false
for containers in m_locations.iterate_containers(group, key, spec) do
insert(container_trail, containers)
local match_at_level = false
local mismatch_at_level = false
for other_holonym_index, other_holonym in export.get_holonyms_to_check(place_desc,
holonym_index and holonym_index + 1 or nil) do
local other_source_holonym = other_holonym.augmented_from_holonym
if other_source_holonym and other_source_holonym.placetype == holonym_placetype and
other_source_holonym.unlinked_placename ~= holonym_placename then
-- Ignore holonyms added during the augmentation process for other holonyms of the same
-- placetype as the placetype of the holonym we're considering. See comment in
-- augment_holonyms_with_container() for why we do this.
-- continue; grrr, no 'continue' in Lua
else
local holonym_matches_at_level = false
local holonym_exists_with_same_placetype = false
for _, container in ipairs(containers) do
if not container.spec.no_check_holonym_mismatch then
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
local placetypes = container.spec.placetype
if type(placetypes) ~= "table" then
placetypes = {placetypes}
end
local placetype_equivs = {}
for _, pt in ipairs(placetypes) do
m_table.extend(placetype_equivs, export.get_placetype_equivs(pt))
end
local this_holonym_matches = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype and
(other_holonym.unlinked_placename == full_container_placename or
other_holonym.unlinked_placename == elliptical_container_placename)
end
)
if this_holonym_matches then
holonym_matches_at_level = true
break
end
local this_holonym_exists_with_same_placetype = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype
end
)
if this_holonym_exists_with_same_placetype then
-- We seem to have a mismatch at this level. But before we decide conclusively that this
-- is the case, check to see whether the putative mismatch is an alias and matches when
-- we resolve the alias.
for oh_group, oh_key, oh_spec, oh_container_trail in
export.iterate_matching_holonym_location {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = place_desc,
} do
local oh_full_placename, oh_elliptical_placename =
m_locations.key_to_placename(oh_group, oh_key)
if oh_full_placename == full_container_placename or
oh_elliptical_placename == elliptical_container_placename then
-- Alias matched when resolved.
this_holonym_matches = true
break
end
end
if this_holonym_matches then
-- Alias matched above when resolved.
holonym_matches_at_level = true
break
else
-- Not an alias, or doesn't match when resolved. We have a true mismatch.
holonym_exists_with_same_placetype = true
end
end
end
end
if holonym_matches_at_level then
match_at_level = true
break
end
if holonym_exists_with_same_placetype then
mismatch_at_level = true
end
end
end
if not match_at_level and mismatch_at_level then
containers_mismatch = true
break
end
end
if not containers_mismatch then
return group, key, spec, container_trail
end
end
end
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, find and return the
corresponding key, spec and group as well as the trail of ancestral containers. This is like
`iterate_matching_holonym_location()` but throws an error if more than one location matches. (An example where this
would happen is {{tl|place|en|neighborhood|city/Newcastle}}, because there are two known locations named Newcastle. To
fix this, specify additional following disambiguating holonyms, e.g.
{{tl|place|en|neighborhood|city/Newcastle|s/New South Wales}}.
]==]
function export.find_matching_holonym_location(data)
local all_found = {}
for group, key, spec, container_trail in export.iterate_matching_holonym_location(data) do
insert(all_found, {group, key, spec, container_trail})
end
if not all_found[1] then
return nil
elseif all_found[2] then
local holonym_placetype = data.holonym_placetype
if type(holonym_placetype) == "table" then
holonym_placetype = concat(holonym_placetype, ",")
end
local found_keys = {}
for _, found in ipairs(all_found) do
local _, key, _, _ = unpack(found)
insert(found_keys, key)
end
error(("Found multiple matching locations for holonym '%s/%s'; specify disambiguating context in the " ..
"containing holonyms: %s"):format(holonym_placetype, data.holonym_placename, dump(found_keys)))
else
return unpack(all_found[1])
end
end
------------------------------------------------------------------------------------------
-- Placename and placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
This is a map from aliases to their canonical forms. Any placetypes appearing as keys here will be mapped to their
canonical forms in all respects, including the display form. Contrast entries in 'placetype_data' with a fallback, which
applies to categorization and other processes but not to display.
The most important aliases are for holonym placetypes, particularly those that occur often such as "country", "state",
"province" and the like. Particularly long placetypes that mostly occur as entry placetypes (e.g.
"census-designated place") can be given abbreviations, but it is generally preferred to spell out the entry placetype.
Note also that we purposely avoid certain abbreviations that would be ambiguous (e.g. "d", which could variously be
interpreted as "department", "district" or "division").
]==]
export.placetype_aliases = {
["acomm"] = "autonomous community",
["adr"] = "administrative region",
["adterr"] = "administrative territory", -- Pakistan
["aobl"] = "autonomous oblast",
["aokr"] = "autonomous okrug",
["ap"] = "autonomous province",
["apref"] = "autonomous prefecture",
["aprov"] = "autonomous province",
["ar"] = "autonomous region",
["arch"] = "archipelago",
["arep"] = "autonomous republic",
["aterr"] = "autonomous territory",
["atu"] = "autonomous territorial unit",
["bor"] = "borough",
["c"] = "quốc gia",
["can"] = "canton",
["carea"] = "council area",
["cc"] = "constituent country",
["cdblock"] = "community development block",
["cdep"] = "Crown dependency",
["CDP"] = "census-designated place",
["cdp"] = "census-designated place",
["clcity"] = "county-level city",
["co"] = "county",
["cobor"] = "county borough",
["colcity"] = "county-level city",
["coll"] = "collectivity",
["comm"] = "community",
["cont"] = "lục địa",
["contr"] = "continental region",
["contregion"] = "continental region",
["cpar"] = "civil parish",
["damun"] = "direct-administered municipality",
["dep"] = "dependency",
["department capital"] = "departmental capital",
["dept"] = "department",
["depterr"] = "dependent territory",
["dist"] = "district",
["distmun"] = "district municipality",
["div"] = "division",
["emp"] = "empire",
["fpref"] = "French prefecture",
["gov"] = "governorate",
["govnat"] = "governorate",
["home-rule city"] = "home rule city",
["home-rule municipality"] = "home rule municipality",
["inner-city area"] = "inner city area",
["ires"] = "Indian reservation",
["isl"] = "island",
["lbor"] = "London borough",
["lga"] = "local government area",
["lgarea"] = "local government area",
["lgd"] = "local government district",
["lgdist"] = "local government district",
["metbor"] = "metropolitan borough",
["metcity"] = "metropolitan city",
["metmun"] = "metropolitan municipality",
["mtn"] = "mountain",
["mun"] = "municipality",
["mundist"] = "municipal district",
["nonmetropolitan county"] = "non-metropolitan county",
["obl"] = "oblast",
["okr"] = "okrug",
["p"] = "province",
["par"] = "parish",
["parmun"] = "parish municipality",
["pen"] = "peninsula",
["plcity"] = "prefecture-level city",
["plcolony"] = "Polish colony",
["pref"] = "prefecture",
["prefcity"] = "prefecture-level city",
["preflcity"] = "prefecture-level city",
["prov"] = "province",
["r"] = "region",
["range"] = "mountain range",
["rcm"] = "regional county municipality",
["rcomun"] = "regional county municipality",
["rdist"] = "regional district",
["rep"] = "republic",
["rhrom"] = "rural hromada",
["riv"] = "river",
["rmun"] = "regional municipality",
["robor"] = "royal borough",
["romp"] = "Roman province",
["runit"] = "regional unit",
["rurmun"] = "rural municipality",
["s"] = "state",
["sar"] = "special administrative region",
["shrom"] = "settlement hromada",
["spref"] = "subprefecture",
["sprefcity"] = "sub-prefectural city",
["sprovcity"] = "subprovincial city",
["submet city"] = "sub-metropolitan city",
["submetropolitan city"] = "sub-metropolitan city",
["sub-prefecture-level city"] = "sub-prefectural city",
["sub-provincial city"] = "subprovincial city",
["sub-provincial district"] = "subprovincial district",
["terr"] = "territory",
["terrauth"] = "territorial authority",
["twp"] = "township",
["twpmun"] = "township municipality",
["uauth"] = "unitary authority",
["ucomm"] = "unincorporated community",
["udist"] = "unitary district",
["uhrom"] = "urban hromada",
["uterr"] = "union territory",
["utwpmun"] = "united township municipality",
["val"] = "valley",
["vdc"] = "village development committee",
["vil"] = "village",
["voi"] = "voivodeship",
["wcomm"] = "Welsh community",
}
local no_link_def_article = {link = false, article = ""}
local no_link_no_article = {link = false, article = false}
--[==[ var:
These qualifiers can be prepended onto any placetype and will be handled correctly. For example, the placetype
`large city` will be displayed as `large <nowiki>[[city]]</nowiki>` and categorized as if `city` were specified. If the
value in the following table is a string, the qualifier will display according to the string. If the value is `true`,
the qualifier will be linked to its corresponding Wiktionary entry. If the value is `false`, the qualifier will not be
linked but will appear as-is. Note that these qualifiers do not override placetypes with entries elsewhere that contain
those same qualifiers. For example, the entry for `inland sea` in `placetype_data` will apply in preference to treating
`inland sea` as equivalent to `sea`.
]==]
export.placetype_qualifiers = {
-- generic qualifiers
["huge"] = false,
["tiny"] = false,
["large"] = false,
["big"] = false,
["mid-size"] = false,
["mid-sized"] = false,
["small"] = false,
["sizable"] = false,
["important"] = false,
["long"] = false,
["short"] = false,
["major"] = false,
["minor"] = false,
["high"] = false,
["tall"] = false,
["low"] = false,
["left"] = false, -- left tributary
["right"] = false, -- right tributary
["modern"] = false, -- for use in opposition to "ancient" in another definition
-- "former" qualifiers
["abandoned"] = true,
["ancient"] = true,
["deserted"] = true,
["extinct"] = true,
["former"] = false,
["historic"] = "historical",
["historical"] = true,
["medieval"] = true,
["mediaeval"] = true,
["ruined"] = true,
["traditional"] = true,
-- sea qualifiers
["coastal"] = true,
["inland"] = true, -- note, we also have an entry in placetype_data for 'inland sea' to get a link to [[inland sea]]
["maritime"] = true,
["overseas"] = true,
["seaside"] = true,
["beachfront"] = true,
["beachside"] = true,
["riverside"] = true,
-- lake qualifiers
["freshwater"] = true,
["saltwater"] = true,
["endorheic"] = true,
["oxbow"] = true,
["ox-bow"] = "[[oxbow]]", -- [[ox-bow]] is a red link
["tidal"] = true,
-- land qualifiers
["hilltop"] = true,
["hilly"] = true,
["insular"] = true,
["peninsular"] = true,
["chalk"] = true,
["karst"] = true,
["limestone"] = true,
["mountainous"] = true,
["mountaintop"] = true,
["alpine"] = true,
["volcanic"] = true, -- for an island
-- political status qualifiers
["autonomous"] = true,
["incorporated"] = true,
["special"] = true,
["unincorporated"] = true,
["coterminous"] = true,
-- monetary status/etc. qualifiers
["fashionable"] = true,
["wealthy"] = true,
["affluent"] = true,
["declining"] = true,
-- city vs. rural qualifiers
["urban"] = true,
["suburban"] = true,
["exurban"] = true,
["outlying"] = true,
["remote"] = true,
["rural"] = true,
["outback"] = true,
["inner"] = false,
["inner-city"] = true,
["central"] = false,
["outer"] = false,
-- land use qualifiers
["residential"] = true,
["agricultural"] = true,
["business"] = true,
["commercial"] = true,
["industrial"] = true,
-- business use qualifiers
["railroad"] = true,
["railway"] = true,
["farming"] = true,
["fishing"] = true,
["mining"] = true,
["logging"] = true,
["cattle"] = true,
-- tourism use qualifiers
["resort"] = true, -- note, we also have 'resort city' and 'resort town', that take precedecne
["spa"] = true, -- note, we also have 'spa city' and 'spa town', that take precedecne
["ski"] = true, -- note, we also have 'ski resort city' and 'ski resort town', that take precedecne
-- religious qualifiers
["holy"] = true,
["sacred"] = true,
["religious"] = true,
["secular"] = true,
-- qualifiers for nonexistent places
["claimed"] = false,
["fictional"] = true,
["legendary"] = true,
["mythical"] = true,
["mythological"] = true,
-- directional qualifiers
["northern"] = false,
["southern"] = false,
["eastern"] = false,
["western"] = false,
["north"] = false,
["south"] = false,
["east"] = false,
["west"] = false,
["northeastern"] = false,
["southeastern"] = false,
["northwestern"] = false,
["southwestern"] = false,
["northeast"] = false,
["southeast"] = false,
["northwest"] = false,
["southwest"] = false,
-- seasonal qualifiers
["summer"] = true, -- e.g. for 'summer capital'
["winter"] = true,
-- legal status qualifiers
-- FIXME: Two-word qualifiers don't work yet. But you can enter "de-facto" and it's canonicalized to [[de facto]].
["official"] = true,
["unofficial"] = true,
["de facto"] = true, -- 'de facto capital'
["de-facto"] = "[[de facto]]", -- [[de-facto]] is a red link
["de jure"] = true, -- 'de jure capital'
["de-jure"] = "[[de jure]]", -- [[de-jure]] is a red link
-- NOTE: 'unrecognized/unrecognised' are handled as placetypes 'unrecognized country', 'unrecognized state'
-- misc. qualifiers
["planned"] = true,
["chartered"] = true,
["landlocked"] = true,
["uninhabited"] = true,
-- superlative qualifiers
["first"] = no_link_def_article,
["second"] = no_link_def_article, -- for "second largest" etc.
["third"] = no_link_def_article,
["fourth"] = no_link_def_article,
["last"] = no_link_def_article,
["only"] = no_link_def_article,
["sole"] = no_link_def_article,
["main"] = no_link_def_article,
["largest"] = no_link_def_article,
["biggest"] = no_link_def_article,
["smallest"] = no_link_def_article,
["shortest"] = no_link_def_article,
["longest"] = no_link_def_article,
["tallest"] = no_link_def_article,
["highest"] = no_link_def_article,
["lowest"] = no_link_def_article,
["leftmost"] = no_link_def_article,
["rightmost"] = no_link_def_article,
["innermost"] = no_link_def_article,
["outermost"] = no_link_def_article,
["northernmost"] = no_link_def_article,
["southernmost"] = no_link_def_article,
["westernmost"] = no_link_def_article,
["easternmost"] = no_link_def_article,
["northwesternmost"] = no_link_def_article,
["southwesternmost"] = no_link_def_article,
["northeasternmost"] = no_link_def_article,
["southeasternmost"] = no_link_def_article,
-- several/various
["several"] = no_link_no_article,
["various"] = no_link_no_article,
["numerous"] = no_link_no_article,
["multiple"] = no_link_no_article,
["many"] = no_link_no_article,
["other"] = no_link_no_article,
}
--[==[ var:
In this table, the key qualifiers should be treated the same as the value qualifiers for categorization purposes. This
is overridden by `placetype_data` and `qualifier_to_placetype_equivs`.
]==]
export.former_qualifiers = {
["abandoned"] = {"FORMER"},
["ancient"] = {"ANCIENT", "FORMER"},
["former"] = {"FORMER"},
["extinct"] = {"FORMER"},
["historic"] = {"FORMER"},
["historical"] = {"FORMER"},
["medieval"] = {"ANCIENT", "FORMER"},
["mediaeval"] = {"ANCIENT", "FORMER"},
["ruined"] = {"ANCIENT", "FORMER"},
["traditional"] = {"FORMER"},
}
--[==[ var:
In this table, any placetypes containing these qualifiers that do not occur in `placetype_data` should be mapped to the
specified placetypes for categorization purposes. Entries here are overridden by `placetype_data`.
]==]
export.qualifier_to_placetype_equivs = {
["fictional"] = "fictional location",
["legendary"] = "mythological location",
["mythical"] = "mythological location",
["mythological"] = "mythological location",
-- For e.g. Taiwan as a "claimed province" of China; parts of Belize as claimed by Guatemala; various islands
-- claimed by various parties in East Asia. FIXME: We should conditionalize on what is being claimed since there are
-- also claimed capitals, e.g. Israel and Palestine claim Jerusalem as their capital.
["claimed"] = "claimed political division",
}
--[==[ var:
Mapping from placetypes to the corresponding plural category-only placetype for a capital of that placetype. The reverse
mapping also exists.
]==]
export.placetype_to_capital_cat = {
["autonomous community"] = "autonomous community capitals",
["canton"] = "cantonal capitals",
["comarca"] = "comarca capitals",
["country"] = "national capitals",
-- The following are not obviously different from 'county seats' but the latte terminology is used in the US.
["county"] = "county capitals",
["department"] = "departmental capitals",
["district"] = "district capitals",
["division"] = "division capitals",
["emirate"] = "emirate capitals",
["governorate"] = "governorate capitals",
["hromada"] = "hromada capitals",
["krai"] = "krai capitals",
["metropolitan city"] = "metropolitan city capitals",
["municipality"] = "municipal capitals",
["oblast"] = "oblast capitals",
["okrug"] = "okrug capitals",
["prefecture"] = "prefectural capitals",
["province"] = "provincial capitals",
["raion"] = "raion capitals",
["regency"] = "regency capitals",
["region"] = "regional capitals",
["regional unit"] = "regional unit capitals",
["republic"] = "republic capitals",
["state"] = "state capitals",
["territory"] = "territorial capitals",
["voivodeship"] = "voivodeship capitals",
}
--[==[ var:
This contains placenames that should be preceded by an article (almost always "the"). '''NOTE''': There are multiple
ways that placenames can come to be preceded by "the":
# Listed here.
# Given in [[Module:place/locations]] with an initial "the". All such placenames are added to this map by the code
just below the map.
# The placetype of the placename has `holonym_use_the = true` in its placetype_data.
# A regex in placename_the_re matches the placename.
Note that "the" is added only before the first holonym in a place description.
]==]
export.placename_article = {
-- This should only contain info that can't be inferred from [[Module:place/locations]].
["archipelago"] = {
["Cyclades"] = "the",
["Dodecanese"] = "the",
},
["country"] = {
["Holy Roman Empire"] = "the",
},
["empire"] = {
["Holy Roman Empire"] = "the",
},
["island"] = {
["North Island"] = "the",
["South Island"] = "the",
},
["region"] = {
["Balkans"] = "the",
["Russian Far East"] = "the",
["Caribbean"] = "the",
["Caucasus"] = "the",
["Middle East"] = "the",
["New Territories"] = "the",
["North Caucasus"] = "the",
["South Caucasus"] = "the",
["West Bank"] = "the",
["Gaza Strip"] = "the",
},
["valley"] = {
["San Fernando Valley"] = "the",
},
}
--[==[ var:
Regular expressions to apply to determine whether we need to put 'the' before a holonym. The key "*" applies to all
holonyms, otherwise only the regexes for the holonym's placetype apply.
]==]
export.placename_the_re = {
-- We don't need entries for peninsulas, seas, oceans, gulfs or rivers
-- because they have holonym_use_the = true.
["*"] = {"^Isle of ", " Islands$", " Mountains$", " Empire$", " Country$", " Region$", " District$", "^City of "},
["bay"] = {"^Vịnh của "},
["lake"] = {"^Hồ của "},
["country"] = {"^Republic of ", " Republic$"},
["republic"] = {"^Republic of ", " Republic$"},
["region"] = {"^Vùng của "},
["river"] = {"^Sông của "},
["local government area"] = {"^Shire of "},
["county"] = {"^Shire of "},
["Indian reservation"] = {" Reservation", " Nation"},
["tribal jurisdictional area"] = {" Reservation", " Nation"},
}
--[==[ var:
If any of the following holonyms are present, the associated holonyms are automatically added to the end of the list of
holonyms for categorization (but not display) purposes.
]==]
export.cat_implications = {
["region"] = {
["Eastern Europe"] = {"continent/Europe"},
["Central Europe"] = {"continent/Europe"},
["Western Europe"] = {"continent/Europe"},
["South Europe"] = {"continent/Europe"},
["Southern Europe"] = {"continent/Europe"},
["Northern Europe"] = {"continent/Europe"},
["Northeast Europe"] = {"continent/Europe"},
["Northeastern Europe"] = {"continent/Europe"},
["Southeast Europe"] = {"continent/Europe"},
["Southeastern Europe"] = {"continent/Europe"},
["North Caucasus"] = {"continent/Europe"},
["South Caucasus"] = {"continent/Asia"},
["South Asia"] = {"continent/Asia"},
["Southern Asia"] = {"continent/Asia"},
["East Asia"] = {"continent/Asia"},
["Eastern Asia"] = {"continent/Asia"},
["Central Asia"] = {"continent/Asia"},
["West Asia"] = {"continent/Asia"},
["Western Asia"] = {"continent/Asia"},
["Southeast Asia"] = {"continent/Asia"},
["North Asia"] = {"continent/Asia"},
["Northern Asia"] = {"continent/Asia"},
["Anatolia"] = {"continent/Asia"},
["Asia Minor"] = {"continent/Asia"},
["Mesopotamia"] = {"continent/Asia"},
["North Africa"] = {"continent/Africa"},
["Central Africa"] = {"continent/Africa"},
["West Africa"] = {"continent/Africa"},
["East Africa"] = {"continent/Africa"},
["Southern Africa"] = {"continent/Africa"},
["Central America"] = {"continent/Central America"},
["Caribbean"] = {"continent/North America"},
["Polynesia"] = {"continent/Oceania"},
["Micronesia"] = {"continent/Oceania"},
["Melanesia"] = {"continent/Oceania"},
["Siberia"] = {"country/Russia", "continent/Asia"},
["Russian Far East"] = {"country/Russia", "continent/Asia"},
["South Wales"] = {"constituent country/Wales", "continent/Europe"},
["Balkans"] = {"continent/Europe"},
["West Bank"] = {"country/Palestine", "continent/Asia"},
["Gaza"] = {"country/Palestine", "continent/Asia"},
["Gaza Strip"] = {"country/Palestine", "continent/Asia"},
}
}
------------------------------------------------------------------------------------------
-- Category and display handlers --
------------------------------------------------------------------------------------------
local function city_type_cat_handler(data)
local entry_placetype = data.entry_placetype
local generic_before_non_cities = export.get_placetype_prop(entry_placetype, "generic_before_non_cities")
if not generic_before_non_cities then
internal_error("city_type_cat_handler called on placetype %s that doesn't have a `generic_before_non_cities`" ..
" setting", entry_placetype)
end
local plural_entry_placetype = export.pluralize_placetype(entry_placetype)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and not spec.is_city then
-- Categorize both in key, and in the larger polity that the key is part of, e.g. [[Hirakata]] goes in both
-- "Cities in Osaka Prefecture" and "Cities in Japan". (But don't do the latter if no_container_cat is set.)
local cap_plural_entry_placetype = ucfirst(plural_entry_placetype)
local retcats = {("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(key, spec))}
if container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(container.key, container.spec)))
end
end
return retcats
end
end
local function capital_city_cat_handler(data, non_city)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
-- The first time we're called we want to return something; otherwise we will be called for later-mentioned
-- holonyms, which can result in wrongly classifying into e.g. `National capitals`. Simulate the loop in
-- find_placetype_cat_specs() over holonyms so we get the proper `Cities in ...` categories as well as the capital
-- category/categories we add below.
local retcats
if not non_city and place_desc.holonyms then
for h_index, holonym in export.get_holonyms_to_check(place_desc, holonym_index) do
local h_placetype, h_placename = holonym.placetype, holonym.unlinked_placename
retcats = city_type_cat_handler {
entry_placetype = "city",
holonym_placetype = h_placetype,
holonym_placename = h_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if retcats then
break
end
end
end
if not retcats then
retcats = {}
end
-- Now find the appropriate capital-type category for the placetype of the holonym, e.g. 'State capitals'. If we
-- recognize the holonym among the known holonyms in [[Module:place/locations]], also add a category like 'State
-- capitals of the United States'. Truncate e.g. 'autonomous region' to 'region', 'union territory' to 'territory'
-- when looking up the type of capital category, if we can't find an entry for the holonym placetype itself (there's
-- an entry for 'autonomous community').
local capital_cat = export.placetype_to_capital_cat[holonym_placetype]
if not capital_cat then
capital_cat = export.placetype_to_capital_cat[holonym_placetype:gsub("^.* ", "")]
end
if capital_cat then
capital_cat = ucfirst(capital_cat)
local inserted_specific_variant_cat = false
if holonym_index then
-- Now find the first recognized holonym location. We don't stop when :also is seen because of the common pattern
-- where we use :also to specify that a given city is the capital at multiple surrounding levels.
local matching_group, matching_key, matching_spec, matching_container_trail, matching_holonym_index
for h_index = holonym_index, #place_desc.holonyms do
if place_desc.holonyms[h_index].placetype then
matching_group, matching_key, matching_spec, matching_container_trail = export.find_matching_holonym_location {
holonym_placetype = place_desc.holonyms[h_index].placetype,
holonym_placename = place_desc.holonyms[h_index].unlinked_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if matching_group then
matching_holonym_index = h_index
break
end
end
end
if matching_holonym_index == holonym_index then
if matching_container_trail[1] and not matching_spec.no_container_cat then
for _, container in ipairs(matching_container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
elseif matching_holonym_index then
-- Check to make sure that the holonym placetype we were called on is listed among the
-- divtypes of the location we found.
local function insert_specific_variant_if_possible(key, spec)
return export.get_equiv_placetype_prop(holonym_placetype, function(pt)
local plural_holonym_placetype = export.pluralize_placetype(pt)
local saw_matching_div
if spec.divs then
local divs = spec.divs
if type(divs) ~= "table" then
divs = {divs}
end
for _, div in ipairs(divs) do
if type(div) ~= "table" then
div = {type = div}
end
if plural_holonym_placetype == div.type then
saw_matching_div = true
break
end
end
end
if saw_matching_div then
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(key, spec)))
return true
end
return false
end)
end
if insert_specific_variant_if_possible(matching_key, matching_spec) then
inserted_specific_variant_cat = true
elseif not matching_spec.no_container_cat then
for _, containers in ipairs(matching_container_trail) do
local saw_no_container_cat = false
for _, container in ipairs(containers) do
if insert_specific_variant_if_possible(container.key, container.spec) then
inserted_specific_variant_cat = true
break
end
saw_no_container_cat = saw_no_container_cat or container.spec.no_container_cat
end
if inserted_specific_variant_cat or saw_no_container_cat then
break
end
end
end
end
else
-- This happens when in an invocation like {{place|en|capital city|s/Haryana,Punjab}} for
-- [[Chandigarh]]. We fall back to older code that doesn't depend on the holonym index existing.
-- FIXME: This may not be necessary. In the example just given, when processing Haryana we add to
-- [[:Category:en:State capitals of India]], and nothing extra gets added when processing Punjab.
-- Possibly we can just skip this case entirely.
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
end
if not inserted_specific_variant_cat then
insert(retcats, capital_cat)
end
else
-- We didn't recognize the holonym placetype; just put in 'Capital cities'.
insert(retcats, "Capital cities")
end
return retcats
end
--[=[
This is invoked specially for all placetypes (see the `*` placetype key at the bottom of `placetype_data`). This is used
in two ways:
# To add pages to generic holonym categories like [[:Category:en:Places in Merseyside, England]] (and
[[:Category:en:Places in England]]) for any pages that have `co/Merseyside` as their holonym.
# To categorize demonyms in bare placename categories like [[:Category:en:Merseyside, England]] if the demonym
description mentions `co/Merseyside` and doesn't mention a more specific placename that also has a category. (In this
case there are none, but we can have demonyms at multiple levels, e.g. in France for individual villages, departments,
administrative regions, and for the entire country, and for example we only want to categorize a demonym into
[[:Category:France]] if no more specific category applies.) Unlike when invoked from {{tl|place}}, a demonym
invocation only adds the most specific holonym category and not the category of any containing polity (hence if we
add [[:Category:en:Merseyside, England]] we won't also add [[:Category:England]]).
This code also handles cities; e.g. for the first use case above, it would be used to add a page that has `city/Boston`
as a holonym to [[:Category:en:Places in Boston]], along with [[:Category:en:Places in Massachusetts, USA]] and
[[:Category:en:Places in the United States]]. The city handler tries to deal with the possibility of multiple cities
having the same name. For example, the code in [[Module:place/locations]] knows about the city of [[Columbus]],
[[Ohio]], which has containing polities `Ohio` (a state) and `the United States` (a country). If either containing
polity is mentioned, the handler proceeds to return the key `Columbus` (along with `Ohio, USA` and `the United States`).
Otherwise, if any other state or country is mentioned, the handler returns nothing, and otherwise it assumes the
mentioned city is the one we're considering and returns `Columbus` etc. This works correctly if the place only mentions
Ohio and a holonym for a Columbus in a different country is encountered, because of the function
`augment_holonyms_with_container`, which adds the US as a holonym when Ohio is encountered.
The single parameter `data` is as in category handlers. The return value is a list of categories (without the preceding
language code).
]=]
local function generic_place_cat_handler(data)
local from_demonym = data.from_demonym
local retcats = {}
local function insert_retkey(key, spec)
if from_demonym then
insert(retcats, key)
else
insert(retcats, ("Địa danh của %s"):format(export.get_prefixed_key(key, spec)))
end
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
if not spec.no_generic_place_cat then
-- This applies to continents and continental regions.
insert_retkey(key, spec)
end
-- Categorize both in key, and in the larger location(s) that the key is part of, e.g. [[Hirakata]] goes in
-- both [[Category:Places in Osaka Prefecture, Japan]] and [[Category:Places in Japan]]. But not when
-- no_container_cat is set (e.g. for 'United Kingdom').
if not spec.no_container_cat then
for _, container_set in ipairs(container_trail) do
local stop_adding_containers = false
for _, container in ipairs(container_set) do
if not container.spec.no_generic_place_cat then
insert_retkey(container.key, container.spec)
end
if container.spec.no_container_cat then
stop_adding_containers = true
end
end
if stop_adding_containers then
break
end
end
end
return retcats
end
end
--[==[
Special category handler run for all placetypes that checks for specified division placetypes of known locations and
categorizes appropriately.
]==]
function export.political_division_cat_handler(data)
if data.from_demonym then
return
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
local divlists = {}
if spec.divs then
insert(divlists, spec.divs)
end
if spec.addl_divs then
insert(divlists, spec.addl_divs)
end
for _, divlist in ipairs(divlists) do
if type(divlist) ~= "table" then
divlist = {divlist}
end
for _, div in ipairs(divlist) do
if type(div) == "string" then
div = {type = div}
end
local sgdiv = export.maybe_singularize_placetype(div.type) or div.type
local prep = div.prep or "of"
local cat_as = div.cat_as or div.type
if type(cat_as) ~= "table" then
cat_as = {cat_as}
end
if not export.placetype_data[sgdiv] then
internal_error("Placetype %s associated with known location key %s and data %s not found in " ..
"`placetype_data`", sgdiv, key, spec)
end
if sgdiv == data.entry_placetype then
local retcats = {}
for _, pt_cat in ipairs(cat_as) do
if type(pt_cat) == "string" then
pt_cat = {type = pt_cat}
end
local pt_prep = pt_cat.prep or prep
insert(retcats, ucfirst(pt_cat.type) .. " " .. pt_prep .. " " ..
export.get_prefixed_key(key, spec))
end
return retcats
end
end
end
end
end
--[==[
This is used to add pages to "bare" categories like [[:Category:en:Georgia, USA]] for `[[Georgia]]` and any
foreign-language terms that are translations of the state of Georgia. We look at the page title (or its overridden value
in {{para|pagename}}) as well as the glosses in {{para|t}}/{{para|t2}} etc., various extra-info values such as the
modern names in {{para|modern}}, and any values specified using a form-of directive. We need to pay attention to the
entry placetypes specified so we don't overcategorize; e.g. the US state of Georgia is `[[Джорджия]]` in Russian but the
country of Georgia is `[[Грузия]]`, and if we just looked for matching names, we'd get both Russian terms categorized
into both [[:Category:ru:Georgia, USA]] and [[:Category:ru:Georgia]]. We also need to check the containing holonyms to
make sure there isn't a mismatch (so we don't e.g. categorize Newark, Delaware in [[:Category:en:Newark]], which is
intended for Newark, New Jersey).
]==]
function export.get_bare_categories(args, overall_place_spec)
local bare_cats = {}
local place_descs = overall_place_spec.descs
local possible_placetypes_by_place_desc = {}
for i, place_desc in ipairs(place_descs) do
possible_placetypes_by_place_desc[i] = {}
for _, placetype in ipairs(place_desc.placetypes) do
if not export.placetype_is_ignorable(placetype) then
local equivs = export.get_placetype_equivs(placetype, {register_former_as_non_former = true})
for _, equiv in ipairs(equivs) do
insert(possible_placetypes_by_place_desc[i], equiv.placetype)
end
end
end
end
local function check_term(term)
-- Treat Wikipedia links like local ones.
term = term:gsub("%[%[w:", "[["):gsub("%[%[wikipedia:", "[[")
term = export.remove_links_and_html(term)
term = term:gsub("^ ", "")
for i, place_desc in ipairs(place_descs) do
-- Iterate over all matching locations in case there are multiple, as with Delhi defined as
-- {{place|en|megacity/and/union territory|c/India|containing the national capital [[New Delhi]]}}.
for group, key, spec, container_trail in export.iterate_matching_holonym_location {
holonym_placetype = possible_placetypes_by_place_desc[i],
holonym_placename = term,
place_desc = place_desc,
} do
insert(bare_cats, key)
end
end
end
-- FIXME: Should we only do the following if the language is English (requires that the lang is passed in)?
-- We should always do it if `pagename` is given (as it is with {{tcl}}) but maybe not otherwise unless 1=en. There
-- are cases like [[Ankara]] = English name for capital of Turkey, but also the name in various languages for the
-- capital of Ghana (= English [[Accra]]). But this should get caught by mismatching the containing country. The
-- advantage of checking when the language isn't English is we catch those places that fail to give an English
-- translation but where the translation happens to be the same as the other-language spelling. However, I don't
-- know how often this situation occurs.
check_term(args.pagename or mw.loadData("Module:headword/data").pagename)
for _, t in ipairs(args.t) do
check_term(t)
end
local function check_termobj_list(terms)
for _, term in ipairs(terms) do
if term.eq then
check_term(term.eq)
end
if term.alt or term.term then
check_term(term.alt or term.term)
end
end
end
for _, extra_info_terms in ipairs(overall_place_spec.extra_info) do
local arg = extra_info_terms.arg
if arg == "modern" or arg == "now" or arg == "full" or arg == "short" then
check_termobj_list(extra_info_terms.terms)
end
end
for _, directive in ipairs(overall_place_spec.directives) do
check_termobj_list(directive.terms)
end
return bare_cats
end
--[==[
This is used to augment the holonyms associated with a place description with the containing polities. For example,
given the following:
`# {{tl|place|en|subprefecture|pref/Hokkaido}}.`
We auto-add Japan as another holonym so that the term gets categorized into [[:Category:Subprefectures of Japan]].
To avoid over-categorizing we need to check to make sure no other countries are specified as holonyms.
]==]
function export.augment_holonyms_with_container(place_descs)
for _, place_desc in ipairs(place_descs) do
if place_desc.holonyms then
-- This ends up containing a copy of the original holonyms, with the augmented holonyms inserted in their
-- appropriate position. We don't just put them at the end because some holonyms have use the `:also`
-- modifier, which causes category processing to restart at that point after generating categories for a
-- preceding holonym, and we don't want the preceding holonym's augmented holonyms interfering with
-- categorization of a later holonym. We proceed from right to left, and each time we augment, we copy
-- the holonyms with the augmented holonym(s) inserted appropriately and replace the place description's
-- holonyms with the augmented ones before the next iteration. The reason for this is so that e.g.
-- {{place|neighborhood|city/Birmingham|co/West Midlands|cc/England}} doesn't throw an error during the
-- augmentation process due to 'Birmingham' referring to two known locations (in England and Alabama). If
-- we go left to right, we will throw an ambiguity error on `city/Birmingham` because code to exclude
-- Birmingham, Alabama needs `c/United Kingdom` present (to cause a mismatch with `c/United States`),
-- which isn't yet present as the augmentation code hasn't gotten to `cc/England` yet. For similar
-- reasons, we need to include the augmented holonyms in the holonyms considered in the next iteration
-- rather than modifying the place description once at athe end.
for i = #place_desc.holonyms, 1, -1 do
local holonym = place_desc.holonyms[i]
if holonym.placetype and not export.placetype_is_ignorable(holonym.placetype) then
local group, key, spec, container_trail = export.find_matching_holonym_location {
holonym_placetype = holonym.placetype,
holonym_placename = holonym.unlinked_placename,
holonym_index = i,
place_desc = place_desc,
}
if group and container_trail[1] and not spec.no_auto_augment_container then
local augmented_holonyms = {}
for j = 1, i do
insert(augmented_holonyms, place_desc.holonyms[j])
end
for _, containers in ipairs(container_trail) do
local any_no_auto_augment_container = false
for _, container in ipairs(containers) do
any_no_auto_augment_container = any_no_auto_augment_container or
container.spec.no_auto_augment_container
local containing_type = container.spec.placetype
if type(containing_type) == "table" then
-- If the containing type is a list, use the first element as the canonical variant.
containing_type = containing_type[1]
end
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
-- Don't side-effect holonyms while processing them.
local new_holonym = {
-- By the time we run, the display has already been generated so we don't need to
-- set display_placename.
placetype = containing_type,
-- placename_to_key() for the group should correctly handle both full and elliptical
-- placenames, but the full placename seems less likely to be ambiguous. FIXME: We
-- should just store the key directly and use it when available to avoid having to
-- convert key to placename and back to key.
unlinked_placename = full_container_placename,
-- Indicate that this is an augmented holonym, and was derived from the specified
-- holonym. In iterate_matching_holonym_location(), we ignore augmented holonyms
-- derived from holonyms that are different from the holonym we're searching for but
-- of the same placetype. This is to correctly handle a situation like
-- {{place|river|dept/Ardèche,Gard,Vaucluse,Bouches-du-Rhône|c/France}}. Here,
-- `Ardèche` is in `r/Auvergne-Rhône-Alpes`, while `Gard` is in `r/Occitania` and
-- the other two are in `r/Provence-Alpes-Côte d'Azur`. Augmenting proceeds from
-- right to left, so after it adds `r/Provence-Alpes-Côte d'Azur` to
-- `Bouches-du-Rhône`, Vaucluse gets augmented correctly but `Gard` fails to match
-- in find_matching_holonym_location() because of the mismatch between augmented
-- `r/Provence-Alpes-Côte d'Azur` and actual `r/Occitania`. Similarly, all later
-- calls to find_matching_holonym_location() fail to match `Gard` (and likewise
-- `Ardèche`) against any known location. To deal with this, we mark augmented
-- holoynms as being augmented due to a source holonym, and when processing a given
-- holonym, ignore augmented holonyms from other holonyms of the same placetype.
-- The restriction to the same placetype is so that `Birmingham` still gets
-- correctly disambiguated to Birmingham, England in the example given above near
-- the top of this function, using the augmented holonym `c/United Kingdom` added by
-- the specified `cc/England` (whose placetype `constituent country` differs from
-- the placetype `city` of Birmingham).
augmented_from_holonym = holonym,
}
insert(augmented_holonyms, new_holonym)
-- But it is safe to modify other parts of the place_desc.
export.key_holonym_into_place_desc(place_desc, new_holonym)
end
if any_no_auto_augment_container then
break
end
end
for j = i + 1, #place_desc.holonyms do
insert(augmented_holonyms, place_desc.holonyms[j])
end
place_desc.holonyms = augmented_holonyms
end
end
end
end
end
end
-- Cat handler for district, areas, neighborhoods and suburbs. Districts are tricky because they can either be political
-- divisions or city neighborhoods. Areas similarly can be political divisions (rarely; specifically, in Kuwait), city
-- neighborhoods or larger geographical areas/regions. We handle this as follows:
-- (1) `placetype_data` cat entries for specific countries or country divisions take precedence over cat_handlers, so if
-- the user says {{tl|place|district|s/Maharashtra|c/India}}, we won't even be called because there is an entry that
-- categorizes into [[:Category|Districts of Maharashtra, India]].
-- (2) If we're called, we check the holonym we're called on to see if it is a recognized city, e.g. if we're called
-- using {{tl|place|district|city/Mumbai|s/Maharashtra|c/India}}. If so, we categorize under e.g.
-- [[:Category:Neighbourhoods of Mumbai]]. (Choosing the spelling "neighbourhoods" because we're in India.)
-- (3) If we're called and the holonym is not a recognized city, we check if the placetype has has_neighborhoods set.
-- If so, it's "city-like" and we categorize under the first containing polity that we recognize. For example, if
-- we're called using {{tl|place|district|town/Northampton|co/Hampshire|s/Massachusetts|c/US}}, we should recognize
-- town as "city-like" and categorize under [[:Category:Neighborhoods in Massachusetts]]. (Note "in" not "of", and
-- note the spelling "neighborhoods" because we're in the US.)
-- (4) If the holonym is not city-like, we do nothing. If there's a city or city-like placetype farther up (e.g. we're
-- called as {{tl|place|district|ward/Foo|mun/Bar|...}}), we will handle the city-like entity according to (2) or
-- (3) when called on that holonym. Otherwise either the categorization in (1) takes place or there's no
-- categorization.
local function district_neighborhood_cat_handler(data)
local function get_plural_entry_placetype(location_spec, container_trail)
if data.entry_placetype == "suburb" then
return "Suburbs"
else
-- Check for `british_spelling` setting on the spec itself or any container.
local uses_british_spelling = location_spec.british_spelling
if uses_british_spelling == nil and container_trail then
for _, container_set in ipairs(container_trail) do
local must_outer_break = false
for _, container in ipairs(container_set) do
if container.spec.british_spelling ~= nil then
uses_british_spelling = container.spec.british_spelling
must_outer_break = true
break
end
end
if must_outer_break then
break
end
end
end
return uses_british_spelling and "Neighbourhoods" or "Neighborhoods"
end
end
-- First check the immediate holonym to see if it's a city or a city-like top-level entity (Hong Kong, Bonaire,
-- etc.)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and spec.is_city then
return {get_plural_entry_placetype(spec, container_trail) .. " of " .. export.get_prefixed_key(key, spec)}
end
-- If the entry placetype is neighbo(u)rhood, assume it is a neighborhood even if there isn't a city-like
-- entity father up the chain. (E.g. due to a mistaken use of m/ instead of mun/ for municipality.)
local has_neighborhoods
local entry_placetype = data.entry_placetype
if entry_placetype == "neighborhood" or entry_placetype == "neighbourhood" or entry_placetype == "suburb" then
has_neighborhoods = true
else
-- Otherwise, make sure the current holonym is city-like.
has_neighborhoods = export.get_equiv_placetype_prop(data.holonym_placetype, function(pt)
return export.get_placetype_prop(pt, "has_neighborhoods")
end, {continue_on_nil_only = true})
end
if has_neighborhoods then
-- Loop up the holonyms, looking for city and city-like entities in case of e.g. [[Sepulveda]] written
-- {{place|en|neighborhood|valley/San Fernando Valley|city/Los Angeles|s/California|c/USA}}
-- but also look for a recognizable poldiv, and if so categorize as "Neighborhoods in POLDIV". We need
-- to start with the current holonym, which is especially important for neighborhoods and suburbs that
-- may have the first holonym be a recognizable province, etc. but can't hurt otherwise. (Previously
-- we skipped the first/current holonym.)
for other_holonym_index, other_holonym in export.get_holonyms_to_check(data.place_desc,
data.holonym_index) do
local other_holonym_data = {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = data.place_desc,
}
local group, key, spec, container_trail = export.find_matching_holonym_location(other_holonym_data)
if group and not spec.is_former_place then
return {get_plural_entry_placetype(spec, container_trail) .. (spec.is_city and " of " or " in ") ..
export.get_prefixed_key(key, spec)}
end
end
end
end
function export.check_already_seen_string(holonym_placename, already_seen_strings)
local canon_placename = ulower(m_links.remove_links(holonym_placename))
if type(already_seen_strings) ~= "table" then
already_seen_strings = {already_seen_strings}
end
for _, already_seen_string in ipairs(already_seen_strings) do
if canon_placename:find(already_seen_string) then
return true
end
end
return false
end
-- Prefix display handler that adds a prefix such as "Metropolitan Borough of " to the display
-- form of holonyms. We make sure the holonym doesn't contain the prefix or some variant already.
-- We do this by checking if any of the strings in ALREADY_SEEN_STRINGS, either a single string or
-- a list of strings, or the prefix if ALREADY_SEEN_STRINGS is omitted, are found in the holonym
-- placename, ignoring case and links. If the prefix isn't already present, we create a link that
-- uses the raw form as the link destination but the prefixed form as the display form, unless the
-- holonym already has a link in it, in which case we just add the prefix.
local function prefix_display_handler(prefix, holonym_placename, already_seen_strings)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(prefix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return prefix .. " " .. holonym_placename
end
return prefix .. " [[" .. holonym_placename .. "]]"
end
-- Suffix display handler that adds a suffix such as " parish" to the display form of holonyms.
-- Works identically to prefix_display_handler but for suffixes instead of prefixes.
local function suffix_display_handler(suffix, holonym_placename, already_seen_strings, include_suffix_in_link)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(suffix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return holonym_placename .. " " .. suffix
end
if include_suffix_in_link then
return "[[" .. holonym_placename .. " " .. suffix .. "]]"
else
return "[[" .. holonym_placename .. "]] " .. suffix
end
end
-- Display handler for boroughs. New York City boroughs are display as-is. Others are suffixed
-- with "borough".
local function borough_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.new_york_boroughs[unlinked_placename] then
-- Hack: don't display "borough" after the names of NYC boroughs
return holonym_placename
end
return suffix_display_handler("borough", holonym_placename)
end
local function county_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
-- Display handler for Irish counties. Irish counties are displayed as e.g. "County [[Cork]]".
if m_locations.ireland_counties["Hạt " .. unlinked_placename .. ", Ireland"] or
m_locations.northern_ireland_counties["Hạt " .. unlinked_placename .. ", Bắc Ireland"] then
return prefix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Taiwanese counties. Taiwanese counties are displayed as e.g. "[[Chiayi]] County".
if m_locations.taiwan_counties[unlinked_placename .. ", Đài Loan"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Romanian counties. Romanian counties are displayed as e.g. "[[Cluj]] County".
if m_locations.romania_counties[unlinked_placename .. ", România"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- FIXME, we need the same for US counties but need to key off the country, not the specific county.
-- Others are displayed as-is.
return holonym_placename
end
-- Display handler for prefectures. Japanese prefectures are displayed as e.g. "[[Fukushima]] Prefecture".
-- Others are displayed as e.g. "[[Fthiotida]] prefecture".
local function prefecture_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
local suffix = m_locations.japan_prefectures[unlinked_placename .. ", Nhật Bản"] and "Prefecture" or "prefecture"
return suffix_display_handler(suffix, holonym_placename)
end
-- Display handler for provinces of Bulgaria, Iran, Laos, North and South Korea, Thailand, Turkey and Vietnam. Recognized
-- provinces are displayed as e.g. "[[Gyeonggi]] Province" or "[[Antalya]] Province". Others are displayed as-is.
local function province_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if
m_locations.bulgaria_provinces[unlinked_placename .. ", Bulgaria"] or
m_locations.iran_provinces[unlinked_placename .. ", Iran"] or
m_locations.laos_provinces[unlinked_placename .. ", Lào"] or
m_locations.north_korea_provinces[unlinked_placename .. ", Cộng hòa Dân chủ Nhân dân Triều Tiên"] or
m_locations.south_korea_provinces[unlinked_placename .. ", Hàn Quốc"] or
m_locations.thailand_provinces[unlinked_placename .. ", Thái Lan"] or
m_locations.turkey_provinces[unlinked_placename .. ", Thổ Nhĩ Kỳ"] or
m_locations.vietnam_provinces[unlinked_placename .. ", Việt Nam"] then
return suffix_display_handler("Province", holonym_placename)
end
return holonym_placename
end
-- Display handler for Nigerian states. Nigerian states are display as "[[Kano]] State". Others are displayed as-is.
local function state_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.nigeria_states[unlinked_placename .. ", Nigeria"] then
return suffix_display_handler("State", holonym_placename)
end
return holonym_placename
end
-- Display handler for voivodeships. Display as e.g. [[Subcarpathian Voivodeship]].
local function voivodesip_display_handler(holonym_placetype, holonym_placename)
return suffix_display_handler("Voivodeship", holonym_placename, nil, "include_suffix_in_link")
end
------------------------------------------------------------------------------------------
-- Placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
Main placetype data structure. This specifies, for each canonicalized placetype, various properties. The keys are
placetypes (in the singular, except for category-only placetypes, which are plural and followed by `!`), and the value
is a table of properties. The `"*"` key is special and is used for adding "generic" categories of the form
`Places in ``location`` `; it runs for all entry placetypes. Keys in the form of plural placetypes followed by `!` are
used only in [[Module:category tree/topic cat/data/Places]] for specifying the properties of categories containing the
specified placetype, esp. bare categories like [[:Category:States and territories]] (rather than qualified categories
like [[:Category:States and territories of Australia]]).
Keys under the value table for a given placetype of are two types: ''property keys'' (which specify the value of
specific properties) and ''categorization keys'' (which tell how to categorize certain sorts of holonyms if the
placetype in question occurs as an entry placetype). Categorization keys are either the special value `default` or are
wildcard strings with a slash in them, such as `"country/*"`. Note that only wildcard strings are currently allowed
directly in the placetype data; everything else is handled through category handlers, either per-placetype or special
(such as `political_division_cat_handler`). The algorithm for how category keys and handlers are used to generate
categories is described at the top of [[Module:place]].
There are several recognized property keys, of various types:
1. The following link-related property keys are recognized:
* `link`: '''Required''' except in category-only placetypes ending in `!`. Describes how to link and display the
placetype in the formatted description when occurring as an entry placetype. Also used for formatting pluralized
placetypes (which may occur in entry placetypes, esp. new-format ones, such as `two <<islands>>`) and may occur in
categories). The possible values are:
*# `true`: Link to the same-named Wiktionary entry. This creates a raw link, e.g. `<nowiki>[[city]]</nowiki>`, which is
converted to an English-specific link by JavaScript postprocessing. If the placetype is plural, this creates a
two-part raw link e.g. `<nowiki>[[city|cities]]</nowiki>`.
*# `"w"`: Link to the same-named Wikipedia entry. This creates a two-part link, e.g.
`<nowiki>[[w:census town|census town]]</nowiki>`, or `<nowiki>[[w:census town|census towns]]</nowiki>` if the
placetype is given plural.
*# `"+..."`: Create a two-part link to the entry following the `+` sign. For example, if `cercle` specifies
`"+w:cercles of Mali"`, a two-part link `<nowiki>[[w:cercles of Mali|cercle]]</nowiki>` will be generated, or
`<nowiki>[[w:cercles of Mali|cercles]]</nowiki>` if plural `cercles` is specified.
*# `"separately"`: Link each word separately. For example, if `administrative territory` specifies `"separately"`, it
will be linked as `<nowiki>[[administrative]] [[territory]]</nowiki>`, or as
`<nowiki>[[administrative]] [[territory|territories]]</nowiki>` if plural `administrative territories` is given.
*# another string: Use that string directly. If the placetype is plural, `pluralize()` in [[Module:en-utilities]] is
called on the string, which will correctly pluralize most strings, including those with links in them. (If there
are multiple links, the display form of the last link is pluralized.)
*# `false`: This placetype is not allowed as an entry placetype. An error will be thrown if this placetype is given as
an entry placetype. This is specified for internal-use placetypes, especially placetypes used in conjunction with
the qualifiers `former`, `ancient`, `historical` and such.
* `plural_link`: If specified and the placetype is plural, use the value in place of generating a pluralized version of
the link spec in `link`. Most commonly, this is either a string with links in it (which is used directly) or the
value `false`, indicating that the placetype cannot occur plural. (This is used for example by `caplc`, which displays
as `<nowiki>[[capital]] and [[large]]st [[city]]</nowiki>`, where a plural version doesn't make sense.) Generally if
this is specified, `plural` also needs to be specified to give a special placetype plural; this situation occurs
especially with multiword placetypes where something other than the last word is pluralized. An example is
`town with bystatus`, whose plural is `towns with bystatus`, which needs to be explicitly given. This example uses
`link = <nowiki>"[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>` ({{m|nb|bystatus}}) is a Norwegian
Bokmål word, and template calls aren't currently permitted in link strings), along with
`plural_link = <nowiki>"[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>`.
* `category_link`: Spec indicating how to display the placetype when occurring in category descriptions. Defaults to
the value of `link`, and in turn is overridden by more specific `category_link_*` keys; see below. Category-only
placetypes (which are plural and end in `!`) usually use `category_link` in preference to `link`. The value of
`category_link` can be any of the types of specs given above, but most commonly is a plural string with links in it,
spelling out the description; in this case it is used directly. When both `category_link` and `link` are given, the
value in `category_link` is typically longer and more descriptive. For example, `polity` uses `link = true`, which
just generates a link `<nowiki>[[polity]]</nowiki>` or plural `<nowiki>[[polity|polities]]</nowiki>`, but specifies a
separate `category_link = <nowiki>"[[independent]] or [[semi-]][[independent]] [[polity|polities]]"</nowiki>`, which
clarifies in the category description what a polity is.
* `category_link_top_level`: Spec indicating how to display top-level (bare/unqualified) categories, i.e. categories
where the placetype is not followed by `in ``location`` ` or `of ``location`` `. If given, this overrides
`category_link` for this type of category.
* `category_link_before_noncity`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` does not refer to a city. If given, this overrides
`category_link` for this type of category.
* `category_link_before_city`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` refer to a city. If given, this overrides `category_link` for
this type of category. An example where this is given is `neighborhood`, which uses the following specs:<ol>
<li>`link = true`</li>
<li>`category_link = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]"</nowiki>`</li>
<li>`category_link_before_city = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions"</nowiki>`</li>
</ol> This has the effect of making the entry placetype `neighborhood` display as just
`<nowiki>[[neighborhood]]</nowiki>`, while e.g. a category like `Neighborhoods of Chicago` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[Chicago]], ...</nowiki>` and a category like
`Neighborhoods in Illinois, USA` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]] in [[Illinois]], ...</nowiki>`.
* `disallow_in_entries`: If specified, this placetype cannot occur as an entry placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
* `disallow_in_holonyms`: If specified, this placetype cannot occur as a holonym placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
2. There is currently one fallback-related property key recognized:
* `fallback`: If specified, its value is a placetype which will be used for categorization purposes if no categories
get added using the placetype itself. As an example, `branch` sets a fallback of `river` but also sets
`preposition = "of"`, meaning that {{tl|place|en|branch|riv/Mississippi}} displays as `a branch of the Mississippi`
(whereas `river` itself uses the preposition `in`), but otherwise categorizes the same as `river`. A more complex
example is `area`, which sets a fallback of `geographic and cultural area` and also sets a category handler that
checks for cities or city-like entities (e.g. boroughs) occurring as holonyms and categorizes the toponym under
[[:Category:Neighborhoods of CITY]] (for recognized cities) or otherwise [[:Category:Neighborhoods of POLDIV]] (for
the nearest containing recognized location). In addition, `area` is set as a political division of Kuwait, meaning if
`c/Kuwait` occurs as holonym, the toponym is categorized under [[:Category:Areas of Kuwait]]. If none of these
categories trigger, the fallback of `geographic and cultural area` will take effect, and the toponym will be
categorized as e.g. [[:Category:Geographic and cultural areas of England]].
3. There is currently one property to control irregular plurals of placetypes:
* `plural`: If specified, its value is the plural of the placetype. Otherwise, the default pluralization algorithm in
[[Module:en-utilities]] applies (which correctly pluralizes most words, including those ending in `-y`, `-ch`, `-sh`,
`-x`, etc.). The value of `plural` is also used when converting a pluralized placetype into its singular equivalent;
for example, since the placetype `kibbutz` has `plural = "kibbutzim"`, the placetype `kibbutzim` will be recognized
as a plural and singularized to `kibbutz`. For this reason, it's occasionally necessary to specify a `plural` value
even when the default pluralization algorithm works correctly, if the default singularization algorithm won't
correctly reverse the pluralization (as with `pass` and other terms ending in `-ss`).
4. The following property keys relate to generating categories for entry placetypes and specifying the parents of those
categories:
* `class`: The general class of placetype. This is used for various purposes: (a) to categorize placetypes preceded by
a qualifier such as `former`, `ancient`, `medieval` or `historical` (note that these placetypes are not all treated
alike); (b) to determine the parent category of bare placetype categories (e.g. [[:Category:Villages]] for placetype
`village`); (c) to determine whether to add a parent category `political divisions of specific countries` to
qualified placetype categories (e.g. [[:Category:Villages in Mali]]). The possible values are:
*# `polity`: a more-or-less sovereign/independent polity, such as a country, kingdom or empire.
*# `subpolity`: a non-sovereign division of a polity, above the level of an individual settlement.
*# `settlement`: a city or smaller equivalent, such as a village. This also includes administrative divisions of a
settlement, such as wards and barangays.
*# `non-admin settlement`: similar to a settlement but without administrative or political significance, such as an
unincorporated community, farm or neighborhood.
*# `capital`: a settlement that is a capital. A former capital is generally still in existence, just not the capital
any more.
*# `natural feature`: any non-man-made feature, such as a lake, mountain, island, ocean, etc.
*# `man-made structure`: a man-made feature below the level of a neighborhood, such as a house, airport, university,
metro station, park or the like.
*# `geographic region`: a geographic or cultural region or area that has no administrative significance. These may vary
greatly in size but typically have some sort of cultural significance (possibly historical). The `former`, `ancient`,
etc. qualifier has no effect on the category of these placetypes.
*# `generic place`: a place that isn't further qualified into any specific subtype.
* `former_type`: The class of placetype used for categorizing placetypes preceded by a qualifier such as `former`,
`ancient`, `medieval` or `historical`. The possible values are the same as for `class` but with the addition of
`dependent territory` (for colonies, protectorates and the like) and `!` (ignore the historical/former/ancient/etc.
qualifier; used e.g. with `fictional location` and `mythological location`). If not specified, the value of `class`
is used. When a qualifier such as `former`, `ancient`, `medieval` or `historical` is encountered (specifically, those
in `former_qualifiers`), it is mapped using `former_qualifiers` to the appropriate internal qualifier or qualifiers
(one or both of `ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
qualifiers), which is prepended to the value of `former_type` or `class` to form a placetype whose properties are
looked up to determine how to categorize the toponym in question. For example, if `medieval village` is given, we map
`medieval` to `ANCIENT` and `FORMER`, and `village` to its `class` of `settlement`, and enter the placetypes
`ANCIENT settlement` and `FORMER settlement` (in that order) into the list of equivalent placetypes returned by
`get_placetype_equivs`. In this case, there is an entry in `placetype_data` for `ANCIENT settlement`, so its default
category spec `Ancient settlements` is used as the category. If on the other hand `medieval kingdom` is given, where
`kingdom` has a `class` value `polity`, we first look up `ANCIENT polity`, see there is no entry in `placetype_data`
for it, and then look up `FORMER polity`, which exists and has a default category spec `Former polities`, which is
used as the category. Note that if the placetype following the "former" qualifier is recognized in `placetype_data`
but has no `former_type` or `class` and no fallback with a `former_type` or `class` specified, it is an internal
error; but if the placetype isn't recognized (e.g. something like `former greenhouse` is specified and we don't have
an entry for `greenhouse`), we just track the occurrence and end up not categorizing.
* `bare_category_parent`: This specifies the first parent category of a bare placetype category named according to the
placetype in question (e.g. [[:Category:Atolls]] for placetype `atoll`, or [[:Category:Named buildings]] for
placetype `named buildings!`). If not specified, the first parent category is determined by the value of `class`,
using the mapping `class_to_bare_category_parent` in [[Module:category tree/topic cat/data/Places]].
* `addl_bare_category_parents`: Extra parent categories to add a bare placetype category to (see `bare_category_parent`
just above).
* `bare_category_breadcrumb`: Breadcrumb for bare placetype categories. Also used as the sort key of
`bare_category_parent` if it is a string.
* `inherently_former`: If specified and the given placetype is used as an entry placetype, act as if `former` or
`ancient` (depending on the value of `inherently_former`) were prefixed to the placetype. This is for placetypes that
always refer to no-longer-existing entities, such as `satrapy` and `treaty port`. The value of `inherently_former` is
a list of internal qualifiers (one or more of `ANCIENT` and/or `FORMER`), just as for `former_qualifiers`, and the
implementation is the same.
* `cat_handler`: Handler used to generate the categories to add a given toponym to, if its entry placetype is the
placetype in question. Generally the `cat_handler` function checks the holonyms specified in order to determine which
category or categories to generate. For example, `district_neighborhood_cat_handler` handles placetypes `district`,
`neighborhood`, `subdivision`, `suburb` and the like, and either adds the toponym to a category like
`Neighborhoods of ``city`` ` (if a recognized city is given as a holonym), or otherwise a category like
`Neighborhoods in ``location`` ` (for the first recognized non-city location given as a holonym, if an unrecognized
city or city-like entity is given before the recognized non-city). The algorithm that runs the category handlers
iterates over holonyms from left to right, running the `cat_handler` function on each holonym in turn until one or
more categories are returned; see below for more specifics. (Note that countries for which e.g. a `district` is a
political division do not get the corresponding category added by the `district_neighborhood_cat_handler` function but
by `political_division_cat_handler`.) `cat_handler` functions are called with one argument, `data`, describing the
resolved entry placetype (i.e. after resolving placetype aliases and fallbacks) and the holonym being processed. The
return value should be a list of category specs (categories minus the langcode prefix, with `+++` standing for the
holonym key, or the value `true`, which stands for ` ``Placetypes`` in/of ``Holonym`` `, i.e. the pluralized placetype
with the appropriate preposition as specified in `placetype_data`). `data` contains the following fields:
** `entry_placetype`: the resolved entry placetype for the entry placetype being processed (i.e. it will always have an
entry in `placetype_data` but may not be the original placetype given by the user);
** `holonym_placetype` and `holonym_placename`: the holonym placetype and placename being processed;
** `holonym_index`: the index of the holonym being processed, or {nil} if we're handling an overriding holonym (FIXME:
we will change the overriding holonym algorithm so there will be an index even when processing overriding holonyms);
** `place_desc`: a full description of the {{tl|place}} call, as specified at the top of [[Module:place]];
** `from_demonym`: If set, we are called from [[Module:demonym]], triggered by {{tl|demonym-adj}} or
{{tl|demonym-noun}}, instead of being triggered by {{tl|place}}.
* `has_neighborhoods`: If `true`, the specified placetype is city-like. This is used in the
`district_neighborhood_cat_handler` to determine whether to add a category such as `Neighborhoods in ``location`` `;
see the section just above on `cat_handler`.
5. The following preposition-related property keys are recognized:
* `preposition`: The preposition used after this placetype when it occurs as an entry placetype. Defaults to `"in"`.
* `generic_before_non_cities`: If specified, the appropriate category description handler in
[[Module:category tree/topic cat/data/Places]] will recognize categories of the form
` ``Placetype`` in/of ``location`` ` for the specified placetype and preposition, if ``location`` is a non-city. This
is used to generate descriptions for categories added by category handlers and by explicit category specs in the
placetype data. All placetypes that specify `generic_before_non_cities` or `generic_before_cities` *MUST* also specify
a value for `class` so that the category tree code can determine whether it's a political or non-political division.
* `generic_before_cities`: Like `generic_before_non_cities` but for locations referring to cities.
6. The following property keys control the auto-addition of affixes when formatting holonyms of a particular placetype:
* `affix_type`: If specified, add the placetype as an affix before or after holonyms of this placetype. Possible values
are:
*# `"pref"` (the holonym will display as `(the) placetype of Holonym`, where `the` appears when the holonym directly
follows an entry placetype);
*# `"Pref"` (same as `"pref"` but the placetype is capitalized; each word is capitalized if there are multiple);
*# `"suf"` (the holonym will display as `Holonym placetype`);
*# `"Suf"` (the holonym will display as `Holonym Placetype`, i.e. same as `"suf"` but the placetype is capitalized).
* `suffix`: String to use in place of the placetype itself when the placetype is displayed as a suffix after a holonym.
Note that `suffix` can be used independently of `affix_type` because the user can also request a suffix explicitly
using a syntax like `adr:suf/Occitania`, which will display as `Occitania region` because the placetype
`administrative region` specifies `suffix = "region"`.
* `prefix`: Like `suffix` but for use when the placetype is displayed as a prefix before the holonym.
* `affix`: Like `suffix` and `prefix` but for use when the placetype is displayed as an affix either before or after the
holonym. If both `suffix` or `prefix` and `affix` are given for a single placetype, `suffix` or `prefix` take
precedence.
* `no_affix_strings`: String or list of strings that, if they occur in the holonym, suppress the addition of any affix
requested using `affix_type`. Defaults to the placetype itself. For example, `autonomous okrug` specifies
`affix_type = "Suf"` so that `aokr/Nenets` displays as `Nenets Autonomous Okrug`, but also specifies
`no_affix_strings = "okrug"` so that `aokr/Nenets Okrug` or `aokr/Nenets Autonomous Okrug` displays as specified,
without a redundant `Autonomous Okrug` added. Matching is case-insensitive but whole-word.
* `display_handler`: A function of two arguments, `holonym_placetype` and `holonym_placename` (specifying a holonym).
Its return value is a string specifying the display form of the holonym.
7. The following property keys control the indefinite and definite articles used before entry placetypes and/or holonyms
of the specified placetype.
* `entry_placetype_use_the`: Use `"the"` before this placetype when it occurs as an entry placetype.
* `entry_placetype_indefinite_article`: Indefinite article used before this placetype when it occurs as an entry
placetype (usually `"a"`, specifically for placetypes beginning with u- that don't take the indefinite article
`"an"`). Defaults to the appropriate indefinite article (`"a"` or `"an"` depending on whether the placetype begins
with a vowel). Overridden by `entry_placetype_use_the`, and unlike for most properties, does not apply to equivalent
placetypes (i.e. fallbacks or those formed by removing a qualifier from the beginning); only to the exact placetype
specified.
* `holonym_use_the`: Use `"the"` before holonyms of this placetype.
'''NOTE:'''
# The `link` property must be specified on all placetypes, except those ending in `!` (category-only placetypes), which
must have either `link` or `category_link` specified.
# Either the `class` or `former_type` property must be specified on all placetypes not ending in `!` that do not have a
fallback (if a placetype has a fallback and omits the `class` and `former_type` properties, they are taken from the
fallback). An internal error will result if a placetype has no `class` or `former_type` property derivable either
directly or through a fallback, if an attempt is made to categorize a former/ancient/historical/etc. entity of this
placetype.
# It is possible to have multiple levels of fallback (e.g. `frazione` falls back to `hamlet`, which falls back
to `village`). Fallback loops will cause an internal error. All placetypes specified as fallbacks must exist in
`placetype_data` or an internal error occurs.
]==]
export.placetype_data = {
--[=[
If you need to sort the following, do this (using Vim):
1. Make sure all full-line comments are within the { ... } table, or are moved after and on the same line as single-line
entries.
2. Make sure the table uses tabs everywhere for indent, and not spaces.
3. Mark the top of the table with `ma`, go to the bottom and execute the following two lines in sequence:
:'a,.s/\n/\\n/g
:s/\\n\(\t\[\)/\r\1/g
The first command converts every newline to a literal `\n` sequence, so the whole thing becomes a single line, while
the second command restores the newlines before the beginning of each entry. The effect is to convert all entries to
a single line while not losing any information. (Potentially a negative lookahead could be used to do it all in one
command.)
4. Execute the following to sort:
:'a,.!perl -pe 's/^(\t\[")(.*?)(".*)$/$2 @@@ $1$2$3/' | sort -f | perl -pe 's/.*? @@@ //'
Note that a simple `sort -f` (where `-f` means case-insensitive) would almost work, but it would sort "hill station"
before "hill" and "county borough" before "county" because the space after e.g. "hill station" sorts before the
quotation mark after e.g. "hill". The above command deals with this by extracting the key, prepending it followed by
` @@@ `, sorting, and then removing key (the classic decorate-sort-undecorate pattern).
5. Put the table back to multi-line format by marking the top of the table with `ma`, going to the bottom and executing
:'a,.s/\\n/\r/g
Note that for some reason, in order to get a match a newline in the left side of a replacement, you must use \n, but
to insert a newline in the right sode of a replacement you must use \r.
]=]
["*"] = {
link = false,
cat_handler = generic_place_cat_handler,
},
["administrative atoll"] = {
-- Maldives
link = "+w:administrative divisions of the Maldives",
preposition = "of",
class = "subpolity",
},
["administrative capital"] = {
link = "w",
fallback = "capital city",
},
["administrative center"] = {
link = "w",
fallback = "non-city capital",
},
["administrative centre"] = {
link = "w",
fallback = "administrative center",
},
["administrative county"] = {
link = "w",
fallback = "county",
},
["administrative district"] = {
link = "w",
fallback = "district",
},
["administrative headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["administrative region"] = {
link = true,
preposition = "của",
suffix = "region", -- but prefix is still "administrative region (of)"
fallback = "region",
class = "subpolity",
},
["administrative seat"] = {
link = "w",
fallback = "administrative centre",
},
["administrative territory"] = {
link = "separately",
preposition = "of",
suffix = "territory", -- but prefix is still "administrative territory (of)"
fallback = "territory",
class = "subpolity",
},
["administrative unit"] = {
-- Grrr, it's difficult to generalize about "administrative units". In Albania, "administrative unit" is an
-- official term for a city-level division of municipalities; Wikipedia renders it using the more practical term
-- "commune". In Pakistan, "administrative unit" is a collective term used to refer to all the different types
-- of first-level divisions (four provinces, one federal territory, and two "disputed territories", i.e. Azad
-- Kashmir and Gilgit-Balistan, that are variously described). For this reason, we set no fallback, but we need
-- to include this so that it can be used as a placetype for Albania, categorizing as communes.
link = "w",
class = "subpolity",
},
["administrative village"] = {
link = "w",
preposition = "of",
has_neighborhoods = true,
class = "settlement",
},
["aimag"] = {
-- used in Mongolia, Russia and China (Inner Mongolia); in Mongolia, equivalent to a province;
-- in China, equivalent to a prefecture (below a province); in Russia, equivalent to a municipal district.
link = "w",
fallback = "prefecture",
},
["airport"] = {
link = true,
class = "man-made structure",
default = {true},
},
["alliance"] = {
link = true,
fallback = "confederation",
},
["archipelago"] = {
link = true,
fallback = "island",
},
["area"] = {
link = true,
preposition = "of",
fallback = "geographic and cultural area",
-- Areas can either be administrative divisions (specifically of Kuwait) or geographic areas. Assume the former
-- when categorizing 'Areas' but the latter when handling e.g. 'historical area'.
class = "subpolity",
former_type = "geographic region",
cat_handler = district_neighborhood_cat_handler,
},
["arm"] = {
link = true,
preposition = "of",
class = "natural feature",
default = {"Seas"},
},
["arrondissement"] = {
link = true,
preposition = "of",
-- FIXME!!! Grrrrr!!! In some countries, arrondissements are divisions of cities; in others, they are divisions
-- of departments or provinces. Need to conditionalize on the country for both of the following.
class = "subpolity",
has_neighborhoods = true,
},
["associated province"] = {
link = "separately",
fallback = "province",
},
["atoll"] = {
-- FIXME! Atolls are administrative divisions of the Maldives but natural features elsewhere. Need to
-- conditionalize `class` on the country. See also `administrative atoll`.
link = true,
class = "natural feature",
bare_category_parent = "islands",
default = {true},
},
["autonomous city"] = {
link = "w",
preposition = "of",
fallback = "city",
has_neighborhoods = true,
},
["autonomous community"] = {
-- Spain; refers to regional entities, not village-like entities, as might be expected from "community"
link = true,
preposition = "of",
class = "subpolity",
},
["autonomous island"] = {
-- Comoros; seems like an administrative atoll of the Maldives.
link = "+w:autonomous islands of Comoros",
preposition = "of",
class = "subpolity",
},
["autonomous oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "oblast",
class = "subpolity",
},
["autonomous okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "okrug",
class = "subpolity",
},
["autonomous prefecture"] = {
link = true,
fallback = "prefecture",
},
["autonomous province"] = {
link = "w",
fallback = "province",
},
["autonomous region"] = {
link = "w",
preposition = "of",
fallback = "administrative region",
-- "administrative region" sets an affix of "region" but we want to display as "Tibet Autonomous Region"
-- if the user writes 'ar:Suf/Tibet'.
affix = "autonomous region",
},
["autonomous republic"] = {
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territorial unit"] = {
-- Moldova; only two of them, one for Gagauzia and one for Transnistria.
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territory"] = {
link = "w",
fallback = "dependent territory",
},
["bailiwick"] = {
-- Jersey, etc.
link = true,
fallback = "polity",
},
["barangay"] = {
-- Philippines
link = true,
class = "settlement",
-- Barangays are formal administrative divisions of a city rather than informal neighborhoods, but can use
-- some of the properties of a neighborhood.
fallback = "neighborhood",
},
["barrio"] = {
-- Spanish-speaking countries; Philippines
link = true,
-- FIXME: Not completely correct, in some countries barrios are formal administrative divisions of a city.
-- `class` will need to conditionalize on the country to be completely correct.
fallback = "neighborhood",
},
["basin"] = {
link = true,
fallback = "lake",
},
["bay"] = {
link = true,
preposition = "of",
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["beach"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"water"},
default = {true},
},
["beach resort"] = {
link = "w",
fallback = "resort town",
},
["bishopric"] = {
link = true,
fallback = "polity",
},
["bodies of water!"] = {
-- FIXME: This is (maybe?) a type category not a name category. There should be an option for this. We need to
-- straighten out the type vs. name vs. related-to issue.
category_link = "[[body of water|bodies of water]]",
class = "natural feature",
addl_bare_category_parents = {"landforms", "ecosystems", "water"},
},
["borough"] = {
link = true,
preposition = "of",
display_handler = borough_display_handler,
has_neighborhoods = true,
-- "former borough" could be a former settlement or a former part of a city but seems more likely to
-- be a former subpolity, particularly in England. FIXME, we really need a handler to take care of this
-- properly.
class = "subpolity",
-- Grr, some boroughs are city-like but some (e.g. in Britain) may be larger.
},
["borough seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["branch"] = {
link = true,
preposition = "of",
fallback = "river",
},
["bridge"] = {
link = true,
class = "man-made structure",
default = {"Named bridges"},
},
["building"] = {
link = true,
class = "man-made structure",
default = {"Named buildings"},
},
["built-up area"] = {
link = "w",
fallback = "area",
},
["burgh"] = {
link = true,
fallback = "borough",
},
["business park"] = {
link = true,
fallback = "park",
},
["caliphate"] = {
link = true,
fallback = "polity",
},
["canton"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["cape"] = {
link = true,
fallback = "headland",
},
["capital"] = {
link = true,
fallback = "capital city",
},
["capital city"] = {
link = true,
category_link = "[[capital city|capital cities]]: the [[seat of government|seats of government]] for a country or [[political]] [[division]] of a country",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
bare_category_parent = "cities",
cat_handler = capital_city_cat_handler,
default = {true},
-- The following is necessary so that e.g. [[Melbourne]] defined as {{place|en|capital city|s/Victoria|c/Australia}}
-- gets categorized in the bare category [[Category:en:Melbourne]]; otherwise placetype 'capital city' wouldn't
-- match against the placetype 'city' of Melbourne.
fallback = "city",
},
["caplc"] = {
link = "[[capital]] and [[large]]st [[city]]",
plural_link = false,
fallback = "capital city",
},
["captaincy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["caravan city"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"ANCIENT", "FORMER"},
},
["castle"] = {
link = true,
fallback = "building",
},
["cathedral city"] = {
link = true,
fallback = "city",
},
["cattle station"] = {
-- Australia
link = true,
fallback = "farm",
},
["census area"] = {
link = true,
affix_type = "Suf",
has_neighborhoods = true,
class = "non-admin settlement",
},
["census-designated place"] = {
-- United States
link = true,
class = "non-admin settlement",
},
["census division"] = {
-- Canada
link = "w",
preposition = "of",
class = "subpolity",
},
["census town"] = {
link = "w",
fallback = "town",
},
["central business district"] = {
link = true,
fallback = "neighborhood",
},
["cercle"] = {
-- Mali
link = "+w:cercles of Mali",
preposition = "of",
class = "subpolity",
},
["ceremonial county"] = {
link = true,
fallback = "county",
},
["chain of islands"] = {
link = "[[chain]] of [[island]]s",
plural = "chains of islands",
plural_link = "[[chain]]s of [[island]]s",
fallback = "island",
},
["channel"] = {
link = true,
fallback = "strait",
},
["charter community"] = {
-- Northwest Territories, Canada
link = "w",
fallback = "village",
},
["city"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["city-state"] = {
link = true,
category_link = "[[sovereign]] [[microstate]]s consisting of a single [[city]] and [[w:dependent territory|dependent territories]]",
has_neighborhoods = true,
class = "settlement",
["continent/*"] = {"City-states", "Cities in +++", "Quốc gia của +++", "National capitals"},
default = {"City-states", "Cities", "Quốc gia", "National capitals"},
},
["civil parish"] = {
-- Mostly England; similar to municipalities
link = true,
preposition = "of",
affix_type = "suf",
has_neighborhoods = true,
class = "subpolity",
},
["claimed political division"] = {
link = "[[claim]]ed [[political]] [[division]]",
class = "subpolity",
default = {true},
},
["co-capital"] = {
link = "[[co-]][[capital]]",
fallback = "capital city",
},
["coal city"] = {
link = "+w:coal town",
fallback = "city",
},
["coal town"] = {
link = "w",
fallback = "town",
},
["collectivity"] = {
link = "w",
preposition = "of",
-- No default; these are weird one-off governmental divisions in France (esp. for overseas collectivities)
class = "subpolity",
},
["colony"] = {
link = true,
fallback = "dependent territory",
},
["comarca"] = {
-- per Wikipedia: traditional region or local administrative division found in Portugal, Spain, and some of
-- their former colonies, like Brazil, Nicaragua, and Panama. In the Valencian Community, for example, it
-- sits between municipalities and provinces, something like a county or district.
link = true,
preposition = "of",
class = "subpolity",
},
["commandery"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["commonwealth"] = {
link = true,
preposition = "of",
-- No default; applies specifically to Puerto Rico
class = "subpolity",
},
["commune"] = {
link = true,
fallback = "municipality",
},
["community"] = {
link = true,
category_link = "[[community|communities]] of all sizes",
fallback = "village",
},
["community development block"] = {
-- in India; appears to be similar to a rural municipality; groups several villages, unclear if there will be
-- neighborhoods so I'm not setting `has_neighborhoods` for now
link = "w",
affix_type = "suf",
no_affix_strings = "block",
class = "subpolity",
},
["comune"] = {
-- Italy, Switzerland
link = true,
fallback = "municipality",
},
["condominium"] = {
link = true,
fallback = "polity",
},
["confederacy"] = {
link = true,
fallback = "confederation",
},
["confederation"] = {
link = true,
fallback = "polity",
},
["constituency"] = {
-- currently we have them as political divisions of Namibia but many countries have them
link = true,
preposition = "of",
class = "subpolity",
},
["constituent country"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["constituent part"] = {
link = "separately",
preposition = "of",
class = "subpolity",
},
["constituent republic"] = {
-- Of Russia, Yugoslavia, etc.
link = "separately",
preposition = "of",
class = "subpolity",
},
["counties and county-level cities!"] = {
-- This is used when grouping counties and county-level cities under prefecture-level cities in China.
category_link = "[[county|counties]] and [[county-level city|county-level cities]]",
class = "subpolity",
},
["continent"] = {
link = true,
category_link = false, -- can't occur as a bare category
class = "natural feature",
default = {"Continents and continental regions"},
},
["continental region"] = {
link = "separately",
category_link = false, -- can't occur as a bare category
class = "geographic region",
fallback = "continent",
},
["continents and continental regions!"] = {
category_link = "[[continent]]s and [[continent]]-[[level]] [[region]]s (e.g. [[Polynesia]])",
class = "geographic region",
},
["council area"] = {
link = true,
-- in Scotland; similar to a county
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["quốc gia"] = {
link = true,
class = "polity",
["continent/*"] = {true, "Quốc gia"},
default = {true},
},
["country-like entities!"] = {
category_link = "[[polity|polities]] not normally considered [[country|countries]] but treated similarly for categorization purposes; typically, [[unrecognized]] [[de-facto]] countries or [[w:dependent territory|dependent territories]]",
class = "polity",
},
["county"] = {
link = true,
preposition = "of",
display_handler = county_display_handler,
class = "subpolity",
},
["county borough"] = {
link = true,
-- in Wales; similar to a county
preposition = "of",
affix_type = "suf",
fallback = "borough",
class = "subpolity",
},
["county seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["county town"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
fallback = "town",
has_neighborhoods = true,
class = "capital",
},
["county-administered city"] = {
-- In Taiwan, per Wikipedia similar to a Taiwanese township or district, which is a small city.
-- NOT anything like a "county-level city" in PR China, which is a county masquerading as a city.
link = "w",
fallback = "city",
has_neighborhoods = true,
class = "settlement",
},
["county-controlled city"] = {
-- Taiwan
link = "w",
fallback = "county-administered city",
},
["county-level city"] = {
-- PR China
link = "w",
fallback = "prefecture-level city",
},
["crater lake"] = {
link = true,
fallback = "lake",
},
["creek"] = {
link = true,
fallback = "stream",
},
["Crown colony"] = {
link = "+crown colony",
fallback = "crown colony",
},
["crown colony"] = {
link = true,
fallback = "colony",
},
["Crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["cultural area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["cultural region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["delegation"] = {
-- Tunisia
link = "+w:delegations of Tunisia",
preposition = "of",
class = "subpolity",
},
["department"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["departmental capital"] = {
link = "separately",
fallback = "capital city",
},
["dependency"] = {
link = true,
fallback = "dependent territory",
},
["dependent territory"] = {
link = "w",
preposition = "of",
class = "subpolity",
former_type = "dependent territory",
bare_category_parent = "political divisions",
["country/*"] = {true},
default = {true},
},
["desert"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"ecosystems"},
default = {true},
},
["deserted mediaeval village"] = {
link = "w",
fallback = "deserted medieval village",
},
["deserted medieval village"] = {
link = "w",
fallback = "ANCIENT settlement",
},
["direct-administered municipality"] = {
-- China
link = "+w:direct-administered municipalities of China",
fallback = "municipality",
},
["direct-controlled municipality"] = {
-- several countries
link = "w",
fallback = "municipality",
},
["distributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["district"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- Grrr! FIXME! Here is where we need handlers for `class`. Using similar logic to
-- district_neighborhood_cat_handler, we need to check if we're below or above a city to determine if the class
-- is "settlement" or "subpolity".
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
-- No default. Countries for which districts are political divisions will get entries.
},
["districts and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Portugal.
category_link = "[[district]]s and [[autonomous region]]s",
class = "subpolity",
},
["districts and autonomous territorial units!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Moldova.
category_link = "[[district]]s and [[w:autonomous territorial unit|autonomous territorial unit]]s",
class = "subpolity",
},
["district capital"] = {
link = "separately",
fallback = "capital city",
},
["district headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["district municipality"] = {
-- In Canada, a district municipality is equivalent to a rural municipality and won't have neighborhoods; in
-- South Africa, district municipalities group local municipalities and hence won't have neighborhoods.
link = "w",
preposition = "of",
affix_type = "suf",
no_affix_strings = {"district", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["division"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["division capital"] = {
link = "separately",
fallback = "capital city",
},
["dome"] = {
link = true,
fallback = "mountain",
},
["dormant volcano"] = {
link = true,
fallback = "volcano",
},
["duchy"] = {
link = true,
fallback = "polity",
},
["emirate"] = {
link = true,
preposition = "of",
-- FIXME: Can be subpolities (of the United Arab Emirates).
fallback = "polity",
},
["empire"] = {
link = true,
fallback = "polity",
},
["enclave"] = {
link = true,
preposition = "of",
-- Enclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["entity"] = {
-- Bosnia and Herzegovina
link = "+w:entities of Bosnia and Herzegovina",
preposition = "of",
class = "subpolity",
},
["escarpment"] = {
link = true,
fallback = "mountain",
},
["ethnographic region"] = {
-- used in Lithuania
link = "+w:ethnographic regions of Lithuania",
fallback = "geographic and cultural area",
},
["exclave"] = {
link = true,
preposition = "of",
-- exclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["external territory"] = {
link = "separately",
fallback = "dependent territory",
},
["farm"] = {
link = true,
class = "non-admin settlement",
default = {"Farms and ranches"},
},
["farms and ranches!"] = {
category_link = "[[farm]]s and [[ranch]]es",
class = "non-admin settlement",
},
["federal city"] = {
link = "w",
preposition = "of",
fallback = "city",
},
["federal district"] = {
link = true,
preposition = "of",
-- Might have neighborhoods as federal districts are often cities (e.g. Mexico City)
has_neighborhoods = true,
class = "settlement",
},
["federal subject"] = {
-- In Russia; a generic term for first-level administrative divisions (republics, oblasts, okrugs, krais,
-- autonomous okrugs and autonomous oblasts).
link = "w",
preposition = "of",
class = "subpolity",
},
["federal territory"] = {
link = "w",
fallback = "territory",
},
["fictional location"] = {
link = "separately",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "places",
default = {true},
},
["First Nations reserve"] = {
-- Canada
link = "[[First Nations]] [[w:Indian reserve|reserve]]",
-- Wikipedia uses "Indian reserve"; presumably that is the legal term
fallback = "Indian reserve",
class = "subpolity",
},
["fjord"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["footpath"] = {
link = true,
fallback = "road",
},
["forest"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"ecosystems", "forestry"},
default = {true},
},
["fort"] = {
link = true,
fallback = "building",
},
["fortress"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- fortresses -> fortresse, so put an entry here to ensure we singularize correctly.
plural = "fortresses",
fallback = "building",
},
["frazione"] = {
link = "w",
fallback = "hamlet",
},
["freeway"] = {
link = true,
fallback = "road",
},
["French prefecture"] = {
link = "[[w:prefectures in France|prefecture]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["geographic and cultural area"] = {
link = "+w:cultural area",
-- `generic_before_non_cities` is used when generating the category description of categories of the format
-- `Geographic and cultural areas of PLACE`. `preposition` is used when generating {{place}} description and
-- categories for any placetype that falls back to `geographic and cultural area`.
generic_before_non_cities = "of",
preposition = "of",
class = "geographic region",
bare_category_parent = "places",
["country/*"] = {true},
["constituent country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["geographic area"] = {
link = "+w:geographic region",
fallback = "geographic and cultural area",
},
["geographic region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geopolitical zone"] = {
-- Nigeria
link = true,
preposition = "of",
class = "subpolity",
},
["gewog"] = {
-- Bhutan
link = true,
preposition = "of",
class = "subpolity",
},
["ghost town"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
bare_category_parent = "former settlements",
cat_handler = city_type_cat_handler,
default = {true},
},
["glen"] = {
link = true,
fallback = "valley",
},
["governorate"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["greater administrative region"] = {
-- China (former division)
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["gromada"] = {
-- Poland (former division)
link = "w",
preposition = "of",
affix_type = "Pref",
class = "subpolity",
inherently_former = {"FORMER"},
},
["group of islands"] = {
link = "[[group]] of [[island]]s",
plural = "groups of islands",
plural_link = "[[group]]s of [[island]]s",
fallback = "island group",
},
["gulf"] = {
link = true,
preposition = "of",
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["hamlet"] = {
link = true,
fallback = "village",
},
["harbor city"] = {
link = "separately",
fallback = "city",
},
["harbor town"] = {
link = "separately",
fallback = "town",
},
["harbour city"] = {
link = "separately",
fallback = "city",
},
["harbour town"] = {
link = "separately",
fallback = "town",
},
["headland"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["headquarters"] = {
link = "w",
fallback = "administrative centre",
},
["heath"] = {
link = true,
fallback = "moor",
},
["hemisphere"] = {
link = true,
entry_placetype_use_the = true,
fallback = "continental region",
},
["highway"] = {
link = true,
fallback = "road",
},
["hill"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["hill station"] = {
link = "w",
fallback = "town",
},
["hill town"] = {
link = "w",
fallback = "town",
},
["historic region"] = {
-- provided only for the link
link = "+w:historical region",
fallback = "FORMER geographic region",
},
["historical county"] = {
-- needed for historical counties of England/etc.
link = "+w:historic county",
fallback = "FORMER subpolity",
},
["historical region"] = {
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["home rule city"] = {
link = "w",
fallback = "city",
},
["home rule municipality"] = {
link = "w",
fallback = "municipality",
},
["hot spring"] = {
link = true,
fallback = "spring",
},
["house"] = {
link = true,
fallback = "building",
},
["housing estate"] = {
-- not the same as a housing project (i.e. public housing)
link = true,
-- not exactly the case but approximately
fallback = "neighborhood",
},
["hromada"] = {
-- Ukraine
link = "w",
disallow_in_entries = "Use placetype 'urban hromada', 'rural hromada' or 'settlement hromada' in place of bare 'hromada'",
disallow_in_holonyms = "Use placetype 'urban hromada'/'uhrom', 'rural hromada'/'rhrom' or 'settlement hromada'/'shrom' in place of bare 'hromada'",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["inactive volcano"] = {
link = "w",
fallback = "dormant volcano",
},
["independent city"] = {
link = true,
fallback = "city",
},
["independent town"] = {
link = "+independent city",
fallback = "town",
},
["Indian reservation"] = {
link = "w",
-- In the US. Also known as "Native American reservation" or "domestic dependent nation", and the reservations
-- themselves often use the term "nation" in their official name (e.g. the "Navajo Nation"). But Wikipedia puts
-- the article at [[w:Indian reservation]] and uses that term when describing e.g. what the Navajo Nation is,
-- so this must still be the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["Indian reserve"] = {
link = "w",
-- In Canada. "First Nations reserve" sounds more modern/PC but Wikipedia uses "Indian reserve"; presumably that
-- is still the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["inland sea"] = {
-- note, we also have 'inland' as a qualifier
link = true,
fallback = "sea",
},
["inner city area"] = {
link = "[[inner city]] [[area]]",
fallback = "neighborhood",
},
["island"] = {
link = true,
preposition = "of",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["island country"] = {
-- FIXME: The following should map to both 'island' and 'country'.
link = "w",
fallback = "country",
},
["island group"] = {
link = "separately",
fallback = "island",
},
["island municipality"] = {
link = "w",
fallback = "municipality",
},
["islet"] = {
link = "w",
fallback = "island",
},
["Israeli settlement"] = {
link = "w",
class = "settlement",
default = {true},
},
["judicial capital"] = {
link = "w",
fallback = "capital city",
},
["khanate"] = {
link = true,
fallback = "polity",
},
["kibbutz"] = {
link = true,
plural = "kibbutzim",
class = "non-admin settlement",
default = {true},
},
["kingdom"] = {
link = true,
fallback = "monarchy",
},
["krai"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["lake"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["địa mạo!"] = {
category_link = "[[địa mạo]]",
bare_category_parent = "địa danh",
addl_bare_category_parents = {"Trái Đất"},
},
["largest city"] = {
link = "[[large]]st [[city]]",
entry_placetype_use_the = true,
fallback = "city",
has_neighborhoods = true,
},
["league"] = {
link = true,
fallback = "confederation",
},
["legislative capital"] = {
link = "separately",
fallback = "capital city",
},
["library"] = {
link = true,
fallback = "building",
},
["lieutenancy area"] = {
-- used in the United Kingdom; per Wikipedia:
-- In England, lieutenancy areas are colloquially known as the ceremonial counties, although this phrase does
-- not appear in any legislation referring to them. The lieutenancy areas of Scotland are subdivisions of
-- Scotland that are more or less based on the counties of Scotland, making use of the major cities as separate
-- entities.[2] In Wales, the lieutenancy areas are known as the preserved counties of Wales and are based on
-- those used for lieutenancy and local government between 1974 and 1996. The lieutenancy areas of Northern
-- Ireland correspond to the six counties and two former county boroughs.[3]
link = "w",
fallback = "ceremonial county",
},
["local authority district"] = {
link = "w",
fallback = "local government district",
},
["local government area"] = {
-- Australia
link = "w",
preposition = "of",
class = "subpolity",
},
["local council"] = {
-- Malta; similar to municipalities
link = "+w:local councils of Malta",
preposition = "of",
fallback = "municipality",
},
["local government district"] = {
link = "w",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local government district with borough status"] = {
link = "[[w:local government district|local government district]] with [[w:borough status|borough status]]",
plural = "local government districts with borough status",
plural_link = "[[w:local government district|local government districts]] with [[w:borough status|borough status]]",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local urban district"] = {
link = "w",
fallback = "unincorporated community",
},
["locality"] = {
link = "+w:locality (settlement)",
-- not necessarily true, but usually is the case
fallback = "village",
},
["London borough"] = {
link = "w",
preposition = "of",
affix_type = "pref",
affix = "borough",
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["macroregion"] = {
link = true,
fallback = "region",
},
["man-made structures!"] = {
category_link = "[[w:geographical feature#Engineered constructs|man-made structures]] such as [[airport]]s, [[university|universities]] and [[metro station]]s",
bare_category_parent = "places",
},
["manor"] = {
-- FIXME: or is this more like a farm?
link = true,
fallback = "building",
},
["marginal sea"] = {
link = true,
preposition = "of",
fallback = "sea",
},
["market city"] = {
link = "+market town",
fallback = "city",
},
["market town"] = {
link = true,
fallback = "town",
},
["massif"] = {
link = true,
fallback = "mountain",
},
["megacity"] = {
link = true,
fallback = "city",
},
["metro station"] = {
link = true,
class = "man-made structure",
},
["metropolitan borough"] = {
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"borough", "city"},
fallback = "local government district",
has_neighborhoods = true,
},
["metropolitan city"] = {
-- These exist e.g. in Italy and are more like municipalities or even provinces than cities.
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"metropolitan", "city"},
class = "subpolity",
},
["metropolitan county"] = {
link = true,
fallback = "county",
},
["metropolitan municipality"] = {
-- In South Africa, metropolitan municipalities group local municipalities and are like districts, between
-- provinces and municipalities.
-- In Turkey, metropolitan municipalities are provinces-level.
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"metropolitan", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["microdistrict"] = {
-- residential complex in post-Soviet states
link = true,
fallback = "neighborhood",
},
["micronations!"] = {
-- FIXME, merge with microstate
category_link = "[[micronation]]s",
bare_category_parent = "quốc gia",
},
["microstate"] = {
link = true,
fallback = "country",
},
["military base"] = {
link = "w",
class = "settlement", -- or "man-made structure"?
default = {true},
},
["minster town"] = {
-- England
link = "separately",
fallback = "town",
},
["monarchy"] = {
link = true,
fallback = "polity",
},
["moor"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "ecosystems"},
default = {true},
},
["moorland"] = {
link = true,
fallback = "moor",
},
["motorway"] = {
link = true,
fallback = "road",
},
["mountain"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["mountain indigenous district"] = {
-- Taiwan
link = "+w:district (Taiwan)",
fallback = "district",
},
["mountain indigenous township"] = {
-- Taiwan
link = "+w:township (Taiwan)",
fallback = "township",
},
["mountain pass"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "mountain passes",
class = "natural feature",
addl_bare_category_parents = {"mountains"},
default = {true},
},
["mountain range"] = {
link = true,
fallback = "mountain",
},
["mountainous region"] = {
link = "separately",
fallback = "region",
},
["mukim"] = {
-- Malaysia, Brunei, Indonesia, Singapore
link = true,
preposition = "of",
class = "subpolity",
},
["municipal district"] = {
link = "w",
-- meaning varies depending on the country; for now, assume no neighborhoods.
-- FIXME: has_neighborhoods might have to be a function that looks at the containing holonyms.
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "municipality",
},
["municipality"] = {
link = true,
preposition = "of",
has_neighborhoods = true,
class = "subpolity",
},
["municipality with city status"] = {
link = "[[municipality]] with [[w:city status|city status]]",
plural = "municipalities with city status",
plural_link = "[[municipality|municipalities]] with [[w:city status|city status]]",
fallback = "municipality",
},
["museum"] = {
link = true,
fallback = "building",
},
["địa danh thần thoại"] = {
link = "địa danh thần thoại",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "địa danh",
default = {true},
},
["named bridges!"] = {
category_link = "notable [[bridge]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"bridges"},
},
["named buildings!"] = {
category_link = "notable [[house]]s, [[library|libraries]] and other [[building]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"buildings"},
},
["named roads!"] = {
category_link = "notable [[road]]s, [[highway]]s, [[trail]]s and similar linear structures",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"roads"},
},
["national capital"] = {
link = "w",
fallback = "capital city",
},
["national park"] = {
link = true,
fallback = "park",
},
["đặc điểm tự nhiên!"] = {
category_link = "tổng hợp các yếu tố vật chất hình thành tồn tại",
bare_category_parent = "địa danh",
},
["neighborhood"] = {
-- The majority of the properties here apply to both `neighborhoods` and `neighbourhoods`; the choice of which
-- one to use is made by district_neighborhood_cat_handler() based on the value of `british_spelling` for the
-- location (city, political division, etc.) of the holonym that follows the word "neighbo(u)hoods" in the
-- category name. It does *NOT* depend on whether the {{place}} call uses "neighborhoods" or "neighbourhoods".
-- (In general it can't, because other things like "urban areas", "districts", "subdivisions" and the like also
-- categorize as neighbo(u)rhoods.)
link = true,
-- See below. These are used by category handlers in [[Module:category tree/topic cat/data/Places]].
generic_before_non_cities = "in",
generic_before_cities = "of",
-- The following text is suitable for the top-level description of a neighborhood as well as categories of the
-- form `Neighborhoods in POLDIV` e.g. `Neighborhoods in Illinois, USA` but not for categories of the form
-- `Neighborhoods of Chicago`, where we'd get "... and other subportions of [[city|cities]] of [[Chicago]]".
category_link = "[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighborhood]]s, [[district]]s and other subportions",
-- NOTE: This setting is needed for administrative divisions like barangays that fall back to `neighborhood`,
-- when set in [[Module:place/locations]] for a specific country (e.g. the Philippines). The above settings
-- for `generic_before_non_cities` and `generic_before_cities` are used by category handlers in
-- [[Module:category tree/topic cat/data/Places]] for `Neighborhoods in POLDIV` and `Neighborhoods of CITY`
-- categories. In fact, district_neighborhood_cat_handler() does not currently pay attention to them, but
-- generates "of" before cities and "in" before non-cities regardless. (FIXME: We should change that.)
preposition = "of",
class = "non-admin settlement",
cat_handler = district_neighborhood_cat_handler,
},
["neighbourhood"] = {
link = true,
category_link = "[[neighbourhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighbourhood]]s, [[district]]s and other subportions",
fallback = "neighborhood",
},
["new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
preposition = "in",
class = "subpolity", --?
},
["new town"] = {
link = true,
fallback = "town",
},
["non-city capital"] = {
link = "[[capital]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
cat_handler = function(data)
return capital_city_cat_handler(data, "non-city")
end,
-- FIXME, do we need the following?
default = {true},
},
["non-metropolitan county"] = {
link = "w",
fallback = "county",
},
["non-metropolitan district"] = {
link = "w",
fallback = "local government district",
},
["non-sovereign kingdom"] = {
-- especially in Africa and Asia
link = "+w:non-sovereign monarchy",
generic_before_non_cities = "in",
class = "subpolity",
["country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["non-sovereign monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["oblasts and autonomous republics!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Ukraine.
category_link = "[[oblast]]s and [[w:autonomous republic|autonomous republic]]s",
class = "subpolity",
},
["ocean"] = {
link = true,
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"seas", "bodies of water"},
default = {true},
},
["okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["overseas collectivity"] = {
link = "w",
fallback = "collectivity",
},
["overseas department"] = {
link = "w",
fallback = "department",
},
["overseas territory"] = {
link = "w",
fallback = "dependent territory",
},
["parish"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["parish municipality"] = {
-- in Quebec, often similar to a rural village; the famous [[Saint-Louis-du-Ha! Ha!]] is one of them.
link = "+w:parish municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true,
},
["parish seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
class = "capital",
has_neighborhoods = true,
},
["park"] = {
link = true,
class = "man-made structure",
default = {true},
},
["pass"] = {
link = "+mountain pass",
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "passes",
fallback = "mountain pass",
},
["path"] = {
link = true,
fallback = "road",
},
["peak"] = {
link = true,
fallback = "mountain",
},
["peninsula"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["periphery"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["địa danh!"] = {
generic_before_non_cities = "của",
generic_before_cities = "của",
class = "generic place",
category_link = "[[place]]s of all sorts",
-- `category_link_top_level` control the description used in the top-level [[Category:Places]] and
-- language-specific variants such as [[Category:en:Places]]. The actual text for a language-spefic variant is
-- "{{{langname}}} names of [[geographical]] [[place]]s of all sorts; [[toponym]]s." where the "names of"
-- portion is automatically generated by the appropriate handler in
-- [[Module:category tree/topic cat/data/Places]].
category_link_top_level = "[[geographical]] [[place]]s of all sorts; [[toponym]]s",
bare_category_parent = "tên",
},
["planned community"] = {
-- Include this so we don't categorize 'planned community' into villages, as 'community' does.
link = true,
class = "settlement",
has_neighborhoods = true,
},
["plateau"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
-- FIXME: Should generate both "Plateaus" and the appropriate 'geographic and cultural area' category
},
["Polish colony"] = {
link = "[[w:colony (Poland)|colony]]",
affix_type = "suf",
affix = "colony",
fallback = "village",
has_neighborhoods = true,
},
["political divisions!"] = {
category_link = "[[political]] [[division]]s and [[subdivision]]s, such as [[state]]s, [[province]]s, [[county|counties]] or [[district]]s",
bare_category_parent = "places",
},
["tổ chức chính trị"] = {
link = true,
category_link = "[[independent]] or [[semi-]][[independent]] [[polity|polities]]",
class = "polity",
bare_category_parent = "địa danh",
default = {true},
},
["populated place"] = {
link = "+w:populated place",
-- not necessarily true, but usually is the case
fallback = "village",
},
["port"] = {
link = true,
class = "man-made structure",
default = {true},
},
["port city"] = {
-- FIXME: should categorize into "Ports" as well as "Cities"
link = true,
fallback = "city",
},
["port town"] = {
-- FIXME: should categorize into "Ports" as well as "Towns"
link = "w",
fallback = "town",
},
["prefecture"] = {
-- FIXME! `prefecture` is like a county in Japan and elsewhere but a department capital city in France.
-- May need `has_neighborhoods` to be a function.
link = true,
preposition = "of",
display_handler = prefecture_display_handler,
class = "subpolity",
},
["prefecture-level city"] = {
-- China; they are huge entities with a central city; not cities themselves.
link = "w",
preposition = "of",
class = "subpolity",
},
["preserved county"] = {
-- In Wales; they are former counties enshrined in law; there are 8 of them and each consists of one or more
-- "principal areas" (styled as "counties" or "county boroughs"), of which there are 22.
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["primary area"] = {
-- a grouping of "districts" (neighborhoods) in Gothenburg, Sweden
link = "+w:sv:primärområde",
fallback = "neighborhood",
},
["principality"] = {
link = true,
fallback = "monarchy",
},
["promontory"] = {
link = true,
fallback = "headland",
},
["protectorate"] = {
link = true,
fallback = "dependent territory",
},
["province"] = {
link = true,
preposition = "of",
display_handler = province_display_handler,
class = "subpolity",
},
["provinces and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case China.
category_link = "[[province]]s and [[autonomous region]]s",
class = "subpolity",
},
["provinces and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Canada and Pakistan.
category_link = "[[province]]s and [[territory|territories]]",
class = "subpolity",
},
["provincial capital"] = {
link = true,
fallback = "capital city",
},
["raion"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["ranch"] = {
link = true,
fallback = "farm",
},
["range"] = {
-- FIXME: Where is this used? Is it a mountain range?
link = true,
holonym_use_the = true,
class = "natural feature",
},
["regency"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["region"] = {
link = true,
preposition = "of",
-- If 'region' isn't a specific administrative division, fall back to 'geographic and cultural area'
fallback = "geographic and cultural area",
-- "former region" is a subpolity but traditional/historic(al)/ancient/medieval/etc. is a geographic region
class = "geographic region",
},
["regional capital"] = {
link = "separately",
fallback = "capital city",
},
["regional county municipality"] = {
-- Quebec
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"municipality", "county"},
fallback = "municipality",
},
["regional district"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "district",
},
["regional municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
},
["regional unit"] = {
link = "w",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["registration county"] = {
-- Used in Scotland for land registration purposes; formerly used in England, Wales and Ireland for statistical
-- purposes (registration of births, deaths and marriages, and for the output of census information).
link = "w",
fallback = "county",
},
["republic"] = {
-- Of Russia, Yugoslavia, etc. "Republics" in general are sovereign but we use "country" in that case.
link = true,
fallback = "constituent republic",
},
["research base"] = {
link = "+w:research station",
fallback = "research station",
},
["research station"] = {
link = "w",
class = "non-admin settlement", -- or "man-made structure"?
default = {true},
},
["reservoir"] = {
link = true,
fallback = "lake",
},
["residential area"] = {
link = "separately",
fallback = "neighborhood",
},
["resort city"] = {
link = "w",
fallback = "city",
},
["resort town"] = {
link = "w",
fallback = "town",
},
["river"] = {
link = true,
generic_before_non_cities = "in",
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
cat_handler = city_type_cat_handler,
["continent/*"] = {true},
default = {true},
},
["river island"] = {
link = "w",
fallback = "island",
},
["road"] = {
link = true,
class = "man-made structure",
default = {"Named roads"},
},
["Roman province"] = {
-- FIXME! Eliminate this in favor of 'former province|emp/Roman Empire'
link = "w",
default = {"Provinces of the Roman Empire"},
class = "subpolity",
},
["royal borough"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"royal", "borough"},
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["royal burgh"] = {
link = true,
fallback = "borough",
},
["royal capital"] = {
link = "w",
fallback = "capital city",
},
["rural committee"] = {
-- Hong Kong; a group of villages
link = "w",
affix_type = "Suf",
has_neighborhoods = true,
class = "settlement",
},
["rural community"] = {
-- New Brunswick
link = "+w:list of municipalities in New_Brunswick#Rural communities",
fallback = "municipality",
},
["rural hromada"] = {
link = "[[rural]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["rural municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
has_neighborhoods = true, --?
},
["rural township"] = {
-- Taiwan
link = "+w:rural township (Taiwan)",
fallback = "township",
},
["sanctuary"] = {
link = true,
fallback = "temple",
},
["satrapy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["sea"] = {
link = true,
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["seaport"] = {
link = true,
fallback = "port",
},
["seat"] = {
link = true,
fallback = "administrative centre",
},
["self-administered area"] = {
-- Myanmar (groups self-administered divisions and zones)
link = "+w:self-administered zone",
preposition = "of",
class = "subpolity",
},
["self-administered division"] = {
-- Myanmar (only one of them: Wa Self-Administered Division)
link = "w",
fallback = "self-administered area",
},
["self-administered zone"] = {
-- Myanmar (five of them)
link = "w",
fallback = "self-administered area",
},
["separatist state"] = {
link = "separately",
fallback = "unrecognized country",
},
["settlement"] = {
link = true,
category_link = "[[settlement]]s such as [[city|cities]], [[village]]s and [[farm]]s",
bare_category_parent = "places",
-- not necessarily true, but usually is the case
fallback = "village",
},
["settlement hromada"] = {
link = "[[w:Populated places in Ukraine#Rural settlements|settlement]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["sheading"] = {
-- Isle of Man
link = true,
fallback = "district",
},
["sheep station"] = {
-- Australia
link = true,
fallback = "farm",
},
["shire"] = {
link = true,
fallback = "county",
},
["shire county"] = {
link = "w",
fallback = "county",
},
["shire town"] = {
link = true,
fallback = "county seat",
},
["ski resort city"] = {
link = "[[ski resort]] [[city]]",
fallback = "city",
},
["ski resort town"] = {
link = "[[ski resort]] [[town]]",
fallback = "town",
},
["spa city"] = {
link = "+w:spa town",
fallback = "city",
},
["spa town"] = {
link = "w",
fallback = "town",
},
["space station"] = {
link = true,
fallback = "research station",
},
["special administrative region"] = {
-- in China; in practice they are city-like (Hong Kong, Macau); also [[Oecusse]] in East Timor is formally a
-- "special administrative region"; North Korea had one such region planned (Sinuiju) but abandoned; Indonesia
-- has similar "special regions" of Jakarta, Yogyakarta and Aceh; and South Sudan has three "special
-- administrative areas"
link = "+w:special administrative regions of China",
preposition = "of",
class = "subpolity",
has_neighborhoods = true, --?
-- no suffix since places in Hong Kong or Macau are listed without China, except Hong Kong and Macau themselves
-- they also contain regions (or areas), e.g. [[Kowloon]], so it would be confusing
suffix = "",
},
["special collectivity"] = {
link = "w",
fallback = "collectivity",
},
["special municipality"] = {
-- formerly linked to the Taiwan article but there are also special municipalities of the Netherlands
link = "w",
fallback = "municipality",
},
["special ward"] = {
-- Tokyo
link = true,
fallback = "municipality",
},
["spit"] = {
link = true,
fallback = "peninsula",
},
["spring"] = {
link = true,
class = "natural feature",
default = {true},
},
["star"] = {
link = true,
class = "natural feature",
default = {true},
},
["state"] = {
link = true,
preposition = "of",
class = "subpolity",
-- 'former/historical state' could refer either to a state of a country (a division) or a state = sovereign
-- entity. The latter appears more common (e.g. in various "ancient states" of East Asia).
former_type = "polity",
},
["states and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Australia.
category_link = "[[state]]s and [[territory|territories]]",
class = "subpolity",
},
["states and union territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case India.
category_link = "[[state]]s and [[union territory|union territories]]",
class = "subpolity",
},
["state capital"] = {
link = true,
fallback = "capital city",
},
["state park"] = {
link = true,
fallback = "park",
},
["state-level new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
fallback = "new area",
},
["statistical region"] = {
-- Slovenia
link = true,
fallback = "administrative region",
},
["statutory city"] = {
link = "w",
fallback = "city",
},
["statutory town"] = {
link = "w",
fallback = "town",
},
["strait"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["stream"] = {
link = true,
fallback = "river",
},
["street"] = {
link = true,
fallback = "road",
},
["strip"] = {
link = true,
fallback = "geographic region",
},
["strip of land"] = {
link = "[[strip]] of [[land]]",
plural = "strips of land",
plural_link = "[[strip]]s of [[land]]",
fallback = "geographic region",
},
["sub-metropolitan city"] = {
link = "+w:List of cities in Nepal#Sub-metropolitan cities",
fallback = "city",
},
["sub-prefectural city"] = {
link = "w",
fallback = "subprovincial city",
},
["subdistrict"] = {
link = true,
preposition = "of",
has_neighborhoods = true, --?
-- FIXME: subdistricts can be neighborhood-like (of Jakarta) or larger (in China); need a handler
class = "subpolity",
default = {true},
},
["subdivision"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- FIXME: subdivisions can be neighborhood-like or larger; need a handler
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
},
["submerged ghost town"] = {
-- FIXME: Consider just having "submerged" as a qualifier.
link = "[[submerged]] [[ghost town]]",
fallback = "ghost town",
},
["subnational kingdom"] = {
link = "+w:subnational monarchy",
fallback = "non-sovereign kingdom",
},
["subnational monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["subprefecture"] = {
link = true,
affix_type = "suf",
preposition = "of",
class = "subpolity",
},
["subprovince"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["subprovincial city"] = {
link = "w",
-- China; special status given to certain prefecture-level cities
fallback = "prefecture-level city",
},
["subprovincial district"] = {
link = "w",
-- China; special status given to Binhai New Area and Pudong New Area, which are county-level districts
preposition = "of",
class = "subpolity",
},
["subregion"] = {
link = true,
fallback = "geographic region",
},
["suburb"] = {
link = true,
-- The following text is suitable for the top-level description of a suburb as well as categories of the form
-- 'Suburbs in POLDIV' e.g. 'Suburbs in Illinois, USA' but not for categories of the form 'Suburbs of Chicago',
-- where we'd get "[[suburb]]s of [[city|cities]] of [[Chicago]]".
category_link = "[[suburb]]s of [[city|cities]]",
category_link_before_city = "[[suburb]]s",
-- See comments under "neighborhood" for the following three settings. They are used by
-- [[Module:category tree/topic cat/data/Places]] for generating the text of 'Suburbs in/of PLACE' categories
-- but currently ignored by district_neighborhood_cat_handler (which actually generates the categories for a
-- given page), which hardcodes "in" for non-cities and "of" for cities. (FIXME: Change this.)
generic_before_non_cities = "in",
generic_before_cities = "of",
preposition = "of",
has_neighborhoods = true, --?
class = "non-admin settlement", --?
cat_handler = district_neighborhood_cat_handler,
},
["suburban area"] = {
link = "w",
fallback = "suburb",
},
["subway station"] = {
link = "w",
fallback = "metro station",
},
["sum"] = {
-- In China, Mongolia, Russia; something like a county in Mongolia but a township in China (Inner Mongolia),
-- and equivalent to a [[selsoviet]] in the parts of Russia where it's in use (a rural council, below a raion).
link = "+w:sum (administrative division)",
-- This fallback is somewha arbitrary. We could use "county" but that has a display handler
-- which we don't want to be active (FIXME: If the display handler would be active, that's a bug).
fallback = "division",
},
["supercontinent"] = {
link = true,
fallback = "continent",
},
["tehsil"] = {
link = true,
affix_type = "suf",
no_affix_strings = {"tehsil", "tahsil"},
class = "subpolity",
},
["temple"] = {
link = true,
fallback = "building",
},
["territorial authority"] = {
link = "w",
fallback = "district",
},
["territory"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["theme"] = {
link = "+w:theme (Byzantine district)",
preposition = "of",
class = "subpolity",
},
["town"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["town with bystatus"] = {
-- can't use templates in links currently
link = "[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]",
plural = "towns with bystatus",
plural_link = "[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]",
fallback = "town",
},
["township"] = {
link = true,
has_neighborhoods = true,
class = "settlement", --?
default = {true},
},
["township municipality"] = {
-- Quebec
link = "+w:township municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["traditional county"] = {
link = true,
fallback = "county",
},
["traditional region"] = {
-- FIXME: Verify this works. Same for 'historic(al) region'.
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["trail"] = {
link = true,
fallback = "road",
},
["treaty port"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"FORMER"},
},
["tributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["underground station"] = {
link = "w",
fallback = "metro station",
},
["unincorporated area"] = {
link = "w",
-- I don't know if this fallback makes sense everywhere.
fallback = "unincorporated community",
},
["unincorporated community"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
},
["unincorporated territory"] = {
link = "w",
fallback = "territory",
},
["union territory"] = {
-- India
link = true,
preposition = "of",
entry_placetype_indefinite_article = "a",
class = "subpolity",
},
["unitary authority"] = {
-- UK, New Zealand
link = true,
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["unitary district"] = {
link = "w",
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["united township municipality"] = {
-- Quebec
link = "+w:united township municipality (Quebec)",
entry_placetype_indefinite_article = "a",
fallback = "township municipality",
has_neighborhoods = true, --?
},
["university"] = {
link = true,
entry_placetype_indefinite_article = "a",
class = "man-made structure",
default = {true},
},
["unrecognised country"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized and nearly unrecognized countries!"] = {
category_link = "[[de facto]] [[independent]] [[state]]s with little or no {{w|international recognition}}",
bare_category_parent = "country-like entities",
},
["unrecognized country"] = {
link = "w",
class = "polity",
default = {"Unrecognized and nearly unrecognized countries"},
},
["unrecognised state"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized state"] = {
link = "w",
fallback = "unrecognized country",
},
["urban area"] = {
link = "separately",
fallback = "neighborhood",
},
["urban hromada"] = {
link = "[[urban]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["urban service area"] = {
-- A strange beast existing in Alberta; technically a type of hamlet but in practice used for much larger
-- cities and treated equivalent to a city. (There are only two of them, [[Fort McMurray]] and [[Sherwood Park]]).
link = "w",
fallback = "city",
},
["urban township"] = {
link = "w",
fallback = "township",
},
["urban-type settlement"] = {
-- appears to be a particular type of small urban settlement in post-Soviet states,
-- had an administrative function.
link = "w",
fallback = "town",
},
["valley"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "water"},
default = {true},
},
["viceroyalty"] = {
-- in essence, a type of colony
link = true,
fallback = "dependent territory",
},
["village"] = {
link = true,
generic_before_non_cities = "in",
category_link = "[[village]]s, [[hamlet]]s, and other small [[community|communities]] and [[settlement]]s",
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["village development committee"] = {
-- former administrative structure in Nepal; also exists in India but not as a formal unit
link = "+w:village development committee (Nepal)",
inherently_former = {"FORMER"},
fallback = "village",
},
["village municipality"] = {
-- Quebec
link = "+w:village municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["voivodeship"] = {
-- Poland
link = true,
display_handler = voivodeship_display_handler,
preposition = "of",
class = "subpolity",
},
["volcano"] = {
link = true,
plural = "volcanoes",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true, "Mountains"},
},
["ward"] = {
link = true,
class = "settlement",
-- Wards are formal administrative divisions of a city but have some properties of neighborhoods.
fallback = "neighborhood",
},
["watercourse"] = {
link = true,
fallback = "channel",
},
["Welsh community"] = {
-- Wales
link = "[[w:community (Wales)|community]]",
preposition = "of",
affix_type = "suf",
affix = "community",
has_neighborhoods = true,
class = "settlement",
},
["zone"] = {
-- administrative division of Ethiopia, Qatar, Nepal, India
link = "+w:zone#Place names",
preposition = "of",
class = "subpolity",
},
----------------------------------------------------------------------------------------------
-- Categories for former places --
----------------------------------------------------------------------------------------------
["ANCIENT capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
-- FIXME: Consider removing 'ancient settlements' here. Ancient capitals, like former capitals, often still
-- exist but just aren't the capital any more. Maybe we should have an 'Ancient capitals' category.
default = {"Ancient settlements", "Former capitals"},
},
["ANCIENT non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "ANCIENT settlement",
},
["ANCIENT settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Ancient settlements"},
},
["ancient settlements!"] = {
category_link = "former [[city|cities]], [[town]]s and [[village]]s that existed in [[antiquity]]",
bare_category_parent = "former settlements",
},
["FORMER capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
default = {"Former capitals"},
},
["former capitals!"] = {
category_link = "former [[capital]] [[city|cities]] and [[town]]s",
bare_category_parent = "settlements",
},
["former counties and county-level cities!"] = {
-- For categorizing former counties and county-level cities of China
category_link = "no-longer existing [[county|counties]] and [[county-level city|county-level cities]]",
bare_category_breadcrumb = "counties and county-level cities",
bare_category_parent = "former political divisions",
},
["FORMER county"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER county-level city"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["former countries and country-like entities!"] = {
category_link = "[[country|countries]] and similar [[polity|polities]] that no longer exist",
bare_category_breadcrumb = "countries and country-like entities",
bare_category_parent = "former polities",
},
["FORMER country"] = {
link = false,
class = "polity",
default = {"Former countries and country-like entities"},
},
["former dependent territories!"] = {
category_link = "[[w:dependent territory|dependent territories]] (colonies, dependencies, protectorates, etc.) that no longer exist",
bare_category_breadcrumb = "dependent territories",
bare_category_parent = "former political divisions",
},
["FORMER dependent territory"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former dependent territories"},
},
["former districts!"] = {
-- For categorizing former districts of China
category_link = "no-longer-existing [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "former political divisions",
},
["FORMER district"] = {
-- For categorizing former districts of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER geographic region"] = {
link = false,
fallback = "geographic and cultural area",
},
["FORMER man-made structure"] = {
link = false,
class = "man-made structure",
default = {"Former man-made structures"},
},
["former man-made structures!"] = {
category_link = "man-made structures such as [[airport]]s and [[park]]s that no longer exist",
bare_category_breadcrumb = "man-made structures",
bare_category_parent = "former places",
},
["former municipalities!"] = {
-- For categorizing former municipalities of the Netherlands
category_link = "no-longer-existing [[municipality|municipalities]]",
bare_category_breadcrumb = "municipalities",
bare_category_parent = "former political divisions",
},
["FORMER municipality"] = {
-- For categorizing former municipalities of the Netherlands
link = false,
fallback = "FORMER subpolity",
},
["FORMER natural feature"] = {
link = false,
class = "natural feature",
default = {"Former natural features"},
},
["former natural features!"] = {
category_link = "natural features such as [[lake]]s, [[river]]s and [[island]]s that no longer exist",
bare_category_breadcrumb = "natural features",
bare_category_parent = "former places",
},
["FORMER non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "FORMER settlement",
},
["former places!"] = {
category_link = "[[place]]s of all sorts that no longer exist",
bare_category_breadcrumb = "former",
bare_category_parent = "places",
},
["former political divisions!"] = {
category_link = "[[political]] [[division]]s (states, provinces, counties, etc.) that no longer exist",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former places",
},
["former polities!"] = {
category_link = "[[polity|polities]] (countries, kingdoms, empires, etc.) that no longer exist",
bare_category_breadcrumb = "polities",
bare_category_parent = "former places",
},
["FORMER polity"] = {
link = false,
class = "polity",
default = {"Former polities"},
},
["former prefectures!"] = {
-- For categorizing former prefectures of China
category_link = "no-longer-existing [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "former political divisions",
},
["FORMER prefecture"] = {
-- For categorizing former prefectures of China
link = false,
fallback = "FORMER subpolity",
},
["former provinces!"] = {
-- For categorizing former provinces of China, etc.
category_link = "no-longer-existing [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "former political divisions",
},
["FORMER province"] = {
-- For categorizing ancient/historical/former provinces of the Roman Empire
link = false,
fallback = "FORMER subpolity",
},
["former region"] = {
-- A former region is considered a former political division, but not a 'historical/traditional/etc.' region.
link = "separately",
preposition = "of",
inherently_former = {"FORMER"},
class = "subpolity",
},
["FORMER settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Former settlements"},
},
["former settlements!"] = {
category_link = "[[city|cities]], [[town]]s and [[village]]s that no longer exist or have been merged or reclassified",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former political divisions",
},
["FORMER subpolity"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former political divisions"},
},
----------------------------------------------------------------------------------------------
-- form-of categories --
----------------------------------------------------------------------------------------------
---------- Abbreviations ----------
["abbreviations of counties!"] = {
-- For categorizing abbreviations of counties of e.g. England
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[county|counties]]",
bare_category_breadcrumb = "counties",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of places",
},
["abbreviations of departments!"] = {
-- For categorizing abbreviations of departments of e.g. France
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[department]]s",
bare_category_breadcrumb = "departments",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of districts!"] = {
-- For categorizing abbreviations of districts of e.g. ???
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of divisions!"] = {
-- For categorizing abbreviations of divisions of e.g. Bangladesh
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[division]]s",
bare_category_breadcrumb = "divisions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of former countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of former places",
},
["abbreviations of former places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "abbreviations of places", sort = "former"}},
},
["abbreviations of places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "places",
},
["abbreviations of political divisions!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[political]] [[division]]s",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "abbreviations of places",
},
["abbreviations of prefectures!"] = {
-- For categorizing abbreviations of prefectures of e.g. Japan
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces!"] = {
-- For categorizing abbreviations of provinces of e.g. Canada
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s and [[territory|territories]]",
bare_category_breadcrumb = "provinces and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of regions!"] = {
-- For categorizing abbreviations of regions of e.g. Italy
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[administrative region]]s",
bare_category_breadcrumb = "regions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states!"] = {
-- For categorizing abbreviations of states of e.g. the United States
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[territory|territories]]",
bare_category_breadcrumb = "states and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and union territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[union territory|union territories]]",
bare_category_breadcrumb = "states and union territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[territory|territories]]",
bare_category_breadcrumb = "territories",
bare_category_parent = "abbreviations of political divisions",
},
["ABBREVIATION_OF country"] = {
link = false,
default = {"Abbreviations of countries"},
},
["ABBREVIATION_OF county"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF department"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF district"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF division"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF FORMER country"] = {
link = false,
default = {"Abbreviations of former countries"},
},
["ABBREVIATION_OF FORMER place"] = {
link = false,
default = {"Abbreviations of former places"},
},
["ABBREVIATION_OF place"] = {
link = false,
default = {"Abbreviations of places"},
},
["ABBREVIATION_OF prefecture"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF province"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF region"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF state"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF subpolity"] = {
link = false,
default = {"Abbreviations of political divisions"},
},
["ABBREVIATION_OF territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF union territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
---------- Archaic forms ----------
["archaic forms of places!"] = {
full_category_link = "{{glossary|archaic}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "archaic forms",
bare_category_parent = "places",
},
["ARCHAIC_FORM_OF place"] = {
link = false,
default = {"Archaic forms of places"},
},
---------- Clippings ----------
["clippings of places!"] = {
full_category_link = "{{glossary|clipping}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "clippings",
bare_category_parent = "places",
},
["CLIPPING_OF place"] = {
link = false,
default = {"Clippings of places"},
},
---------- Dated forms ----------
["dated forms of places!"] = {
full_category_link = "{{glossary|dated}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "dated forms",
bare_category_parent = "places",
},
["DATED_FORM_OF place"] = {
link = false,
default = {"Dated forms of places"},
},
---------- Derogatory names ----------
["derogatory names for cities!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[city|cities]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["derogatory names for continents!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for continents"},
},
["derogatory names for countries!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for countries"},
},
["derogatory names for places!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[place]]s",
bare_category_breadcrumb = "derogatory names",
bare_category_parent = "nicknames for places",
},
["derogatory names for states!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for states"},
},
["DEROGATORY_NAME_FOR capital"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR city"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR continent"] = {
link = false,
default = {"Derogatory names for continents"},
},
["DEROGATORY_NAME_FOR country"] = {
link = false,
default = {"Derogatory names for countries"},
},
["DEROGATORY_NAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR place"] = {
link = false,
default = {"Derogatory names for places"},
},
["DEROGATORY_NAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR state"] = {
link = false,
default = {"Derogatory names for states"},
},
["DEROGATORY_NAME_FOR town"] = {
link = false,
default = {"Derogatory names for cities"},
},
---------- Ellipses ----------
["ellipses of places!"] = {
full_category_link = "{{glossary|ellipsis|ellipses}} of [[name]]s of [[place]]s",
bare_category_breadcrumb = "ellipses",
bare_category_parent = "places",
},
["ELLIPSIS_OF place"] = {
link = false,
default = {"Ellipses of places"},
},
---------- Former long-form names ----------
["former long-form names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former long-form names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "long-form"}},
},
["former long-form names of places!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form",
bare_category_parent = "former names of places",
},
["FORMER_LONG_FORM_OF country"] = {
link = false,
default = {"Former long-form names of countries"},
},
["FORMER_LONG_FORM_OF place"] = {
link = false,
default = {"Former long-form names of places"},
},
---------- Former names ----------
["former names of capitals!"] = {
full_category_link = "[[former]] [[name]]s of [[capital city|capital cities]] that generally still exist but under a different name",
bare_category_breadcrumb = "capitals",
bare_category_parent = "former names of settlements",
},
["former names of countries!"] = {
full_category_link = "[[former]] [[name]]s of [[country|countries]] that generally still exist but under a different name",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former names of places",
},
["former names of places!"] = {
full_category_link = "[[former]] [[name]]s of [[place]]s that generally still exist but under a different name",
bare_category_breadcrumb = "former names",
bare_category_parent = "places",
},
["former names of political divisions!"] = {
full_category_link = "[[former]] [[name]]s of [[political]] [[division]]s (states, provinces, counties, etc.) that generally still exist but under a different name",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former names of places",
},
["former names of polities!"] = {
full_category_link = "[[former]] [[name]]s of [[polity|polities]] (e.g. [[country|countries]]) that generally still exist but under a different name",
bare_category_breadcrumb = "polities",
bare_category_parent = "former names of places",
},
["former names of settlements!"] = {
full_category_link = "[[former]] [[name]]s of [[city|cities]], [[town]]s, [[village]]s, etc. that generally still exist but under a different name",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former names of political divisions",
},
["FORMER_NAME_OF capital"] = {
link = false,
default = {"Former names of capitals"},
},
["FORMER_NAME_OF country"] = {
link = false,
default = {"Former names of countries"},
},
["FORMER_NAME_OF place"] = {
link = false,
default = {"Former names of places"},
},
["FORMER_NAME_OF polity"] = {
link = false,
default = {"Former names of polities"},
},
["FORMER_NAME_OF region"] = {
link = false,
fallback = "FORMER_NAME_OF subpolity",
},
["FORMER_NAME_OF settlement"] = {
link = false,
default = {"Former names of settlements"},
},
["FORMER_NAME_OF subpolity"] = {
link = false,
default = {"Former names of political divisions"},
},
---------- Former nicknames ----------
["former nicknames for cities!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[city|cities]], e.g. the [[Eternal City]] for [[Kyoto]] during the {{w|Heian period}} ({{circa2|800–1100|short=yes}} {{AD}})",
bare_category_breadcrumb = "cities",
bare_category_parent = "former nicknames for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["former nicknames for places!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "former",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {{name = "former names of places", sort = "nicknames"}},
},
["FORMER_NICKNAME_FOR capital"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR city"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR place"] = {
link = false,
default = {"Former nicknames for places"},
},
["FORMER_NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR town"] = {
link = false,
default = {"Former nicknames for cities"},
},
---------- Former official names ----------
["former official names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former official names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "official"}},
},
["former official names of places!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "former names of places",
},
["FORMER_OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Former official names of countries"},
},
["FORMER_OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Former official names of places"},
},
---------- Long-form names ----------
["long-form names of countries!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "long-form names of places",
},
["long-form names of places!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form names",
bare_category_parent = "places",
},
["LONG_FORM_OF country"] = {
link = false,
default = {"Long-form names of countries"},
},
["LONG_FORM_OF place"] = {
link = false,
default = {"Long-form names of places"},
},
---------- Nicknames ----------
["nicknames for cities!"] = {
full_category_link = "[[nickname]]s for [[city|cities]], e.g. the [[Big Apple]] for [[New York City]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"cities"},
},
["nicknames for continents!"] = {
full_category_link = "[[nickname]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"continents"},
},
["nicknames for countries!"] = {
full_category_link = "[[nickname]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"quốc gia"},
},
["nicknames for places!"] = {
full_category_link = "[[nickname]]s for [[place]]s",
bare_category_breadcrumb = "places",
bare_category_parent = "nicknames",
addl_bare_category_parents = {"places"},
},
["nicknames for states!"] = {
-- For categorizing nicknames for states of e.g. the United States
full_category_link = "[[nicknames]] for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"states"},
},
["NICKNAME_FOR capital"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR city"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR continent"] = {
link = false,
default = {"Nicknames for continents"},
},
["NICKNAME_FOR country"] = {
link = false,
default = {"Nicknames for countries"},
},
["NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR place"] = {
link = false,
default = {"Nicknames for places"},
},
["NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR state"] = {
link = false,
default = {"Nicknames for states"},
},
["NICKNAME_FOR town"] = {
link = false,
default = {"Nicknames for cities"},
},
---------- Obsolete forms ----------
["obsolete forms of places!"] = {
full_category_link = "{{glossary|obsolete}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "obsolete forms",
bare_category_parent = "places",
},
["OBSOLETE_FORM_OF place"] = {
link = false,
default = {"Obsolete forms of places"},
},
---------- Official names ----------
["official names of countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of places",
},
["official names of former countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of former places",
},
["official names of former places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "official names",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "official names of places", sort = "former"}},
},
["official names of places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official names",
bare_category_parent = "places",
},
["OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Official names of countries"},
},
["OFFICIAL_NAME_OF FORMER country"] = {
link = false,
default = {"Official names of former countries"},
},
["OFFICIAL_NAME_OF FORMER place"] = {
link = false,
default = {"Official names of former places"},
},
["OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Official names of places"},
},
---------- Official nicknames ----------
["official nicknames for places!"] = {
full_category_link = "[[official]] [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for places",
},
["official nicknames for states!"] = {
-- For categorizing official nicknames for states of e.g. the United States
full_category_link = "[[official]] [[nicknames]] for [[state]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for states",
addl_bare_category_parents = {"states"},
},
["OFFICIAL_NICKNAME_FOR place"] = {
link = false,
default = {"Official nicknames for places"},
},
["OFFICIAL_NICKNAME_FOR state"] = {
link = false,
default = {"Official nicknames for states"},
},
}
export.plural_placetype_to_singular = {}
for sg_placetype, spec in pairs(export.placetype_data) do
if spec.plural then
export.plural_placetype_to_singular[spec.plural] = sg_placetype
end
end
return export
h3sq0ou7ztjq8cbcugstmvzjw4v048e
2350216
2350205
2026-05-05T04:13:17Z
Hiyuune
50834
2350216
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true for testing
local m_locations = require("Module:place/locations")
local m_links = require("Module:links")
local m_table = require("Module:table")
local m_strutils = require("Module:string utilities")
local debug_track_module = "Module:debug/track"
local en_utilities_module = "Module:en-utilities"
local dump = mw.dumpObject
local insert = table.insert
local concat = table.concat
local internal_error = m_locations.internal_error
export.internal_error = internal_error
local process_error = m_locations.process_error
export.process_error = process_error
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local ucfirst = m_strutils.ucfirst
local ulower = m_strutils.lower
local rmatch = m_strutils.match
local split = m_strutils.split
--[==[ intro:
This module contains placetype data used by [[Module:place]] and {{tl|place}}, along with a significant amount of code
to work with both placetypes and locations, as well as some placename-related info (FIXME: Consider moving it to
[[Module:place/locations]]). See also [[Module:place/locations]], which has definitions of all known locations. You must
currently load this module using {{cd|require()}}, not using {{cd|mw.loadData()}}.
In particular, it contains two fundamental and tricky functions:
# `get_placetype_equivs`, which finds the equivalent placetypes to look under in order to find a given property, and in
the process correctly handles placetypes with qualifiers (including qualifiers that act similar to "type-raising"
operators in that they do something non-trivial to the placetype to their right) as well as form-of directives and
fallbacks.
# `find_matching_holonym_location`, which looks up a holonym to find a matching known location, but in the process
checks holonyms to the right to make sure there isn't a clash between the user-specified containing holonyms and the
containers of the known location being considered. This is done to prevent overcategorizing when either there are two
known locations with the same name (e.g. Birmingham in England and Birmingham, Alabama in the US), or more generally
two locations with the same name, one of which is a known location but where the other is not (e.g. we're processing
non-known-location Mérida, Spain and don't want it categorized like known location Mérida, Yucatán, Mexico).
Both of these functions are invoked repeatedly, and probably are invoked several times on the same inputs and as a
result are candidates for memoization to speed up the operation of {{tl|place}}.
]==]
------------------------------------------------------------------------------------------
-- Basic utilities --
------------------------------------------------------------------------------------------
--[==[
Return true if `force_cat` is set either in this module or in [[Module:place/locations]].
]==]
function export.get_force_cat()
return export.force_cat or m_locations.force_cat
end
-- Add the page to a tracking "category". To see the pages in the "category",
-- go to [[Wiktionary:Tracking/place/PAGE]] and click on "What links here".
local function track(page)
require(debug_track_module)("place/" .. page)
return true
end
function export.remove_links_and_html(text)
text = m_links.remove_links(text)
return text:gsub("<.->", "")
end
--[==[
Return the singular version of a maybe-plural placetype, or nil if not plural. This correctly handles placetypes with
irregular plurals such as `kibbutzim` plural of `kibbutz` by looking up in a table constructed from the `plural` values
specified in `placetype_data`. If a special plural value is not found, the regular singularization algorithm in
[[Module:en-utilities]] is invoked, which reverses the y -> ies change after vowels and the 'es' addition after sh/ch/x,
and otherwise just subtracts a final 's' (which will incorrectly generate 'passe' for plural 'passes'; FIXME: consider
changing this for words ending in '-sses'). If the generated singular is the same as the passed-in value, nil is
returned.
]==]
function export.maybe_singularize_placetype(placetype)
if not placetype then
return nil
end
if export.plural_placetype_to_singular[placetype] then
return export.plural_placetype_to_singular[placetype]
end
local retval = require(en_utilities_module).singularize(placetype)
if retval == placetype then
return nil
end
return retval
end
-- Return the correct plural of a placetype, and (if `do_ucfirst` is given) make the first letter uppercase. We first
-- look up the plural in `placetype_data`, falling back to pluralize() in [[Module:en-utilities]], which is almost
-- always correct.
function export.pluralize_placetype(placetype, do_ucfirst)
local ptdata = export.placetype_data[placetype]
if ptdata and ptdata.plural then
placetype = ptdata
else
placetype = placetype
end
if do_ucfirst then
return ucfirst(placetype)
else
return placetype
end
end
--[==[
Get the data associated with a placetype, which may be in its singular or plural form. If `from_category` is specified,
we also look for category-only placetypes (generally plural) followed by `!`. Return three values: (a) the placetype
under which the data can be looked up (i.e. in its singular form if the passed-in `placetype` is plural and did not
match a category-only placetype followed by `!`); (b) the placetype data structure; (c) the type of `placetype` match
that occurred, one of `"direct"` if the canonical placetype is the same as the passed-in `placetype` and also the same
as the key under which `ptdata` was looked up, or `"direct-category"` if the `ptdata` was looked up under a key formed
from the passed-in `placetype` by adding `!`, or `"plural"` if the `ptdata` was looked up under the singularized version
of the plural passed-in `placetype`.
]==]
function export.get_placetype_data(placetype, from_category)
local ptdata = export.placetype_data[placetype]
if ptdata then
return placetype, ptdata, "direct"
end
if from_category then
ptdata = export.placetype_data[placetype .. "!"]
if ptdata then
return placetype .. "!", ptdata, "direct-category"
end
end
local sg_placetype = export.maybe_singularize_placetype(placetype)
if sg_placetype then
ptdata = export.placetype_data[sg_placetype]
if ptdata then
return sg_placetype, ptdata, "plural"
end
end
return nil
end
--[==[
Check for special pseudo-placetypes that should be ignored for categorization purposes.
]==]
function export.placetype_is_ignorable(placetype)
return placetype == "and" or placetype == "or" or placetype:find("^%(")
end
function export.resolve_placetype_aliases(placetype)
return export.placetype_aliases[placetype] or placetype
end
--[==[
Return a property from `placetype_data` for a given placetype. If the placetype isn't found in `placetype_data`, or the
key isn't found in the placetype's entry in `placetype_data`, return nil.
]==]
function export.get_placetype_prop(placetype, key)
-- Usually we are called on equivalent placetypes returned from `get_placetype_equivs`, in which case placetype
-- aliases have been resolved, but sometimes not, e.g. when fetching the indefinite article in
-- get_placetype_article(). `resolve_placetype_aliases` is just a simple lookup and it doesn't hurt to do it twice.
placetype = export.resolve_placetype_aliases(placetype)
if export.placetype_data[placetype] then
return export.placetype_data[placetype][key]
else
return nil
end
end
--[==[
Given a placetype, split the placetype into one or more potential ''splits'', each consisting of a three-element list
{ {``prev_qualifiers``, ``this_qualifier``, ``reduced_placetype``}}, i.e.
# the concatenation of zero or more previously-recognized qualifiers on the left, normally canonicalized (if there are
zero such qualifiers, the value will be nil);
# a single recognized qualifier, normally canonicalized (if there is no qualifier, the value will be nil);
# the "reduced placetype" on the right.
Splitting between the qualifier in (2) and the reduced placetype in (3) happens at each space character, proceeding from
left to right, and stops if a qualifier isn't recognized. All placetypes are canonicalized by checking for aliases
in `placetype_aliases`, but no other checks are made as to whether the reduced placetype is recognized. Canonicalization
of qualifiers does not happen if `no_canon_qualifiers` is specified.
For example, given the placetype `"small beachside unincorporated community"`, the return value will be
{ {
{nil, nil, "small beachside unincorporated community"},
{nil, "small", "beachside unincorporated community"},
{"small", "[[beachfront]]", "unincorporated community"},
{"small [[beachfront]]", "[[unincorporated]]", "community"},
}}
Here, `"beachside"` is canonicalized to `"[[beachfront]]"` and `"unincorporated"` is canonicalized to
`"[[unincorporated]]"`, in both cases according to the entry in `placetype_qualifiers`.
On the other hand, if given `"small former haunted community"`, the return value will be
{ {
{nil, nil, "small former haunted community"},
{nil, "small", "former haunted community"},
{"small", "former", "haunted community"},
}}
because `"small"` and `"former"` but not `"haunted"` are recognized as qualifiers.
Finally, if given `"former adr"`, the return value will be
{ {
{nil, nil, "former adr"},
{nil, "former", "administrative region"},
}}
because `"adr"` is a recognized placetype alias for `"administrative region"`.
]==]
function export.split_qualifiers_from_placetype(placetype, no_canon_qualifiers)
local splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
local prev_qualifier = nil
while true do
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if canon == nil then
break
end
local new_qualifier = qualifier
if type(canon) == "table" then
canon = canon.link
end
if not no_canon_qualifiers and canon ~= false then
if canon == true then
new_qualifier = "[[" .. qualifier .. "]]"
else
new_qualifier = canon
end
end
insert(splits, {prev_qualifier, new_qualifier, export.resolve_placetype_aliases(reduced_placetype)})
prev_qualifier = prev_qualifier and prev_qualifier .. " " .. new_qualifier or new_qualifier
placetype = reduced_placetype
else
break
end
end
return splits
end
--[==[
Given a `placetype` (which may be pluralized), return an ordered list of equivalent placetypes to look under to find the
placetype's properties (such as the category or categories to be inserted). The return value is actually an ordered list
of objects of the form `{qualifier=``qualifier``, placetype=``equiv_placetype``}` where ``equiv_placetype`` is a
placetype whose properties to look up, derived from the passed-in placetype or from a contiguous subsequence of the
words in the passed-in placetype (always including the rightmost word in the placetype, i.e. we successively chop off
qualifier words from the left and use the remainder to find equivalent placetypes). ``qualifier`` is the remaining words
not part of the subsequence used to find ``equiv_placetype``; or nil if all words in the passed-in placetype were used
to find ``equiv_placetype``. (FIXME: This qualifier is not currently used anywhere.) Only placetypes for which there is
an entry in `placetype_data` are included. The placetype passed in is always checked first, and will form the first
entry if it exists in `placetype_data`.
'''NOTE:''' This is a tricky function as it implements handling of (a) qualifiers, (b) fallback logic, (c)
"type-raising" qualifiers such as `former`/`ancient`/etc. as well as `fictional` and `mythological`, and (d) form-of
directives, which act somewhat similarly to `former`, and allows interaction between more than one of these
simultaneously (e.g. official names of former places, which have their own categorization).
If {{tl|place}} gets too slow, one potential speedup is to memoize the results of this function, as it appears to be
getting called more than once on the same inputs. Another similar potential speedup is to memoize the results of
`iterate_matching_holonym_location()`.
For example, given the placetype `left tributary`, the following placetype/qualifier combinations are checked in turn:
```
{qualifier = nil, placetype="left tributary"}
{qualifier = "left", placetype="tributary"}
{qualifier = "left", placetype="river"}
```
and the return value will be
{ {
{qualifier = "left", placetype="tributary"},
{qualifier = "left", placetype="river"},
}}
The algorithm first enters the placetype itself into the list, then checks for `left tributary` as a recognized
placetype in `placetype_data` and doesn't find it, so it doesn't enter it into the returned list (if it found it, it
would add it as well as any fallbacks directly after it). It then splits off the recognized qualifier `left` to form the
''reduced placetype'' `tributary`, which is entered into the list because it is found in `placetype_data`. Then, because
it has a fallback `river`, which exists in `placetype_data`, the fallback is entered next.
Another example is `small rural fraziones` (where a ''frazione'' is type of subdivision of a ''comune'' or municipality,
often specifically an outlying hamlet). the placetype/qualifier combinations checked are:
```
{qualifier = nil, placetype="small rural fraziones"}
{qualifier = nil, placetype="small rural frazione"}
{qualifier = "small", placetype="rural fraziones"}
{qualifier = "small", placetype="rural frazione"}
{qualifier = "small [[rural]]", placetype="fraziones"}
{qualifier = "small [[rural]]", placetype="frazione"}
{qualifier = "small [[rural]]", placetype="hamlet"}
{qualifier = "small [[rural]]", placetype="village"}
```
The return value ends up as
{qualifier = "small [[rural]]", placetype="frazione"},
{qualifier = "small [[rural]]", placetype="hamlet"},
{qualifier = "small [[rural]]", placetype="village"},
}}
Here, because the result of singularizing `fraziones` returns a different value from the placetype itself, that
singularized value is checked after the original plural value. Also, in the process of splitting off qualifiers,
they are canonicalized if the entry in `placetype_qualifiers` says to do so; in this case, links are placed around
`rural`. Finally, `frazione` has `hamlet` as its fallback, which in turn has `village` as its fallback, so both
fallbacks end up being returned.
`no_fallback`, if set, disables returning equivalent placetypes based on the `fallback` setting for a placetype. This is
used in the first of two loops in find_placetype_cat_specs() in [[Module:place]] to prefer exact matches for placetypes
such as barangays with later holonyms to matches based on a fallback such as `neighborhood` with an earlier holonym.
See the comment in that function in [[Module:place]] for a more detailed explanation of why this is needed. Only the
placetype itself, and any reduced placetypes created by chopping off recognized qualifiers at the beginning, are
returned; but we do not return reduced placetypes if a containing placetype exists in `placetype_data`. (For example,
`"overseas territory"` has a fallback `"dependent territory"`, and `"overseas"` is also a recognized qualifier. When
`no_fallback` is in place, without the above proviso, we would return `"overseas territory"` followed by `"territory"`
with the incorrect effect of classifying an `"overseas territory"` of the United Kingdom such as `"Gibraltar"` under
[[:Category:Territories of the United Kingdom]] instead of [[:Category:Dependent territories of the United Kingdom]].)
As an exception, if `historical`, `ancient`, `former` or the like are found, they proceed ignoring `no_fallback`,
because it seems tricky to handle them correctly in the presence of `no_fallback`, and historical/former placetypes
rarely occur with exact match category specs anyway.
`no_split_qualifiers` prevents splitting off recognized qualifiers and returning the remainder of the placetype as an
equivalent placetype. Only the passed-in placetype, and any fallbacks, will be returned. This is used in
[[Module:category tree/topic cat/data/Places]] when looking up placetypes found in categories. Such placetypes won't
have qualifiers and so it doesn't make sense to try and look for them.
`from_category`, if set, causes category-only placetypes (those ending in `!`) to also be checked.
`form_of_directive`, if set, causes the specified form-of directive (e.g. `FORMER_NAME_OF`) to be prepended to checked
placetypes, their directive-specific type (e.g. `FORMER_NAME_OF_type`), and their classes (`class`) to get the
appropriate placetypes to check for form-of-directive categories. It falls back to the prepended generic `place` as a
placetype, e.g. `FORMER_NAME_OF place`, if nothing else matches.
`no_check_for_inherently_former` is used internally to prevent an infinite loop when checking for `inherently_former`.
`register_former_as_non_former` is a major hack used in `get_bare_categories` to deal with the mismatch between e.g.
known location `Yugoslavia` declaring itself a `country` but definitions of it declaring it a `former country`. It
causes the non-former version of the specified placetype to be included in the returned equivalents along with the
former placetypes. [FIXME: This should apply only to the entries in `former_countries` but it's tricky to do that now;
fix this in the known-location refactor. -- The known-location refactor is already done but we haven't yet fixed this.]
]==]
function export.get_placetype_equivs(placetype, props)
local no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former
local form_of_directive
if props then
no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former =
props.no_fallback, props.no_split_qualifiers, props.no_check_for_inherently_former, props.from_category,
props.register_former_as_non_former
form_of_directive = props.form_of_directive
end
local equivs = {}
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. `qualifier` is
-- the preceding qualifier to insert into `equivs` along with the placetype (see comment at top of function). If
-- `from_category` is given, we also check for a category-specific entry consisting of the placetype followed by
-- `!`, and in all cases we also check to see if `placetype` is plural, and if so, insert the singularized version
-- along with its fallbacks (if any) in `placetype_data`. `form_of_prefix` is a form-of prefix such as
-- `OFFICIAL_NAME_OF`. If specified, we check the fallbacks of `placetype` without the prefix but then insert into
-- `equivs` the prefixed placetype. This way, if the user says e.g. {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}},
-- we will correctly categorize into [[:Category:Official names of countries]], rather than only trying to look up
-- `OFFICIAL_NAME_OF island country` and failing, falling back ultimately to [[:Category:Official names of places]].
local function insert_placetype_and_fallbacks(qualifier, placetype, form_of_prefix)
local function insert_equiv(pt)
if form_of_prefix then
-- Let's say the user says {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}} and we have
-- no entry for `OFFICIAL_NAME_OF island country` but we do for `OFFICIAL_NAME_OF country` (which we end
-- up processing because `island country` falls back to `country`), and that entry in turn is defined
-- using a fallback. We have to insert that fallback-of-fallback, and the easiest/cleanest way of
-- handling this is by calling ourselves recursively.
insert_placetype_and_fallbacks(qualifier, form_of_prefix .. " " .. pt)
else
insert(equivs, {qualifier=qualifier, placetype=pt})
end
end
-- Insert the placetype, along with any fallbacks.
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if ptdata then
insert_equiv(canon_placetype)
if no_fallback then
return
end
local first_placetype = #equivs + 1
local prev_placetype = nil
while true do
local pt_value = export.placetype_data[canon_placetype]
if not pt_value then
internal_error("Fallback value %s specified for placetype %s but is not in `placetype_data`",
canon_placetype, prev_placetype)
end
if pt_value.fallback then
insert_equiv(pt_value.fallback)
local last_placetype = #equivs
if last_placetype - first_placetype >= 10 then
local fallback_loop = {}
for i = first_placetype, last_placetype do
insert(fallback_loop, equivs[i].placetype)
end
internal_error("Apparent loop in fallback chain: %s", table.concat(fallback_loop, " -> "))
end
prev_placetype = canon_placetype
canon_placetype = pt_value.fallback
else
break
end
end
end
end
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. This is a
-- wrapper around the more basic `insert_placetype_and_fallbacks()` which handles form-of directives. If there is no
-- form-of directive, this function directly calls `insert_placetype_and_fallbacks()`. We do things this way so that
-- form-of directives correctly combine with `former`-type qualifiers. Note that we also have special backups for
-- form-of directives that check `DIRECTIVE place` (and before that, `DIRECTIVE FORMER/ANCIENT place` is there's a
-- `former`-type directive); these backups live outside this function because we want them done once, late, rather
-- than in each invocation of `process_and_insert_placetype()`.
local function process_and_insert_placetype(qualifier, reduced_placetype)
if form_of_directive then
-- First check for e.g. `OFFICIAL_NAME_OF island country` and its fallbacks; then we look for fallbacks of
-- `island country` and check e.g. `OFFICIAL_NAME_OF country` and its fallbacks. All of this is handled by
-- `insert_placetype_and_fallbacks()` with appropriate parameters. After that, check the general class of
-- the directive, e.g. `subpolity` if something like `district` is given. (Eventually, we check for
-- `OFFICIAL_NAME_OF place` as a backup, but this happens at the end outside the loop over qualifiers.)
insert_placetype_and_fallbacks(qualifier, reduced_placetype, form_of_directive)
if not no_fallback then
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype)
local directive_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, form_of_directive .. "_type") or
export.get_placetype_prop(pt, "class") end
)
if not directive_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s in conjunction with form-of directive %s, placetype data " ..
'located but directive-specific type property %s missing, and so is "class"; ' ..
"placetypes searched are %s", reduced_placetype, form_of_directive,
form_of_directive .. "_type", reduced_placetype_equivs)
else
-- This should be allowed, as we allow unrecognized placetypes in general.
end
elseif directive_type ~= "!" then
insert_placetype_and_fallbacks(qualifier, directive_type, form_of_directive)
end
end
else
insert_placetype_and_fallbacks(qualifier, reduced_placetype)
end
end
-- Successively split off recognized qualifiers and loop over successively greater sets of qualifiers from the left
-- (unless `no_split_qualifiers` is specified, in which case we don't check for qualifiers).
local splits
if no_split_qualifiers then
splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
else
splits = export.split_qualifiers_from_placetype(placetype)
end
for _, split in ipairs(splits) do
local prev_qualifier, this_qualifier, reduced_placetype = unpack(split, 1, 3)
-- If a special "former" qualifier like `former` or `historical` isn't present, and
-- `no_check_for_inherently_former` is not given (this flag is used to avoid infinite loops), check for
-- "inherently former" placetypes like `satrapy` and `treaty port` that always refer to no-longer-existing
-- placetypes, and handle accordingly.
local unlinked_this_qualifier
if this_qualifier and this_qualifier:find("%[") then
unlinked_this_qualifier = export.remove_links_and_html(this_qualifier)
else
unlinked_this_qualifier = this_qualifier
end
local former_qualifiers = this_qualifier and export.former_qualifiers[unlinked_this_qualifier] or nil
if not former_qualifiers and not no_check_for_inherently_former then
former_qualifiers = export.get_equiv_placetype_prop(reduced_placetype,
function(pt) return export.get_placetype_prop(pt, "inherently_former") end,
{no_check_for_inherently_former = true})
end
-- If a special "former" qualifier like `former` or `historical` is present, map it to the appropriate internal
-- qualifiers (`ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
-- qualifiers), fetch the `former_type` property, and treat the placetype as if a concatenation of the mapped
-- qualifier(s) and the value of `former_type`. For example, if `medieval village` is given, we map `medieval`
-- to `ANCIENT` and `FORMER`, and `village` to its `former_type` of `settlement`, and enter the placetypes
-- `ANCIENT settlement` and `FORMER settlement` (in that order) into `equivs`. If the placetype following the
-- "former" qualifier is recognized in `placetype_data` but has no `former_type` and no fallback with a
-- `former_type` specified, it is an internal error; but if the placetype isn't recognized (e.g. something like
-- `former greenhouse` is specified and we don't have an entry for `greenhouse`), just track the occurrence and
-- don't enter anything into `equivs`.
if former_qualifiers then
-- FIXME: Should we respect `no_fallback` here? My instinct says no.
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype, {
no_check_for_inherently_former = true
})
local former_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, "former_type") or
export.get_placetype_prop(pt, "class") end
)
if not former_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s, placetype data located but `former_type` missing; " ..
"placetypes searched are %s", reduced_placetype, reduced_placetype_equivs)
else
-- Enable error when we've verified there aren't any examples.
track("bad-former-placetype")
track("bad-former-placetype/" .. reduced_placetype)
--process_error("For placetype '%s', unrecognized placetype following 'former'-type " ..
-- "qualifier; searched placetype(s) %s", reduced_placetype, dump(reduced_placetype_equivs))
end
elseif former_type ~= "!" then
-- First check directly for `ANCIENT/FORMER` + the original following placetype. This makes it possible
-- for (e.g.) former provinces of the Roman empire to be categorized specially.
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. reduced_placetype)
end
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. former_type)
end
-- HACK! See explanation above for `register_former_as_non_former`.
if register_former_as_non_former then
process_and_insert_placetype(prev_qualifier, reduced_placetype)
end
-- If we're processing a form-of directive, after doing everything else we do
-- `DIRECTIVE ANCIENT/FORMER place` e.g. `OFFICIAL_NAME_OF FORMER place` as a backup.
if form_of_directive and not no_fallback then
for _, former_qualifier in ipairs(former_qualifiers) do
insert_placetype_and_fallbacks(prev_qualifier, form_of_directive .. " " .. former_qualifier ..
" place")
end
end
-- Don't continue processing equivs. The reason is probably the same as the `break` below for
-- qualifier_to_placetype_equivs[]; categories for `former BLAH` are set using `default`, and
-- non-former equivs will otherwise take precedence.
break
end
end
-- Then see if the rightmost split-off qualifier is in qualifier_to_placetype_equivs
-- (e.g. 'fictional *' -> 'fictional location'). If so, add the mapping.
if this_qualifier and export.qualifier_to_placetype_equivs[unlinked_this_qualifier] then
insert(equivs, {
qualifier=prev_qualifier,
placetype=export.qualifier_to_placetype_equivs[unlinked_this_qualifier]
})
-- Don't continue processing equivs; otherwise, if we specify 'mythological city', even though the
-- equivalent entry for 'mythological location' gets inserted ahead of the entry for 'city', the
-- latter ends up generating the category because the category for 'mythological location' is set as
-- the default value, which is used only when no non-default category can be found.
break
end
-- Finally, join the rightmost split-off qualifier to the previously split-off qualifiers to form a combined
-- qualifier, and add it along with reduced_placetype and any mapping in placetype_data for reduced_placetype.
-- NOTE: The first time through this loop, both `prev_qualifier` and `this_qualifier` are nil, and this inserts
-- the full placetype into `equivs`.
local qualifier = prev_qualifier and prev_qualifier .. " " .. this_qualifier or this_qualifier
process_and_insert_placetype(qualifier, reduced_placetype)
-- If `no_fallback` and there's an entry in `placetype_data` for this placetype, don't include any reduced
-- placetypes to avoid the "overseas territory treated as a territory" issue describe above.
if no_fallback then
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(reduced_placetype, from_category)
if canon_placetype then
break
end
end
end
-- If we're processing a form-of directive, after doing everything else we do `DIRECTIVE place` e.g.
-- `OFFICIAL_NAME_OF place` as a backup; but only if either the placetype as a whole is recognized or the placetype
-- begins with a recognized qualifier. This latter check is to avoid categorizing into e.g.
-- [[Category:en:Former names of places]] in an invocation like
-- {{place|en|@former name of:Democratic Republic of the Congo|country|r/Central Africa|;|used from 1971–1997}};
-- the `used from 1971–1997` gets treated as a placetype and we're called on it.
if form_of_directive and not no_fallback and (splits[2] or export.get_placetype_data(placetype, from_category)) then
insert_placetype_and_fallbacks(nil, form_of_directive .. " place")
end
return equivs
end
function export.get_equiv_placetype_prop_from_equivs(equivs, fun, continue_on_nil_only)
for _, equiv in ipairs(equivs) do
local retval = fun(equiv.placetype)
if continue_on_nil_only and retval ~= nil or not continue_on_nil_only and retval then
return retval, equiv
end
end
return nil, nil
end
--[==[
Given a placetype `placetype` and a function `fun` of one argument, iteratively call the function on equivalent
placetypes fetched from `get_placetype_equivs` until the function returns a non-falsy value (i.e. not {nil} or {false});
but if `continue_on_nil_only` is specified, the iterations continue until the function returns non non-{nil} value.
FIXME: We should make `continue_on_nil_only` the default; but this requires changing some callers.) When `fun` returns a
non-falsy or non-{nil} value, `get_equiv_placetype_prop` returns two values: the value returned by `fun` and the
equivalent placetype that triggered the non-falsy (or non-{nil}) return value. If `fun` never returns a non-falsy (or
non-{nil}) value, `get_equiv_placetype_prop` returns {nil} for both return values. If `placetype` is passed in as {nil},
the return value is the result of calling `fun` on {nil} (whatever it is) with {nil} for the second return value.
]==]
function export.get_equiv_placetype_prop(placetype, fun, props)
if not placetype then
return fun(nil), nil
end
return export.get_equiv_placetype_prop_from_equivs(export.get_placetype_equivs(placetype, props), fun,
props and props.continue_on_nil_only)
end
--[==[
Return the article that is used with an entry placetype. We proceed as follows:
# See if there is a recognized qualifier at the beginning that specifies an article (including `false` for no article).
This takes precedence over anything else, so that e.g. `various capitals` gets no article rather than "`the"`.
# Then check the placetype or any equivalent placetype for the `entry_placetype_use_the` property, indicating that
`"the"` should be used.
# Otherwise we look to see if the placetype itself (not any equivalents, even those involving deleting a qualifier from
the beginning) has an entry in `placetype_data` that specifies the indefinite article using `entry_placetype_use_the`
(principally for use with placetypes like `union territory`).
# Otherwise, we use [[Module:en-utilities]] to apply the standard algorithm to generate `"an"` for words beginning with
a vowel and `"a"` otherwise.
If `ucfirst` is true, the first letter of the article is made upper-case.
]==]
function export.get_placetype_article(placetype, ucfirst)
local art
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if type(canon) == "table" then
art = canon.article
end
end
if art == false then
return art
end
if art == nil then
local placetype_use_the = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "entry_placetype_use_the") end)
if placetype_use_the then
art = "tên"
else
art = export.get_placetype_prop(placetype, "entry_placetype_indefinite_article")
if not art then
art = require(en_utilities_module).get_indefinite_article(placetype)
end
end
end
if ucfirst then
art = m_strutils.ucfirst(art)
end
return art
end
--[==[
Return the preposition that should be used after `placetype` when occurring as an entry placetype or in categories
(e.g. `city >in< France` but `country >of< South America`). The preposition defaults to `"của"` if not specified.
]==]
function export.get_placetype_entry_preposition(placetype)
local pt_prep = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "preposition") end
)
return pt_prep or "của"
end
--[==[
Given a place desc (see top of file) and a holonym object (see top of file), add a key/value into the place desc's
`holonyms_by_placetype` field corresponding to the placetype and placename of the holonym. For example, corresponding
to the holonym "c/Italy", a key with the list value {"Italy"} will be added to the place desc's
`holonyms_by_placetype` field. If there is already a key with that place type, the new placename will be added to the
end of the value's list.
]==]
function export.key_holonym_into_place_desc(place_desc, holonym)
if not holonym.placetype then
return
end
-- Key in equivalent placetypes, so that e.g. `cities/San Francisco` gets keyed under `city`; but don't do
-- fallbacks, as it doesn't seem correct for the "do other holonyms of the same placetype" algorithm to do holonyms
-- of different types just because they have the same fallback.
local equiv_placetypes = export.get_placetype_equivs(holonym.placetype, {no_fallback = true})
local unlinked_placename = holonym.unlinked_placename
for _, equiv in ipairs(equiv_placetypes) do
local placetype = equiv.placetype
if not place_desc.holonyms_by_placetype then
place_desc.holonyms_by_placetype = {}
end
if not place_desc.holonyms_by_placetype[placetype] then
place_desc.holonyms_by_placetype[placetype] = {unlinked_placename}
else
insert(place_desc.holonyms_by_placetype[placetype], unlinked_placename)
end
end
end
--[=[
Construct a formatted link from the raw link spec `link` given the canonical singular placetype `sg_placetype`. If the
placetype was originally plural, `orig_placetype` should contain this plural value; otherwise it should be nil. This
will construct the appropriate type of link that displays as `orig_placetype` (or otherwise `sg_placetype`) but links to
whatever the `link` spec specifies (which may be `sg_placetype`, a Wikipedia article, etc.). `ptdata` is the placetype
data structure for the placetype, and `from_category` indicates that we are generating the description of a category
(otherwise we are generating the display form of an entry placetype).
]=]
local function make_placetype_link(link, sg_placetype, orig_placetype, ptdata, from_category, noerror)
if not from_category and ptdata.disallow_in_entries then
if noerror then
return "[not meant to be specified directly, with warning: " .. ptdata.disallow_in_entries .. "]"
else
process_error("Placetype %s is not meant to be specified directly: " .. ptdata.disallow_in_entries, sg_placetype)
end
end
if link == nil then
internal_error("Placetype data present for placetype %s but no link= setting given", sg_placetype)
elseif link == true then
if orig_placetype then
return ("[[%s|%s]]"):format(sg_placetype, orig_placetype)
else
return ("[[%s]]"):format(sg_placetype)
end
elseif link == false then
process_error("Placetype %s is not meant to be specified directly, but is only for internal use", sg_placetype)
elseif link == "w" then
return ("[[w:%s|%s]]"):format(sg_placetype, orig_placetype or sg_placetype)
elseif link == "separately" then
if orig_placetype then
local sg_words = split(sg_placetype, " ")
local orig_words = split(orig_placetype, " ")
if #sg_words ~= #orig_words then
internal_error("Can't construct 'separately' link for plural placetype %s as original placetype %s " ..
"has different number of words", orig_placetype, sg_placetype)
else
for i = 1, #sg_words do
if sg_words[i] == orig_words[i] then
sg_words[i] = ("[[%s]]"):format(sg_words[i])
else
sg_words[i] = ("[[%s|%s]]"):format(sg_words[i], orig_words[i])
end
end
return concat(sg_words, " ")
end
else
return (sg_placetype:gsub("([^ ]+)", "[[%1]]"))
end
elseif link:find("^%+") then
link = link:sub(2) -- discard initial +
return ("[[%s|%s]]"):format(link, orig_placetype or sg_placetype)
elseif not orig_placetype then
return link
else
return link
end
end
--[==[
Get the display form of a placetype by looking it up in `placetype_data`. If the placetype is recognized, or is the
plural of a recognized placetype, the corresponding linked display form is returned (with plural placetypes displaying
as plural but linked to the singular form of the placetype). Otherwise, return nil. If we're generating the description
of a category, `category_type` should be set to one of `"top-level"` (for top-level categories like
[[:Category:Neighborhoods]]), `"noncity"` (for non-city categories like [[:Category:Neighborhoods in Illinois, USA]]) or
`"city"` (for city categories like [[:Category:Neighborhoods of Chicago]]). Otherwise, we're generating the description
for use in formatting a {{tl|place}} call, and category-only placetypes ending in `!` will be ignored, along with
special `category_link*` settings. `return_full` is used along with `category_type` and will preferably return the
"full" variant of category link settings, i.e. `full_category_link*`; if they don't exist, the `category_link*` value is
prepended with `"names of"`. `noerror` says to not throw an error when encountering entry placetypes that would be
disallowed.
]==]
function export.get_placetype_display_form(placetype, category_type, return_full, noerror)
local from_category = not not category_type
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if canon_placetype then
local raw_link
local function is_linked_string(str)
return type(str) == "string" and str:find("%[%[")
end
if category_type then
local fetched_full
local function fetch_maybe_full(prop)
local retval = ptdata["full_" .. prop]
if retval ~= nil then
if return_full then
return retval, true
else
internal_error("Saw full_" .. prop .. "=%s but `return_full` not set, can't handle", retval)
end
end
return ptdata[prop], false
end
local function maybe_prefix(str)
if return_full and not fetched_full then
return "names of " .. str
else
return str
end
end
-- Careful with `false` as possible value.
if category_type == "top-level" then
raw_link, fetched_full = fetch_maybe_full("category_link_top_level")
elseif category_type == "noncity" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_noncity")
elseif category_type == "city" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_city")
else
internal_error('Unrecognized value for `category_type` %s, should be "top-level", "noncity" or "city"',
category_type)
end
if type(raw_link) == "string" then
return maybe_prefix(raw_link), ptdata
elseif raw_link ~= nil then
return raw_link, ptdata
end
raw_link, fetched_full = fetch_maybe_full("category_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
if ptmatch == "plural" then
raw_link, fetched_full = fetch_maybe_full("plural_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
end
if raw_link == nil then
raw_link, fetched_full = fetch_maybe_full("link")
end
if raw_link == false then
return raw_link, ptdata
end
return maybe_prefix(make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror)), ptdata
else
if ptmatch == "plural" then
raw_link = ptdata.plural_link
if raw_link == false then
process_error("Placetype %s cannot appear plural", placetype)
end
if is_linked_string(raw_link) then
return raw_link, ptdata
end
end
if raw_link == nil then
raw_link = ptdata.link
end
return make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror), ptdata
end
end
return nil
end
local function resolve_unlinked_placename_display_aliases(placetype, placename)
local equiv_placetypes = export.get_placetype_equivs(placetype)
for i, equiv in ipairs(equiv_placetypes) do
equiv_placetypes[i] = equiv.placetype
end
local all_display_aliases_found = {}
local all_others_found = {}
for group, key, spec in m_locations.iterate_matching_location {
placetypes = equiv_placetypes,
placename = placename,
alias_resolution = "display",
} do
if spec.alias_of and spec.display then
insert(all_display_aliases_found, {group, key, spec, spec.display_as_full})
else
insert(all_others_found, {group, key, spec})
end
end
if not all_display_aliases_found[1] then
return placename
elseif all_display_aliases_found[2] then
internal_error("Found multiple matching display aliases for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
elseif all_others_found[1] then
internal_error("Found a display alias along with other possible meanings for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
else
local group, key, spec, as_full = unpack(all_display_aliases_found[1])
local full, elliptical = m_locations.key_to_placename(group, key)
return as_full and full or elliptical
end
end
--[==[
If `placename` of type `placetype` is a display alias, convert it to its canonical form; otherwise, return unchanged.
Display aliases transform certain placenames into canonical displayed forms. For example, if any of `country/US`,
`country/USA` or `country/United States of America` (or `c/US`, etc.) are given, the result will be displayed as
`United States`.
'''NOTE''': Display aliases change what is displayed from what the editor wrote in the Wikitext. As a result, they
should (a) be non-political in nature, and (b) not involve a change where the word `the` needs to be added or removed.
For example, normalizing `US` and `USA` to `United States` for display purposes is OK but normalizing `Burma` to
`Myanmar` is not (instead a cat alias should be used) because the terms `Burma` and `Myanmar` have clear political
connotations. Similarly, we have a display alias that maps the old name of `Macedonia` as a country (but not a region!)
to `North Macedonia`, but `Republic of Macedonia` is mapped to `North Macedonia` only as a cat alias because the two
terms differ in their use of `the`. (For example, if we had a display alias mapping `Republic of Macedonia` to
`North Macedonia`, the call {{tl|place|en|the <<capital city>> of the <<c/Republic of Macedonia>>}} would wrongly
display as `the [[capital city]] of the [[North Macedonia]]`.) Generally, display normalizations tend to involve
alternative forms (e.g. abbreviations, ellipses, foreign spellings) where the normalization improves clarity and
consistency.
]==]
function export.resolve_placename_display_aliases(placetype, placename)
-- If the placename is a link, apply the alias inside the link.
-- This pattern matches both piped and unpiped links. If the link is not piped, the second capture (linktext) will
-- be empty.
local link, linktext = rmatch(placename, "^%[%[([^|%[%]]+)|?([^|%[%]]-)%]%]$")
if link then
if linktext ~= "" then
local alias = resolve_unlinked_placename_display_aliases(placetype, linktext)
return "[[" .. link .. "|" .. alias .. "]]"
else
local alias = resolve_unlinked_placename_display_aliases(placetype, link)
return "[[" .. alias .. "]]"
end
else
return resolve_unlinked_placename_display_aliases(placetype, placename)
end
end
--[==[
Generate the "prefixed" version of a bare key, i.e. prefix it with `the` if correct for this key.
]==]
function export.get_prefixed_key(key, spec)
if spec.the then
return key
else
return key
end
end
-- Necessary for use by [[Module:place]]. FIXME: Reorganize the modules so this isn't necessary.
export.iterate_matching_location = m_locations.iterate_matching_location
--[=[
Iterator that iterates over holonyms in `place_desc`. If `first_holonym_index` is given, start iterating at the
specified holonym and stop either when there are no more holonyms or a holonym with modifier `:also` is found. If
`first_holonym_index` is nil or omitted, iterate over all holonyms regardless. If `include_raw_text_holonyms` is
specified, raw text holonyms (those not of the form `placetype/placename`) are returned as well; they can be identified
by the fact that the `placetype` field in the holonym structure is nil. Two values are returned at each iteration, the
holonym index and holonym structure, similar to `ipairs()`.
]=]
function export.get_holonyms_to_check(place_desc, first_holonym_index, include_raw_text_holonyms)
local stop_at_also = not not first_holonym_index
return function(place_desc, index)
while true do
index = index + 1
local this_holonym = place_desc.holonyms[index]
-- If we were passed in a starting holonym index, go up to but not including a holonym marked with `:also`
-- (continue_cat_loop); the categorization code will then restart the loop at that holonym. That holonym
-- will have `:also` marked on it, so make sure not to stop immediately if the first holonym is marked with
-- `:also`.
if not this_holonym or stop_at_also and index > first_holonym_index and this_holonym.continue_cat_loop then
return nil
end
-- If not placetype, we're processing raw text, which we normally want to skip.
if include_raw_text_holonyms or this_holonym.placetype then
return index, this_holonym
end
end
end, place_desc, first_holonym_index and first_holonym_index - 1 or 0
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, iterate over all
such known locations, returning for each location the corresponding key, spec and group as well as the trail of
ancestral containers. Unlike `iterate_matching_location()`, this specifically checks that there is no mismatch between
the location's containers at any level and any of the following holonyms in the {{tl|place}} spec. The fields in `data`
are:
* `holonym_placetype`: The placetype of the holonym. It can actually be a list of possible placetypes, as with
`iterate_matching_location()`.
* `holonym_placename`: The placename of the holonym.
* `holonym_index`: The index of the holonym among the holonyms in `place_desc`, or nil if the holonym is not among the
holonyms in `place_desc`. (If a holonym index is given, we check for container mismatches among the holonyms
following the specified index, stopping either when encountering a holonym marked with modifier `:also` or, if none
exist, when we run out of holonyms. If no holonym index is given, we check all holonyms for container mismatches.)
* `place_desc`: Description of the place; used for the holonyms, to check for container mismatches.
Returns four values: the location group, the canonical key by which the location is known, the spec object describing
the location and the trail of ancestral containers for the location. The first three values are the same as for
`iterate_matching_location`.
]==]
function export.iterate_matching_holonym_location(data)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
local matching_location_iterator = m_locations.iterate_matching_location {
placetypes = holonym_placetype,
placename = holonym_placename,
}
return function()
while true do
local group, key, spec = matching_location_iterator()
if not group then
return nil
end
local container_trail = {}
-- For each level of container, check that there are no mismatches (i.e. other location of the same
-- placetype) mentioned. We allow a mismatch at a given level if there's also a match with the container
-- at that level. For example, in the case of Kansas City, defined in [[Module:place/locations]] as a city
-- in Missouri, if we define it as {{tl|place|city|s/Missouri,Kansas}}, we ignore the mismatching state of
-- Kansas because the correct state of Missouri was also mentioned. But imagine we are defining Newark,
-- Delaware as {{tl|place|city|s/Delaware|c/US}} and (as is the case) we have an entry for Newark, New
-- Jersey in [[Module:place/locations]]. Just because the containing location `US` matches isn't enough,
-- because Newark, NJ also has New Jersey as a containing location and there's a mismatch at that level. If
-- there are no mismatches at any level we assume we're dealing with the right known location.
--
-- If at a given level there are multiple containing locations, we count a match if any holonym matches any
-- containing location, and a mismatch only if a holonym exists of the same placetype that doesn't match any
-- containing location.
local containers_mismatch = false
for containers in m_locations.iterate_containers(group, key, spec) do
insert(container_trail, containers)
local match_at_level = false
local mismatch_at_level = false
for other_holonym_index, other_holonym in export.get_holonyms_to_check(place_desc,
holonym_index and holonym_index + 1 or nil) do
local other_source_holonym = other_holonym.augmented_from_holonym
if other_source_holonym and other_source_holonym.placetype == holonym_placetype and
other_source_holonym.unlinked_placename ~= holonym_placename then
-- Ignore holonyms added during the augmentation process for other holonyms of the same
-- placetype as the placetype of the holonym we're considering. See comment in
-- augment_holonyms_with_container() for why we do this.
-- continue; grrr, no 'continue' in Lua
else
local holonym_matches_at_level = false
local holonym_exists_with_same_placetype = false
for _, container in ipairs(containers) do
if not container.spec.no_check_holonym_mismatch then
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
local placetypes = container.spec.placetype
if type(placetypes) ~= "table" then
placetypes = {placetypes}
end
local placetype_equivs = {}
for _, pt in ipairs(placetypes) do
m_table.extend(placetype_equivs, export.get_placetype_equivs(pt))
end
local this_holonym_matches = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype and
(other_holonym.unlinked_placename == full_container_placename or
other_holonym.unlinked_placename == elliptical_container_placename)
end
)
if this_holonym_matches then
holonym_matches_at_level = true
break
end
local this_holonym_exists_with_same_placetype = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype
end
)
if this_holonym_exists_with_same_placetype then
-- We seem to have a mismatch at this level. But before we decide conclusively that this
-- is the case, check to see whether the putative mismatch is an alias and matches when
-- we resolve the alias.
for oh_group, oh_key, oh_spec, oh_container_trail in
export.iterate_matching_holonym_location {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = place_desc,
} do
local oh_full_placename, oh_elliptical_placename =
m_locations.key_to_placename(oh_group, oh_key)
if oh_full_placename == full_container_placename or
oh_elliptical_placename == elliptical_container_placename then
-- Alias matched when resolved.
this_holonym_matches = true
break
end
end
if this_holonym_matches then
-- Alias matched above when resolved.
holonym_matches_at_level = true
break
else
-- Not an alias, or doesn't match when resolved. We have a true mismatch.
holonym_exists_with_same_placetype = true
end
end
end
end
if holonym_matches_at_level then
match_at_level = true
break
end
if holonym_exists_with_same_placetype then
mismatch_at_level = true
end
end
end
if not match_at_level and mismatch_at_level then
containers_mismatch = true
break
end
end
if not containers_mismatch then
return group, key, spec, container_trail
end
end
end
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, find and return the
corresponding key, spec and group as well as the trail of ancestral containers. This is like
`iterate_matching_holonym_location()` but throws an error if more than one location matches. (An example where this
would happen is {{tl|place|en|neighborhood|city/Newcastle}}, because there are two known locations named Newcastle. To
fix this, specify additional following disambiguating holonyms, e.g.
{{tl|place|en|neighborhood|city/Newcastle|s/New South Wales}}.
]==]
function export.find_matching_holonym_location(data)
local all_found = {}
for group, key, spec, container_trail in export.iterate_matching_holonym_location(data) do
insert(all_found, {group, key, spec, container_trail})
end
if not all_found[1] then
return nil
elseif all_found[2] then
local holonym_placetype = data.holonym_placetype
if type(holonym_placetype) == "table" then
holonym_placetype = concat(holonym_placetype, ",")
end
local found_keys = {}
for _, found in ipairs(all_found) do
local _, key, _, _ = unpack(found)
insert(found_keys, key)
end
error(("Found multiple matching locations for holonym '%s/%s'; specify disambiguating context in the " ..
"containing holonyms: %s"):format(holonym_placetype, data.holonym_placename, dump(found_keys)))
else
return unpack(all_found[1])
end
end
------------------------------------------------------------------------------------------
-- Placename and placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
This is a map from aliases to their canonical forms. Any placetypes appearing as keys here will be mapped to their
canonical forms in all respects, including the display form. Contrast entries in 'placetype_data' with a fallback, which
applies to categorization and other processes but not to display.
The most important aliases are for holonym placetypes, particularly those that occur often such as "country", "state",
"province" and the like. Particularly long placetypes that mostly occur as entry placetypes (e.g.
"census-designated place") can be given abbreviations, but it is generally preferred to spell out the entry placetype.
Note also that we purposely avoid certain abbreviations that would be ambiguous (e.g. "d", which could variously be
interpreted as "department", "district" or "division").
]==]
export.placetype_aliases = {
["acomm"] = "autonomous community",
["adr"] = "administrative region",
["adterr"] = "administrative territory", -- Pakistan
["aobl"] = "autonomous oblast",
["aokr"] = "autonomous okrug",
["ap"] = "autonomous province",
["apref"] = "autonomous prefecture",
["aprov"] = "autonomous province",
["ar"] = "autonomous region",
["arch"] = "archipelago",
["arep"] = "autonomous republic",
["aterr"] = "autonomous territory",
["atu"] = "autonomous territorial unit",
["bor"] = "borough",
["c"] = "quốc gia",
["can"] = "canton",
["carea"] = "council area",
["cc"] = "constituent country",
["cdblock"] = "community development block",
["cdep"] = "Crown dependency",
["CDP"] = "census-designated place",
["cdp"] = "census-designated place",
["clcity"] = "county-level city",
["co"] = "county",
["cobor"] = "county borough",
["colcity"] = "county-level city",
["coll"] = "collectivity",
["comm"] = "community",
["cont"] = "lục địa",
["contr"] = "continental region",
["contregion"] = "continental region",
["cpar"] = "civil parish",
["damun"] = "direct-administered municipality",
["dep"] = "dependency",
["department capital"] = "departmental capital",
["dept"] = "department",
["depterr"] = "dependent territory",
["dist"] = "district",
["distmun"] = "district municipality",
["div"] = "division",
["emp"] = "empire",
["fpref"] = "French prefecture",
["gov"] = "governorate",
["govnat"] = "governorate",
["home-rule city"] = "home rule city",
["home-rule municipality"] = "home rule municipality",
["inner-city area"] = "inner city area",
["ires"] = "Indian reservation",
["isl"] = "island",
["lbor"] = "London borough",
["lga"] = "local government area",
["lgarea"] = "local government area",
["lgd"] = "local government district",
["lgdist"] = "local government district",
["metbor"] = "metropolitan borough",
["metcity"] = "metropolitan city",
["metmun"] = "metropolitan municipality",
["mtn"] = "mountain",
["mun"] = "municipality",
["mundist"] = "municipal district",
["nonmetropolitan county"] = "non-metropolitan county",
["obl"] = "oblast",
["okr"] = "okrug",
["p"] = "province",
["par"] = "parish",
["parmun"] = "parish municipality",
["pen"] = "peninsula",
["plcity"] = "prefecture-level city",
["plcolony"] = "Polish colony",
["pref"] = "prefecture",
["prefcity"] = "prefecture-level city",
["preflcity"] = "prefecture-level city",
["prov"] = "province",
["r"] = "region",
["range"] = "mountain range",
["rcm"] = "regional county municipality",
["rcomun"] = "regional county municipality",
["rdist"] = "regional district",
["rep"] = "republic",
["rhrom"] = "rural hromada",
["riv"] = "river",
["rmun"] = "regional municipality",
["robor"] = "royal borough",
["romp"] = "Roman province",
["runit"] = "regional unit",
["rurmun"] = "rural municipality",
["s"] = "state",
["sar"] = "special administrative region",
["shrom"] = "settlement hromada",
["spref"] = "subprefecture",
["sprefcity"] = "sub-prefectural city",
["sprovcity"] = "subprovincial city",
["submet city"] = "sub-metropolitan city",
["submetropolitan city"] = "sub-metropolitan city",
["sub-prefecture-level city"] = "sub-prefectural city",
["sub-provincial city"] = "subprovincial city",
["sub-provincial district"] = "subprovincial district",
["terr"] = "territory",
["terrauth"] = "territorial authority",
["twp"] = "township",
["twpmun"] = "township municipality",
["uauth"] = "unitary authority",
["ucomm"] = "unincorporated community",
["udist"] = "unitary district",
["uhrom"] = "urban hromada",
["uterr"] = "union territory",
["utwpmun"] = "united township municipality",
["val"] = "valley",
["vdc"] = "village development committee",
["vil"] = "village",
["voi"] = "voivodeship",
["wcomm"] = "Welsh community",
}
local no_link_def_article = {link = false, article = ""}
local no_link_no_article = {link = false, article = false}
--[==[ var:
These qualifiers can be prepended onto any placetype and will be handled correctly. For example, the placetype
`large city` will be displayed as `large <nowiki>[[city]]</nowiki>` and categorized as if `city` were specified. If the
value in the following table is a string, the qualifier will display according to the string. If the value is `true`,
the qualifier will be linked to its corresponding Wiktionary entry. If the value is `false`, the qualifier will not be
linked but will appear as-is. Note that these qualifiers do not override placetypes with entries elsewhere that contain
those same qualifiers. For example, the entry for `inland sea` in `placetype_data` will apply in preference to treating
`inland sea` as equivalent to `sea`.
]==]
export.placetype_qualifiers = {
-- generic qualifiers
["huge"] = false,
["tiny"] = false,
["large"] = false,
["big"] = false,
["mid-size"] = false,
["mid-sized"] = false,
["small"] = false,
["sizable"] = false,
["important"] = false,
["long"] = false,
["short"] = false,
["major"] = false,
["minor"] = false,
["high"] = false,
["tall"] = false,
["low"] = false,
["left"] = false, -- left tributary
["right"] = false, -- right tributary
["modern"] = false, -- for use in opposition to "ancient" in another definition
-- "former" qualifiers
["abandoned"] = true,
["ancient"] = true,
["deserted"] = true,
["extinct"] = true,
["former"] = false,
["historic"] = "historical",
["historical"] = true,
["medieval"] = true,
["mediaeval"] = true,
["ruined"] = true,
["traditional"] = true,
-- sea qualifiers
["coastal"] = true,
["inland"] = true, -- note, we also have an entry in placetype_data for 'inland sea' to get a link to [[inland sea]]
["maritime"] = true,
["overseas"] = true,
["seaside"] = true,
["beachfront"] = true,
["beachside"] = true,
["riverside"] = true,
-- lake qualifiers
["freshwater"] = true,
["saltwater"] = true,
["endorheic"] = true,
["oxbow"] = true,
["ox-bow"] = "[[oxbow]]", -- [[ox-bow]] is a red link
["tidal"] = true,
-- land qualifiers
["hilltop"] = true,
["hilly"] = true,
["insular"] = true,
["peninsular"] = true,
["chalk"] = true,
["karst"] = true,
["limestone"] = true,
["mountainous"] = true,
["mountaintop"] = true,
["alpine"] = true,
["volcanic"] = true, -- for an island
-- political status qualifiers
["autonomous"] = true,
["incorporated"] = true,
["special"] = true,
["unincorporated"] = true,
["coterminous"] = true,
-- monetary status/etc. qualifiers
["fashionable"] = true,
["wealthy"] = true,
["affluent"] = true,
["declining"] = true,
-- city vs. rural qualifiers
["urban"] = true,
["suburban"] = true,
["exurban"] = true,
["outlying"] = true,
["remote"] = true,
["rural"] = true,
["outback"] = true,
["inner"] = false,
["inner-city"] = true,
["central"] = false,
["outer"] = false,
-- land use qualifiers
["residential"] = true,
["agricultural"] = true,
["business"] = true,
["commercial"] = true,
["industrial"] = true,
-- business use qualifiers
["railroad"] = true,
["railway"] = true,
["farming"] = true,
["fishing"] = true,
["mining"] = true,
["logging"] = true,
["cattle"] = true,
-- tourism use qualifiers
["resort"] = true, -- note, we also have 'resort city' and 'resort town', that take precedecne
["spa"] = true, -- note, we also have 'spa city' and 'spa town', that take precedecne
["ski"] = true, -- note, we also have 'ski resort city' and 'ski resort town', that take precedecne
-- religious qualifiers
["holy"] = true,
["sacred"] = true,
["religious"] = true,
["secular"] = true,
-- qualifiers for nonexistent places
["claimed"] = false,
["fictional"] = true,
["legendary"] = true,
["mythical"] = true,
["mythological"] = true,
-- directional qualifiers
["northern"] = false,
["southern"] = false,
["eastern"] = false,
["western"] = false,
["north"] = false,
["south"] = false,
["east"] = false,
["west"] = false,
["northeastern"] = false,
["southeastern"] = false,
["northwestern"] = false,
["southwestern"] = false,
["northeast"] = false,
["southeast"] = false,
["northwest"] = false,
["southwest"] = false,
-- seasonal qualifiers
["summer"] = true, -- e.g. for 'summer capital'
["winter"] = true,
-- legal status qualifiers
-- FIXME: Two-word qualifiers don't work yet. But you can enter "de-facto" and it's canonicalized to [[de facto]].
["official"] = true,
["unofficial"] = true,
["de facto"] = true, -- 'de facto capital'
["de-facto"] = "[[de facto]]", -- [[de-facto]] is a red link
["de jure"] = true, -- 'de jure capital'
["de-jure"] = "[[de jure]]", -- [[de-jure]] is a red link
-- NOTE: 'unrecognized/unrecognised' are handled as placetypes 'unrecognized country', 'unrecognized state'
-- misc. qualifiers
["planned"] = true,
["chartered"] = true,
["landlocked"] = true,
["uninhabited"] = true,
-- superlative qualifiers
["first"] = no_link_def_article,
["second"] = no_link_def_article, -- for "second largest" etc.
["third"] = no_link_def_article,
["fourth"] = no_link_def_article,
["last"] = no_link_def_article,
["only"] = no_link_def_article,
["sole"] = no_link_def_article,
["main"] = no_link_def_article,
["largest"] = no_link_def_article,
["biggest"] = no_link_def_article,
["smallest"] = no_link_def_article,
["shortest"] = no_link_def_article,
["longest"] = no_link_def_article,
["tallest"] = no_link_def_article,
["highest"] = no_link_def_article,
["lowest"] = no_link_def_article,
["leftmost"] = no_link_def_article,
["rightmost"] = no_link_def_article,
["innermost"] = no_link_def_article,
["outermost"] = no_link_def_article,
["northernmost"] = no_link_def_article,
["southernmost"] = no_link_def_article,
["westernmost"] = no_link_def_article,
["easternmost"] = no_link_def_article,
["northwesternmost"] = no_link_def_article,
["southwesternmost"] = no_link_def_article,
["northeasternmost"] = no_link_def_article,
["southeasternmost"] = no_link_def_article,
-- several/various
["several"] = no_link_no_article,
["various"] = no_link_no_article,
["numerous"] = no_link_no_article,
["multiple"] = no_link_no_article,
["many"] = no_link_no_article,
["other"] = no_link_no_article,
}
--[==[ var:
In this table, the key qualifiers should be treated the same as the value qualifiers for categorization purposes. This
is overridden by `placetype_data` and `qualifier_to_placetype_equivs`.
]==]
export.former_qualifiers = {
["abandoned"] = {"FORMER"},
["ancient"] = {"ANCIENT", "FORMER"},
["former"] = {"FORMER"},
["extinct"] = {"FORMER"},
["historic"] = {"FORMER"},
["historical"] = {"FORMER"},
["medieval"] = {"ANCIENT", "FORMER"},
["mediaeval"] = {"ANCIENT", "FORMER"},
["ruined"] = {"ANCIENT", "FORMER"},
["traditional"] = {"FORMER"},
}
--[==[ var:
In this table, any placetypes containing these qualifiers that do not occur in `placetype_data` should be mapped to the
specified placetypes for categorization purposes. Entries here are overridden by `placetype_data`.
]==]
export.qualifier_to_placetype_equivs = {
["fictional"] = "fictional location",
["legendary"] = "mythological location",
["mythical"] = "mythological location",
["mythological"] = "mythological location",
-- For e.g. Taiwan as a "claimed province" of China; parts of Belize as claimed by Guatemala; various islands
-- claimed by various parties in East Asia. FIXME: We should conditionalize on what is being claimed since there are
-- also claimed capitals, e.g. Israel and Palestine claim Jerusalem as their capital.
["claimed"] = "claimed political division",
}
--[==[ var:
Mapping from placetypes to the corresponding plural category-only placetype for a capital of that placetype. The reverse
mapping also exists.
]==]
export.placetype_to_capital_cat = {
["autonomous community"] = "autonomous community capitals",
["canton"] = "cantonal capitals",
["comarca"] = "comarca capitals",
["country"] = "national capitals",
-- The following are not obviously different from 'county seats' but the latte terminology is used in the US.
["county"] = "county capitals",
["department"] = "departmental capitals",
["district"] = "district capitals",
["division"] = "division capitals",
["emirate"] = "emirate capitals",
["governorate"] = "governorate capitals",
["hromada"] = "hromada capitals",
["krai"] = "krai capitals",
["metropolitan city"] = "metropolitan city capitals",
["municipality"] = "municipal capitals",
["oblast"] = "oblast capitals",
["okrug"] = "okrug capitals",
["prefecture"] = "prefectural capitals",
["province"] = "provincial capitals",
["raion"] = "raion capitals",
["regency"] = "regency capitals",
["region"] = "regional capitals",
["regional unit"] = "regional unit capitals",
["republic"] = "republic capitals",
["state"] = "state capitals",
["territory"] = "territorial capitals",
["voivodeship"] = "voivodeship capitals",
}
--[==[ var:
This contains placenames that should be preceded by an article (almost always "the"). '''NOTE''': There are multiple
ways that placenames can come to be preceded by "the":
# Listed here.
# Given in [[Module:place/locations]] with an initial "the". All such placenames are added to this map by the code
just below the map.
# The placetype of the placename has `holonym_use_the = true` in its placetype_data.
# A regex in placename_the_re matches the placename.
Note that "the" is added only before the first holonym in a place description.
]==]
export.placename_article = {
-- This should only contain info that can't be inferred from [[Module:place/locations]].
["archipelago"] = {
["Cyclades"] = "the",
["Dodecanese"] = "the",
},
["country"] = {
["Holy Roman Empire"] = "the",
},
["empire"] = {
["Holy Roman Empire"] = "the",
},
["island"] = {
["North Island"] = "the",
["South Island"] = "the",
},
["region"] = {
["Balkans"] = "the",
["Russian Far East"] = "the",
["Caribbean"] = "the",
["Caucasus"] = "the",
["Middle East"] = "the",
["New Territories"] = "the",
["North Caucasus"] = "the",
["South Caucasus"] = "the",
["West Bank"] = "the",
["Gaza Strip"] = "the",
},
["valley"] = {
["San Fernando Valley"] = "the",
},
}
--[==[ var:
Regular expressions to apply to determine whether we need to put 'the' before a holonym. The key "*" applies to all
holonyms, otherwise only the regexes for the holonym's placetype apply.
]==]
export.placename_the_re = {
-- We don't need entries for peninsulas, seas, oceans, gulfs or rivers
-- because they have holonym_use_the = true.
["*"] = {"^Isle of ", " Islands$", " Mountains$", " Empire$", " Country$", " Region$", " District$", "^City of "},
["bay"] = {"^Vịnh của "},
["lake"] = {"^Hồ của "},
["country"] = {"^Republic of ", " Republic$"},
["republic"] = {"^Republic of ", " Republic$"},
["region"] = {"^Vùng của "},
["river"] = {"^Sông của "},
["local government area"] = {"^Shire of "},
["county"] = {"^Shire of "},
["Indian reservation"] = {" Reservation", " Nation"},
["tribal jurisdictional area"] = {" Reservation", " Nation"},
}
--[==[ var:
If any of the following holonyms are present, the associated holonyms are automatically added to the end of the list of
holonyms for categorization (but not display) purposes.
]==]
export.cat_implications = {
["region"] = {
["Eastern Europe"] = {"continent/Europe"},
["Central Europe"] = {"continent/Europe"},
["Western Europe"] = {"continent/Europe"},
["South Europe"] = {"continent/Europe"},
["Southern Europe"] = {"continent/Europe"},
["Northern Europe"] = {"continent/Europe"},
["Northeast Europe"] = {"continent/Europe"},
["Northeastern Europe"] = {"continent/Europe"},
["Southeast Europe"] = {"continent/Europe"},
["Southeastern Europe"] = {"continent/Europe"},
["North Caucasus"] = {"continent/Europe"},
["South Caucasus"] = {"continent/Asia"},
["South Asia"] = {"continent/Asia"},
["Southern Asia"] = {"continent/Asia"},
["East Asia"] = {"continent/Asia"},
["Eastern Asia"] = {"continent/Asia"},
["Central Asia"] = {"continent/Asia"},
["West Asia"] = {"continent/Asia"},
["Western Asia"] = {"continent/Asia"},
["Southeast Asia"] = {"continent/Asia"},
["North Asia"] = {"continent/Asia"},
["Northern Asia"] = {"continent/Asia"},
["Anatolia"] = {"continent/Asia"},
["Asia Minor"] = {"continent/Asia"},
["Mesopotamia"] = {"continent/Asia"},
["North Africa"] = {"continent/Africa"},
["Central Africa"] = {"continent/Africa"},
["West Africa"] = {"continent/Africa"},
["East Africa"] = {"continent/Africa"},
["Southern Africa"] = {"continent/Africa"},
["Central America"] = {"continent/Central America"},
["Caribbean"] = {"continent/North America"},
["Polynesia"] = {"continent/Oceania"},
["Micronesia"] = {"continent/Oceania"},
["Melanesia"] = {"continent/Oceania"},
["Siberia"] = {"country/Russia", "continent/Asia"},
["Russian Far East"] = {"country/Russia", "continent/Asia"},
["South Wales"] = {"constituent country/Wales", "continent/Europe"},
["Balkans"] = {"continent/Europe"},
["West Bank"] = {"country/Palestine", "continent/Asia"},
["Gaza"] = {"country/Palestine", "continent/Asia"},
["Gaza Strip"] = {"country/Palestine", "continent/Asia"},
}
}
------------------------------------------------------------------------------------------
-- Category and display handlers --
------------------------------------------------------------------------------------------
local function city_type_cat_handler(data)
local entry_placetype = data.entry_placetype
local generic_before_non_cities = export.get_placetype_prop(entry_placetype, "generic_before_non_cities")
if not generic_before_non_cities then
internal_error("city_type_cat_handler called on placetype %s that doesn't have a `generic_before_non_cities`" ..
" setting", entry_placetype)
end
local plural_entry_placetype = export.pluralize_placetype(entry_placetype)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and not spec.is_city then
-- Categorize both in key, and in the larger polity that the key is part of, e.g. [[Hirakata]] goes in both
-- "Cities in Osaka Prefecture" and "Cities in Japan". (But don't do the latter if no_container_cat is set.)
local cap_plural_entry_placetype = ucfirst(plural_entry_placetype)
local retcats = {("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(key, spec))}
if container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(container.key, container.spec)))
end
end
return retcats
end
end
local function capital_city_cat_handler(data, non_city)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
-- The first time we're called we want to return something; otherwise we will be called for later-mentioned
-- holonyms, which can result in wrongly classifying into e.g. `National capitals`. Simulate the loop in
-- find_placetype_cat_specs() over holonyms so we get the proper `Cities in ...` categories as well as the capital
-- category/categories we add below.
local retcats
if not non_city and place_desc.holonyms then
for h_index, holonym in export.get_holonyms_to_check(place_desc, holonym_index) do
local h_placetype, h_placename = holonym.placetype, holonym.unlinked_placename
retcats = city_type_cat_handler {
entry_placetype = "city",
holonym_placetype = h_placetype,
holonym_placename = h_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if retcats then
break
end
end
end
if not retcats then
retcats = {}
end
-- Now find the appropriate capital-type category for the placetype of the holonym, e.g. 'State capitals'. If we
-- recognize the holonym among the known holonyms in [[Module:place/locations]], also add a category like 'State
-- capitals of the United States'. Truncate e.g. 'autonomous region' to 'region', 'union territory' to 'territory'
-- when looking up the type of capital category, if we can't find an entry for the holonym placetype itself (there's
-- an entry for 'autonomous community').
local capital_cat = export.placetype_to_capital_cat[holonym_placetype]
if not capital_cat then
capital_cat = export.placetype_to_capital_cat[holonym_placetype:gsub("^.* ", "")]
end
if capital_cat then
capital_cat = ucfirst(capital_cat)
local inserted_specific_variant_cat = false
if holonym_index then
-- Now find the first recognized holonym location. We don't stop when :also is seen because of the common pattern
-- where we use :also to specify that a given city is the capital at multiple surrounding levels.
local matching_group, matching_key, matching_spec, matching_container_trail, matching_holonym_index
for h_index = holonym_index, #place_desc.holonyms do
if place_desc.holonyms[h_index].placetype then
matching_group, matching_key, matching_spec, matching_container_trail = export.find_matching_holonym_location {
holonym_placetype = place_desc.holonyms[h_index].placetype,
holonym_placename = place_desc.holonyms[h_index].unlinked_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if matching_group then
matching_holonym_index = h_index
break
end
end
end
if matching_holonym_index == holonym_index then
if matching_container_trail[1] and not matching_spec.no_container_cat then
for _, container in ipairs(matching_container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
elseif matching_holonym_index then
-- Check to make sure that the holonym placetype we were called on is listed among the
-- divtypes of the location we found.
local function insert_specific_variant_if_possible(key, spec)
return export.get_equiv_placetype_prop(holonym_placetype, function(pt)
local plural_holonym_placetype = export.pluralize_placetype(pt)
local saw_matching_div
if spec.divs then
local divs = spec.divs
if type(divs) ~= "table" then
divs = {divs}
end
for _, div in ipairs(divs) do
if type(div) ~= "table" then
div = {type = div}
end
if plural_holonym_placetype == div.type then
saw_matching_div = true
break
end
end
end
if saw_matching_div then
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(key, spec)))
return true
end
return false
end)
end
if insert_specific_variant_if_possible(matching_key, matching_spec) then
inserted_specific_variant_cat = true
elseif not matching_spec.no_container_cat then
for _, containers in ipairs(matching_container_trail) do
local saw_no_container_cat = false
for _, container in ipairs(containers) do
if insert_specific_variant_if_possible(container.key, container.spec) then
inserted_specific_variant_cat = true
break
end
saw_no_container_cat = saw_no_container_cat or container.spec.no_container_cat
end
if inserted_specific_variant_cat or saw_no_container_cat then
break
end
end
end
end
else
-- This happens when in an invocation like {{place|en|capital city|s/Haryana,Punjab}} for
-- [[Chandigarh]]. We fall back to older code that doesn't depend on the holonym index existing.
-- FIXME: This may not be necessary. In the example just given, when processing Haryana we add to
-- [[:Category:en:State capitals of India]], and nothing extra gets added when processing Punjab.
-- Possibly we can just skip this case entirely.
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
end
if not inserted_specific_variant_cat then
insert(retcats, capital_cat)
end
else
-- We didn't recognize the holonym placetype; just put in 'Capital cities'.
insert(retcats, "Capital cities")
end
return retcats
end
--[=[
This is invoked specially for all placetypes (see the `*` placetype key at the bottom of `placetype_data`). This is used
in two ways:
# To add pages to generic holonym categories like [[:Category:en:Places in Merseyside, England]] (and
[[:Category:en:Places in England]]) for any pages that have `co/Merseyside` as their holonym.
# To categorize demonyms in bare placename categories like [[:Category:en:Merseyside, England]] if the demonym
description mentions `co/Merseyside` and doesn't mention a more specific placename that also has a category. (In this
case there are none, but we can have demonyms at multiple levels, e.g. in France for individual villages, departments,
administrative regions, and for the entire country, and for example we only want to categorize a demonym into
[[:Category:France]] if no more specific category applies.) Unlike when invoked from {{tl|place}}, a demonym
invocation only adds the most specific holonym category and not the category of any containing polity (hence if we
add [[:Category:en:Merseyside, England]] we won't also add [[:Category:England]]).
This code also handles cities; e.g. for the first use case above, it would be used to add a page that has `city/Boston`
as a holonym to [[:Category:en:Places in Boston]], along with [[:Category:en:Places in Massachusetts, USA]] and
[[:Category:en:Places in the United States]]. The city handler tries to deal with the possibility of multiple cities
having the same name. For example, the code in [[Module:place/locations]] knows about the city of [[Columbus]],
[[Ohio]], which has containing polities `Ohio` (a state) and `the United States` (a country). If either containing
polity is mentioned, the handler proceeds to return the key `Columbus` (along with `Ohio, USA` and `the United States`).
Otherwise, if any other state or country is mentioned, the handler returns nothing, and otherwise it assumes the
mentioned city is the one we're considering and returns `Columbus` etc. This works correctly if the place only mentions
Ohio and a holonym for a Columbus in a different country is encountered, because of the function
`augment_holonyms_with_container`, which adds the US as a holonym when Ohio is encountered.
The single parameter `data` is as in category handlers. The return value is a list of categories (without the preceding
language code).
]=]
local function generic_place_cat_handler(data)
local from_demonym = data.from_demonym
local retcats = {}
local function insert_retkey(key, spec)
if from_demonym then
insert(retcats, key)
else
insert(retcats, ("Địa danh của %s"):format(export.get_prefixed_key(key, spec)))
end
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
if not spec.no_generic_place_cat then
-- This applies to continents and continental regions.
insert_retkey(key, spec)
end
-- Categorize both in key, and in the larger location(s) that the key is part of, e.g. [[Hirakata]] goes in
-- both [[Category:Places in Osaka Prefecture, Japan]] and [[Category:Places in Japan]]. But not when
-- no_container_cat is set (e.g. for 'United Kingdom').
if not spec.no_container_cat then
for _, container_set in ipairs(container_trail) do
local stop_adding_containers = false
for _, container in ipairs(container_set) do
if not container.spec.no_generic_place_cat then
insert_retkey(container.key, container.spec)
end
if container.spec.no_container_cat then
stop_adding_containers = true
end
end
if stop_adding_containers then
break
end
end
end
return retcats
end
end
--[==[
Special category handler run for all placetypes that checks for specified division placetypes of known locations and
categorizes appropriately.
]==]
function export.political_division_cat_handler(data)
if data.from_demonym then
return
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
local divlists = {}
if spec.divs then
insert(divlists, spec.divs)
end
if spec.addl_divs then
insert(divlists, spec.addl_divs)
end
for _, divlist in ipairs(divlists) do
if type(divlist) ~= "table" then
divlist = {divlist}
end
for _, div in ipairs(divlist) do
if type(div) == "string" then
div = {type = div}
end
local sgdiv = export.maybe_singularize_placetype(div.type) or div.type
local prep = div.prep or "of"
local cat_as = div.cat_as or div.type
if type(cat_as) ~= "table" then
cat_as = {cat_as}
end
if not export.placetype_data[sgdiv] then
internal_error("Placetype %s associated with known location key %s and data %s not found in " ..
"`placetype_data`", sgdiv, key, spec)
end
if sgdiv == data.entry_placetype then
local retcats = {}
for _, pt_cat in ipairs(cat_as) do
if type(pt_cat) == "string" then
pt_cat = {type = pt_cat}
end
local pt_prep = pt_cat.prep or prep
insert(retcats, ucfirst(pt_cat.type) .. " " .. pt_prep .. " " ..
export.get_prefixed_key(key, spec))
end
return retcats
end
end
end
end
end
--[==[
This is used to add pages to "bare" categories like [[:Category:en:Georgia, USA]] for `[[Georgia]]` and any
foreign-language terms that are translations of the state of Georgia. We look at the page title (or its overridden value
in {{para|pagename}}) as well as the glosses in {{para|t}}/{{para|t2}} etc., various extra-info values such as the
modern names in {{para|modern}}, and any values specified using a form-of directive. We need to pay attention to the
entry placetypes specified so we don't overcategorize; e.g. the US state of Georgia is `[[Джорджия]]` in Russian but the
country of Georgia is `[[Грузия]]`, and if we just looked for matching names, we'd get both Russian terms categorized
into both [[:Category:ru:Georgia, USA]] and [[:Category:ru:Georgia]]. We also need to check the containing holonyms to
make sure there isn't a mismatch (so we don't e.g. categorize Newark, Delaware in [[:Category:en:Newark]], which is
intended for Newark, New Jersey).
]==]
function export.get_bare_categories(args, overall_place_spec)
local bare_cats = {}
local place_descs = overall_place_spec.descs
local possible_placetypes_by_place_desc = {}
for i, place_desc in ipairs(place_descs) do
possible_placetypes_by_place_desc[i] = {}
for _, placetype in ipairs(place_desc.placetypes) do
if not export.placetype_is_ignorable(placetype) then
local equivs = export.get_placetype_equivs(placetype, {register_former_as_non_former = true})
for _, equiv in ipairs(equivs) do
insert(possible_placetypes_by_place_desc[i], equiv.placetype)
end
end
end
end
local function check_term(term)
-- Treat Wikipedia links like local ones.
term = term:gsub("%[%[w:", "[["):gsub("%[%[wikipedia:", "[[")
term = export.remove_links_and_html(term)
term = term:gsub("^ ", "")
for i, place_desc in ipairs(place_descs) do
-- Iterate over all matching locations in case there are multiple, as with Delhi defined as
-- {{place|en|megacity/and/union territory|c/India|containing the national capital [[New Delhi]]}}.
for group, key, spec, container_trail in export.iterate_matching_holonym_location {
holonym_placetype = possible_placetypes_by_place_desc[i],
holonym_placename = term,
place_desc = place_desc,
} do
insert(bare_cats, key)
end
end
end
-- FIXME: Should we only do the following if the language is English (requires that the lang is passed in)?
-- We should always do it if `pagename` is given (as it is with {{tcl}}) but maybe not otherwise unless 1=en. There
-- are cases like [[Ankara]] = English name for capital of Turkey, but also the name in various languages for the
-- capital of Ghana (= English [[Accra]]). But this should get caught by mismatching the containing country. The
-- advantage of checking when the language isn't English is we catch those places that fail to give an English
-- translation but where the translation happens to be the same as the other-language spelling. However, I don't
-- know how often this situation occurs.
check_term(args.pagename or mw.loadData("Module:headword/data").pagename)
for _, t in ipairs(args.t) do
check_term(t)
end
local function check_termobj_list(terms)
for _, term in ipairs(terms) do
if term.eq then
check_term(term.eq)
end
if term.alt or term.term then
check_term(term.alt or term.term)
end
end
end
for _, extra_info_terms in ipairs(overall_place_spec.extra_info) do
local arg = extra_info_terms.arg
if arg == "modern" or arg == "now" or arg == "full" or arg == "short" then
check_termobj_list(extra_info_terms.terms)
end
end
for _, directive in ipairs(overall_place_spec.directives) do
check_termobj_list(directive.terms)
end
return bare_cats
end
--[==[
This is used to augment the holonyms associated with a place description with the containing polities. For example,
given the following:
`# {{tl|place|en|subprefecture|pref/Hokkaido}}.`
We auto-add Japan as another holonym so that the term gets categorized into [[:Category:Subprefectures of Japan]].
To avoid over-categorizing we need to check to make sure no other countries are specified as holonyms.
]==]
function export.augment_holonyms_with_container(place_descs)
for _, place_desc in ipairs(place_descs) do
if place_desc.holonyms then
-- This ends up containing a copy of the original holonyms, with the augmented holonyms inserted in their
-- appropriate position. We don't just put them at the end because some holonyms have use the `:also`
-- modifier, which causes category processing to restart at that point after generating categories for a
-- preceding holonym, and we don't want the preceding holonym's augmented holonyms interfering with
-- categorization of a later holonym. We proceed from right to left, and each time we augment, we copy
-- the holonyms with the augmented holonym(s) inserted appropriately and replace the place description's
-- holonyms with the augmented ones before the next iteration. The reason for this is so that e.g.
-- {{place|neighborhood|city/Birmingham|co/West Midlands|cc/England}} doesn't throw an error during the
-- augmentation process due to 'Birmingham' referring to two known locations (in England and Alabama). If
-- we go left to right, we will throw an ambiguity error on `city/Birmingham` because code to exclude
-- Birmingham, Alabama needs `c/United Kingdom` present (to cause a mismatch with `c/United States`),
-- which isn't yet present as the augmentation code hasn't gotten to `cc/England` yet. For similar
-- reasons, we need to include the augmented holonyms in the holonyms considered in the next iteration
-- rather than modifying the place description once at athe end.
for i = #place_desc.holonyms, 1, -1 do
local holonym = place_desc.holonyms[i]
if holonym.placetype and not export.placetype_is_ignorable(holonym.placetype) then
local group, key, spec, container_trail = export.find_matching_holonym_location {
holonym_placetype = holonym.placetype,
holonym_placename = holonym.unlinked_placename,
holonym_index = i,
place_desc = place_desc,
}
if group and container_trail[1] and not spec.no_auto_augment_container then
local augmented_holonyms = {}
for j = 1, i do
insert(augmented_holonyms, place_desc.holonyms[j])
end
for _, containers in ipairs(container_trail) do
local any_no_auto_augment_container = false
for _, container in ipairs(containers) do
any_no_auto_augment_container = any_no_auto_augment_container or
container.spec.no_auto_augment_container
local containing_type = container.spec.placetype
if type(containing_type) == "table" then
-- If the containing type is a list, use the first element as the canonical variant.
containing_type = containing_type[1]
end
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
-- Don't side-effect holonyms while processing them.
local new_holonym = {
-- By the time we run, the display has already been generated so we don't need to
-- set display_placename.
placetype = containing_type,
-- placename_to_key() for the group should correctly handle both full and elliptical
-- placenames, but the full placename seems less likely to be ambiguous. FIXME: We
-- should just store the key directly and use it when available to avoid having to
-- convert key to placename and back to key.
unlinked_placename = full_container_placename,
-- Indicate that this is an augmented holonym, and was derived from the specified
-- holonym. In iterate_matching_holonym_location(), we ignore augmented holonyms
-- derived from holonyms that are different from the holonym we're searching for but
-- of the same placetype. This is to correctly handle a situation like
-- {{place|river|dept/Ardèche,Gard,Vaucluse,Bouches-du-Rhône|c/France}}. Here,
-- `Ardèche` is in `r/Auvergne-Rhône-Alpes`, while `Gard` is in `r/Occitania` and
-- the other two are in `r/Provence-Alpes-Côte d'Azur`. Augmenting proceeds from
-- right to left, so after it adds `r/Provence-Alpes-Côte d'Azur` to
-- `Bouches-du-Rhône`, Vaucluse gets augmented correctly but `Gard` fails to match
-- in find_matching_holonym_location() because of the mismatch between augmented
-- `r/Provence-Alpes-Côte d'Azur` and actual `r/Occitania`. Similarly, all later
-- calls to find_matching_holonym_location() fail to match `Gard` (and likewise
-- `Ardèche`) against any known location. To deal with this, we mark augmented
-- holoynms as being augmented due to a source holonym, and when processing a given
-- holonym, ignore augmented holonyms from other holonyms of the same placetype.
-- The restriction to the same placetype is so that `Birmingham` still gets
-- correctly disambiguated to Birmingham, England in the example given above near
-- the top of this function, using the augmented holonym `c/United Kingdom` added by
-- the specified `cc/England` (whose placetype `constituent country` differs from
-- the placetype `city` of Birmingham).
augmented_from_holonym = holonym,
}
insert(augmented_holonyms, new_holonym)
-- But it is safe to modify other parts of the place_desc.
export.key_holonym_into_place_desc(place_desc, new_holonym)
end
if any_no_auto_augment_container then
break
end
end
for j = i + 1, #place_desc.holonyms do
insert(augmented_holonyms, place_desc.holonyms[j])
end
place_desc.holonyms = augmented_holonyms
end
end
end
end
end
end
-- Cat handler for district, areas, neighborhoods and suburbs. Districts are tricky because they can either be political
-- divisions or city neighborhoods. Areas similarly can be political divisions (rarely; specifically, in Kuwait), city
-- neighborhoods or larger geographical areas/regions. We handle this as follows:
-- (1) `placetype_data` cat entries for specific countries or country divisions take precedence over cat_handlers, so if
-- the user says {{tl|place|district|s/Maharashtra|c/India}}, we won't even be called because there is an entry that
-- categorizes into [[:Category|Districts of Maharashtra, India]].
-- (2) If we're called, we check the holonym we're called on to see if it is a recognized city, e.g. if we're called
-- using {{tl|place|district|city/Mumbai|s/Maharashtra|c/India}}. If so, we categorize under e.g.
-- [[:Category:Neighbourhoods of Mumbai]]. (Choosing the spelling "neighbourhoods" because we're in India.)
-- (3) If we're called and the holonym is not a recognized city, we check if the placetype has has_neighborhoods set.
-- If so, it's "city-like" and we categorize under the first containing polity that we recognize. For example, if
-- we're called using {{tl|place|district|town/Northampton|co/Hampshire|s/Massachusetts|c/US}}, we should recognize
-- town as "city-like" and categorize under [[:Category:Neighborhoods in Massachusetts]]. (Note "in" not "of", and
-- note the spelling "neighborhoods" because we're in the US.)
-- (4) If the holonym is not city-like, we do nothing. If there's a city or city-like placetype farther up (e.g. we're
-- called as {{tl|place|district|ward/Foo|mun/Bar|...}}), we will handle the city-like entity according to (2) or
-- (3) when called on that holonym. Otherwise either the categorization in (1) takes place or there's no
-- categorization.
local function district_neighborhood_cat_handler(data)
local function get_plural_entry_placetype(location_spec, container_trail)
if data.entry_placetype == "suburb" then
return "Suburbs"
else
-- Check for `british_spelling` setting on the spec itself or any container.
local uses_british_spelling = location_spec.british_spelling
if uses_british_spelling == nil and container_trail then
for _, container_set in ipairs(container_trail) do
local must_outer_break = false
for _, container in ipairs(container_set) do
if container.spec.british_spelling ~= nil then
uses_british_spelling = container.spec.british_spelling
must_outer_break = true
break
end
end
if must_outer_break then
break
end
end
end
return uses_british_spelling and "Neighbourhoods" or "Neighborhoods"
end
end
-- First check the immediate holonym to see if it's a city or a city-like top-level entity (Hong Kong, Bonaire,
-- etc.)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and spec.is_city then
return {get_plural_entry_placetype(spec, container_trail) .. " of " .. export.get_prefixed_key(key, spec)}
end
-- If the entry placetype is neighbo(u)rhood, assume it is a neighborhood even if there isn't a city-like
-- entity father up the chain. (E.g. due to a mistaken use of m/ instead of mun/ for municipality.)
local has_neighborhoods
local entry_placetype = data.entry_placetype
if entry_placetype == "neighborhood" or entry_placetype == "neighbourhood" or entry_placetype == "suburb" then
has_neighborhoods = true
else
-- Otherwise, make sure the current holonym is city-like.
has_neighborhoods = export.get_equiv_placetype_prop(data.holonym_placetype, function(pt)
return export.get_placetype_prop(pt, "has_neighborhoods")
end, {continue_on_nil_only = true})
end
if has_neighborhoods then
-- Loop up the holonyms, looking for city and city-like entities in case of e.g. [[Sepulveda]] written
-- {{place|en|neighborhood|valley/San Fernando Valley|city/Los Angeles|s/California|c/USA}}
-- but also look for a recognizable poldiv, and if so categorize as "Neighborhoods in POLDIV". We need
-- to start with the current holonym, which is especially important for neighborhoods and suburbs that
-- may have the first holonym be a recognizable province, etc. but can't hurt otherwise. (Previously
-- we skipped the first/current holonym.)
for other_holonym_index, other_holonym in export.get_holonyms_to_check(data.place_desc,
data.holonym_index) do
local other_holonym_data = {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = data.place_desc,
}
local group, key, spec, container_trail = export.find_matching_holonym_location(other_holonym_data)
if group and not spec.is_former_place then
return {get_plural_entry_placetype(spec, container_trail) .. (spec.is_city and " of " or " in ") ..
export.get_prefixed_key(key, spec)}
end
end
end
end
function export.check_already_seen_string(holonym_placename, already_seen_strings)
local canon_placename = ulower(m_links.remove_links(holonym_placename))
if type(already_seen_strings) ~= "table" then
already_seen_strings = {already_seen_strings}
end
for _, already_seen_string in ipairs(already_seen_strings) do
if canon_placename:find(already_seen_string) then
return true
end
end
return false
end
-- Prefix display handler that adds a prefix such as "Metropolitan Borough of " to the display
-- form of holonyms. We make sure the holonym doesn't contain the prefix or some variant already.
-- We do this by checking if any of the strings in ALREADY_SEEN_STRINGS, either a single string or
-- a list of strings, or the prefix if ALREADY_SEEN_STRINGS is omitted, are found in the holonym
-- placename, ignoring case and links. If the prefix isn't already present, we create a link that
-- uses the raw form as the link destination but the prefixed form as the display form, unless the
-- holonym already has a link in it, in which case we just add the prefix.
local function prefix_display_handler(prefix, holonym_placename, already_seen_strings)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(prefix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return prefix .. " " .. holonym_placename
end
return prefix .. " [[" .. holonym_placename .. "]]"
end
-- Suffix display handler that adds a suffix such as " parish" to the display form of holonyms.
-- Works identically to prefix_display_handler but for suffixes instead of prefixes.
local function suffix_display_handler(suffix, holonym_placename, already_seen_strings, include_suffix_in_link)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(suffix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return holonym_placename .. " " .. suffix
end
if include_suffix_in_link then
return "[[" .. holonym_placename .. " " .. suffix .. "]]"
else
return "[[" .. holonym_placename .. "]] " .. suffix
end
end
-- Display handler for boroughs. New York City boroughs are display as-is. Others are suffixed
-- with "borough".
local function borough_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.new_york_boroughs[unlinked_placename] then
-- Hack: don't display "borough" after the names of NYC boroughs
return holonym_placename
end
return suffix_display_handler("borough", holonym_placename)
end
local function county_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
-- Display handler for Irish counties. Irish counties are displayed as e.g. "County [[Cork]]".
if m_locations.ireland_counties["Hạt " .. unlinked_placename .. ", Ireland"] or
m_locations.northern_ireland_counties["Hạt " .. unlinked_placename .. ", Bắc Ireland"] then
return prefix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Taiwanese counties. Taiwanese counties are displayed as e.g. "[[Chiayi]] County".
if m_locations.taiwan_counties[unlinked_placename .. ", Đài Loan"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Romanian counties. Romanian counties are displayed as e.g. "[[Cluj]] County".
if m_locations.romania_counties[unlinked_placename .. ", România"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- FIXME, we need the same for US counties but need to key off the country, not the specific county.
-- Others are displayed as-is.
return holonym_placename
end
-- Display handler for prefectures. Japanese prefectures are displayed as e.g. "[[Fukushima]] Prefecture".
-- Others are displayed as e.g. "[[Fthiotida]] prefecture".
local function prefecture_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
local suffix = m_locations.japan_prefectures[unlinked_placename .. ", Nhật Bản"] and "Prefecture" or "prefecture"
return suffix_display_handler(suffix, holonym_placename)
end
-- Display handler for provinces of Bulgaria, Iran, Laos, North and South Korea, Thailand, Turkey and Vietnam. Recognized
-- provinces are displayed as e.g. "[[Gyeonggi]] Province" or "[[Antalya]] Province". Others are displayed as-is.
local function province_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if
m_locations.bulgaria_provinces[unlinked_placename .. ", Bulgaria"] or
m_locations.iran_provinces[unlinked_placename .. ", Iran"] or
m_locations.laos_provinces[unlinked_placename .. ", Lào"] or
m_locations.north_korea_provinces[unlinked_placename .. ", Cộng hòa Dân chủ Nhân dân Triều Tiên"] or
m_locations.south_korea_provinces[unlinked_placename .. ", Hàn Quốc"] or
m_locations.thailand_provinces[unlinked_placename .. ", Thái Lan"] or
m_locations.turkey_provinces[unlinked_placename .. ", Thổ Nhĩ Kỳ"] or
m_locations.vietnam_provinces[unlinked_placename .. ", Việt Nam"] then
return suffix_display_handler("Province", holonym_placename)
end
return holonym_placename
end
-- Display handler for Nigerian states. Nigerian states are display as "[[Kano]] State". Others are displayed as-is.
local function state_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.nigeria_states[unlinked_placename .. ", Nigeria"] then
return suffix_display_handler("State", holonym_placename)
end
return holonym_placename
end
-- Display handler for voivodeships. Display as e.g. [[Subcarpathian Voivodeship]].
local function voivodesip_display_handler(holonym_placetype, holonym_placename)
return suffix_display_handler("Voivodeship", holonym_placename, nil, "include_suffix_in_link")
end
------------------------------------------------------------------------------------------
-- Placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
Main placetype data structure. This specifies, for each canonicalized placetype, various properties. The keys are
placetypes (in the singular, except for category-only placetypes, which are plural and followed by `!`), and the value
is a table of properties. The `"*"` key is special and is used for adding "generic" categories of the form
`Places in ``location`` `; it runs for all entry placetypes. Keys in the form of plural placetypes followed by `!` are
used only in [[Module:category tree/topic cat/data/Places]] for specifying the properties of categories containing the
specified placetype, esp. bare categories like [[:Category:States and territories]] (rather than qualified categories
like [[:Category:States and territories of Australia]]).
Keys under the value table for a given placetype of are two types: ''property keys'' (which specify the value of
specific properties) and ''categorization keys'' (which tell how to categorize certain sorts of holonyms if the
placetype in question occurs as an entry placetype). Categorization keys are either the special value `default` or are
wildcard strings with a slash in them, such as `"country/*"`. Note that only wildcard strings are currently allowed
directly in the placetype data; everything else is handled through category handlers, either per-placetype or special
(such as `political_division_cat_handler`). The algorithm for how category keys and handlers are used to generate
categories is described at the top of [[Module:place]].
There are several recognized property keys, of various types:
1. The following link-related property keys are recognized:
* `link`: '''Required''' except in category-only placetypes ending in `!`. Describes how to link and display the
placetype in the formatted description when occurring as an entry placetype. Also used for formatting pluralized
placetypes (which may occur in entry placetypes, esp. new-format ones, such as `two <<islands>>`) and may occur in
categories). The possible values are:
*# `true`: Link to the same-named Wiktionary entry. This creates a raw link, e.g. `<nowiki>[[city]]</nowiki>`, which is
converted to an English-specific link by JavaScript postprocessing. If the placetype is plural, this creates a
two-part raw link e.g. `<nowiki>[[city|cities]]</nowiki>`.
*# `"w"`: Link to the same-named Wikipedia entry. This creates a two-part link, e.g.
`<nowiki>[[w:census town|census town]]</nowiki>`, or `<nowiki>[[w:census town|census towns]]</nowiki>` if the
placetype is given plural.
*# `"+..."`: Create a two-part link to the entry following the `+` sign. For example, if `cercle` specifies
`"+w:cercles of Mali"`, a two-part link `<nowiki>[[w:cercles of Mali|cercle]]</nowiki>` will be generated, or
`<nowiki>[[w:cercles of Mali|cercles]]</nowiki>` if plural `cercles` is specified.
*# `"separately"`: Link each word separately. For example, if `administrative territory` specifies `"separately"`, it
will be linked as `<nowiki>[[administrative]] [[territory]]</nowiki>`, or as
`<nowiki>[[administrative]] [[territory|territories]]</nowiki>` if plural `administrative territories` is given.
*# another string: Use that string directly. If the placetype is plural, `pluralize()` in [[Module:en-utilities]] is
called on the string, which will correctly pluralize most strings, including those with links in them. (If there
are multiple links, the display form of the last link is pluralized.)
*# `false`: This placetype is not allowed as an entry placetype. An error will be thrown if this placetype is given as
an entry placetype. This is specified for internal-use placetypes, especially placetypes used in conjunction with
the qualifiers `former`, `ancient`, `historical` and such.
* `plural_link`: If specified and the placetype is plural, use the value in place of generating a pluralized version of
the link spec in `link`. Most commonly, this is either a string with links in it (which is used directly) or the
value `false`, indicating that the placetype cannot occur plural. (This is used for example by `caplc`, which displays
as `<nowiki>[[capital]] and [[large]]st [[city]]</nowiki>`, where a plural version doesn't make sense.) Generally if
this is specified, `plural` also needs to be specified to give a special placetype plural; this situation occurs
especially with multiword placetypes where something other than the last word is pluralized. An example is
`town with bystatus`, whose plural is `towns with bystatus`, which needs to be explicitly given. This example uses
`link = <nowiki>"[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>` ({{m|nb|bystatus}}) is a Norwegian
Bokmål word, and template calls aren't currently permitted in link strings), along with
`plural_link = <nowiki>"[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>`.
* `category_link`: Spec indicating how to display the placetype when occurring in category descriptions. Defaults to
the value of `link`, and in turn is overridden by more specific `category_link_*` keys; see below. Category-only
placetypes (which are plural and end in `!`) usually use `category_link` in preference to `link`. The value of
`category_link` can be any of the types of specs given above, but most commonly is a plural string with links in it,
spelling out the description; in this case it is used directly. When both `category_link` and `link` are given, the
value in `category_link` is typically longer and more descriptive. For example, `polity` uses `link = true`, which
just generates a link `<nowiki>[[polity]]</nowiki>` or plural `<nowiki>[[polity|polities]]</nowiki>`, but specifies a
separate `category_link = <nowiki>"[[independent]] or [[semi-]][[independent]] [[polity|polities]]"</nowiki>`, which
clarifies in the category description what a polity is.
* `category_link_top_level`: Spec indicating how to display top-level (bare/unqualified) categories, i.e. categories
where the placetype is not followed by `in ``location`` ` or `of ``location`` `. If given, this overrides
`category_link` for this type of category.
* `category_link_before_noncity`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` does not refer to a city. If given, this overrides
`category_link` for this type of category.
* `category_link_before_city`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` refer to a city. If given, this overrides `category_link` for
this type of category. An example where this is given is `neighborhood`, which uses the following specs:<ol>
<li>`link = true`</li>
<li>`category_link = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]"</nowiki>`</li>
<li>`category_link_before_city = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions"</nowiki>`</li>
</ol> This has the effect of making the entry placetype `neighborhood` display as just
`<nowiki>[[neighborhood]]</nowiki>`, while e.g. a category like `Neighborhoods of Chicago` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[Chicago]], ...</nowiki>` and a category like
`Neighborhoods in Illinois, USA` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]] in [[Illinois]], ...</nowiki>`.
* `disallow_in_entries`: If specified, this placetype cannot occur as an entry placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
* `disallow_in_holonyms`: If specified, this placetype cannot occur as a holonym placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
2. There is currently one fallback-related property key recognized:
* `fallback`: If specified, its value is a placetype which will be used for categorization purposes if no categories
get added using the placetype itself. As an example, `branch` sets a fallback of `river` but also sets
`preposition = "of"`, meaning that {{tl|place|en|branch|riv/Mississippi}} displays as `a branch of the Mississippi`
(whereas `river` itself uses the preposition `in`), but otherwise categorizes the same as `river`. A more complex
example is `area`, which sets a fallback of `geographic and cultural area` and also sets a category handler that
checks for cities or city-like entities (e.g. boroughs) occurring as holonyms and categorizes the toponym under
[[:Category:Neighborhoods of CITY]] (for recognized cities) or otherwise [[:Category:Neighborhoods of POLDIV]] (for
the nearest containing recognized location). In addition, `area` is set as a political division of Kuwait, meaning if
`c/Kuwait` occurs as holonym, the toponym is categorized under [[:Category:Areas of Kuwait]]. If none of these
categories trigger, the fallback of `geographic and cultural area` will take effect, and the toponym will be
categorized as e.g. [[:Category:Geographic and cultural areas of England]].
3. There is currently one property to control irregular plurals of placetypes:
* `plural`: If specified, its value is the plural of the placetype. Otherwise, the default pluralization algorithm in
[[Module:en-utilities]] applies (which correctly pluralizes most words, including those ending in `-y`, `-ch`, `-sh`,
`-x`, etc.). The value of `plural` is also used when converting a pluralized placetype into its singular equivalent;
for example, since the placetype `kibbutz` has `plural = "kibbutzim"`, the placetype `kibbutzim` will be recognized
as a plural and singularized to `kibbutz`. For this reason, it's occasionally necessary to specify a `plural` value
even when the default pluralization algorithm works correctly, if the default singularization algorithm won't
correctly reverse the pluralization (as with `pass` and other terms ending in `-ss`).
4. The following property keys relate to generating categories for entry placetypes and specifying the parents of those
categories:
* `class`: The general class of placetype. This is used for various purposes: (a) to categorize placetypes preceded by
a qualifier such as `former`, `ancient`, `medieval` or `historical` (note that these placetypes are not all treated
alike); (b) to determine the parent category of bare placetype categories (e.g. [[:Category:Villages]] for placetype
`village`); (c) to determine whether to add a parent category `political divisions of specific countries` to
qualified placetype categories (e.g. [[:Category:Villages in Mali]]). The possible values are:
*# `polity`: a more-or-less sovereign/independent polity, such as a country, kingdom or empire.
*# `subpolity`: a non-sovereign division of a polity, above the level of an individual settlement.
*# `settlement`: a city or smaller equivalent, such as a village. This also includes administrative divisions of a
settlement, such as wards and barangays.
*# `non-admin settlement`: similar to a settlement but without administrative or political significance, such as an
unincorporated community, farm or neighborhood.
*# `capital`: a settlement that is a capital. A former capital is generally still in existence, just not the capital
any more.
*# `natural feature`: any non-man-made feature, such as a lake, mountain, island, ocean, etc.
*# `man-made structure`: a man-made feature below the level of a neighborhood, such as a house, airport, university,
metro station, park or the like.
*# `geographic region`: a geographic or cultural region or area that has no administrative significance. These may vary
greatly in size but typically have some sort of cultural significance (possibly historical). The `former`, `ancient`,
etc. qualifier has no effect on the category of these placetypes.
*# `generic place`: a place that isn't further qualified into any specific subtype.
* `former_type`: The class of placetype used for categorizing placetypes preceded by a qualifier such as `former`,
`ancient`, `medieval` or `historical`. The possible values are the same as for `class` but with the addition of
`dependent territory` (for colonies, protectorates and the like) and `!` (ignore the historical/former/ancient/etc.
qualifier; used e.g. with `fictional location` and `mythological location`). If not specified, the value of `class`
is used. When a qualifier such as `former`, `ancient`, `medieval` or `historical` is encountered (specifically, those
in `former_qualifiers`), it is mapped using `former_qualifiers` to the appropriate internal qualifier or qualifiers
(one or both of `ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
qualifiers), which is prepended to the value of `former_type` or `class` to form a placetype whose properties are
looked up to determine how to categorize the toponym in question. For example, if `medieval village` is given, we map
`medieval` to `ANCIENT` and `FORMER`, and `village` to its `class` of `settlement`, and enter the placetypes
`ANCIENT settlement` and `FORMER settlement` (in that order) into the list of equivalent placetypes returned by
`get_placetype_equivs`. In this case, there is an entry in `placetype_data` for `ANCIENT settlement`, so its default
category spec `Ancient settlements` is used as the category. If on the other hand `medieval kingdom` is given, where
`kingdom` has a `class` value `polity`, we first look up `ANCIENT polity`, see there is no entry in `placetype_data`
for it, and then look up `FORMER polity`, which exists and has a default category spec `Former polities`, which is
used as the category. Note that if the placetype following the "former" qualifier is recognized in `placetype_data`
but has no `former_type` or `class` and no fallback with a `former_type` or `class` specified, it is an internal
error; but if the placetype isn't recognized (e.g. something like `former greenhouse` is specified and we don't have
an entry for `greenhouse`), we just track the occurrence and end up not categorizing.
* `bare_category_parent`: This specifies the first parent category of a bare placetype category named according to the
placetype in question (e.g. [[:Category:Atolls]] for placetype `atoll`, or [[:Category:Named buildings]] for
placetype `named buildings!`). If not specified, the first parent category is determined by the value of `class`,
using the mapping `class_to_bare_category_parent` in [[Module:category tree/topic cat/data/Places]].
* `addl_bare_category_parents`: Extra parent categories to add a bare placetype category to (see `bare_category_parent`
just above).
* `bare_category_breadcrumb`: Breadcrumb for bare placetype categories. Also used as the sort key of
`bare_category_parent` if it is a string.
* `inherently_former`: If specified and the given placetype is used as an entry placetype, act as if `former` or
`ancient` (depending on the value of `inherently_former`) were prefixed to the placetype. This is for placetypes that
always refer to no-longer-existing entities, such as `satrapy` and `treaty port`. The value of `inherently_former` is
a list of internal qualifiers (one or more of `ANCIENT` and/or `FORMER`), just as for `former_qualifiers`, and the
implementation is the same.
* `cat_handler`: Handler used to generate the categories to add a given toponym to, if its entry placetype is the
placetype in question. Generally the `cat_handler` function checks the holonyms specified in order to determine which
category or categories to generate. For example, `district_neighborhood_cat_handler` handles placetypes `district`,
`neighborhood`, `subdivision`, `suburb` and the like, and either adds the toponym to a category like
`Neighborhoods of ``city`` ` (if a recognized city is given as a holonym), or otherwise a category like
`Neighborhoods in ``location`` ` (for the first recognized non-city location given as a holonym, if an unrecognized
city or city-like entity is given before the recognized non-city). The algorithm that runs the category handlers
iterates over holonyms from left to right, running the `cat_handler` function on each holonym in turn until one or
more categories are returned; see below for more specifics. (Note that countries for which e.g. a `district` is a
political division do not get the corresponding category added by the `district_neighborhood_cat_handler` function but
by `political_division_cat_handler`.) `cat_handler` functions are called with one argument, `data`, describing the
resolved entry placetype (i.e. after resolving placetype aliases and fallbacks) and the holonym being processed. The
return value should be a list of category specs (categories minus the langcode prefix, with `+++` standing for the
holonym key, or the value `true`, which stands for ` ``Placetypes`` in/of ``Holonym`` `, i.e. the pluralized placetype
with the appropriate preposition as specified in `placetype_data`). `data` contains the following fields:
** `entry_placetype`: the resolved entry placetype for the entry placetype being processed (i.e. it will always have an
entry in `placetype_data` but may not be the original placetype given by the user);
** `holonym_placetype` and `holonym_placename`: the holonym placetype and placename being processed;
** `holonym_index`: the index of the holonym being processed, or {nil} if we're handling an overriding holonym (FIXME:
we will change the overriding holonym algorithm so there will be an index even when processing overriding holonyms);
** `place_desc`: a full description of the {{tl|place}} call, as specified at the top of [[Module:place]];
** `from_demonym`: If set, we are called from [[Module:demonym]], triggered by {{tl|demonym-adj}} or
{{tl|demonym-noun}}, instead of being triggered by {{tl|place}}.
* `has_neighborhoods`: If `true`, the specified placetype is city-like. This is used in the
`district_neighborhood_cat_handler` to determine whether to add a category such as `Neighborhoods in ``location`` `;
see the section just above on `cat_handler`.
5. The following preposition-related property keys are recognized:
* `preposition`: The preposition used after this placetype when it occurs as an entry placetype. Defaults to `"in"`.
* `generic_before_non_cities`: If specified, the appropriate category description handler in
[[Module:category tree/topic cat/data/Places]] will recognize categories of the form
` ``Placetype`` in/of ``location`` ` for the specified placetype and preposition, if ``location`` is a non-city. This
is used to generate descriptions for categories added by category handlers and by explicit category specs in the
placetype data. All placetypes that specify `generic_before_non_cities` or `generic_before_cities` *MUST* also specify
a value for `class` so that the category tree code can determine whether it's a political or non-political division.
* `generic_before_cities`: Like `generic_before_non_cities` but for locations referring to cities.
6. The following property keys control the auto-addition of affixes when formatting holonyms of a particular placetype:
* `affix_type`: If specified, add the placetype as an affix before or after holonyms of this placetype. Possible values
are:
*# `"pref"` (the holonym will display as `(the) placetype of Holonym`, where `the` appears when the holonym directly
follows an entry placetype);
*# `"Pref"` (same as `"pref"` but the placetype is capitalized; each word is capitalized if there are multiple);
*# `"suf"` (the holonym will display as `Holonym placetype`);
*# `"Suf"` (the holonym will display as `Holonym Placetype`, i.e. same as `"suf"` but the placetype is capitalized).
* `suffix`: String to use in place of the placetype itself when the placetype is displayed as a suffix after a holonym.
Note that `suffix` can be used independently of `affix_type` because the user can also request a suffix explicitly
using a syntax like `adr:suf/Occitania`, which will display as `Occitania region` because the placetype
`administrative region` specifies `suffix = "region"`.
* `prefix`: Like `suffix` but for use when the placetype is displayed as a prefix before the holonym.
* `affix`: Like `suffix` and `prefix` but for use when the placetype is displayed as an affix either before or after the
holonym. If both `suffix` or `prefix` and `affix` are given for a single placetype, `suffix` or `prefix` take
precedence.
* `no_affix_strings`: String or list of strings that, if they occur in the holonym, suppress the addition of any affix
requested using `affix_type`. Defaults to the placetype itself. For example, `autonomous okrug` specifies
`affix_type = "Suf"` so that `aokr/Nenets` displays as `Nenets Autonomous Okrug`, but also specifies
`no_affix_strings = "okrug"` so that `aokr/Nenets Okrug` or `aokr/Nenets Autonomous Okrug` displays as specified,
without a redundant `Autonomous Okrug` added. Matching is case-insensitive but whole-word.
* `display_handler`: A function of two arguments, `holonym_placetype` and `holonym_placename` (specifying a holonym).
Its return value is a string specifying the display form of the holonym.
7. The following property keys control the indefinite and definite articles used before entry placetypes and/or holonyms
of the specified placetype.
* `entry_placetype_use_the`: Use `"the"` before this placetype when it occurs as an entry placetype.
* `entry_placetype_indefinite_article`: Indefinite article used before this placetype when it occurs as an entry
placetype (usually `"a"`, specifically for placetypes beginning with u- that don't take the indefinite article
`"an"`). Defaults to the appropriate indefinite article (`"a"` or `"an"` depending on whether the placetype begins
with a vowel). Overridden by `entry_placetype_use_the`, and unlike for most properties, does not apply to equivalent
placetypes (i.e. fallbacks or those formed by removing a qualifier from the beginning); only to the exact placetype
specified.
* `holonym_use_the`: Use `"the"` before holonyms of this placetype.
'''NOTE:'''
# The `link` property must be specified on all placetypes, except those ending in `!` (category-only placetypes), which
must have either `link` or `category_link` specified.
# Either the `class` or `former_type` property must be specified on all placetypes not ending in `!` that do not have a
fallback (if a placetype has a fallback and omits the `class` and `former_type` properties, they are taken from the
fallback). An internal error will result if a placetype has no `class` or `former_type` property derivable either
directly or through a fallback, if an attempt is made to categorize a former/ancient/historical/etc. entity of this
placetype.
# It is possible to have multiple levels of fallback (e.g. `frazione` falls back to `hamlet`, which falls back
to `village`). Fallback loops will cause an internal error. All placetypes specified as fallbacks must exist in
`placetype_data` or an internal error occurs.
]==]
export.placetype_data = {
--[=[
If you need to sort the following, do this (using Vim):
1. Make sure all full-line comments are within the { ... } table, or are moved after and on the same line as single-line
entries.
2. Make sure the table uses tabs everywhere for indent, and not spaces.
3. Mark the top of the table with `ma`, go to the bottom and execute the following two lines in sequence:
:'a,.s/\n/\\n/g
:s/\\n\(\t\[\)/\r\1/g
The first command converts every newline to a literal `\n` sequence, so the whole thing becomes a single line, while
the second command restores the newlines before the beginning of each entry. The effect is to convert all entries to
a single line while not losing any information. (Potentially a negative lookahead could be used to do it all in one
command.)
4. Execute the following to sort:
:'a,.!perl -pe 's/^(\t\[")(.*?)(".*)$/$2 @@@ $1$2$3/' | sort -f | perl -pe 's/.*? @@@ //'
Note that a simple `sort -f` (where `-f` means case-insensitive) would almost work, but it would sort "hill station"
before "hill" and "county borough" before "county" because the space after e.g. "hill station" sorts before the
quotation mark after e.g. "hill". The above command deals with this by extracting the key, prepending it followed by
` @@@ `, sorting, and then removing key (the classic decorate-sort-undecorate pattern).
5. Put the table back to multi-line format by marking the top of the table with `ma`, going to the bottom and executing
:'a,.s/\\n/\r/g
Note that for some reason, in order to get a match a newline in the left side of a replacement, you must use \n, but
to insert a newline in the right sode of a replacement you must use \r.
]=]
["*"] = {
link = false,
cat_handler = generic_place_cat_handler,
},
["administrative atoll"] = {
-- Maldives
link = "+w:administrative divisions of the Maldives",
preposition = "of",
class = "subpolity",
},
["administrative capital"] = {
link = "w",
fallback = "capital city",
},
["administrative center"] = {
link = "w",
fallback = "non-city capital",
},
["administrative centre"] = {
link = "w",
fallback = "administrative center",
},
["administrative county"] = {
link = "w",
fallback = "county",
},
["administrative district"] = {
link = "w",
fallback = "district",
},
["administrative headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["administrative region"] = {
link = true,
preposition = "của",
suffix = "region", -- but prefix is still "administrative region (of)"
fallback = "region",
class = "subpolity",
},
["administrative seat"] = {
link = "w",
fallback = "administrative centre",
},
["administrative territory"] = {
link = "separately",
preposition = "of",
suffix = "territory", -- but prefix is still "administrative territory (of)"
fallback = "territory",
class = "subpolity",
},
["administrative unit"] = {
-- Grrr, it's difficult to generalize about "administrative units". In Albania, "administrative unit" is an
-- official term for a city-level division of municipalities; Wikipedia renders it using the more practical term
-- "commune". In Pakistan, "administrative unit" is a collective term used to refer to all the different types
-- of first-level divisions (four provinces, one federal territory, and two "disputed territories", i.e. Azad
-- Kashmir and Gilgit-Balistan, that are variously described). For this reason, we set no fallback, but we need
-- to include this so that it can be used as a placetype for Albania, categorizing as communes.
link = "w",
class = "subpolity",
},
["administrative village"] = {
link = "w",
preposition = "of",
has_neighborhoods = true,
class = "settlement",
},
["aimag"] = {
-- used in Mongolia, Russia and China (Inner Mongolia); in Mongolia, equivalent to a province;
-- in China, equivalent to a prefecture (below a province); in Russia, equivalent to a municipal district.
link = "w",
fallback = "prefecture",
},
["airport"] = {
link = true,
class = "man-made structure",
default = {true},
},
["alliance"] = {
link = true,
fallback = "confederation",
},
["archipelago"] = {
link = true,
fallback = "island",
},
["area"] = {
link = true,
preposition = "of",
fallback = "geographic and cultural area",
-- Areas can either be administrative divisions (specifically of Kuwait) or geographic areas. Assume the former
-- when categorizing 'Areas' but the latter when handling e.g. 'historical area'.
class = "subpolity",
former_type = "geographic region",
cat_handler = district_neighborhood_cat_handler,
},
["arm"] = {
link = true,
preposition = "of",
class = "natural feature",
default = {"Seas"},
},
["arrondissement"] = {
link = true,
preposition = "of",
-- FIXME!!! Grrrrr!!! In some countries, arrondissements are divisions of cities; in others, they are divisions
-- of departments or provinces. Need to conditionalize on the country for both of the following.
class = "subpolity",
has_neighborhoods = true,
},
["associated province"] = {
link = "separately",
fallback = "province",
},
["atoll"] = {
-- FIXME! Atolls are administrative divisions of the Maldives but natural features elsewhere. Need to
-- conditionalize `class` on the country. See also `administrative atoll`.
link = true,
class = "natural feature",
bare_category_parent = "islands",
default = {true},
},
["autonomous city"] = {
link = "w",
preposition = "of",
fallback = "city",
has_neighborhoods = true,
},
["autonomous community"] = {
-- Spain; refers to regional entities, not village-like entities, as might be expected from "community"
link = true,
preposition = "of",
class = "subpolity",
},
["autonomous island"] = {
-- Comoros; seems like an administrative atoll of the Maldives.
link = "+w:autonomous islands of Comoros",
preposition = "of",
class = "subpolity",
},
["autonomous oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "oblast",
class = "subpolity",
},
["autonomous okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "okrug",
class = "subpolity",
},
["autonomous prefecture"] = {
link = true,
fallback = "prefecture",
},
["autonomous province"] = {
link = "w",
fallback = "province",
},
["autonomous region"] = {
link = "w",
preposition = "of",
fallback = "administrative region",
-- "administrative region" sets an affix of "region" but we want to display as "Tibet Autonomous Region"
-- if the user writes 'ar:Suf/Tibet'.
affix = "autonomous region",
},
["autonomous republic"] = {
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territorial unit"] = {
-- Moldova; only two of them, one for Gagauzia and one for Transnistria.
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territory"] = {
link = "w",
fallback = "dependent territory",
},
["bailiwick"] = {
-- Jersey, etc.
link = true,
fallback = "polity",
},
["barangay"] = {
-- Philippines
link = true,
class = "settlement",
-- Barangays are formal administrative divisions of a city rather than informal neighborhoods, but can use
-- some of the properties of a neighborhood.
fallback = "neighborhood",
},
["barrio"] = {
-- Spanish-speaking countries; Philippines
link = true,
-- FIXME: Not completely correct, in some countries barrios are formal administrative divisions of a city.
-- `class` will need to conditionalize on the country to be completely correct.
fallback = "neighborhood",
},
["basin"] = {
link = true,
fallback = "lake",
},
["bay"] = {
link = true,
preposition = "of",
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["beach"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"water"},
default = {true},
},
["beach resort"] = {
link = "w",
fallback = "resort town",
},
["bishopric"] = {
link = true,
fallback = "polity",
},
["vùng nước!"] = {
-- FIXME: This is (maybe?) a type category not a name category. There should be an option for this. We need to
-- straighten out the type vs. name vs. related-to issue.
category_link = "vùng nước",
class = "natural feature",
addl_bare_category_parents = {"địa mạo", "hệ thống sinh thái", "nước"},
},
["borough"] = {
link = true,
preposition = "of",
display_handler = borough_display_handler,
has_neighborhoods = true,
-- "former borough" could be a former settlement or a former part of a city but seems more likely to
-- be a former subpolity, particularly in England. FIXME, we really need a handler to take care of this
-- properly.
class = "subpolity",
-- Grr, some boroughs are city-like but some (e.g. in Britain) may be larger.
},
["borough seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["branch"] = {
link = true,
preposition = "of",
fallback = "river",
},
["bridge"] = {
link = true,
class = "man-made structure",
default = {"Named bridges"},
},
["building"] = {
link = true,
class = "man-made structure",
default = {"Named buildings"},
},
["built-up area"] = {
link = "w",
fallback = "area",
},
["burgh"] = {
link = true,
fallback = "borough",
},
["business park"] = {
link = true,
fallback = "park",
},
["caliphate"] = {
link = true,
fallback = "polity",
},
["canton"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["cape"] = {
link = true,
fallback = "headland",
},
["capital"] = {
link = true,
fallback = "capital city",
},
["capital city"] = {
link = true,
category_link = "[[capital city|capital cities]]: the [[seat of government|seats of government]] for a country or [[political]] [[division]] of a country",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
bare_category_parent = "cities",
cat_handler = capital_city_cat_handler,
default = {true},
-- The following is necessary so that e.g. [[Melbourne]] defined as {{place|en|capital city|s/Victoria|c/Australia}}
-- gets categorized in the bare category [[Category:en:Melbourne]]; otherwise placetype 'capital city' wouldn't
-- match against the placetype 'city' of Melbourne.
fallback = "city",
},
["caplc"] = {
link = "[[capital]] and [[large]]st [[city]]",
plural_link = false,
fallback = "capital city",
},
["captaincy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["caravan city"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"ANCIENT", "FORMER"},
},
["castle"] = {
link = true,
fallback = "building",
},
["cathedral city"] = {
link = true,
fallback = "city",
},
["cattle station"] = {
-- Australia
link = true,
fallback = "farm",
},
["census area"] = {
link = true,
affix_type = "Suf",
has_neighborhoods = true,
class = "non-admin settlement",
},
["census-designated place"] = {
-- United States
link = true,
class = "non-admin settlement",
},
["census division"] = {
-- Canada
link = "w",
preposition = "of",
class = "subpolity",
},
["census town"] = {
link = "w",
fallback = "town",
},
["central business district"] = {
link = true,
fallback = "neighborhood",
},
["cercle"] = {
-- Mali
link = "+w:cercles of Mali",
preposition = "of",
class = "subpolity",
},
["ceremonial county"] = {
link = true,
fallback = "county",
},
["chain of islands"] = {
link = "[[chain]] of [[island]]s",
plural = "chains of islands",
plural_link = "[[chain]]s of [[island]]s",
fallback = "island",
},
["channel"] = {
link = true,
fallback = "strait",
},
["charter community"] = {
-- Northwest Territories, Canada
link = "w",
fallback = "village",
},
["city"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["city-state"] = {
link = true,
category_link = "[[sovereign]] [[microstate]]s consisting of a single [[city]] and [[w:dependent territory|dependent territories]]",
has_neighborhoods = true,
class = "settlement",
["continent/*"] = {"City-states", "Cities in +++", "Quốc gia của +++", "National capitals"},
default = {"City-states", "Cities", "Quốc gia", "National capitals"},
},
["civil parish"] = {
-- Mostly England; similar to municipalities
link = true,
preposition = "of",
affix_type = "suf",
has_neighborhoods = true,
class = "subpolity",
},
["claimed political division"] = {
link = "[[claim]]ed [[political]] [[division]]",
class = "subpolity",
default = {true},
},
["co-capital"] = {
link = "[[co-]][[capital]]",
fallback = "capital city",
},
["coal city"] = {
link = "+w:coal town",
fallback = "city",
},
["coal town"] = {
link = "w",
fallback = "town",
},
["collectivity"] = {
link = "w",
preposition = "of",
-- No default; these are weird one-off governmental divisions in France (esp. for overseas collectivities)
class = "subpolity",
},
["colony"] = {
link = true,
fallback = "dependent territory",
},
["comarca"] = {
-- per Wikipedia: traditional region or local administrative division found in Portugal, Spain, and some of
-- their former colonies, like Brazil, Nicaragua, and Panama. In the Valencian Community, for example, it
-- sits between municipalities and provinces, something like a county or district.
link = true,
preposition = "of",
class = "subpolity",
},
["commandery"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["commonwealth"] = {
link = true,
preposition = "of",
-- No default; applies specifically to Puerto Rico
class = "subpolity",
},
["commune"] = {
link = true,
fallback = "municipality",
},
["community"] = {
link = true,
category_link = "[[community|communities]] of all sizes",
fallback = "village",
},
["community development block"] = {
-- in India; appears to be similar to a rural municipality; groups several villages, unclear if there will be
-- neighborhoods so I'm not setting `has_neighborhoods` for now
link = "w",
affix_type = "suf",
no_affix_strings = "block",
class = "subpolity",
},
["comune"] = {
-- Italy, Switzerland
link = true,
fallback = "municipality",
},
["condominium"] = {
link = true,
fallback = "polity",
},
["confederacy"] = {
link = true,
fallback = "confederation",
},
["confederation"] = {
link = true,
fallback = "polity",
},
["constituency"] = {
-- currently we have them as political divisions of Namibia but many countries have them
link = true,
preposition = "of",
class = "subpolity",
},
["constituent country"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["constituent part"] = {
link = "separately",
preposition = "of",
class = "subpolity",
},
["constituent republic"] = {
-- Of Russia, Yugoslavia, etc.
link = "separately",
preposition = "of",
class = "subpolity",
},
["counties and county-level cities!"] = {
-- This is used when grouping counties and county-level cities under prefecture-level cities in China.
category_link = "[[county|counties]] and [[county-level city|county-level cities]]",
class = "subpolity",
},
["continent"] = {
link = true,
category_link = false, -- can't occur as a bare category
class = "natural feature",
default = {"Continents and continental regions"},
},
["continental region"] = {
link = "separately",
category_link = false, -- can't occur as a bare category
class = "geographic region",
fallback = "continent",
},
["continents and continental regions!"] = {
category_link = "[[continent]]s and [[continent]]-[[level]] [[region]]s (e.g. [[Polynesia]])",
class = "geographic region",
},
["council area"] = {
link = true,
-- in Scotland; similar to a county
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["quốc gia"] = {
link = true,
class = "polity",
["continent/*"] = {true, "Quốc gia"},
default = {true},
},
["country-like entities!"] = {
category_link = "[[polity|polities]] not normally considered [[country|countries]] but treated similarly for categorization purposes; typically, [[unrecognized]] [[de-facto]] countries or [[w:dependent territory|dependent territories]]",
class = "polity",
},
["county"] = {
link = true,
preposition = "of",
display_handler = county_display_handler,
class = "subpolity",
},
["county borough"] = {
link = true,
-- in Wales; similar to a county
preposition = "of",
affix_type = "suf",
fallback = "borough",
class = "subpolity",
},
["county seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["county town"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
fallback = "town",
has_neighborhoods = true,
class = "capital",
},
["county-administered city"] = {
-- In Taiwan, per Wikipedia similar to a Taiwanese township or district, which is a small city.
-- NOT anything like a "county-level city" in PR China, which is a county masquerading as a city.
link = "w",
fallback = "city",
has_neighborhoods = true,
class = "settlement",
},
["county-controlled city"] = {
-- Taiwan
link = "w",
fallback = "county-administered city",
},
["county-level city"] = {
-- PR China
link = "w",
fallback = "prefecture-level city",
},
["crater lake"] = {
link = true,
fallback = "lake",
},
["creek"] = {
link = true,
fallback = "stream",
},
["Crown colony"] = {
link = "+crown colony",
fallback = "crown colony",
},
["crown colony"] = {
link = true,
fallback = "colony",
},
["Crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["cultural area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["cultural region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["delegation"] = {
-- Tunisia
link = "+w:delegations of Tunisia",
preposition = "of",
class = "subpolity",
},
["department"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["departmental capital"] = {
link = "separately",
fallback = "capital city",
},
["dependency"] = {
link = true,
fallback = "dependent territory",
},
["dependent territory"] = {
link = "w",
preposition = "of",
class = "subpolity",
former_type = "dependent territory",
bare_category_parent = "political divisions",
["country/*"] = {true},
default = {true},
},
["desert"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"ecosystems"},
default = {true},
},
["deserted mediaeval village"] = {
link = "w",
fallback = "deserted medieval village",
},
["deserted medieval village"] = {
link = "w",
fallback = "ANCIENT settlement",
},
["direct-administered municipality"] = {
-- China
link = "+w:direct-administered municipalities of China",
fallback = "municipality",
},
["direct-controlled municipality"] = {
-- several countries
link = "w",
fallback = "municipality",
},
["distributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["district"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- Grrr! FIXME! Here is where we need handlers for `class`. Using similar logic to
-- district_neighborhood_cat_handler, we need to check if we're below or above a city to determine if the class
-- is "settlement" or "subpolity".
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
-- No default. Countries for which districts are political divisions will get entries.
},
["districts and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Portugal.
category_link = "[[district]]s and [[autonomous region]]s",
class = "subpolity",
},
["districts and autonomous territorial units!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Moldova.
category_link = "[[district]]s and [[w:autonomous territorial unit|autonomous territorial unit]]s",
class = "subpolity",
},
["district capital"] = {
link = "separately",
fallback = "capital city",
},
["district headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["district municipality"] = {
-- In Canada, a district municipality is equivalent to a rural municipality and won't have neighborhoods; in
-- South Africa, district municipalities group local municipalities and hence won't have neighborhoods.
link = "w",
preposition = "of",
affix_type = "suf",
no_affix_strings = {"district", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["division"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["division capital"] = {
link = "separately",
fallback = "capital city",
},
["dome"] = {
link = true,
fallback = "mountain",
},
["dormant volcano"] = {
link = true,
fallback = "volcano",
},
["duchy"] = {
link = true,
fallback = "polity",
},
["emirate"] = {
link = true,
preposition = "of",
-- FIXME: Can be subpolities (of the United Arab Emirates).
fallback = "polity",
},
["empire"] = {
link = true,
fallback = "polity",
},
["enclave"] = {
link = true,
preposition = "of",
-- Enclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["entity"] = {
-- Bosnia and Herzegovina
link = "+w:entities of Bosnia and Herzegovina",
preposition = "of",
class = "subpolity",
},
["escarpment"] = {
link = true,
fallback = "mountain",
},
["ethnographic region"] = {
-- used in Lithuania
link = "+w:ethnographic regions of Lithuania",
fallback = "geographic and cultural area",
},
["exclave"] = {
link = true,
preposition = "of",
-- exclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["external territory"] = {
link = "separately",
fallback = "dependent territory",
},
["farm"] = {
link = true,
class = "non-admin settlement",
default = {"Farms and ranches"},
},
["farms and ranches!"] = {
category_link = "[[farm]]s and [[ranch]]es",
class = "non-admin settlement",
},
["federal city"] = {
link = "w",
preposition = "of",
fallback = "city",
},
["federal district"] = {
link = true,
preposition = "of",
-- Might have neighborhoods as federal districts are often cities (e.g. Mexico City)
has_neighborhoods = true,
class = "settlement",
},
["federal subject"] = {
-- In Russia; a generic term for first-level administrative divisions (republics, oblasts, okrugs, krais,
-- autonomous okrugs and autonomous oblasts).
link = "w",
preposition = "of",
class = "subpolity",
},
["federal territory"] = {
link = "w",
fallback = "territory",
},
["fictional location"] = {
link = "separately",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "places",
default = {true},
},
["First Nations reserve"] = {
-- Canada
link = "[[First Nations]] [[w:Indian reserve|reserve]]",
-- Wikipedia uses "Indian reserve"; presumably that is the legal term
fallback = "Indian reserve",
class = "subpolity",
},
["fjord"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["footpath"] = {
link = true,
fallback = "road",
},
["forest"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"ecosystems", "forestry"},
default = {true},
},
["fort"] = {
link = true,
fallback = "building",
},
["fortress"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- fortresses -> fortresse, so put an entry here to ensure we singularize correctly.
plural = "fortresses",
fallback = "building",
},
["frazione"] = {
link = "w",
fallback = "hamlet",
},
["freeway"] = {
link = true,
fallback = "road",
},
["French prefecture"] = {
link = "[[w:prefectures in France|prefecture]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["geographic and cultural area"] = {
link = "+w:cultural area",
-- `generic_before_non_cities` is used when generating the category description of categories of the format
-- `Geographic and cultural areas of PLACE`. `preposition` is used when generating {{place}} description and
-- categories for any placetype that falls back to `geographic and cultural area`.
generic_before_non_cities = "of",
preposition = "of",
class = "geographic region",
bare_category_parent = "places",
["country/*"] = {true},
["constituent country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["geographic area"] = {
link = "+w:geographic region",
fallback = "geographic and cultural area",
},
["geographic region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geopolitical zone"] = {
-- Nigeria
link = true,
preposition = "of",
class = "subpolity",
},
["gewog"] = {
-- Bhutan
link = true,
preposition = "of",
class = "subpolity",
},
["ghost town"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
bare_category_parent = "former settlements",
cat_handler = city_type_cat_handler,
default = {true},
},
["glen"] = {
link = true,
fallback = "valley",
},
["governorate"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["greater administrative region"] = {
-- China (former division)
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["gromada"] = {
-- Poland (former division)
link = "w",
preposition = "of",
affix_type = "Pref",
class = "subpolity",
inherently_former = {"FORMER"},
},
["group of islands"] = {
link = "[[group]] of [[island]]s",
plural = "groups of islands",
plural_link = "[[group]]s of [[island]]s",
fallback = "island group",
},
["gulf"] = {
link = true,
preposition = "of",
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["hamlet"] = {
link = true,
fallback = "village",
},
["harbor city"] = {
link = "separately",
fallback = "city",
},
["harbor town"] = {
link = "separately",
fallback = "town",
},
["harbour city"] = {
link = "separately",
fallback = "city",
},
["harbour town"] = {
link = "separately",
fallback = "town",
},
["headland"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["headquarters"] = {
link = "w",
fallback = "administrative centre",
},
["heath"] = {
link = true,
fallback = "moor",
},
["hemisphere"] = {
link = true,
entry_placetype_use_the = true,
fallback = "continental region",
},
["highway"] = {
link = true,
fallback = "road",
},
["hill"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["hill station"] = {
link = "w",
fallback = "town",
},
["hill town"] = {
link = "w",
fallback = "town",
},
["historic region"] = {
-- provided only for the link
link = "+w:historical region",
fallback = "FORMER geographic region",
},
["historical county"] = {
-- needed for historical counties of England/etc.
link = "+w:historic county",
fallback = "FORMER subpolity",
},
["historical region"] = {
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["home rule city"] = {
link = "w",
fallback = "city",
},
["home rule municipality"] = {
link = "w",
fallback = "municipality",
},
["hot spring"] = {
link = true,
fallback = "spring",
},
["house"] = {
link = true,
fallback = "building",
},
["housing estate"] = {
-- not the same as a housing project (i.e. public housing)
link = true,
-- not exactly the case but approximately
fallback = "neighborhood",
},
["hromada"] = {
-- Ukraine
link = "w",
disallow_in_entries = "Use placetype 'urban hromada', 'rural hromada' or 'settlement hromada' in place of bare 'hromada'",
disallow_in_holonyms = "Use placetype 'urban hromada'/'uhrom', 'rural hromada'/'rhrom' or 'settlement hromada'/'shrom' in place of bare 'hromada'",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["inactive volcano"] = {
link = "w",
fallback = "dormant volcano",
},
["independent city"] = {
link = true,
fallback = "city",
},
["independent town"] = {
link = "+independent city",
fallback = "town",
},
["Indian reservation"] = {
link = "w",
-- In the US. Also known as "Native American reservation" or "domestic dependent nation", and the reservations
-- themselves often use the term "nation" in their official name (e.g. the "Navajo Nation"). But Wikipedia puts
-- the article at [[w:Indian reservation]] and uses that term when describing e.g. what the Navajo Nation is,
-- so this must still be the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["Indian reserve"] = {
link = "w",
-- In Canada. "First Nations reserve" sounds more modern/PC but Wikipedia uses "Indian reserve"; presumably that
-- is still the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["inland sea"] = {
-- note, we also have 'inland' as a qualifier
link = true,
fallback = "sea",
},
["inner city area"] = {
link = "[[inner city]] [[area]]",
fallback = "neighborhood",
},
["island"] = {
link = true,
preposition = "of",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["island country"] = {
-- FIXME: The following should map to both 'island' and 'country'.
link = "w",
fallback = "country",
},
["island group"] = {
link = "separately",
fallback = "island",
},
["island municipality"] = {
link = "w",
fallback = "municipality",
},
["islet"] = {
link = "w",
fallback = "island",
},
["Israeli settlement"] = {
link = "w",
class = "settlement",
default = {true},
},
["judicial capital"] = {
link = "w",
fallback = "capital city",
},
["khanate"] = {
link = true,
fallback = "polity",
},
["kibbutz"] = {
link = true,
plural = "kibbutzim",
class = "non-admin settlement",
default = {true},
},
["kingdom"] = {
link = true,
fallback = "monarchy",
},
["krai"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["lake"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["địa mạo!"] = {
category_link = "[[địa mạo]]",
bare_category_parent = "địa danh",
addl_bare_category_parents = {"Trái Đất"},
},
["largest city"] = {
link = "[[large]]st [[city]]",
entry_placetype_use_the = true,
fallback = "city",
has_neighborhoods = true,
},
["league"] = {
link = true,
fallback = "confederation",
},
["legislative capital"] = {
link = "separately",
fallback = "capital city",
},
["library"] = {
link = true,
fallback = "building",
},
["lieutenancy area"] = {
-- used in the United Kingdom; per Wikipedia:
-- In England, lieutenancy areas are colloquially known as the ceremonial counties, although this phrase does
-- not appear in any legislation referring to them. The lieutenancy areas of Scotland are subdivisions of
-- Scotland that are more or less based on the counties of Scotland, making use of the major cities as separate
-- entities.[2] In Wales, the lieutenancy areas are known as the preserved counties of Wales and are based on
-- those used for lieutenancy and local government between 1974 and 1996. The lieutenancy areas of Northern
-- Ireland correspond to the six counties and two former county boroughs.[3]
link = "w",
fallback = "ceremonial county",
},
["local authority district"] = {
link = "w",
fallback = "local government district",
},
["local government area"] = {
-- Australia
link = "w",
preposition = "of",
class = "subpolity",
},
["local council"] = {
-- Malta; similar to municipalities
link = "+w:local councils of Malta",
preposition = "of",
fallback = "municipality",
},
["local government district"] = {
link = "w",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local government district with borough status"] = {
link = "[[w:local government district|local government district]] with [[w:borough status|borough status]]",
plural = "local government districts with borough status",
plural_link = "[[w:local government district|local government districts]] with [[w:borough status|borough status]]",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local urban district"] = {
link = "w",
fallback = "unincorporated community",
},
["locality"] = {
link = "+w:locality (settlement)",
-- not necessarily true, but usually is the case
fallback = "village",
},
["London borough"] = {
link = "w",
preposition = "of",
affix_type = "pref",
affix = "borough",
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["macroregion"] = {
link = true,
fallback = "region",
},
["man-made structures!"] = {
category_link = "[[w:geographical feature#Engineered constructs|man-made structures]] such as [[airport]]s, [[university|universities]] and [[metro station]]s",
bare_category_parent = "places",
},
["manor"] = {
-- FIXME: or is this more like a farm?
link = true,
fallback = "building",
},
["marginal sea"] = {
link = true,
preposition = "of",
fallback = "sea",
},
["market city"] = {
link = "+market town",
fallback = "city",
},
["market town"] = {
link = true,
fallback = "town",
},
["massif"] = {
link = true,
fallback = "mountain",
},
["megacity"] = {
link = true,
fallback = "city",
},
["metro station"] = {
link = true,
class = "man-made structure",
},
["metropolitan borough"] = {
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"borough", "city"},
fallback = "local government district",
has_neighborhoods = true,
},
["metropolitan city"] = {
-- These exist e.g. in Italy and are more like municipalities or even provinces than cities.
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"metropolitan", "city"},
class = "subpolity",
},
["metropolitan county"] = {
link = true,
fallback = "county",
},
["metropolitan municipality"] = {
-- In South Africa, metropolitan municipalities group local municipalities and are like districts, between
-- provinces and municipalities.
-- In Turkey, metropolitan municipalities are provinces-level.
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"metropolitan", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["microdistrict"] = {
-- residential complex in post-Soviet states
link = true,
fallback = "neighborhood",
},
["micronations!"] = {
-- FIXME, merge with microstate
category_link = "[[micronation]]s",
bare_category_parent = "quốc gia",
},
["microstate"] = {
link = true,
fallback = "country",
},
["military base"] = {
link = "w",
class = "settlement", -- or "man-made structure"?
default = {true},
},
["minster town"] = {
-- England
link = "separately",
fallback = "town",
},
["monarchy"] = {
link = true,
fallback = "polity",
},
["moor"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "ecosystems"},
default = {true},
},
["moorland"] = {
link = true,
fallback = "moor",
},
["motorway"] = {
link = true,
fallback = "road",
},
["mountain"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["mountain indigenous district"] = {
-- Taiwan
link = "+w:district (Taiwan)",
fallback = "district",
},
["mountain indigenous township"] = {
-- Taiwan
link = "+w:township (Taiwan)",
fallback = "township",
},
["mountain pass"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "mountain passes",
class = "natural feature",
addl_bare_category_parents = {"mountains"},
default = {true},
},
["mountain range"] = {
link = true,
fallback = "mountain",
},
["mountainous region"] = {
link = "separately",
fallback = "region",
},
["mukim"] = {
-- Malaysia, Brunei, Indonesia, Singapore
link = true,
preposition = "of",
class = "subpolity",
},
["municipal district"] = {
link = "w",
-- meaning varies depending on the country; for now, assume no neighborhoods.
-- FIXME: has_neighborhoods might have to be a function that looks at the containing holonyms.
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "municipality",
},
["municipality"] = {
link = true,
preposition = "of",
has_neighborhoods = true,
class = "subpolity",
},
["municipality with city status"] = {
link = "[[municipality]] with [[w:city status|city status]]",
plural = "municipalities with city status",
plural_link = "[[municipality|municipalities]] with [[w:city status|city status]]",
fallback = "municipality",
},
["museum"] = {
link = true,
fallback = "building",
},
["địa danh thần thoại"] = {
link = "địa danh thần thoại",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "địa danh",
default = {true},
},
["named bridges!"] = {
category_link = "notable [[bridge]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"bridges"},
},
["named buildings!"] = {
category_link = "notable [[house]]s, [[library|libraries]] and other [[building]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"buildings"},
},
["named roads!"] = {
category_link = "notable [[road]]s, [[highway]]s, [[trail]]s and similar linear structures",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"roads"},
},
["national capital"] = {
link = "w",
fallback = "capital city",
},
["national park"] = {
link = true,
fallback = "park",
},
["đặc điểm tự nhiên!"] = {
category_link = "tổng hợp các yếu tố vật chất hình thành tồn tại",
bare_category_parent = "địa danh",
},
["neighborhood"] = {
-- The majority of the properties here apply to both `neighborhoods` and `neighbourhoods`; the choice of which
-- one to use is made by district_neighborhood_cat_handler() based on the value of `british_spelling` for the
-- location (city, political division, etc.) of the holonym that follows the word "neighbo(u)hoods" in the
-- category name. It does *NOT* depend on whether the {{place}} call uses "neighborhoods" or "neighbourhoods".
-- (In general it can't, because other things like "urban areas", "districts", "subdivisions" and the like also
-- categorize as neighbo(u)rhoods.)
link = true,
-- See below. These are used by category handlers in [[Module:category tree/topic cat/data/Places]].
generic_before_non_cities = "in",
generic_before_cities = "of",
-- The following text is suitable for the top-level description of a neighborhood as well as categories of the
-- form `Neighborhoods in POLDIV` e.g. `Neighborhoods in Illinois, USA` but not for categories of the form
-- `Neighborhoods of Chicago`, where we'd get "... and other subportions of [[city|cities]] of [[Chicago]]".
category_link = "[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighborhood]]s, [[district]]s and other subportions",
-- NOTE: This setting is needed for administrative divisions like barangays that fall back to `neighborhood`,
-- when set in [[Module:place/locations]] for a specific country (e.g. the Philippines). The above settings
-- for `generic_before_non_cities` and `generic_before_cities` are used by category handlers in
-- [[Module:category tree/topic cat/data/Places]] for `Neighborhoods in POLDIV` and `Neighborhoods of CITY`
-- categories. In fact, district_neighborhood_cat_handler() does not currently pay attention to them, but
-- generates "of" before cities and "in" before non-cities regardless. (FIXME: We should change that.)
preposition = "of",
class = "non-admin settlement",
cat_handler = district_neighborhood_cat_handler,
},
["neighbourhood"] = {
link = true,
category_link = "[[neighbourhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighbourhood]]s, [[district]]s and other subportions",
fallback = "neighborhood",
},
["new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
preposition = "in",
class = "subpolity", --?
},
["new town"] = {
link = true,
fallback = "town",
},
["non-city capital"] = {
link = "[[capital]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
cat_handler = function(data)
return capital_city_cat_handler(data, "non-city")
end,
-- FIXME, do we need the following?
default = {true},
},
["non-metropolitan county"] = {
link = "w",
fallback = "county",
},
["non-metropolitan district"] = {
link = "w",
fallback = "local government district",
},
["non-sovereign kingdom"] = {
-- especially in Africa and Asia
link = "+w:non-sovereign monarchy",
generic_before_non_cities = "in",
class = "subpolity",
["country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["non-sovereign monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["oblasts and autonomous republics!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Ukraine.
category_link = "[[oblast]]s and [[w:autonomous republic|autonomous republic]]s",
class = "subpolity",
},
["đại dương"] = {
link = true,
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"biển", "vùng nước"},
default = {true},
},
["okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["overseas collectivity"] = {
link = "w",
fallback = "collectivity",
},
["overseas department"] = {
link = "w",
fallback = "department",
},
["overseas territory"] = {
link = "w",
fallback = "dependent territory",
},
["parish"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["parish municipality"] = {
-- in Quebec, often similar to a rural village; the famous [[Saint-Louis-du-Ha! Ha!]] is one of them.
link = "+w:parish municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true,
},
["parish seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
class = "capital",
has_neighborhoods = true,
},
["park"] = {
link = true,
class = "man-made structure",
default = {true},
},
["pass"] = {
link = "+mountain pass",
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "passes",
fallback = "mountain pass",
},
["path"] = {
link = true,
fallback = "road",
},
["peak"] = {
link = true,
fallback = "mountain",
},
["peninsula"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["periphery"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["địa danh!"] = {
generic_before_non_cities = "của",
generic_before_cities = "của",
class = "generic place",
category_link = "[[place]]s of all sorts",
-- `category_link_top_level` control the description used in the top-level [[Category:Places]] and
-- language-specific variants such as [[Category:en:Places]]. The actual text for a language-spefic variant is
-- "{{{langname}}} names of [[geographical]] [[place]]s of all sorts; [[toponym]]s." where the "names of"
-- portion is automatically generated by the appropriate handler in
-- [[Module:category tree/topic cat/data/Places]].
category_link_top_level = "[[geographical]] [[place]]s of all sorts; [[toponym]]s",
bare_category_parent = "tên",
},
["planned community"] = {
-- Include this so we don't categorize 'planned community' into villages, as 'community' does.
link = true,
class = "settlement",
has_neighborhoods = true,
},
["plateau"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
-- FIXME: Should generate both "Plateaus" and the appropriate 'geographic and cultural area' category
},
["Polish colony"] = {
link = "[[w:colony (Poland)|colony]]",
affix_type = "suf",
affix = "colony",
fallback = "village",
has_neighborhoods = true,
},
["political divisions!"] = {
category_link = "[[political]] [[division]]s and [[subdivision]]s, such as [[state]]s, [[province]]s, [[county|counties]] or [[district]]s",
bare_category_parent = "places",
},
["tổ chức chính trị"] = {
link = true,
category_link = "[[independent]] or [[semi-]][[independent]] [[polity|polities]]",
class = "polity",
bare_category_parent = "địa danh",
default = {true},
},
["populated place"] = {
link = "+w:populated place",
-- not necessarily true, but usually is the case
fallback = "village",
},
["port"] = {
link = true,
class = "man-made structure",
default = {true},
},
["port city"] = {
-- FIXME: should categorize into "Ports" as well as "Cities"
link = true,
fallback = "city",
},
["port town"] = {
-- FIXME: should categorize into "Ports" as well as "Towns"
link = "w",
fallback = "town",
},
["prefecture"] = {
-- FIXME! `prefecture` is like a county in Japan and elsewhere but a department capital city in France.
-- May need `has_neighborhoods` to be a function.
link = true,
preposition = "of",
display_handler = prefecture_display_handler,
class = "subpolity",
},
["prefecture-level city"] = {
-- China; they are huge entities with a central city; not cities themselves.
link = "w",
preposition = "of",
class = "subpolity",
},
["preserved county"] = {
-- In Wales; they are former counties enshrined in law; there are 8 of them and each consists of one or more
-- "principal areas" (styled as "counties" or "county boroughs"), of which there are 22.
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["primary area"] = {
-- a grouping of "districts" (neighborhoods) in Gothenburg, Sweden
link = "+w:sv:primärområde",
fallback = "neighborhood",
},
["principality"] = {
link = true,
fallback = "monarchy",
},
["promontory"] = {
link = true,
fallback = "headland",
},
["protectorate"] = {
link = true,
fallback = "dependent territory",
},
["province"] = {
link = true,
preposition = "of",
display_handler = province_display_handler,
class = "subpolity",
},
["provinces and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case China.
category_link = "[[province]]s and [[autonomous region]]s",
class = "subpolity",
},
["provinces and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Canada and Pakistan.
category_link = "[[province]]s and [[territory|territories]]",
class = "subpolity",
},
["provincial capital"] = {
link = true,
fallback = "capital city",
},
["raion"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["ranch"] = {
link = true,
fallback = "farm",
},
["range"] = {
-- FIXME: Where is this used? Is it a mountain range?
link = true,
holonym_use_the = true,
class = "natural feature",
},
["regency"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["region"] = {
link = true,
preposition = "of",
-- If 'region' isn't a specific administrative division, fall back to 'geographic and cultural area'
fallback = "geographic and cultural area",
-- "former region" is a subpolity but traditional/historic(al)/ancient/medieval/etc. is a geographic region
class = "geographic region",
},
["regional capital"] = {
link = "separately",
fallback = "capital city",
},
["regional county municipality"] = {
-- Quebec
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"municipality", "county"},
fallback = "municipality",
},
["regional district"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "district",
},
["regional municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
},
["regional unit"] = {
link = "w",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["registration county"] = {
-- Used in Scotland for land registration purposes; formerly used in England, Wales and Ireland for statistical
-- purposes (registration of births, deaths and marriages, and for the output of census information).
link = "w",
fallback = "county",
},
["republic"] = {
-- Of Russia, Yugoslavia, etc. "Republics" in general are sovereign but we use "country" in that case.
link = true,
fallback = "constituent republic",
},
["research base"] = {
link = "+w:research station",
fallback = "research station",
},
["research station"] = {
link = "w",
class = "non-admin settlement", -- or "man-made structure"?
default = {true},
},
["reservoir"] = {
link = true,
fallback = "lake",
},
["residential area"] = {
link = "separately",
fallback = "neighborhood",
},
["resort city"] = {
link = "w",
fallback = "city",
},
["resort town"] = {
link = "w",
fallback = "town",
},
["river"] = {
link = true,
generic_before_non_cities = "in",
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
cat_handler = city_type_cat_handler,
["continent/*"] = {true},
default = {true},
},
["river island"] = {
link = "w",
fallback = "island",
},
["road"] = {
link = true,
class = "man-made structure",
default = {"Named roads"},
},
["Roman province"] = {
-- FIXME! Eliminate this in favor of 'former province|emp/Roman Empire'
link = "w",
default = {"Provinces of the Roman Empire"},
class = "subpolity",
},
["royal borough"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"royal", "borough"},
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["royal burgh"] = {
link = true,
fallback = "borough",
},
["royal capital"] = {
link = "w",
fallback = "capital city",
},
["rural committee"] = {
-- Hong Kong; a group of villages
link = "w",
affix_type = "Suf",
has_neighborhoods = true,
class = "settlement",
},
["rural community"] = {
-- New Brunswick
link = "+w:list of municipalities in New_Brunswick#Rural communities",
fallback = "municipality",
},
["rural hromada"] = {
link = "[[rural]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["rural municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
has_neighborhoods = true, --?
},
["rural township"] = {
-- Taiwan
link = "+w:rural township (Taiwan)",
fallback = "township",
},
["sanctuary"] = {
link = true,
fallback = "temple",
},
["satrapy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["biển"] = {
link = true,
holonym_use_the = true,
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["seaport"] = {
link = true,
fallback = "port",
},
["seat"] = {
link = true,
fallback = "administrative centre",
},
["self-administered area"] = {
-- Myanmar (groups self-administered divisions and zones)
link = "+w:self-administered zone",
preposition = "of",
class = "subpolity",
},
["self-administered division"] = {
-- Myanmar (only one of them: Wa Self-Administered Division)
link = "w",
fallback = "self-administered area",
},
["self-administered zone"] = {
-- Myanmar (five of them)
link = "w",
fallback = "self-administered area",
},
["separatist state"] = {
link = "separately",
fallback = "unrecognized country",
},
["settlement"] = {
link = true,
category_link = "[[settlement]]s such as [[city|cities]], [[village]]s and [[farm]]s",
bare_category_parent = "places",
-- not necessarily true, but usually is the case
fallback = "village",
},
["settlement hromada"] = {
link = "[[w:Populated places in Ukraine#Rural settlements|settlement]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["sheading"] = {
-- Isle of Man
link = true,
fallback = "district",
},
["sheep station"] = {
-- Australia
link = true,
fallback = "farm",
},
["shire"] = {
link = true,
fallback = "county",
},
["shire county"] = {
link = "w",
fallback = "county",
},
["shire town"] = {
link = true,
fallback = "county seat",
},
["ski resort city"] = {
link = "[[ski resort]] [[city]]",
fallback = "city",
},
["ski resort town"] = {
link = "[[ski resort]] [[town]]",
fallback = "town",
},
["spa city"] = {
link = "+w:spa town",
fallback = "city",
},
["spa town"] = {
link = "w",
fallback = "town",
},
["space station"] = {
link = true,
fallback = "research station",
},
["special administrative region"] = {
-- in China; in practice they are city-like (Hong Kong, Macau); also [[Oecusse]] in East Timor is formally a
-- "special administrative region"; North Korea had one such region planned (Sinuiju) but abandoned; Indonesia
-- has similar "special regions" of Jakarta, Yogyakarta and Aceh; and South Sudan has three "special
-- administrative areas"
link = "+w:special administrative regions of China",
preposition = "of",
class = "subpolity",
has_neighborhoods = true, --?
-- no suffix since places in Hong Kong or Macau are listed without China, except Hong Kong and Macau themselves
-- they also contain regions (or areas), e.g. [[Kowloon]], so it would be confusing
suffix = "",
},
["special collectivity"] = {
link = "w",
fallback = "collectivity",
},
["special municipality"] = {
-- formerly linked to the Taiwan article but there are also special municipalities of the Netherlands
link = "w",
fallback = "municipality",
},
["special ward"] = {
-- Tokyo
link = true,
fallback = "municipality",
},
["spit"] = {
link = true,
fallback = "peninsula",
},
["spring"] = {
link = true,
class = "natural feature",
default = {true},
},
["star"] = {
link = true,
class = "natural feature",
default = {true},
},
["state"] = {
link = true,
preposition = "of",
class = "subpolity",
-- 'former/historical state' could refer either to a state of a country (a division) or a state = sovereign
-- entity. The latter appears more common (e.g. in various "ancient states" of East Asia).
former_type = "polity",
},
["states and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Australia.
category_link = "[[state]]s and [[territory|territories]]",
class = "subpolity",
},
["states and union territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case India.
category_link = "[[state]]s and [[union territory|union territories]]",
class = "subpolity",
},
["state capital"] = {
link = true,
fallback = "capital city",
},
["state park"] = {
link = true,
fallback = "park",
},
["state-level new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
fallback = "new area",
},
["statistical region"] = {
-- Slovenia
link = true,
fallback = "administrative region",
},
["statutory city"] = {
link = "w",
fallback = "city",
},
["statutory town"] = {
link = "w",
fallback = "town",
},
["strait"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["stream"] = {
link = true,
fallback = "river",
},
["street"] = {
link = true,
fallback = "road",
},
["strip"] = {
link = true,
fallback = "geographic region",
},
["strip of land"] = {
link = "[[strip]] of [[land]]",
plural = "strips of land",
plural_link = "[[strip]]s of [[land]]",
fallback = "geographic region",
},
["sub-metropolitan city"] = {
link = "+w:List of cities in Nepal#Sub-metropolitan cities",
fallback = "city",
},
["sub-prefectural city"] = {
link = "w",
fallback = "subprovincial city",
},
["subdistrict"] = {
link = true,
preposition = "of",
has_neighborhoods = true, --?
-- FIXME: subdistricts can be neighborhood-like (of Jakarta) or larger (in China); need a handler
class = "subpolity",
default = {true},
},
["subdivision"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- FIXME: subdivisions can be neighborhood-like or larger; need a handler
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
},
["submerged ghost town"] = {
-- FIXME: Consider just having "submerged" as a qualifier.
link = "[[submerged]] [[ghost town]]",
fallback = "ghost town",
},
["subnational kingdom"] = {
link = "+w:subnational monarchy",
fallback = "non-sovereign kingdom",
},
["subnational monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["subprefecture"] = {
link = true,
affix_type = "suf",
preposition = "of",
class = "subpolity",
},
["subprovince"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["subprovincial city"] = {
link = "w",
-- China; special status given to certain prefecture-level cities
fallback = "prefecture-level city",
},
["subprovincial district"] = {
link = "w",
-- China; special status given to Binhai New Area and Pudong New Area, which are county-level districts
preposition = "of",
class = "subpolity",
},
["subregion"] = {
link = true,
fallback = "geographic region",
},
["suburb"] = {
link = true,
-- The following text is suitable for the top-level description of a suburb as well as categories of the form
-- 'Suburbs in POLDIV' e.g. 'Suburbs in Illinois, USA' but not for categories of the form 'Suburbs of Chicago',
-- where we'd get "[[suburb]]s of [[city|cities]] of [[Chicago]]".
category_link = "[[suburb]]s of [[city|cities]]",
category_link_before_city = "[[suburb]]s",
-- See comments under "neighborhood" for the following three settings. They are used by
-- [[Module:category tree/topic cat/data/Places]] for generating the text of 'Suburbs in/of PLACE' categories
-- but currently ignored by district_neighborhood_cat_handler (which actually generates the categories for a
-- given page), which hardcodes "in" for non-cities and "of" for cities. (FIXME: Change this.)
generic_before_non_cities = "in",
generic_before_cities = "of",
preposition = "of",
has_neighborhoods = true, --?
class = "non-admin settlement", --?
cat_handler = district_neighborhood_cat_handler,
},
["suburban area"] = {
link = "w",
fallback = "suburb",
},
["subway station"] = {
link = "w",
fallback = "metro station",
},
["sum"] = {
-- In China, Mongolia, Russia; something like a county in Mongolia but a township in China (Inner Mongolia),
-- and equivalent to a [[selsoviet]] in the parts of Russia where it's in use (a rural council, below a raion).
link = "+w:sum (administrative division)",
-- This fallback is somewha arbitrary. We could use "county" but that has a display handler
-- which we don't want to be active (FIXME: If the display handler would be active, that's a bug).
fallback = "division",
},
["supercontinent"] = {
link = true,
fallback = "continent",
},
["tehsil"] = {
link = true,
affix_type = "suf",
no_affix_strings = {"tehsil", "tahsil"},
class = "subpolity",
},
["temple"] = {
link = true,
fallback = "building",
},
["territorial authority"] = {
link = "w",
fallback = "district",
},
["territory"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["theme"] = {
link = "+w:theme (Byzantine district)",
preposition = "of",
class = "subpolity",
},
["town"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["town with bystatus"] = {
-- can't use templates in links currently
link = "[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]",
plural = "towns with bystatus",
plural_link = "[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]",
fallback = "town",
},
["township"] = {
link = true,
has_neighborhoods = true,
class = "settlement", --?
default = {true},
},
["township municipality"] = {
-- Quebec
link = "+w:township municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["traditional county"] = {
link = true,
fallback = "county",
},
["traditional region"] = {
-- FIXME: Verify this works. Same for 'historic(al) region'.
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["trail"] = {
link = true,
fallback = "road",
},
["treaty port"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"FORMER"},
},
["tributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["underground station"] = {
link = "w",
fallback = "metro station",
},
["unincorporated area"] = {
link = "w",
-- I don't know if this fallback makes sense everywhere.
fallback = "unincorporated community",
},
["unincorporated community"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
},
["unincorporated territory"] = {
link = "w",
fallback = "territory",
},
["union territory"] = {
-- India
link = true,
preposition = "of",
entry_placetype_indefinite_article = "a",
class = "subpolity",
},
["unitary authority"] = {
-- UK, New Zealand
link = true,
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["unitary district"] = {
link = "w",
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["united township municipality"] = {
-- Quebec
link = "+w:united township municipality (Quebec)",
entry_placetype_indefinite_article = "a",
fallback = "township municipality",
has_neighborhoods = true, --?
},
["university"] = {
link = true,
entry_placetype_indefinite_article = "a",
class = "man-made structure",
default = {true},
},
["unrecognised country"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized and nearly unrecognized countries!"] = {
category_link = "[[de facto]] [[independent]] [[state]]s with little or no {{w|international recognition}}",
bare_category_parent = "country-like entities",
},
["unrecognized country"] = {
link = "w",
class = "polity",
default = {"Unrecognized and nearly unrecognized countries"},
},
["unrecognised state"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized state"] = {
link = "w",
fallback = "unrecognized country",
},
["urban area"] = {
link = "separately",
fallback = "neighborhood",
},
["urban hromada"] = {
link = "[[urban]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["urban service area"] = {
-- A strange beast existing in Alberta; technically a type of hamlet but in practice used for much larger
-- cities and treated equivalent to a city. (There are only two of them, [[Fort McMurray]] and [[Sherwood Park]]).
link = "w",
fallback = "city",
},
["urban township"] = {
link = "w",
fallback = "township",
},
["urban-type settlement"] = {
-- appears to be a particular type of small urban settlement in post-Soviet states,
-- had an administrative function.
link = "w",
fallback = "town",
},
["valley"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "water"},
default = {true},
},
["viceroyalty"] = {
-- in essence, a type of colony
link = true,
fallback = "dependent territory",
},
["village"] = {
link = true,
generic_before_non_cities = "in",
category_link = "[[village]]s, [[hamlet]]s, and other small [[community|communities]] and [[settlement]]s",
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["village development committee"] = {
-- former administrative structure in Nepal; also exists in India but not as a formal unit
link = "+w:village development committee (Nepal)",
inherently_former = {"FORMER"},
fallback = "village",
},
["village municipality"] = {
-- Quebec
link = "+w:village municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["voivodeship"] = {
-- Poland
link = true,
display_handler = voivodeship_display_handler,
preposition = "of",
class = "subpolity",
},
["volcano"] = {
link = true,
plural = "volcanoes",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true, "Mountains"},
},
["ward"] = {
link = true,
class = "settlement",
-- Wards are formal administrative divisions of a city but have some properties of neighborhoods.
fallback = "neighborhood",
},
["watercourse"] = {
link = true,
fallback = "channel",
},
["Welsh community"] = {
-- Wales
link = "[[w:community (Wales)|community]]",
preposition = "of",
affix_type = "suf",
affix = "community",
has_neighborhoods = true,
class = "settlement",
},
["zone"] = {
-- administrative division of Ethiopia, Qatar, Nepal, India
link = "+w:zone#Place names",
preposition = "of",
class = "subpolity",
},
----------------------------------------------------------------------------------------------
-- Categories for former places --
----------------------------------------------------------------------------------------------
["ANCIENT capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
-- FIXME: Consider removing 'ancient settlements' here. Ancient capitals, like former capitals, often still
-- exist but just aren't the capital any more. Maybe we should have an 'Ancient capitals' category.
default = {"Ancient settlements", "Former capitals"},
},
["ANCIENT non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "ANCIENT settlement",
},
["ANCIENT settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Ancient settlements"},
},
["ancient settlements!"] = {
category_link = "former [[city|cities]], [[town]]s and [[village]]s that existed in [[antiquity]]",
bare_category_parent = "former settlements",
},
["FORMER capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
default = {"Former capitals"},
},
["former capitals!"] = {
category_link = "former [[capital]] [[city|cities]] and [[town]]s",
bare_category_parent = "settlements",
},
["former counties and county-level cities!"] = {
-- For categorizing former counties and county-level cities of China
category_link = "no-longer existing [[county|counties]] and [[county-level city|county-level cities]]",
bare_category_breadcrumb = "counties and county-level cities",
bare_category_parent = "former political divisions",
},
["FORMER county"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER county-level city"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["former countries and country-like entities!"] = {
category_link = "[[country|countries]] and similar [[polity|polities]] that no longer exist",
bare_category_breadcrumb = "countries and country-like entities",
bare_category_parent = "former polities",
},
["FORMER country"] = {
link = false,
class = "polity",
default = {"Former countries and country-like entities"},
},
["former dependent territories!"] = {
category_link = "[[w:dependent territory|dependent territories]] (colonies, dependencies, protectorates, etc.) that no longer exist",
bare_category_breadcrumb = "dependent territories",
bare_category_parent = "former political divisions",
},
["FORMER dependent territory"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former dependent territories"},
},
["former districts!"] = {
-- For categorizing former districts of China
category_link = "no-longer-existing [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "former political divisions",
},
["FORMER district"] = {
-- For categorizing former districts of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER geographic region"] = {
link = false,
fallback = "geographic and cultural area",
},
["FORMER man-made structure"] = {
link = false,
class = "man-made structure",
default = {"Former man-made structures"},
},
["former man-made structures!"] = {
category_link = "man-made structures such as [[airport]]s and [[park]]s that no longer exist",
bare_category_breadcrumb = "man-made structures",
bare_category_parent = "former places",
},
["former municipalities!"] = {
-- For categorizing former municipalities of the Netherlands
category_link = "no-longer-existing [[municipality|municipalities]]",
bare_category_breadcrumb = "municipalities",
bare_category_parent = "former political divisions",
},
["FORMER municipality"] = {
-- For categorizing former municipalities of the Netherlands
link = false,
fallback = "FORMER subpolity",
},
["FORMER natural feature"] = {
link = false,
class = "natural feature",
default = {"Former natural features"},
},
["former natural features!"] = {
category_link = "natural features such as [[lake]]s, [[river]]s and [[island]]s that no longer exist",
bare_category_breadcrumb = "natural features",
bare_category_parent = "former places",
},
["FORMER non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "FORMER settlement",
},
["former places!"] = {
category_link = "[[place]]s of all sorts that no longer exist",
bare_category_breadcrumb = "former",
bare_category_parent = "places",
},
["former political divisions!"] = {
category_link = "[[political]] [[division]]s (states, provinces, counties, etc.) that no longer exist",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former places",
},
["former polities!"] = {
category_link = "[[polity|polities]] (countries, kingdoms, empires, etc.) that no longer exist",
bare_category_breadcrumb = "polities",
bare_category_parent = "former places",
},
["FORMER polity"] = {
link = false,
class = "polity",
default = {"Former polities"},
},
["former prefectures!"] = {
-- For categorizing former prefectures of China
category_link = "no-longer-existing [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "former political divisions",
},
["FORMER prefecture"] = {
-- For categorizing former prefectures of China
link = false,
fallback = "FORMER subpolity",
},
["former provinces!"] = {
-- For categorizing former provinces of China, etc.
category_link = "no-longer-existing [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "former political divisions",
},
["FORMER province"] = {
-- For categorizing ancient/historical/former provinces of the Roman Empire
link = false,
fallback = "FORMER subpolity",
},
["former region"] = {
-- A former region is considered a former political division, but not a 'historical/traditional/etc.' region.
link = "separately",
preposition = "of",
inherently_former = {"FORMER"},
class = "subpolity",
},
["FORMER settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Former settlements"},
},
["former settlements!"] = {
category_link = "[[city|cities]], [[town]]s and [[village]]s that no longer exist or have been merged or reclassified",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former political divisions",
},
["FORMER subpolity"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former political divisions"},
},
----------------------------------------------------------------------------------------------
-- form-of categories --
----------------------------------------------------------------------------------------------
---------- Abbreviations ----------
["abbreviations of counties!"] = {
-- For categorizing abbreviations of counties of e.g. England
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[county|counties]]",
bare_category_breadcrumb = "counties",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of places",
},
["abbreviations of departments!"] = {
-- For categorizing abbreviations of departments of e.g. France
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[department]]s",
bare_category_breadcrumb = "departments",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of districts!"] = {
-- For categorizing abbreviations of districts of e.g. ???
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of divisions!"] = {
-- For categorizing abbreviations of divisions of e.g. Bangladesh
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[division]]s",
bare_category_breadcrumb = "divisions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of former countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of former places",
},
["abbreviations of former places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "abbreviations of places", sort = "former"}},
},
["abbreviations of places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "places",
},
["abbreviations of political divisions!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[political]] [[division]]s",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "abbreviations of places",
},
["abbreviations of prefectures!"] = {
-- For categorizing abbreviations of prefectures of e.g. Japan
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces!"] = {
-- For categorizing abbreviations of provinces of e.g. Canada
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s and [[territory|territories]]",
bare_category_breadcrumb = "provinces and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of regions!"] = {
-- For categorizing abbreviations of regions of e.g. Italy
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[administrative region]]s",
bare_category_breadcrumb = "regions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states!"] = {
-- For categorizing abbreviations of states of e.g. the United States
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[territory|territories]]",
bare_category_breadcrumb = "states and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and union territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[union territory|union territories]]",
bare_category_breadcrumb = "states and union territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[territory|territories]]",
bare_category_breadcrumb = "territories",
bare_category_parent = "abbreviations of political divisions",
},
["ABBREVIATION_OF country"] = {
link = false,
default = {"Abbreviations of countries"},
},
["ABBREVIATION_OF county"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF department"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF district"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF division"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF FORMER country"] = {
link = false,
default = {"Abbreviations of former countries"},
},
["ABBREVIATION_OF FORMER place"] = {
link = false,
default = {"Abbreviations of former places"},
},
["ABBREVIATION_OF place"] = {
link = false,
default = {"Abbreviations of places"},
},
["ABBREVIATION_OF prefecture"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF province"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF region"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF state"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF subpolity"] = {
link = false,
default = {"Abbreviations of political divisions"},
},
["ABBREVIATION_OF territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF union territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
---------- Archaic forms ----------
["archaic forms of places!"] = {
full_category_link = "{{glossary|archaic}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "archaic forms",
bare_category_parent = "places",
},
["ARCHAIC_FORM_OF place"] = {
link = false,
default = {"Archaic forms of places"},
},
---------- Clippings ----------
["clippings of places!"] = {
full_category_link = "{{glossary|clipping}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "clippings",
bare_category_parent = "places",
},
["CLIPPING_OF place"] = {
link = false,
default = {"Clippings of places"},
},
---------- Dated forms ----------
["dated forms of places!"] = {
full_category_link = "{{glossary|dated}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "dated forms",
bare_category_parent = "places",
},
["DATED_FORM_OF place"] = {
link = false,
default = {"Dated forms of places"},
},
---------- Derogatory names ----------
["derogatory names for cities!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[city|cities]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["derogatory names for continents!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for continents"},
},
["derogatory names for countries!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for countries"},
},
["derogatory names for places!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[place]]s",
bare_category_breadcrumb = "derogatory names",
bare_category_parent = "nicknames for places",
},
["derogatory names for states!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for states"},
},
["DEROGATORY_NAME_FOR capital"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR city"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR continent"] = {
link = false,
default = {"Derogatory names for continents"},
},
["DEROGATORY_NAME_FOR country"] = {
link = false,
default = {"Derogatory names for countries"},
},
["DEROGATORY_NAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR place"] = {
link = false,
default = {"Derogatory names for places"},
},
["DEROGATORY_NAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR state"] = {
link = false,
default = {"Derogatory names for states"},
},
["DEROGATORY_NAME_FOR town"] = {
link = false,
default = {"Derogatory names for cities"},
},
---------- Ellipses ----------
["ellipses of places!"] = {
full_category_link = "{{glossary|ellipsis|ellipses}} of [[name]]s of [[place]]s",
bare_category_breadcrumb = "ellipses",
bare_category_parent = "places",
},
["ELLIPSIS_OF place"] = {
link = false,
default = {"Ellipses of places"},
},
---------- Former long-form names ----------
["former long-form names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former long-form names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "long-form"}},
},
["former long-form names of places!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form",
bare_category_parent = "former names of places",
},
["FORMER_LONG_FORM_OF country"] = {
link = false,
default = {"Former long-form names of countries"},
},
["FORMER_LONG_FORM_OF place"] = {
link = false,
default = {"Former long-form names of places"},
},
---------- Former names ----------
["former names of capitals!"] = {
full_category_link = "[[former]] [[name]]s of [[capital city|capital cities]] that generally still exist but under a different name",
bare_category_breadcrumb = "capitals",
bare_category_parent = "former names of settlements",
},
["former names of countries!"] = {
full_category_link = "[[former]] [[name]]s of [[country|countries]] that generally still exist but under a different name",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former names of places",
},
["former names of places!"] = {
full_category_link = "[[former]] [[name]]s of [[place]]s that generally still exist but under a different name",
bare_category_breadcrumb = "former names",
bare_category_parent = "places",
},
["former names of political divisions!"] = {
full_category_link = "[[former]] [[name]]s of [[political]] [[division]]s (states, provinces, counties, etc.) that generally still exist but under a different name",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former names of places",
},
["former names of polities!"] = {
full_category_link = "[[former]] [[name]]s of [[polity|polities]] (e.g. [[country|countries]]) that generally still exist but under a different name",
bare_category_breadcrumb = "polities",
bare_category_parent = "former names of places",
},
["former names of settlements!"] = {
full_category_link = "[[former]] [[name]]s of [[city|cities]], [[town]]s, [[village]]s, etc. that generally still exist but under a different name",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former names of political divisions",
},
["FORMER_NAME_OF capital"] = {
link = false,
default = {"Former names of capitals"},
},
["FORMER_NAME_OF country"] = {
link = false,
default = {"Former names of countries"},
},
["FORMER_NAME_OF place"] = {
link = false,
default = {"Former names of places"},
},
["FORMER_NAME_OF polity"] = {
link = false,
default = {"Former names of polities"},
},
["FORMER_NAME_OF region"] = {
link = false,
fallback = "FORMER_NAME_OF subpolity",
},
["FORMER_NAME_OF settlement"] = {
link = false,
default = {"Former names of settlements"},
},
["FORMER_NAME_OF subpolity"] = {
link = false,
default = {"Former names of political divisions"},
},
---------- Former nicknames ----------
["former nicknames for cities!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[city|cities]], e.g. the [[Eternal City]] for [[Kyoto]] during the {{w|Heian period}} ({{circa2|800–1100|short=yes}} {{AD}})",
bare_category_breadcrumb = "cities",
bare_category_parent = "former nicknames for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["former nicknames for places!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "former",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {{name = "former names of places", sort = "nicknames"}},
},
["FORMER_NICKNAME_FOR capital"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR city"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR place"] = {
link = false,
default = {"Former nicknames for places"},
},
["FORMER_NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR town"] = {
link = false,
default = {"Former nicknames for cities"},
},
---------- Former official names ----------
["former official names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former official names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "official"}},
},
["former official names of places!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "former names of places",
},
["FORMER_OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Former official names of countries"},
},
["FORMER_OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Former official names of places"},
},
---------- Long-form names ----------
["long-form names of countries!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "long-form names of places",
},
["long-form names of places!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form names",
bare_category_parent = "places",
},
["LONG_FORM_OF country"] = {
link = false,
default = {"Long-form names of countries"},
},
["LONG_FORM_OF place"] = {
link = false,
default = {"Long-form names of places"},
},
---------- Nicknames ----------
["nicknames for cities!"] = {
full_category_link = "[[nickname]]s for [[city|cities]], e.g. the [[Big Apple]] for [[New York City]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"cities"},
},
["nicknames for continents!"] = {
full_category_link = "[[nickname]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"continents"},
},
["nicknames for countries!"] = {
full_category_link = "[[nickname]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"quốc gia"},
},
["nicknames for places!"] = {
full_category_link = "[[nickname]]s for [[place]]s",
bare_category_breadcrumb = "places",
bare_category_parent = "nicknames",
addl_bare_category_parents = {"places"},
},
["nicknames for states!"] = {
-- For categorizing nicknames for states of e.g. the United States
full_category_link = "[[nicknames]] for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"states"},
},
["NICKNAME_FOR capital"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR city"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR continent"] = {
link = false,
default = {"Nicknames for continents"},
},
["NICKNAME_FOR country"] = {
link = false,
default = {"Nicknames for countries"},
},
["NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR place"] = {
link = false,
default = {"Nicknames for places"},
},
["NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR state"] = {
link = false,
default = {"Nicknames for states"},
},
["NICKNAME_FOR town"] = {
link = false,
default = {"Nicknames for cities"},
},
---------- Obsolete forms ----------
["obsolete forms of places!"] = {
full_category_link = "{{glossary|obsolete}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "obsolete forms",
bare_category_parent = "places",
},
["OBSOLETE_FORM_OF place"] = {
link = false,
default = {"Obsolete forms of places"},
},
---------- Official names ----------
["official names of countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of places",
},
["official names of former countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of former places",
},
["official names of former places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "official names",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "official names of places", sort = "former"}},
},
["official names of places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official names",
bare_category_parent = "places",
},
["OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Official names of countries"},
},
["OFFICIAL_NAME_OF FORMER country"] = {
link = false,
default = {"Official names of former countries"},
},
["OFFICIAL_NAME_OF FORMER place"] = {
link = false,
default = {"Official names of former places"},
},
["OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Official names of places"},
},
---------- Official nicknames ----------
["official nicknames for places!"] = {
full_category_link = "[[official]] [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for places",
},
["official nicknames for states!"] = {
-- For categorizing official nicknames for states of e.g. the United States
full_category_link = "[[official]] [[nicknames]] for [[state]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for states",
addl_bare_category_parents = {"states"},
},
["OFFICIAL_NICKNAME_FOR place"] = {
link = false,
default = {"Official nicknames for places"},
},
["OFFICIAL_NICKNAME_FOR state"] = {
link = false,
default = {"Official nicknames for states"},
},
}
export.plural_placetype_to_singular = {}
for sg_placetype, spec in pairs(export.placetype_data) do
if spec.plural then
export.plural_placetype_to_singular[spec.plural] = sg_placetype
end
end
return export
d7j029kztnurrbj1kqghyo3p3ytb038
2350245
2350216
2026-05-05T07:05:06Z
Hiyuune
50834
2350245
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true for testing
local m_locations = require("Module:place/locations")
local m_links = require("Module:links")
local m_table = require("Module:table")
local m_strutils = require("Module:string utilities")
local debug_track_module = "Module:debug/track"
local en_utilities_module = "Module:en-utilities"
local dump = mw.dumpObject
local insert = table.insert
local concat = table.concat
local internal_error = m_locations.internal_error
export.internal_error = internal_error
local process_error = m_locations.process_error
export.process_error = process_error
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local ucfirst = m_strutils.ucfirst
local ulower = m_strutils.lower
local rmatch = m_strutils.match
local split = m_strutils.split
--[==[ intro:
This module contains placetype data used by [[Module:place]] and {{tl|place}}, along with a significant amount of code
to work with both placetypes and locations, as well as some placename-related info (FIXME: Consider moving it to
[[Module:place/locations]]). See also [[Module:place/locations]], which has definitions of all known locations. You must
currently load this module using {{cd|require()}}, not using {{cd|mw.loadData()}}.
In particular, it contains two fundamental and tricky functions:
# `get_placetype_equivs`, which finds the equivalent placetypes to look under in order to find a given property, and in
the process correctly handles placetypes with qualifiers (including qualifiers that act similar to "type-raising"
operators in that they do something non-trivial to the placetype to their right) as well as form-of directives and
fallbacks.
# `find_matching_holonym_location`, which looks up a holonym to find a matching known location, but in the process
checks holonyms to the right to make sure there isn't a clash between the user-specified containing holonyms and the
containers of the known location being considered. This is done to prevent overcategorizing when either there are two
known locations with the same name (e.g. Birmingham in England and Birmingham, Alabama in the US), or more generally
two locations with the same name, one of which is a known location but where the other is not (e.g. we're processing
non-known-location Mérida, Spain and don't want it categorized like known location Mérida, Yucatán, Mexico).
Both of these functions are invoked repeatedly, and probably are invoked several times on the same inputs and as a
result are candidates for memoization to speed up the operation of {{tl|place}}.
]==]
------------------------------------------------------------------------------------------
-- Basic utilities --
------------------------------------------------------------------------------------------
--[==[
Return true if `force_cat` is set either in this module or in [[Module:place/locations]].
]==]
function export.get_force_cat()
return export.force_cat or m_locations.force_cat
end
-- Add the page to a tracking "category". To see the pages in the "category",
-- go to [[Wiktionary:Tracking/place/PAGE]] and click on "What links here".
local function track(page)
require(debug_track_module)("place/" .. page)
return true
end
function export.remove_links_and_html(text)
text = m_links.remove_links(text)
return text:gsub("<.->", "")
end
--[==[
Return the singular version of a maybe-plural placetype, or nil if not plural. This correctly handles placetypes with
irregular plurals such as `kibbutzim` plural of `kibbutz` by looking up in a table constructed from the `plural` values
specified in `placetype_data`. If a special plural value is not found, the regular singularization algorithm in
[[Module:en-utilities]] is invoked, which reverses the y -> ies change after vowels and the 'es' addition after sh/ch/x,
and otherwise just subtracts a final 's' (which will incorrectly generate 'passe' for plural 'passes'; FIXME: consider
changing this for words ending in '-sses'). If the generated singular is the same as the passed-in value, nil is
returned.
]==]
function export.maybe_singularize_placetype(placetype)
if not placetype then
return nil
end
if export.plural_placetype_to_singular[placetype] then
return export.plural_placetype_to_singular[placetype]
end
local retval = require(en_utilities_module).singularize(placetype)
if retval == placetype then
return nil
end
return retval
end
-- Return the correct plural of a placetype, and (if `do_ucfirst` is given) make the first letter uppercase. We first
-- look up the plural in `placetype_data`, falling back to pluralize() in [[Module:en-utilities]], which is almost
-- always correct.
function export.pluralize_placetype(placetype, do_ucfirst)
local ptdata = export.placetype_data[placetype]
if ptdata and ptdata.plural then
placetype = ptdata
else
placetype = placetype
end
if do_ucfirst then
return ucfirst(placetype)
else
return placetype
end
end
--[==[
Get the data associated with a placetype, which may be in its singular or plural form. If `from_category` is specified,
we also look for category-only placetypes (generally plural) followed by `!`. Return three values: (a) the placetype
under which the data can be looked up (i.e. in its singular form if the passed-in `placetype` is plural and did not
match a category-only placetype followed by `!`); (b) the placetype data structure; (c) the type of `placetype` match
that occurred, one of `"direct"` if the canonical placetype is the same as the passed-in `placetype` and also the same
as the key under which `ptdata` was looked up, or `"direct-category"` if the `ptdata` was looked up under a key formed
from the passed-in `placetype` by adding `!`, or `"plural"` if the `ptdata` was looked up under the singularized version
of the plural passed-in `placetype`.
]==]
function export.get_placetype_data(placetype, from_category)
local ptdata = export.placetype_data[placetype]
if ptdata then
return placetype, ptdata, "direct"
end
if from_category then
ptdata = export.placetype_data[placetype .. "!"]
if ptdata then
return placetype .. "!", ptdata, "direct-category"
end
end
local sg_placetype = export.maybe_singularize_placetype(placetype)
if sg_placetype then
ptdata = export.placetype_data[sg_placetype]
if ptdata then
return sg_placetype, ptdata, "plural"
end
end
return nil
end
--[==[
Check for special pseudo-placetypes that should be ignored for categorization purposes.
]==]
function export.placetype_is_ignorable(placetype)
return placetype == "and" or placetype == "or" or placetype:find("^%(")
end
function export.resolve_placetype_aliases(placetype)
return export.placetype_aliases[placetype] or placetype
end
--[==[
Return a property from `placetype_data` for a given placetype. If the placetype isn't found in `placetype_data`, or the
key isn't found in the placetype's entry in `placetype_data`, return nil.
]==]
function export.get_placetype_prop(placetype, key)
-- Usually we are called on equivalent placetypes returned from `get_placetype_equivs`, in which case placetype
-- aliases have been resolved, but sometimes not, e.g. when fetching the indefinite article in
-- get_placetype_article(). `resolve_placetype_aliases` is just a simple lookup and it doesn't hurt to do it twice.
placetype = export.resolve_placetype_aliases(placetype)
if export.placetype_data[placetype] then
return export.placetype_data[placetype][key]
else
return nil
end
end
--[==[
Given a placetype, split the placetype into one or more potential ''splits'', each consisting of a three-element list
{ {``prev_qualifiers``, ``this_qualifier``, ``reduced_placetype``}}, i.e.
# the concatenation of zero or more previously-recognized qualifiers on the left, normally canonicalized (if there are
zero such qualifiers, the value will be nil);
# a single recognized qualifier, normally canonicalized (if there is no qualifier, the value will be nil);
# the "reduced placetype" on the right.
Splitting between the qualifier in (2) and the reduced placetype in (3) happens at each space character, proceeding from
left to right, and stops if a qualifier isn't recognized. All placetypes are canonicalized by checking for aliases
in `placetype_aliases`, but no other checks are made as to whether the reduced placetype is recognized. Canonicalization
of qualifiers does not happen if `no_canon_qualifiers` is specified.
For example, given the placetype `"small beachside unincorporated community"`, the return value will be
{ {
{nil, nil, "small beachside unincorporated community"},
{nil, "small", "beachside unincorporated community"},
{"small", "[[beachfront]]", "unincorporated community"},
{"small [[beachfront]]", "[[unincorporated]]", "community"},
}}
Here, `"beachside"` is canonicalized to `"[[beachfront]]"` and `"unincorporated"` is canonicalized to
`"[[unincorporated]]"`, in both cases according to the entry in `placetype_qualifiers`.
On the other hand, if given `"small former haunted community"`, the return value will be
{ {
{nil, nil, "small former haunted community"},
{nil, "small", "former haunted community"},
{"small", "former", "haunted community"},
}}
because `"small"` and `"former"` but not `"haunted"` are recognized as qualifiers.
Finally, if given `"former adr"`, the return value will be
{ {
{nil, nil, "former adr"},
{nil, "former", "administrative region"},
}}
because `"adr"` is a recognized placetype alias for `"administrative region"`.
]==]
function export.split_qualifiers_from_placetype(placetype, no_canon_qualifiers)
local splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
local prev_qualifier = nil
while true do
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if canon == nil then
break
end
local new_qualifier = qualifier
if type(canon) == "table" then
canon = canon.link
end
if not no_canon_qualifiers and canon ~= false then
if canon == true then
new_qualifier = "[[" .. qualifier .. "]]"
else
new_qualifier = canon
end
end
insert(splits, {prev_qualifier, new_qualifier, export.resolve_placetype_aliases(reduced_placetype)})
prev_qualifier = prev_qualifier and prev_qualifier .. " " .. new_qualifier or new_qualifier
placetype = reduced_placetype
else
break
end
end
return splits
end
--[==[
Given a `placetype` (which may be pluralized), return an ordered list of equivalent placetypes to look under to find the
placetype's properties (such as the category or categories to be inserted). The return value is actually an ordered list
of objects of the form `{qualifier=``qualifier``, placetype=``equiv_placetype``}` where ``equiv_placetype`` is a
placetype whose properties to look up, derived from the passed-in placetype or from a contiguous subsequence of the
words in the passed-in placetype (always including the rightmost word in the placetype, i.e. we successively chop off
qualifier words from the left and use the remainder to find equivalent placetypes). ``qualifier`` is the remaining words
not part of the subsequence used to find ``equiv_placetype``; or nil if all words in the passed-in placetype were used
to find ``equiv_placetype``. (FIXME: This qualifier is not currently used anywhere.) Only placetypes for which there is
an entry in `placetype_data` are included. The placetype passed in is always checked first, and will form the first
entry if it exists in `placetype_data`.
'''NOTE:''' This is a tricky function as it implements handling of (a) qualifiers, (b) fallback logic, (c)
"type-raising" qualifiers such as `former`/`ancient`/etc. as well as `fictional` and `mythological`, and (d) form-of
directives, which act somewhat similarly to `former`, and allows interaction between more than one of these
simultaneously (e.g. official names of former places, which have their own categorization).
If {{tl|place}} gets too slow, one potential speedup is to memoize the results of this function, as it appears to be
getting called more than once on the same inputs. Another similar potential speedup is to memoize the results of
`iterate_matching_holonym_location()`.
For example, given the placetype `left tributary`, the following placetype/qualifier combinations are checked in turn:
```
{qualifier = nil, placetype="left tributary"}
{qualifier = "left", placetype="tributary"}
{qualifier = "left", placetype="river"}
```
and the return value will be
{ {
{qualifier = "left", placetype="tributary"},
{qualifier = "left", placetype="river"},
}}
The algorithm first enters the placetype itself into the list, then checks for `left tributary` as a recognized
placetype in `placetype_data` and doesn't find it, so it doesn't enter it into the returned list (if it found it, it
would add it as well as any fallbacks directly after it). It then splits off the recognized qualifier `left` to form the
''reduced placetype'' `tributary`, which is entered into the list because it is found in `placetype_data`. Then, because
it has a fallback `river`, which exists in `placetype_data`, the fallback is entered next.
Another example is `small rural fraziones` (where a ''frazione'' is type of subdivision of a ''comune'' or municipality,
often specifically an outlying hamlet). the placetype/qualifier combinations checked are:
```
{qualifier = nil, placetype="small rural fraziones"}
{qualifier = nil, placetype="small rural frazione"}
{qualifier = "small", placetype="rural fraziones"}
{qualifier = "small", placetype="rural frazione"}
{qualifier = "small [[rural]]", placetype="fraziones"}
{qualifier = "small [[rural]]", placetype="frazione"}
{qualifier = "small [[rural]]", placetype="hamlet"}
{qualifier = "small [[rural]]", placetype="village"}
```
The return value ends up as
{qualifier = "small [[rural]]", placetype="frazione"},
{qualifier = "small [[rural]]", placetype="hamlet"},
{qualifier = "small [[rural]]", placetype="village"},
}}
Here, because the result of singularizing `fraziones` returns a different value from the placetype itself, that
singularized value is checked after the original plural value. Also, in the process of splitting off qualifiers,
they are canonicalized if the entry in `placetype_qualifiers` says to do so; in this case, links are placed around
`rural`. Finally, `frazione` has `hamlet` as its fallback, which in turn has `village` as its fallback, so both
fallbacks end up being returned.
`no_fallback`, if set, disables returning equivalent placetypes based on the `fallback` setting for a placetype. This is
used in the first of two loops in find_placetype_cat_specs() in [[Module:place]] to prefer exact matches for placetypes
such as barangays with later holonyms to matches based on a fallback such as `neighborhood` with an earlier holonym.
See the comment in that function in [[Module:place]] for a more detailed explanation of why this is needed. Only the
placetype itself, and any reduced placetypes created by chopping off recognized qualifiers at the beginning, are
returned; but we do not return reduced placetypes if a containing placetype exists in `placetype_data`. (For example,
`"overseas territory"` has a fallback `"dependent territory"`, and `"overseas"` is also a recognized qualifier. When
`no_fallback` is in place, without the above proviso, we would return `"overseas territory"` followed by `"territory"`
with the incorrect effect of classifying an `"overseas territory"` of the United Kingdom such as `"Gibraltar"` under
[[:Category:Territories of the United Kingdom]] instead of [[:Category:Dependent territories of the United Kingdom]].)
As an exception, if `historical`, `ancient`, `former` or the like are found, they proceed ignoring `no_fallback`,
because it seems tricky to handle them correctly in the presence of `no_fallback`, and historical/former placetypes
rarely occur with exact match category specs anyway.
`no_split_qualifiers` prevents splitting off recognized qualifiers and returning the remainder of the placetype as an
equivalent placetype. Only the passed-in placetype, and any fallbacks, will be returned. This is used in
[[Module:category tree/topic cat/data/Places]] when looking up placetypes found in categories. Such placetypes won't
have qualifiers and so it doesn't make sense to try and look for them.
`from_category`, if set, causes category-only placetypes (those ending in `!`) to also be checked.
`form_of_directive`, if set, causes the specified form-of directive (e.g. `FORMER_NAME_OF`) to be prepended to checked
placetypes, their directive-specific type (e.g. `FORMER_NAME_OF_type`), and their classes (`class`) to get the
appropriate placetypes to check for form-of-directive categories. It falls back to the prepended generic `place` as a
placetype, e.g. `FORMER_NAME_OF place`, if nothing else matches.
`no_check_for_inherently_former` is used internally to prevent an infinite loop when checking for `inherently_former`.
`register_former_as_non_former` is a major hack used in `get_bare_categories` to deal with the mismatch between e.g.
known location `Yugoslavia` declaring itself a `country` but definitions of it declaring it a `former country`. It
causes the non-former version of the specified placetype to be included in the returned equivalents along with the
former placetypes. [FIXME: This should apply only to the entries in `former_countries` but it's tricky to do that now;
fix this in the known-location refactor. -- The known-location refactor is already done but we haven't yet fixed this.]
]==]
function export.get_placetype_equivs(placetype, props)
local no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former
local form_of_directive
if props then
no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former =
props.no_fallback, props.no_split_qualifiers, props.no_check_for_inherently_former, props.from_category,
props.register_former_as_non_former
form_of_directive = props.form_of_directive
end
local equivs = {}
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. `qualifier` is
-- the preceding qualifier to insert into `equivs` along with the placetype (see comment at top of function). If
-- `from_category` is given, we also check for a category-specific entry consisting of the placetype followed by
-- `!`, and in all cases we also check to see if `placetype` is plural, and if so, insert the singularized version
-- along with its fallbacks (if any) in `placetype_data`. `form_of_prefix` is a form-of prefix such as
-- `OFFICIAL_NAME_OF`. If specified, we check the fallbacks of `placetype` without the prefix but then insert into
-- `equivs` the prefixed placetype. This way, if the user says e.g. {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}},
-- we will correctly categorize into [[:Category:Official names of countries]], rather than only trying to look up
-- `OFFICIAL_NAME_OF island country` and failing, falling back ultimately to [[:Category:Official names of places]].
local function insert_placetype_and_fallbacks(qualifier, placetype, form_of_prefix)
local function insert_equiv(pt)
if form_of_prefix then
-- Let's say the user says {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}} and we have
-- no entry for `OFFICIAL_NAME_OF island country` but we do for `OFFICIAL_NAME_OF country` (which we end
-- up processing because `island country` falls back to `country`), and that entry in turn is defined
-- using a fallback. We have to insert that fallback-of-fallback, and the easiest/cleanest way of
-- handling this is by calling ourselves recursively.
insert_placetype_and_fallbacks(qualifier, form_of_prefix .. " " .. pt)
else
insert(equivs, {qualifier=qualifier, placetype=pt})
end
end
-- Insert the placetype, along with any fallbacks.
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if ptdata then
insert_equiv(canon_placetype)
if no_fallback then
return
end
local first_placetype = #equivs + 1
local prev_placetype = nil
while true do
local pt_value = export.placetype_data[canon_placetype]
if not pt_value then
internal_error("Fallback value %s specified for placetype %s but is not in `placetype_data`",
canon_placetype, prev_placetype)
end
if pt_value.fallback then
insert_equiv(pt_value.fallback)
local last_placetype = #equivs
if last_placetype - first_placetype >= 10 then
local fallback_loop = {}
for i = first_placetype, last_placetype do
insert(fallback_loop, equivs[i].placetype)
end
internal_error("Apparent loop in fallback chain: %s", table.concat(fallback_loop, " -> "))
end
prev_placetype = canon_placetype
canon_placetype = pt_value.fallback
else
break
end
end
end
end
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. This is a
-- wrapper around the more basic `insert_placetype_and_fallbacks()` which handles form-of directives. If there is no
-- form-of directive, this function directly calls `insert_placetype_and_fallbacks()`. We do things this way so that
-- form-of directives correctly combine with `former`-type qualifiers. Note that we also have special backups for
-- form-of directives that check `DIRECTIVE place` (and before that, `DIRECTIVE FORMER/ANCIENT place` is there's a
-- `former`-type directive); these backups live outside this function because we want them done once, late, rather
-- than in each invocation of `process_and_insert_placetype()`.
local function process_and_insert_placetype(qualifier, reduced_placetype)
if form_of_directive then
-- First check for e.g. `OFFICIAL_NAME_OF island country` and its fallbacks; then we look for fallbacks of
-- `island country` and check e.g. `OFFICIAL_NAME_OF country` and its fallbacks. All of this is handled by
-- `insert_placetype_and_fallbacks()` with appropriate parameters. After that, check the general class of
-- the directive, e.g. `subpolity` if something like `district` is given. (Eventually, we check for
-- `OFFICIAL_NAME_OF place` as a backup, but this happens at the end outside the loop over qualifiers.)
insert_placetype_and_fallbacks(qualifier, reduced_placetype, form_of_directive)
if not no_fallback then
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype)
local directive_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, form_of_directive .. "_type") or
export.get_placetype_prop(pt, "class") end
)
if not directive_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s in conjunction with form-of directive %s, placetype data " ..
'located but directive-specific type property %s missing, and so is "class"; ' ..
"placetypes searched are %s", reduced_placetype, form_of_directive,
form_of_directive .. "_type", reduced_placetype_equivs)
else
-- This should be allowed, as we allow unrecognized placetypes in general.
end
elseif directive_type ~= "!" then
insert_placetype_and_fallbacks(qualifier, directive_type, form_of_directive)
end
end
else
insert_placetype_and_fallbacks(qualifier, reduced_placetype)
end
end
-- Successively split off recognized qualifiers and loop over successively greater sets of qualifiers from the left
-- (unless `no_split_qualifiers` is specified, in which case we don't check for qualifiers).
local splits
if no_split_qualifiers then
splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
else
splits = export.split_qualifiers_from_placetype(placetype)
end
for _, split in ipairs(splits) do
local prev_qualifier, this_qualifier, reduced_placetype = unpack(split, 1, 3)
-- If a special "former" qualifier like `former` or `historical` isn't present, and
-- `no_check_for_inherently_former` is not given (this flag is used to avoid infinite loops), check for
-- "inherently former" placetypes like `satrapy` and `treaty port` that always refer to no-longer-existing
-- placetypes, and handle accordingly.
local unlinked_this_qualifier
if this_qualifier and this_qualifier:find("%[") then
unlinked_this_qualifier = export.remove_links_and_html(this_qualifier)
else
unlinked_this_qualifier = this_qualifier
end
local former_qualifiers = this_qualifier and export.former_qualifiers[unlinked_this_qualifier] or nil
if not former_qualifiers and not no_check_for_inherently_former then
former_qualifiers = export.get_equiv_placetype_prop(reduced_placetype,
function(pt) return export.get_placetype_prop(pt, "inherently_former") end,
{no_check_for_inherently_former = true})
end
-- If a special "former" qualifier like `former` or `historical` is present, map it to the appropriate internal
-- qualifiers (`ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
-- qualifiers), fetch the `former_type` property, and treat the placetype as if a concatenation of the mapped
-- qualifier(s) and the value of `former_type`. For example, if `medieval village` is given, we map `medieval`
-- to `ANCIENT` and `FORMER`, and `village` to its `former_type` of `settlement`, and enter the placetypes
-- `ANCIENT settlement` and `FORMER settlement` (in that order) into `equivs`. If the placetype following the
-- "former" qualifier is recognized in `placetype_data` but has no `former_type` and no fallback with a
-- `former_type` specified, it is an internal error; but if the placetype isn't recognized (e.g. something like
-- `former greenhouse` is specified and we don't have an entry for `greenhouse`), just track the occurrence and
-- don't enter anything into `equivs`.
if former_qualifiers then
-- FIXME: Should we respect `no_fallback` here? My instinct says no.
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype, {
no_check_for_inherently_former = true
})
local former_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, "former_type") or
export.get_placetype_prop(pt, "class") end
)
if not former_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s, placetype data located but `former_type` missing; " ..
"placetypes searched are %s", reduced_placetype, reduced_placetype_equivs)
else
-- Enable error when we've verified there aren't any examples.
track("bad-former-placetype")
track("bad-former-placetype/" .. reduced_placetype)
--process_error("For placetype '%s', unrecognized placetype following 'former'-type " ..
-- "qualifier; searched placetype(s) %s", reduced_placetype, dump(reduced_placetype_equivs))
end
elseif former_type ~= "!" then
-- First check directly for `ANCIENT/FORMER` + the original following placetype. This makes it possible
-- for (e.g.) former provinces of the Roman empire to be categorized specially.
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. reduced_placetype)
end
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. former_type)
end
-- HACK! See explanation above for `register_former_as_non_former`.
if register_former_as_non_former then
process_and_insert_placetype(prev_qualifier, reduced_placetype)
end
-- If we're processing a form-of directive, after doing everything else we do
-- `DIRECTIVE ANCIENT/FORMER place` e.g. `OFFICIAL_NAME_OF FORMER place` as a backup.
if form_of_directive and not no_fallback then
for _, former_qualifier in ipairs(former_qualifiers) do
insert_placetype_and_fallbacks(prev_qualifier, form_of_directive .. " " .. former_qualifier ..
" place")
end
end
-- Don't continue processing equivs. The reason is probably the same as the `break` below for
-- qualifier_to_placetype_equivs[]; categories for `former BLAH` are set using `default`, and
-- non-former equivs will otherwise take precedence.
break
end
end
-- Then see if the rightmost split-off qualifier is in qualifier_to_placetype_equivs
-- (e.g. 'fictional *' -> 'fictional location'). If so, add the mapping.
if this_qualifier and export.qualifier_to_placetype_equivs[unlinked_this_qualifier] then
insert(equivs, {
qualifier=prev_qualifier,
placetype=export.qualifier_to_placetype_equivs[unlinked_this_qualifier]
})
-- Don't continue processing equivs; otherwise, if we specify 'mythological city', even though the
-- equivalent entry for 'mythological location' gets inserted ahead of the entry for 'city', the
-- latter ends up generating the category because the category for 'mythological location' is set as
-- the default value, which is used only when no non-default category can be found.
break
end
-- Finally, join the rightmost split-off qualifier to the previously split-off qualifiers to form a combined
-- qualifier, and add it along with reduced_placetype and any mapping in placetype_data for reduced_placetype.
-- NOTE: The first time through this loop, both `prev_qualifier` and `this_qualifier` are nil, and this inserts
-- the full placetype into `equivs`.
local qualifier = prev_qualifier and prev_qualifier .. " " .. this_qualifier or this_qualifier
process_and_insert_placetype(qualifier, reduced_placetype)
-- If `no_fallback` and there's an entry in `placetype_data` for this placetype, don't include any reduced
-- placetypes to avoid the "overseas territory treated as a territory" issue describe above.
if no_fallback then
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(reduced_placetype, from_category)
if canon_placetype then
break
end
end
end
-- If we're processing a form-of directive, after doing everything else we do `DIRECTIVE place` e.g.
-- `OFFICIAL_NAME_OF place` as a backup; but only if either the placetype as a whole is recognized or the placetype
-- begins with a recognized qualifier. This latter check is to avoid categorizing into e.g.
-- [[Category:en:Former names of places]] in an invocation like
-- {{place|en|@former name of:Democratic Republic of the Congo|country|r/Central Africa|;|used from 1971–1997}};
-- the `used from 1971–1997` gets treated as a placetype and we're called on it.
if form_of_directive and not no_fallback and (splits[2] or export.get_placetype_data(placetype, from_category)) then
insert_placetype_and_fallbacks(nil, form_of_directive .. " place")
end
return equivs
end
function export.get_equiv_placetype_prop_from_equivs(equivs, fun, continue_on_nil_only)
for _, equiv in ipairs(equivs) do
local retval = fun(equiv.placetype)
if continue_on_nil_only and retval ~= nil or not continue_on_nil_only and retval then
return retval, equiv
end
end
return nil, nil
end
--[==[
Given a placetype `placetype` and a function `fun` of one argument, iteratively call the function on equivalent
placetypes fetched from `get_placetype_equivs` until the function returns a non-falsy value (i.e. not {nil} or {false});
but if `continue_on_nil_only` is specified, the iterations continue until the function returns non non-{nil} value.
FIXME: We should make `continue_on_nil_only` the default; but this requires changing some callers.) When `fun` returns a
non-falsy or non-{nil} value, `get_equiv_placetype_prop` returns two values: the value returned by `fun` and the
equivalent placetype that triggered the non-falsy (or non-{nil}) return value. If `fun` never returns a non-falsy (or
non-{nil}) value, `get_equiv_placetype_prop` returns {nil} for both return values. If `placetype` is passed in as {nil},
the return value is the result of calling `fun` on {nil} (whatever it is) with {nil} for the second return value.
]==]
function export.get_equiv_placetype_prop(placetype, fun, props)
if not placetype then
return fun(nil), nil
end
return export.get_equiv_placetype_prop_from_equivs(export.get_placetype_equivs(placetype, props), fun,
props and props.continue_on_nil_only)
end
--[==[
Return the article that is used with an entry placetype. We proceed as follows:
# See if there is a recognized qualifier at the beginning that specifies an article (including `false` for no article).
This takes precedence over anything else, so that e.g. `various capitals` gets no article rather than "`the"`.
# Then check the placetype or any equivalent placetype for the `entry_placetype_use_the` property, indicating that
`"the"` should be used.
# Otherwise we look to see if the placetype itself (not any equivalents, even those involving deleting a qualifier from
the beginning) has an entry in `placetype_data` that specifies the indefinite article using `entry_placetype_use_the`
(principally for use with placetypes like `union territory`).
# Otherwise, we use [[Module:en-utilities]] to apply the standard algorithm to generate `"an"` for words beginning with
a vowel and `"a"` otherwise.
If `ucfirst` is true, the first letter of the article is made upper-case.
]==]
function export.get_placetype_article(placetype, ucfirst)
local art
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if type(canon) == "table" then
art = canon.article
end
end
if art == false then
return art
end
if art == nil then
local placetype_use_the = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "entry_placetype_use_the") end)
if placetype_use_the then
art = "tên"
else
art = export.get_placetype_prop(placetype, "entry_placetype_indefinite_article")
if not art then
art = require(en_utilities_module).get_indefinite_article(placetype)
end
end
end
if ucfirst then
art = m_strutils.ucfirst(art)
end
return art
end
--[==[
Return the preposition that should be used after `placetype` when occurring as an entry placetype or in categories
(e.g. `city >in< France` but `country >of< South America`). The preposition defaults to `"của"` if not specified.
]==]
function export.get_placetype_entry_preposition(placetype)
local pt_prep = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "preposition") end
)
return pt_prep or "của"
end
--[==[
Given a place desc (see top of file) and a holonym object (see top of file), add a key/value into the place desc's
`holonyms_by_placetype` field corresponding to the placetype and placename of the holonym. For example, corresponding
to the holonym "c/Italy", a key with the list value {"Italy"} will be added to the place desc's
`holonyms_by_placetype` field. If there is already a key with that place type, the new placename will be added to the
end of the value's list.
]==]
function export.key_holonym_into_place_desc(place_desc, holonym)
if not holonym.placetype then
return
end
-- Key in equivalent placetypes, so that e.g. `cities/San Francisco` gets keyed under `city`; but don't do
-- fallbacks, as it doesn't seem correct for the "do other holonyms of the same placetype" algorithm to do holonyms
-- of different types just because they have the same fallback.
local equiv_placetypes = export.get_placetype_equivs(holonym.placetype, {no_fallback = true})
local unlinked_placename = holonym.unlinked_placename
for _, equiv in ipairs(equiv_placetypes) do
local placetype = equiv.placetype
if not place_desc.holonyms_by_placetype then
place_desc.holonyms_by_placetype = {}
end
if not place_desc.holonyms_by_placetype[placetype] then
place_desc.holonyms_by_placetype[placetype] = {unlinked_placename}
else
insert(place_desc.holonyms_by_placetype[placetype], unlinked_placename)
end
end
end
--[=[
Construct a formatted link from the raw link spec `link` given the canonical singular placetype `sg_placetype`. If the
placetype was originally plural, `orig_placetype` should contain this plural value; otherwise it should be nil. This
will construct the appropriate type of link that displays as `orig_placetype` (or otherwise `sg_placetype`) but links to
whatever the `link` spec specifies (which may be `sg_placetype`, a Wikipedia article, etc.). `ptdata` is the placetype
data structure for the placetype, and `from_category` indicates that we are generating the description of a category
(otherwise we are generating the display form of an entry placetype).
]=]
local function make_placetype_link(link, sg_placetype, orig_placetype, ptdata, from_category, noerror)
if not from_category and ptdata.disallow_in_entries then
if noerror then
return "[not meant to be specified directly, with warning: " .. ptdata.disallow_in_entries .. "]"
else
process_error("Placetype %s is not meant to be specified directly: " .. ptdata.disallow_in_entries, sg_placetype)
end
end
if link == nil then
internal_error("Placetype data present for placetype %s but no link= setting given", sg_placetype)
elseif link == true then
if orig_placetype then
return ("[[%s|%s]]"):format(sg_placetype, orig_placetype)
else
return ("[[%s]]"):format(sg_placetype)
end
elseif link == false then
process_error("Placetype %s is not meant to be specified directly, but is only for internal use", sg_placetype)
elseif link == "w" then
return ("[[w:%s|%s]]"):format(sg_placetype, orig_placetype or sg_placetype)
elseif link == "separately" then
if orig_placetype then
local sg_words = split(sg_placetype, " ")
local orig_words = split(orig_placetype, " ")
if #sg_words ~= #orig_words then
internal_error("Can't construct 'separately' link for plural placetype %s as original placetype %s " ..
"has different number of words", orig_placetype, sg_placetype)
else
for i = 1, #sg_words do
if sg_words[i] == orig_words[i] then
sg_words[i] = ("[[%s]]"):format(sg_words[i])
else
sg_words[i] = ("[[%s|%s]]"):format(sg_words[i], orig_words[i])
end
end
return concat(sg_words, " ")
end
else
return (sg_placetype:gsub("([^ ]+)", "[[%1]]"))
end
elseif link:find("^%+") then
link = link:sub(2) -- discard initial +
return ("[[%s|%s]]"):format(link, orig_placetype or sg_placetype)
elseif not orig_placetype then
return link
else
return link
end
end
--[==[
Get the display form of a placetype by looking it up in `placetype_data`. If the placetype is recognized, or is the
plural of a recognized placetype, the corresponding linked display form is returned (with plural placetypes displaying
as plural but linked to the singular form of the placetype). Otherwise, return nil. If we're generating the description
of a category, `category_type` should be set to one of `"top-level"` (for top-level categories like
[[:Category:Neighborhoods]]), `"noncity"` (for non-city categories like [[:Category:Neighborhoods in Illinois, USA]]) or
`"city"` (for city categories like [[:Category:Neighborhoods of Chicago]]). Otherwise, we're generating the description
for use in formatting a {{tl|place}} call, and category-only placetypes ending in `!` will be ignored, along with
special `category_link*` settings. `return_full` is used along with `category_type` and will preferably return the
"full" variant of category link settings, i.e. `full_category_link*`; if they don't exist, the `category_link*` value is
prepended with `"names of"`. `noerror` says to not throw an error when encountering entry placetypes that would be
disallowed.
]==]
function export.get_placetype_display_form(placetype, category_type, return_full, noerror)
local from_category = not not category_type
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if canon_placetype then
local raw_link
local function is_linked_string(str)
return type(str) == "string" and str:find("%[%[")
end
if category_type then
local fetched_full
local function fetch_maybe_full(prop)
local retval = ptdata["full_" .. prop]
if retval ~= nil then
if return_full then
return retval, true
else
internal_error("Saw full_" .. prop .. "=%s but `return_full` not set, can't handle", retval)
end
end
return ptdata[prop], false
end
local function maybe_prefix(str)
if return_full and not fetched_full then
return "names of " .. str
else
return str
end
end
-- Careful with `false` as possible value.
if category_type == "top-level" then
raw_link, fetched_full = fetch_maybe_full("category_link_top_level")
elseif category_type == "noncity" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_noncity")
elseif category_type == "city" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_city")
else
internal_error('Unrecognized value for `category_type` %s, should be "top-level", "noncity" or "city"',
category_type)
end
if type(raw_link) == "string" then
return maybe_prefix(raw_link), ptdata
elseif raw_link ~= nil then
return raw_link, ptdata
end
raw_link, fetched_full = fetch_maybe_full("category_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
if ptmatch == "plural" then
raw_link, fetched_full = fetch_maybe_full("plural_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
end
if raw_link == nil then
raw_link, fetched_full = fetch_maybe_full("link")
end
if raw_link == false then
return raw_link, ptdata
end
return maybe_prefix(make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror)), ptdata
else
if ptmatch == "plural" then
raw_link = ptdata.plural_link
if raw_link == false then
process_error("Placetype %s cannot appear plural", placetype)
end
if is_linked_string(raw_link) then
return raw_link, ptdata
end
end
if raw_link == nil then
raw_link = ptdata.link
end
return make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror), ptdata
end
end
return nil
end
local function resolve_unlinked_placename_display_aliases(placetype, placename)
local equiv_placetypes = export.get_placetype_equivs(placetype)
for i, equiv in ipairs(equiv_placetypes) do
equiv_placetypes[i] = equiv.placetype
end
local all_display_aliases_found = {}
local all_others_found = {}
for group, key, spec in m_locations.iterate_matching_location {
placetypes = equiv_placetypes,
placename = placename,
alias_resolution = "display",
} do
if spec.alias_of and spec.display then
insert(all_display_aliases_found, {group, key, spec, spec.display_as_full})
else
insert(all_others_found, {group, key, spec})
end
end
if not all_display_aliases_found[1] then
return placename
elseif all_display_aliases_found[2] then
internal_error("Found multiple matching display aliases for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
elseif all_others_found[1] then
internal_error("Found a display alias along with other possible meanings for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
else
local group, key, spec, as_full = unpack(all_display_aliases_found[1])
local full, elliptical = m_locations.key_to_placename(group, key)
return as_full and full or elliptical
end
end
--[==[
If `placename` of type `placetype` is a display alias, convert it to its canonical form; otherwise, return unchanged.
Display aliases transform certain placenames into canonical displayed forms. For example, if any of `country/US`,
`country/USA` or `country/United States of America` (or `c/US`, etc.) are given, the result will be displayed as
`United States`.
'''NOTE''': Display aliases change what is displayed from what the editor wrote in the Wikitext. As a result, they
should (a) be non-political in nature, and (b) not involve a change where the word `the` needs to be added or removed.
For example, normalizing `US` and `USA` to `United States` for display purposes is OK but normalizing `Burma` to
`Myanmar` is not (instead a cat alias should be used) because the terms `Burma` and `Myanmar` have clear political
connotations. Similarly, we have a display alias that maps the old name of `Macedonia` as a country (but not a region!)
to `North Macedonia`, but `Republic of Macedonia` is mapped to `North Macedonia` only as a cat alias because the two
terms differ in their use of `the`. (For example, if we had a display alias mapping `Republic of Macedonia` to
`North Macedonia`, the call {{tl|place|en|the <<capital city>> of the <<c/Republic of Macedonia>>}} would wrongly
display as `the [[capital city]] of the [[North Macedonia]]`.) Generally, display normalizations tend to involve
alternative forms (e.g. abbreviations, ellipses, foreign spellings) where the normalization improves clarity and
consistency.
]==]
function export.resolve_placename_display_aliases(placetype, placename)
-- If the placename is a link, apply the alias inside the link.
-- This pattern matches both piped and unpiped links. If the link is not piped, the second capture (linktext) will
-- be empty.
local link, linktext = rmatch(placename, "^%[%[([^|%[%]]+)|?([^|%[%]]-)%]%]$")
if link then
if linktext ~= "" then
local alias = resolve_unlinked_placename_display_aliases(placetype, linktext)
return "[[" .. link .. "|" .. alias .. "]]"
else
local alias = resolve_unlinked_placename_display_aliases(placetype, link)
return "[[" .. alias .. "]]"
end
else
return resolve_unlinked_placename_display_aliases(placetype, placename)
end
end
--[==[
Generate the "prefixed" version of a bare key, i.e. prefix it with `the` if correct for this key.
]==]
function export.get_prefixed_key(key, spec)
if spec.the then
return key
else
return key
end
end
-- Necessary for use by [[Module:place]]. FIXME: Reorganize the modules so this isn't necessary.
export.iterate_matching_location = m_locations.iterate_matching_location
--[=[
Iterator that iterates over holonyms in `place_desc`. If `first_holonym_index` is given, start iterating at the
specified holonym and stop either when there are no more holonyms or a holonym with modifier `:also` is found. If
`first_holonym_index` is nil or omitted, iterate over all holonyms regardless. If `include_raw_text_holonyms` is
specified, raw text holonyms (those not of the form `placetype/placename`) are returned as well; they can be identified
by the fact that the `placetype` field in the holonym structure is nil. Two values are returned at each iteration, the
holonym index and holonym structure, similar to `ipairs()`.
]=]
function export.get_holonyms_to_check(place_desc, first_holonym_index, include_raw_text_holonyms)
local stop_at_also = not not first_holonym_index
return function(place_desc, index)
while true do
index = index + 1
local this_holonym = place_desc.holonyms[index]
-- If we were passed in a starting holonym index, go up to but not including a holonym marked with `:also`
-- (continue_cat_loop); the categorization code will then restart the loop at that holonym. That holonym
-- will have `:also` marked on it, so make sure not to stop immediately if the first holonym is marked with
-- `:also`.
if not this_holonym or stop_at_also and index > first_holonym_index and this_holonym.continue_cat_loop then
return nil
end
-- If not placetype, we're processing raw text, which we normally want to skip.
if include_raw_text_holonyms or this_holonym.placetype then
return index, this_holonym
end
end
end, place_desc, first_holonym_index and first_holonym_index - 1 or 0
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, iterate over all
such known locations, returning for each location the corresponding key, spec and group as well as the trail of
ancestral containers. Unlike `iterate_matching_location()`, this specifically checks that there is no mismatch between
the location's containers at any level and any of the following holonyms in the {{tl|place}} spec. The fields in `data`
are:
* `holonym_placetype`: The placetype of the holonym. It can actually be a list of possible placetypes, as with
`iterate_matching_location()`.
* `holonym_placename`: The placename of the holonym.
* `holonym_index`: The index of the holonym among the holonyms in `place_desc`, or nil if the holonym is not among the
holonyms in `place_desc`. (If a holonym index is given, we check for container mismatches among the holonyms
following the specified index, stopping either when encountering a holonym marked with modifier `:also` or, if none
exist, when we run out of holonyms. If no holonym index is given, we check all holonyms for container mismatches.)
* `place_desc`: Description of the place; used for the holonyms, to check for container mismatches.
Returns four values: the location group, the canonical key by which the location is known, the spec object describing
the location and the trail of ancestral containers for the location. The first three values are the same as for
`iterate_matching_location`.
]==]
function export.iterate_matching_holonym_location(data)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
local matching_location_iterator = m_locations.iterate_matching_location {
placetypes = holonym_placetype,
placename = holonym_placename,
}
return function()
while true do
local group, key, spec = matching_location_iterator()
if not group then
return nil
end
local container_trail = {}
-- For each level of container, check that there are no mismatches (i.e. other location of the same
-- placetype) mentioned. We allow a mismatch at a given level if there's also a match with the container
-- at that level. For example, in the case of Kansas City, defined in [[Module:place/locations]] as a city
-- in Missouri, if we define it as {{tl|place|city|s/Missouri,Kansas}}, we ignore the mismatching state of
-- Kansas because the correct state of Missouri was also mentioned. But imagine we are defining Newark,
-- Delaware as {{tl|place|city|s/Delaware|c/US}} and (as is the case) we have an entry for Newark, New
-- Jersey in [[Module:place/locations]]. Just because the containing location `US` matches isn't enough,
-- because Newark, NJ also has New Jersey as a containing location and there's a mismatch at that level. If
-- there are no mismatches at any level we assume we're dealing with the right known location.
--
-- If at a given level there are multiple containing locations, we count a match if any holonym matches any
-- containing location, and a mismatch only if a holonym exists of the same placetype that doesn't match any
-- containing location.
local containers_mismatch = false
for containers in m_locations.iterate_containers(group, key, spec) do
insert(container_trail, containers)
local match_at_level = false
local mismatch_at_level = false
for other_holonym_index, other_holonym in export.get_holonyms_to_check(place_desc,
holonym_index and holonym_index + 1 or nil) do
local other_source_holonym = other_holonym.augmented_from_holonym
if other_source_holonym and other_source_holonym.placetype == holonym_placetype and
other_source_holonym.unlinked_placename ~= holonym_placename then
-- Ignore holonyms added during the augmentation process for other holonyms of the same
-- placetype as the placetype of the holonym we're considering. See comment in
-- augment_holonyms_with_container() for why we do this.
-- continue; grrr, no 'continue' in Lua
else
local holonym_matches_at_level = false
local holonym_exists_with_same_placetype = false
for _, container in ipairs(containers) do
if not container.spec.no_check_holonym_mismatch then
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
local placetypes = container.spec.placetype
if type(placetypes) ~= "table" then
placetypes = {placetypes}
end
local placetype_equivs = {}
for _, pt in ipairs(placetypes) do
m_table.extend(placetype_equivs, export.get_placetype_equivs(pt))
end
local this_holonym_matches = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype and
(other_holonym.unlinked_placename == full_container_placename or
other_holonym.unlinked_placename == elliptical_container_placename)
end
)
if this_holonym_matches then
holonym_matches_at_level = true
break
end
local this_holonym_exists_with_same_placetype = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype
end
)
if this_holonym_exists_with_same_placetype then
-- We seem to have a mismatch at this level. But before we decide conclusively that this
-- is the case, check to see whether the putative mismatch is an alias and matches when
-- we resolve the alias.
for oh_group, oh_key, oh_spec, oh_container_trail in
export.iterate_matching_holonym_location {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = place_desc,
} do
local oh_full_placename, oh_elliptical_placename =
m_locations.key_to_placename(oh_group, oh_key)
if oh_full_placename == full_container_placename or
oh_elliptical_placename == elliptical_container_placename then
-- Alias matched when resolved.
this_holonym_matches = true
break
end
end
if this_holonym_matches then
-- Alias matched above when resolved.
holonym_matches_at_level = true
break
else
-- Not an alias, or doesn't match when resolved. We have a true mismatch.
holonym_exists_with_same_placetype = true
end
end
end
end
if holonym_matches_at_level then
match_at_level = true
break
end
if holonym_exists_with_same_placetype then
mismatch_at_level = true
end
end
end
if not match_at_level and mismatch_at_level then
containers_mismatch = true
break
end
end
if not containers_mismatch then
return group, key, spec, container_trail
end
end
end
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, find and return the
corresponding key, spec and group as well as the trail of ancestral containers. This is like
`iterate_matching_holonym_location()` but throws an error if more than one location matches. (An example where this
would happen is {{tl|place|en|neighborhood|city/Newcastle}}, because there are two known locations named Newcastle. To
fix this, specify additional following disambiguating holonyms, e.g.
{{tl|place|en|neighborhood|city/Newcastle|s/New South Wales}}.
]==]
function export.find_matching_holonym_location(data)
local all_found = {}
for group, key, spec, container_trail in export.iterate_matching_holonym_location(data) do
insert(all_found, {group, key, spec, container_trail})
end
if not all_found[1] then
return nil
elseif all_found[2] then
local holonym_placetype = data.holonym_placetype
if type(holonym_placetype) == "table" then
holonym_placetype = concat(holonym_placetype, ",")
end
local found_keys = {}
for _, found in ipairs(all_found) do
local _, key, _, _ = unpack(found)
insert(found_keys, key)
end
error(("Found multiple matching locations for holonym '%s/%s'; specify disambiguating context in the " ..
"containing holonyms: %s"):format(holonym_placetype, data.holonym_placename, dump(found_keys)))
else
return unpack(all_found[1])
end
end
------------------------------------------------------------------------------------------
-- Placename and placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
This is a map from aliases to their canonical forms. Any placetypes appearing as keys here will be mapped to their
canonical forms in all respects, including the display form. Contrast entries in 'placetype_data' with a fallback, which
applies to categorization and other processes but not to display.
The most important aliases are for holonym placetypes, particularly those that occur often such as "country", "state",
"province" and the like. Particularly long placetypes that mostly occur as entry placetypes (e.g.
"census-designated place") can be given abbreviations, but it is generally preferred to spell out the entry placetype.
Note also that we purposely avoid certain abbreviations that would be ambiguous (e.g. "d", which could variously be
interpreted as "department", "district" or "division").
]==]
export.placetype_aliases = {
["acomm"] = "autonomous community",
["adr"] = "administrative region",
["adterr"] = "administrative territory", -- Pakistan
["aobl"] = "autonomous oblast",
["aokr"] = "autonomous okrug",
["ap"] = "autonomous province",
["apref"] = "autonomous prefecture",
["aprov"] = "autonomous province",
["ar"] = "autonomous region",
["arch"] = "archipelago",
["arep"] = "autonomous republic",
["aterr"] = "autonomous territory",
["atu"] = "autonomous territorial unit",
["bor"] = "borough",
["c"] = "quốc gia",
["can"] = "canton",
["carea"] = "council area",
["cc"] = "constituent country",
["cdblock"] = "community development block",
["cdep"] = "Crown dependency",
["CDP"] = "census-designated place",
["cdp"] = "census-designated place",
["clcity"] = "county-level city",
["co"] = "county",
["cobor"] = "county borough",
["colcity"] = "county-level city",
["coll"] = "collectivity",
["comm"] = "community",
["cont"] = "lục địa",
["contr"] = "continental region",
["contregion"] = "continental region",
["cpar"] = "civil parish",
["damun"] = "direct-administered municipality",
["dep"] = "dependency",
["department capital"] = "departmental capital",
["dept"] = "department",
["depterr"] = "dependent territory",
["dist"] = "district",
["distmun"] = "district municipality",
["div"] = "division",
["emp"] = "empire",
["fpref"] = "French prefecture",
["gov"] = "governorate",
["govnat"] = "governorate",
["home-rule city"] = "home rule city",
["home-rule municipality"] = "home rule municipality",
["inner-city area"] = "inner city area",
["ires"] = "Indian reservation",
["isl"] = "island",
["lbor"] = "London borough",
["lga"] = "local government area",
["lgarea"] = "local government area",
["lgd"] = "local government district",
["lgdist"] = "local government district",
["metbor"] = "metropolitan borough",
["metcity"] = "metropolitan city",
["metmun"] = "metropolitan municipality",
["mtn"] = "mountain",
["mun"] = "municipality",
["mundist"] = "municipal district",
["nonmetropolitan county"] = "non-metropolitan county",
["obl"] = "oblast",
["okr"] = "okrug",
["p"] = "province",
["par"] = "parish",
["parmun"] = "parish municipality",
["pen"] = "peninsula",
["plcity"] = "prefecture-level city",
["plcolony"] = "Polish colony",
["pref"] = "prefecture",
["prefcity"] = "prefecture-level city",
["preflcity"] = "prefecture-level city",
["prov"] = "province",
["r"] = "region",
["range"] = "mountain range",
["rcm"] = "regional county municipality",
["rcomun"] = "regional county municipality",
["rdist"] = "regional district",
["rep"] = "republic",
["rhrom"] = "rural hromada",
["riv"] = "river",
["rmun"] = "regional municipality",
["robor"] = "royal borough",
["romp"] = "Roman province",
["runit"] = "regional unit",
["rurmun"] = "rural municipality",
["s"] = "state",
["sar"] = "special administrative region",
["shrom"] = "settlement hromada",
["spref"] = "subprefecture",
["sprefcity"] = "sub-prefectural city",
["sprovcity"] = "subprovincial city",
["submet city"] = "sub-metropolitan city",
["submetropolitan city"] = "sub-metropolitan city",
["sub-prefecture-level city"] = "sub-prefectural city",
["sub-provincial city"] = "subprovincial city",
["sub-provincial district"] = "subprovincial district",
["terr"] = "territory",
["terrauth"] = "territorial authority",
["twp"] = "township",
["twpmun"] = "township municipality",
["uauth"] = "unitary authority",
["ucomm"] = "unincorporated community",
["udist"] = "unitary district",
["uhrom"] = "urban hromada",
["uterr"] = "union territory",
["utwpmun"] = "united township municipality",
["val"] = "valley",
["vdc"] = "village development committee",
["vil"] = "village",
["voi"] = "voivodeship",
["wcomm"] = "Welsh community",
}
local no_link_def_article = {link = false, article = ""}
local no_link_no_article = {link = false, article = false}
--[==[ var:
These qualifiers can be prepended onto any placetype and will be handled correctly. For example, the placetype
`large city` will be displayed as `large <nowiki>[[city]]</nowiki>` and categorized as if `city` were specified. If the
value in the following table is a string, the qualifier will display according to the string. If the value is `true`,
the qualifier will be linked to its corresponding Wiktionary entry. If the value is `false`, the qualifier will not be
linked but will appear as-is. Note that these qualifiers do not override placetypes with entries elsewhere that contain
those same qualifiers. For example, the entry for `inland sea` in `placetype_data` will apply in preference to treating
`inland sea` as equivalent to `sea`.
]==]
export.placetype_qualifiers = {
-- generic qualifiers
["huge"] = false,
["tiny"] = false,
["large"] = false,
["big"] = false,
["mid-size"] = false,
["mid-sized"] = false,
["small"] = false,
["sizable"] = false,
["important"] = false,
["long"] = false,
["short"] = false,
["major"] = false,
["minor"] = false,
["high"] = false,
["tall"] = false,
["low"] = false,
["left"] = false, -- left tributary
["right"] = false, -- right tributary
["modern"] = false, -- for use in opposition to "ancient" in another definition
-- "former" qualifiers
["abandoned"] = true,
["ancient"] = true,
["deserted"] = true,
["extinct"] = true,
["former"] = false,
["historic"] = "historical",
["historical"] = true,
["medieval"] = true,
["mediaeval"] = true,
["ruined"] = true,
["traditional"] = true,
-- sea qualifiers
["coastal"] = true,
["inland"] = true, -- note, we also have an entry in placetype_data for 'inland sea' to get a link to [[inland sea]]
["maritime"] = true,
["overseas"] = true,
["seaside"] = true,
["beachfront"] = true,
["beachside"] = true,
["riverside"] = true,
-- lake qualifiers
["freshwater"] = true,
["saltwater"] = true,
["endorheic"] = true,
["oxbow"] = true,
["ox-bow"] = "[[oxbow]]", -- [[ox-bow]] is a red link
["tidal"] = true,
-- land qualifiers
["hilltop"] = true,
["hilly"] = true,
["insular"] = true,
["peninsular"] = true,
["chalk"] = true,
["karst"] = true,
["limestone"] = true,
["mountainous"] = true,
["mountaintop"] = true,
["alpine"] = true,
["volcanic"] = true, -- for an island
-- political status qualifiers
["autonomous"] = true,
["incorporated"] = true,
["special"] = true,
["unincorporated"] = true,
["coterminous"] = true,
-- monetary status/etc. qualifiers
["fashionable"] = true,
["wealthy"] = true,
["affluent"] = true,
["declining"] = true,
-- city vs. rural qualifiers
["urban"] = true,
["suburban"] = true,
["exurban"] = true,
["outlying"] = true,
["remote"] = true,
["rural"] = true,
["outback"] = true,
["inner"] = false,
["inner-city"] = true,
["central"] = false,
["outer"] = false,
-- land use qualifiers
["residential"] = true,
["agricultural"] = true,
["business"] = true,
["commercial"] = true,
["industrial"] = true,
-- business use qualifiers
["railroad"] = true,
["railway"] = true,
["farming"] = true,
["fishing"] = true,
["mining"] = true,
["logging"] = true,
["cattle"] = true,
-- tourism use qualifiers
["resort"] = true, -- note, we also have 'resort city' and 'resort town', that take precedecne
["spa"] = true, -- note, we also have 'spa city' and 'spa town', that take precedecne
["ski"] = true, -- note, we also have 'ski resort city' and 'ski resort town', that take precedecne
-- religious qualifiers
["holy"] = true,
["sacred"] = true,
["religious"] = true,
["secular"] = true,
-- qualifiers for nonexistent places
["claimed"] = false,
["fictional"] = true,
["legendary"] = true,
["mythical"] = true,
["mythological"] = true,
-- directional qualifiers
["northern"] = false,
["southern"] = false,
["eastern"] = false,
["western"] = false,
["north"] = false,
["south"] = false,
["east"] = false,
["west"] = false,
["northeastern"] = false,
["southeastern"] = false,
["northwestern"] = false,
["southwestern"] = false,
["northeast"] = false,
["southeast"] = false,
["northwest"] = false,
["southwest"] = false,
-- seasonal qualifiers
["summer"] = true, -- e.g. for 'summer capital'
["winter"] = true,
-- legal status qualifiers
-- FIXME: Two-word qualifiers don't work yet. But you can enter "de-facto" and it's canonicalized to [[de facto]].
["official"] = true,
["unofficial"] = true,
["de facto"] = true, -- 'de facto capital'
["de-facto"] = "[[de facto]]", -- [[de-facto]] is a red link
["de jure"] = true, -- 'de jure capital'
["de-jure"] = "[[de jure]]", -- [[de-jure]] is a red link
-- NOTE: 'unrecognized/unrecognised' are handled as placetypes 'unrecognized country', 'unrecognized state'
-- misc. qualifiers
["planned"] = true,
["chartered"] = true,
["landlocked"] = true,
["uninhabited"] = true,
-- superlative qualifiers
["first"] = no_link_def_article,
["second"] = no_link_def_article, -- for "second largest" etc.
["third"] = no_link_def_article,
["fourth"] = no_link_def_article,
["last"] = no_link_def_article,
["only"] = no_link_def_article,
["sole"] = no_link_def_article,
["main"] = no_link_def_article,
["largest"] = no_link_def_article,
["biggest"] = no_link_def_article,
["smallest"] = no_link_def_article,
["shortest"] = no_link_def_article,
["longest"] = no_link_def_article,
["tallest"] = no_link_def_article,
["highest"] = no_link_def_article,
["lowest"] = no_link_def_article,
["leftmost"] = no_link_def_article,
["rightmost"] = no_link_def_article,
["innermost"] = no_link_def_article,
["outermost"] = no_link_def_article,
["northernmost"] = no_link_def_article,
["southernmost"] = no_link_def_article,
["westernmost"] = no_link_def_article,
["easternmost"] = no_link_def_article,
["northwesternmost"] = no_link_def_article,
["southwesternmost"] = no_link_def_article,
["northeasternmost"] = no_link_def_article,
["southeasternmost"] = no_link_def_article,
-- several/various
["several"] = no_link_no_article,
["various"] = no_link_no_article,
["numerous"] = no_link_no_article,
["multiple"] = no_link_no_article,
["many"] = no_link_no_article,
["other"] = no_link_no_article,
}
--[==[ var:
In this table, the key qualifiers should be treated the same as the value qualifiers for categorization purposes. This
is overridden by `placetype_data` and `qualifier_to_placetype_equivs`.
]==]
export.former_qualifiers = {
["abandoned"] = {"FORMER"},
["ancient"] = {"ANCIENT", "FORMER"},
["former"] = {"FORMER"},
["extinct"] = {"FORMER"},
["historic"] = {"FORMER"},
["historical"] = {"FORMER"},
["medieval"] = {"ANCIENT", "FORMER"},
["mediaeval"] = {"ANCIENT", "FORMER"},
["ruined"] = {"ANCIENT", "FORMER"},
["traditional"] = {"FORMER"},
}
--[==[ var:
In this table, any placetypes containing these qualifiers that do not occur in `placetype_data` should be mapped to the
specified placetypes for categorization purposes. Entries here are overridden by `placetype_data`.
]==]
export.qualifier_to_placetype_equivs = {
["fictional"] = "fictional location",
["legendary"] = "mythological location",
["mythical"] = "mythological location",
["mythological"] = "mythological location",
-- For e.g. Taiwan as a "claimed province" of China; parts of Belize as claimed by Guatemala; various islands
-- claimed by various parties in East Asia. FIXME: We should conditionalize on what is being claimed since there are
-- also claimed capitals, e.g. Israel and Palestine claim Jerusalem as their capital.
["claimed"] = "claimed political division",
}
--[==[ var:
Mapping from placetypes to the corresponding plural category-only placetype for a capital of that placetype. The reverse
mapping also exists.
]==]
export.placetype_to_capital_cat = {
["autonomous community"] = "autonomous community capitals",
["canton"] = "cantonal capitals",
["comarca"] = "comarca capitals",
["country"] = "national capitals",
-- The following are not obviously different from 'county seats' but the latte terminology is used in the US.
["county"] = "county capitals",
["department"] = "departmental capitals",
["district"] = "district capitals",
["division"] = "division capitals",
["emirate"] = "emirate capitals",
["governorate"] = "governorate capitals",
["hromada"] = "hromada capitals",
["krai"] = "krai capitals",
["metropolitan city"] = "metropolitan city capitals",
["municipality"] = "municipal capitals",
["oblast"] = "oblast capitals",
["okrug"] = "okrug capitals",
["prefecture"] = "prefectural capitals",
["province"] = "provincial capitals",
["raion"] = "raion capitals",
["regency"] = "regency capitals",
["region"] = "regional capitals",
["regional unit"] = "regional unit capitals",
["republic"] = "republic capitals",
["state"] = "state capitals",
["territory"] = "territorial capitals",
["voivodeship"] = "voivodeship capitals",
}
--[==[ var:
This contains placenames that should be preceded by an article (almost always "the"). '''NOTE''': There are multiple
ways that placenames can come to be preceded by "the":
# Listed here.
# Given in [[Module:place/locations]] with an initial "the". All such placenames are added to this map by the code
just below the map.
# The placetype of the placename has `holonym_use_the = true` in its placetype_data.
# A regex in placename_the_re matches the placename.
Note that "the" is added only before the first holonym in a place description.
]==]
export.placename_article = {
-- This should only contain info that can't be inferred from [[Module:place/locations]].
["archipelago"] = {
["Cyclades"] = "the",
["Dodecanese"] = "the",
},
["country"] = {
["Holy Roman Empire"] = "the",
},
["empire"] = {
["Holy Roman Empire"] = "the",
},
["island"] = {
["North Island"] = "the",
["South Island"] = "the",
},
["region"] = {
["Balkans"] = "the",
["Russian Far East"] = "the",
["Caribbean"] = "the",
["Caucasus"] = "the",
["Middle East"] = "the",
["New Territories"] = "the",
["North Caucasus"] = "the",
["South Caucasus"] = "the",
["West Bank"] = "the",
["Gaza Strip"] = "the",
},
["valley"] = {
["San Fernando Valley"] = "the",
},
}
--[==[ var:
Regular expressions to apply to determine whether we need to put 'the' before a holonym. The key "*" applies to all
holonyms, otherwise only the regexes for the holonym's placetype apply.
]==]
export.placename_the_re = {
-- We don't need entries for peninsulas, seas, oceans, gulfs or rivers
-- because they have holonym_use_the = true.
["*"] = {"^Isle of ", " Islands$", " Mountains$", " Empire$", " Country$", " Region$", " District$", "^City of "},
["bay"] = {"^Vịnh của "},
["lake"] = {"^Hồ của "},
["country"] = {"^Republic of ", " Republic$"},
["republic"] = {"^Republic of ", " Republic$"},
["region"] = {"^Vùng của "},
["river"] = {"^Sông của "},
["local government area"] = {"^Shire of "},
["county"] = {"^Shire of "},
["Indian reservation"] = {" Reservation", " Nation"},
["tribal jurisdictional area"] = {" Reservation", " Nation"},
}
--[==[ var:
If any of the following holonyms are present, the associated holonyms are automatically added to the end of the list of
holonyms for categorization (but not display) purposes.
]==]
export.cat_implications = {
["region"] = {
["Eastern Europe"] = {"continent/Europe"},
["Central Europe"] = {"continent/Europe"},
["Western Europe"] = {"continent/Europe"},
["South Europe"] = {"continent/Europe"},
["Southern Europe"] = {"continent/Europe"},
["Northern Europe"] = {"continent/Europe"},
["Northeast Europe"] = {"continent/Europe"},
["Northeastern Europe"] = {"continent/Europe"},
["Southeast Europe"] = {"continent/Europe"},
["Southeastern Europe"] = {"continent/Europe"},
["North Caucasus"] = {"continent/Europe"},
["South Caucasus"] = {"continent/Asia"},
["South Asia"] = {"continent/Asia"},
["Southern Asia"] = {"continent/Asia"},
["East Asia"] = {"continent/Asia"},
["Eastern Asia"] = {"continent/Asia"},
["Central Asia"] = {"continent/Asia"},
["West Asia"] = {"continent/Asia"},
["Western Asia"] = {"continent/Asia"},
["Southeast Asia"] = {"continent/Asia"},
["North Asia"] = {"continent/Asia"},
["Northern Asia"] = {"continent/Asia"},
["Anatolia"] = {"continent/Asia"},
["Asia Minor"] = {"continent/Asia"},
["Mesopotamia"] = {"continent/Asia"},
["North Africa"] = {"continent/Africa"},
["Central Africa"] = {"continent/Africa"},
["West Africa"] = {"continent/Africa"},
["East Africa"] = {"continent/Africa"},
["Southern Africa"] = {"continent/Africa"},
["Central America"] = {"continent/Central America"},
["Caribbean"] = {"continent/North America"},
["Polynesia"] = {"continent/Oceania"},
["Micronesia"] = {"continent/Oceania"},
["Melanesia"] = {"continent/Oceania"},
["Siberia"] = {"country/Russia", "continent/Asia"},
["Russian Far East"] = {"country/Russia", "continent/Asia"},
["South Wales"] = {"constituent country/Wales", "continent/Europe"},
["Balkans"] = {"continent/Europe"},
["West Bank"] = {"country/Palestine", "continent/Asia"},
["Gaza"] = {"country/Palestine", "continent/Asia"},
["Gaza Strip"] = {"country/Palestine", "continent/Asia"},
}
}
------------------------------------------------------------------------------------------
-- Category and display handlers --
------------------------------------------------------------------------------------------
local function city_type_cat_handler(data)
local entry_placetype = data.entry_placetype
local generic_before_non_cities = export.get_placetype_prop(entry_placetype, "generic_before_non_cities")
if not generic_before_non_cities then
internal_error("city_type_cat_handler called on placetype %s that doesn't have a `generic_before_non_cities`" ..
" setting", entry_placetype)
end
local plural_entry_placetype = export.pluralize_placetype(entry_placetype)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and not spec.is_city then
-- Categorize both in key, and in the larger polity that the key is part of, e.g. [[Hirakata]] goes in both
-- "Cities in Osaka Prefecture" and "Cities in Japan". (But don't do the latter if no_container_cat is set.)
local cap_plural_entry_placetype = ucfirst(plural_entry_placetype)
local retcats = {("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(key, spec))}
if container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(container.key, container.spec)))
end
end
return retcats
end
end
local function capital_city_cat_handler(data, non_city)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
-- The first time we're called we want to return something; otherwise we will be called for later-mentioned
-- holonyms, which can result in wrongly classifying into e.g. `National capitals`. Simulate the loop in
-- find_placetype_cat_specs() over holonyms so we get the proper `Cities in ...` categories as well as the capital
-- category/categories we add below.
local retcats
if not non_city and place_desc.holonyms then
for h_index, holonym in export.get_holonyms_to_check(place_desc, holonym_index) do
local h_placetype, h_placename = holonym.placetype, holonym.unlinked_placename
retcats = city_type_cat_handler {
entry_placetype = "city",
holonym_placetype = h_placetype,
holonym_placename = h_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if retcats then
break
end
end
end
if not retcats then
retcats = {}
end
-- Now find the appropriate capital-type category for the placetype of the holonym, e.g. 'State capitals'. If we
-- recognize the holonym among the known holonyms in [[Module:place/locations]], also add a category like 'State
-- capitals of the United States'. Truncate e.g. 'autonomous region' to 'region', 'union territory' to 'territory'
-- when looking up the type of capital category, if we can't find an entry for the holonym placetype itself (there's
-- an entry for 'autonomous community').
local capital_cat = export.placetype_to_capital_cat[holonym_placetype]
if not capital_cat then
capital_cat = export.placetype_to_capital_cat[holonym_placetype:gsub("^.* ", "")]
end
if capital_cat then
capital_cat = ucfirst(capital_cat)
local inserted_specific_variant_cat = false
if holonym_index then
-- Now find the first recognized holonym location. We don't stop when :also is seen because of the common pattern
-- where we use :also to specify that a given city is the capital at multiple surrounding levels.
local matching_group, matching_key, matching_spec, matching_container_trail, matching_holonym_index
for h_index = holonym_index, #place_desc.holonyms do
if place_desc.holonyms[h_index].placetype then
matching_group, matching_key, matching_spec, matching_container_trail = export.find_matching_holonym_location {
holonym_placetype = place_desc.holonyms[h_index].placetype,
holonym_placename = place_desc.holonyms[h_index].unlinked_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if matching_group then
matching_holonym_index = h_index
break
end
end
end
if matching_holonym_index == holonym_index then
if matching_container_trail[1] and not matching_spec.no_container_cat then
for _, container in ipairs(matching_container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
elseif matching_holonym_index then
-- Check to make sure that the holonym placetype we were called on is listed among the
-- divtypes of the location we found.
local function insert_specific_variant_if_possible(key, spec)
return export.get_equiv_placetype_prop(holonym_placetype, function(pt)
local plural_holonym_placetype = export.pluralize_placetype(pt)
local saw_matching_div
if spec.divs then
local divs = spec.divs
if type(divs) ~= "table" then
divs = {divs}
end
for _, div in ipairs(divs) do
if type(div) ~= "table" then
div = {type = div}
end
if plural_holonym_placetype == div.type then
saw_matching_div = true
break
end
end
end
if saw_matching_div then
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(key, spec)))
return true
end
return false
end)
end
if insert_specific_variant_if_possible(matching_key, matching_spec) then
inserted_specific_variant_cat = true
elseif not matching_spec.no_container_cat then
for _, containers in ipairs(matching_container_trail) do
local saw_no_container_cat = false
for _, container in ipairs(containers) do
if insert_specific_variant_if_possible(container.key, container.spec) then
inserted_specific_variant_cat = true
break
end
saw_no_container_cat = saw_no_container_cat or container.spec.no_container_cat
end
if inserted_specific_variant_cat or saw_no_container_cat then
break
end
end
end
end
else
-- This happens when in an invocation like {{place|en|capital city|s/Haryana,Punjab}} for
-- [[Chandigarh]]. We fall back to older code that doesn't depend on the holonym index existing.
-- FIXME: This may not be necessary. In the example just given, when processing Haryana we add to
-- [[:Category:en:State capitals of India]], and nothing extra gets added when processing Punjab.
-- Possibly we can just skip this case entirely.
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
end
if not inserted_specific_variant_cat then
insert(retcats, capital_cat)
end
else
-- We didn't recognize the holonym placetype; just put in 'Capital cities'.
insert(retcats, "Capital cities")
end
return retcats
end
--[=[
This is invoked specially for all placetypes (see the `*` placetype key at the bottom of `placetype_data`). This is used
in two ways:
# To add pages to generic holonym categories like [[:Category:en:Places in Merseyside, England]] (and
[[:Category:en:Places in England]]) for any pages that have `co/Merseyside` as their holonym.
# To categorize demonyms in bare placename categories like [[:Category:en:Merseyside, England]] if the demonym
description mentions `co/Merseyside` and doesn't mention a more specific placename that also has a category. (In this
case there are none, but we can have demonyms at multiple levels, e.g. in France for individual villages, departments,
administrative regions, and for the entire country, and for example we only want to categorize a demonym into
[[:Category:France]] if no more specific category applies.) Unlike when invoked from {{tl|place}}, a demonym
invocation only adds the most specific holonym category and not the category of any containing polity (hence if we
add [[:Category:en:Merseyside, England]] we won't also add [[:Category:England]]).
This code also handles cities; e.g. for the first use case above, it would be used to add a page that has `city/Boston`
as a holonym to [[:Category:en:Places in Boston]], along with [[:Category:en:Places in Massachusetts, USA]] and
[[:Category:en:Places in the United States]]. The city handler tries to deal with the possibility of multiple cities
having the same name. For example, the code in [[Module:place/locations]] knows about the city of [[Columbus]],
[[Ohio]], which has containing polities `Ohio` (a state) and `the United States` (a country). If either containing
polity is mentioned, the handler proceeds to return the key `Columbus` (along with `Ohio, USA` and `the United States`).
Otherwise, if any other state or country is mentioned, the handler returns nothing, and otherwise it assumes the
mentioned city is the one we're considering and returns `Columbus` etc. This works correctly if the place only mentions
Ohio and a holonym for a Columbus in a different country is encountered, because of the function
`augment_holonyms_with_container`, which adds the US as a holonym when Ohio is encountered.
The single parameter `data` is as in category handlers. The return value is a list of categories (without the preceding
language code).
]=]
local function generic_place_cat_handler(data)
local from_demonym = data.from_demonym
local retcats = {}
local function insert_retkey(key, spec)
if from_demonym then
insert(retcats, key)
else
insert(retcats, ("Địa danh của %s"):format(export.get_prefixed_key(key, spec)))
end
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
if not spec.no_generic_place_cat then
-- This applies to continents and continental regions.
insert_retkey(key, spec)
end
-- Categorize both in key, and in the larger location(s) that the key is part of, e.g. [[Hirakata]] goes in
-- both [[Category:Places in Osaka Prefecture, Japan]] and [[Category:Places in Japan]]. But not when
-- no_container_cat is set (e.g. for 'United Kingdom').
if not spec.no_container_cat then
for _, container_set in ipairs(container_trail) do
local stop_adding_containers = false
for _, container in ipairs(container_set) do
if not container.spec.no_generic_place_cat then
insert_retkey(container.key, container.spec)
end
if container.spec.no_container_cat then
stop_adding_containers = true
end
end
if stop_adding_containers then
break
end
end
end
return retcats
end
end
--[==[
Special category handler run for all placetypes that checks for specified division placetypes of known locations and
categorizes appropriately.
]==]
function export.political_division_cat_handler(data)
if data.from_demonym then
return
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
local divlists = {}
if spec.divs then
insert(divlists, spec.divs)
end
if spec.addl_divs then
insert(divlists, spec.addl_divs)
end
for _, divlist in ipairs(divlists) do
if type(divlist) ~= "table" then
divlist = {divlist}
end
for _, div in ipairs(divlist) do
if type(div) == "string" then
div = {type = div}
end
local sgdiv = export.maybe_singularize_placetype(div.type) or div.type
local prep = div.prep or "of"
local cat_as = div.cat_as or div.type
if type(cat_as) ~= "table" then
cat_as = {cat_as}
end
if not export.placetype_data[sgdiv] then
internal_error("Placetype %s associated with known location key %s and data %s not found in " ..
"`placetype_data`", sgdiv, key, spec)
end
if sgdiv == data.entry_placetype then
local retcats = {}
for _, pt_cat in ipairs(cat_as) do
if type(pt_cat) == "string" then
pt_cat = {type = pt_cat}
end
local pt_prep = pt_cat.prep or prep
insert(retcats, ucfirst(pt_cat.type) .. " " .. pt_prep .. " " ..
export.get_prefixed_key(key, spec))
end
return retcats
end
end
end
end
end
--[==[
This is used to add pages to "bare" categories like [[:Category:en:Georgia, USA]] for `[[Georgia]]` and any
foreign-language terms that are translations of the state of Georgia. We look at the page title (or its overridden value
in {{para|pagename}}) as well as the glosses in {{para|t}}/{{para|t2}} etc., various extra-info values such as the
modern names in {{para|modern}}, and any values specified using a form-of directive. We need to pay attention to the
entry placetypes specified so we don't overcategorize; e.g. the US state of Georgia is `[[Джорджия]]` in Russian but the
country of Georgia is `[[Грузия]]`, and if we just looked for matching names, we'd get both Russian terms categorized
into both [[:Category:ru:Georgia, USA]] and [[:Category:ru:Georgia]]. We also need to check the containing holonyms to
make sure there isn't a mismatch (so we don't e.g. categorize Newark, Delaware in [[:Category:en:Newark]], which is
intended for Newark, New Jersey).
]==]
function export.get_bare_categories(args, overall_place_spec)
local bare_cats = {}
local place_descs = overall_place_spec.descs
local possible_placetypes_by_place_desc = {}
for i, place_desc in ipairs(place_descs) do
possible_placetypes_by_place_desc[i] = {}
for _, placetype in ipairs(place_desc.placetypes) do
if not export.placetype_is_ignorable(placetype) then
local equivs = export.get_placetype_equivs(placetype, {register_former_as_non_former = true})
for _, equiv in ipairs(equivs) do
insert(possible_placetypes_by_place_desc[i], equiv.placetype)
end
end
end
end
local function check_term(term)
-- Treat Wikipedia links like local ones.
term = term:gsub("%[%[w:", "[["):gsub("%[%[wikipedia:", "[[")
term = export.remove_links_and_html(term)
term = term:gsub("^ ", "")
for i, place_desc in ipairs(place_descs) do
-- Iterate over all matching locations in case there are multiple, as with Delhi defined as
-- {{place|en|megacity/and/union territory|c/India|containing the national capital [[New Delhi]]}}.
for group, key, spec, container_trail in export.iterate_matching_holonym_location {
holonym_placetype = possible_placetypes_by_place_desc[i],
holonym_placename = term,
place_desc = place_desc,
} do
insert(bare_cats, key)
end
end
end
-- FIXME: Should we only do the following if the language is English (requires that the lang is passed in)?
-- We should always do it if `pagename` is given (as it is with {{tcl}}) but maybe not otherwise unless 1=en. There
-- are cases like [[Ankara]] = English name for capital of Turkey, but also the name in various languages for the
-- capital of Ghana (= English [[Accra]]). But this should get caught by mismatching the containing country. The
-- advantage of checking when the language isn't English is we catch those places that fail to give an English
-- translation but where the translation happens to be the same as the other-language spelling. However, I don't
-- know how often this situation occurs.
check_term(args.pagename or mw.loadData("Module:headword/data").pagename)
for _, t in ipairs(args.t) do
check_term(t)
end
local function check_termobj_list(terms)
for _, term in ipairs(terms) do
if term.eq then
check_term(term.eq)
end
if term.alt or term.term then
check_term(term.alt or term.term)
end
end
end
for _, extra_info_terms in ipairs(overall_place_spec.extra_info) do
local arg = extra_info_terms.arg
if arg == "modern" or arg == "now" or arg == "full" or arg == "short" then
check_termobj_list(extra_info_terms.terms)
end
end
for _, directive in ipairs(overall_place_spec.directives) do
check_termobj_list(directive.terms)
end
return bare_cats
end
--[==[
This is used to augment the holonyms associated with a place description with the containing polities. For example,
given the following:
`# {{tl|place|en|subprefecture|pref/Hokkaido}}.`
We auto-add Japan as another holonym so that the term gets categorized into [[:Category:Subprefectures of Japan]].
To avoid over-categorizing we need to check to make sure no other countries are specified as holonyms.
]==]
function export.augment_holonyms_with_container(place_descs)
for _, place_desc in ipairs(place_descs) do
if place_desc.holonyms then
-- This ends up containing a copy of the original holonyms, with the augmented holonyms inserted in their
-- appropriate position. We don't just put them at the end because some holonyms have use the `:also`
-- modifier, which causes category processing to restart at that point after generating categories for a
-- preceding holonym, and we don't want the preceding holonym's augmented holonyms interfering with
-- categorization of a later holonym. We proceed from right to left, and each time we augment, we copy
-- the holonyms with the augmented holonym(s) inserted appropriately and replace the place description's
-- holonyms with the augmented ones before the next iteration. The reason for this is so that e.g.
-- {{place|neighborhood|city/Birmingham|co/West Midlands|cc/England}} doesn't throw an error during the
-- augmentation process due to 'Birmingham' referring to two known locations (in England and Alabama). If
-- we go left to right, we will throw an ambiguity error on `city/Birmingham` because code to exclude
-- Birmingham, Alabama needs `c/United Kingdom` present (to cause a mismatch with `c/United States`),
-- which isn't yet present as the augmentation code hasn't gotten to `cc/England` yet. For similar
-- reasons, we need to include the augmented holonyms in the holonyms considered in the next iteration
-- rather than modifying the place description once at athe end.
for i = #place_desc.holonyms, 1, -1 do
local holonym = place_desc.holonyms[i]
if holonym.placetype and not export.placetype_is_ignorable(holonym.placetype) then
local group, key, spec, container_trail = export.find_matching_holonym_location {
holonym_placetype = holonym.placetype,
holonym_placename = holonym.unlinked_placename,
holonym_index = i,
place_desc = place_desc,
}
if group and container_trail[1] and not spec.no_auto_augment_container then
local augmented_holonyms = {}
for j = 1, i do
insert(augmented_holonyms, place_desc.holonyms[j])
end
for _, containers in ipairs(container_trail) do
local any_no_auto_augment_container = false
for _, container in ipairs(containers) do
any_no_auto_augment_container = any_no_auto_augment_container or
container.spec.no_auto_augment_container
local containing_type = container.spec.placetype
if type(containing_type) == "table" then
-- If the containing type is a list, use the first element as the canonical variant.
containing_type = containing_type[1]
end
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
-- Don't side-effect holonyms while processing them.
local new_holonym = {
-- By the time we run, the display has already been generated so we don't need to
-- set display_placename.
placetype = containing_type,
-- placename_to_key() for the group should correctly handle both full and elliptical
-- placenames, but the full placename seems less likely to be ambiguous. FIXME: We
-- should just store the key directly and use it when available to avoid having to
-- convert key to placename and back to key.
unlinked_placename = full_container_placename,
-- Indicate that this is an augmented holonym, and was derived from the specified
-- holonym. In iterate_matching_holonym_location(), we ignore augmented holonyms
-- derived from holonyms that are different from the holonym we're searching for but
-- of the same placetype. This is to correctly handle a situation like
-- {{place|river|dept/Ardèche,Gard,Vaucluse,Bouches-du-Rhône|c/France}}. Here,
-- `Ardèche` is in `r/Auvergne-Rhône-Alpes`, while `Gard` is in `r/Occitania` and
-- the other two are in `r/Provence-Alpes-Côte d'Azur`. Augmenting proceeds from
-- right to left, so after it adds `r/Provence-Alpes-Côte d'Azur` to
-- `Bouches-du-Rhône`, Vaucluse gets augmented correctly but `Gard` fails to match
-- in find_matching_holonym_location() because of the mismatch between augmented
-- `r/Provence-Alpes-Côte d'Azur` and actual `r/Occitania`. Similarly, all later
-- calls to find_matching_holonym_location() fail to match `Gard` (and likewise
-- `Ardèche`) against any known location. To deal with this, we mark augmented
-- holoynms as being augmented due to a source holonym, and when processing a given
-- holonym, ignore augmented holonyms from other holonyms of the same placetype.
-- The restriction to the same placetype is so that `Birmingham` still gets
-- correctly disambiguated to Birmingham, England in the example given above near
-- the top of this function, using the augmented holonym `c/United Kingdom` added by
-- the specified `cc/England` (whose placetype `constituent country` differs from
-- the placetype `city` of Birmingham).
augmented_from_holonym = holonym,
}
insert(augmented_holonyms, new_holonym)
-- But it is safe to modify other parts of the place_desc.
export.key_holonym_into_place_desc(place_desc, new_holonym)
end
if any_no_auto_augment_container then
break
end
end
for j = i + 1, #place_desc.holonyms do
insert(augmented_holonyms, place_desc.holonyms[j])
end
place_desc.holonyms = augmented_holonyms
end
end
end
end
end
end
-- Cat handler for district, areas, neighborhoods and suburbs. Districts are tricky because they can either be political
-- divisions or city neighborhoods. Areas similarly can be political divisions (rarely; specifically, in Kuwait), city
-- neighborhoods or larger geographical areas/regions. We handle this as follows:
-- (1) `placetype_data` cat entries for specific countries or country divisions take precedence over cat_handlers, so if
-- the user says {{tl|place|district|s/Maharashtra|c/India}}, we won't even be called because there is an entry that
-- categorizes into [[:Category|Districts of Maharashtra, India]].
-- (2) If we're called, we check the holonym we're called on to see if it is a recognized city, e.g. if we're called
-- using {{tl|place|district|city/Mumbai|s/Maharashtra|c/India}}. If so, we categorize under e.g.
-- [[:Category:Neighbourhoods of Mumbai]]. (Choosing the spelling "neighbourhoods" because we're in India.)
-- (3) If we're called and the holonym is not a recognized city, we check if the placetype has has_neighborhoods set.
-- If so, it's "city-like" and we categorize under the first containing polity that we recognize. For example, if
-- we're called using {{tl|place|district|town/Northampton|co/Hampshire|s/Massachusetts|c/US}}, we should recognize
-- town as "city-like" and categorize under [[:Category:Neighborhoods in Massachusetts]]. (Note "in" not "of", and
-- note the spelling "neighborhoods" because we're in the US.)
-- (4) If the holonym is not city-like, we do nothing. If there's a city or city-like placetype farther up (e.g. we're
-- called as {{tl|place|district|ward/Foo|mun/Bar|...}}), we will handle the city-like entity according to (2) or
-- (3) when called on that holonym. Otherwise either the categorization in (1) takes place or there's no
-- categorization.
local function district_neighborhood_cat_handler(data)
local function get_plural_entry_placetype(location_spec, container_trail)
if data.entry_placetype == "suburb" then
return "Suburbs"
else
-- Check for `british_spelling` setting on the spec itself or any container.
local uses_british_spelling = location_spec.british_spelling
if uses_british_spelling == nil and container_trail then
for _, container_set in ipairs(container_trail) do
local must_outer_break = false
for _, container in ipairs(container_set) do
if container.spec.british_spelling ~= nil then
uses_british_spelling = container.spec.british_spelling
must_outer_break = true
break
end
end
if must_outer_break then
break
end
end
end
return uses_british_spelling and "Neighbourhoods" or "Neighborhoods"
end
end
-- First check the immediate holonym to see if it's a city or a city-like top-level entity (Hong Kong, Bonaire,
-- etc.)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and spec.is_city then
return {get_plural_entry_placetype(spec, container_trail) .. " of " .. export.get_prefixed_key(key, spec)}
end
-- If the entry placetype is neighbo(u)rhood, assume it is a neighborhood even if there isn't a city-like
-- entity father up the chain. (E.g. due to a mistaken use of m/ instead of mun/ for municipality.)
local has_neighborhoods
local entry_placetype = data.entry_placetype
if entry_placetype == "neighborhood" or entry_placetype == "neighbourhood" or entry_placetype == "suburb" then
has_neighborhoods = true
else
-- Otherwise, make sure the current holonym is city-like.
has_neighborhoods = export.get_equiv_placetype_prop(data.holonym_placetype, function(pt)
return export.get_placetype_prop(pt, "has_neighborhoods")
end, {continue_on_nil_only = true})
end
if has_neighborhoods then
-- Loop up the holonyms, looking for city and city-like entities in case of e.g. [[Sepulveda]] written
-- {{place|en|neighborhood|valley/San Fernando Valley|city/Los Angeles|s/California|c/USA}}
-- but also look for a recognizable poldiv, and if so categorize as "Neighborhoods in POLDIV". We need
-- to start with the current holonym, which is especially important for neighborhoods and suburbs that
-- may have the first holonym be a recognizable province, etc. but can't hurt otherwise. (Previously
-- we skipped the first/current holonym.)
for other_holonym_index, other_holonym in export.get_holonyms_to_check(data.place_desc,
data.holonym_index) do
local other_holonym_data = {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = data.place_desc,
}
local group, key, spec, container_trail = export.find_matching_holonym_location(other_holonym_data)
if group and not spec.is_former_place then
return {get_plural_entry_placetype(spec, container_trail) .. (spec.is_city and " of " or " in ") ..
export.get_prefixed_key(key, spec)}
end
end
end
end
function export.check_already_seen_string(holonym_placename, already_seen_strings)
local canon_placename = ulower(m_links.remove_links(holonym_placename))
if type(already_seen_strings) ~= "table" then
already_seen_strings = {already_seen_strings}
end
for _, already_seen_string in ipairs(already_seen_strings) do
if canon_placename:find(already_seen_string) then
return true
end
end
return false
end
-- Prefix display handler that adds a prefix such as "Metropolitan Borough of " to the display
-- form of holonyms. We make sure the holonym doesn't contain the prefix or some variant already.
-- We do this by checking if any of the strings in ALREADY_SEEN_STRINGS, either a single string or
-- a list of strings, or the prefix if ALREADY_SEEN_STRINGS is omitted, are found in the holonym
-- placename, ignoring case and links. If the prefix isn't already present, we create a link that
-- uses the raw form as the link destination but the prefixed form as the display form, unless the
-- holonym already has a link in it, in which case we just add the prefix.
local function prefix_display_handler(prefix, holonym_placename, already_seen_strings)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(prefix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return prefix .. " " .. holonym_placename
end
return prefix .. " [[" .. holonym_placename .. "]]"
end
-- Suffix display handler that adds a suffix such as " parish" to the display form of holonyms.
-- Works identically to prefix_display_handler but for suffixes instead of prefixes.
local function suffix_display_handler(suffix, holonym_placename, already_seen_strings, include_suffix_in_link)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(suffix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return holonym_placename .. " " .. suffix
end
if include_suffix_in_link then
return "[[" .. holonym_placename .. " " .. suffix .. "]]"
else
return "[[" .. holonym_placename .. "]] " .. suffix
end
end
-- Display handler for boroughs. New York City boroughs are display as-is. Others are suffixed
-- with "borough".
local function borough_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.new_york_boroughs[unlinked_placename] then
-- Hack: don't display "borough" after the names of NYC boroughs
return holonym_placename
end
return suffix_display_handler("borough", holonym_placename)
end
local function county_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
-- Display handler for Irish counties. Irish counties are displayed as e.g. "County [[Cork]]".
if m_locations.ireland_counties["Hạt " .. unlinked_placename .. ", Ireland"] or
m_locations.northern_ireland_counties["Hạt " .. unlinked_placename .. ", Bắc Ireland"] then
return prefix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Taiwanese counties. Taiwanese counties are displayed as e.g. "[[Chiayi]] County".
if m_locations.taiwan_counties[unlinked_placename .. ", Đài Loan"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Romanian counties. Romanian counties are displayed as e.g. "[[Cluj]] County".
if m_locations.romania_counties[unlinked_placename .. ", România"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- FIXME, we need the same for US counties but need to key off the country, not the specific county.
-- Others are displayed as-is.
return holonym_placename
end
-- Display handler for prefectures. Japanese prefectures are displayed as e.g. "[[Fukushima]] Prefecture".
-- Others are displayed as e.g. "[[Fthiotida]] prefecture".
local function prefecture_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
local suffix = m_locations.japan_prefectures[unlinked_placename .. ", Nhật Bản"] and "Prefecture" or "prefecture"
return suffix_display_handler(suffix, holonym_placename)
end
-- Display handler for provinces of Bulgaria, Iran, Laos, North and South Korea, Thailand, Turkey and Vietnam. Recognized
-- provinces are displayed as e.g. "[[Gyeonggi]] Province" or "[[Antalya]] Province". Others are displayed as-is.
local function province_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if
m_locations.bulgaria_provinces[unlinked_placename .. ", Bulgaria"] or
m_locations.iran_provinces[unlinked_placename .. ", Iran"] or
m_locations.laos_provinces[unlinked_placename .. ", Lào"] or
m_locations.north_korea_provinces[unlinked_placename .. ", Cộng hòa Dân chủ Nhân dân Triều Tiên"] or
m_locations.south_korea_provinces[unlinked_placename .. ", Hàn Quốc"] or
m_locations.thailand_provinces[unlinked_placename .. ", Thái Lan"] or
m_locations.turkey_provinces[unlinked_placename .. ", Thổ Nhĩ Kỳ"] or
m_locations.vietnam_provinces[unlinked_placename .. ", Việt Nam"] then
return suffix_display_handler("Province", holonym_placename)
end
return holonym_placename
end
-- Display handler for Nigerian states. Nigerian states are display as "[[Kano]] State". Others are displayed as-is.
local function state_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.nigeria_states[unlinked_placename .. ", Nigeria"] then
return suffix_display_handler("State", holonym_placename)
end
return holonym_placename
end
-- Display handler for voivodeships. Display as e.g. [[Subcarpathian Voivodeship]].
local function voivodesip_display_handler(holonym_placetype, holonym_placename)
return suffix_display_handler("Voivodeship", holonym_placename, nil, "include_suffix_in_link")
end
------------------------------------------------------------------------------------------
-- Placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
Main placetype data structure. This specifies, for each canonicalized placetype, various properties. The keys are
placetypes (in the singular, except for category-only placetypes, which are plural and followed by `!`), and the value
is a table of properties. The `"*"` key is special and is used for adding "generic" categories of the form
`Places in ``location`` `; it runs for all entry placetypes. Keys in the form of plural placetypes followed by `!` are
used only in [[Module:category tree/topic cat/data/Places]] for specifying the properties of categories containing the
specified placetype, esp. bare categories like [[:Category:States and territories]] (rather than qualified categories
like [[:Category:States and territories of Australia]]).
Keys under the value table for a given placetype of are two types: ''property keys'' (which specify the value of
specific properties) and ''categorization keys'' (which tell how to categorize certain sorts of holonyms if the
placetype in question occurs as an entry placetype). Categorization keys are either the special value `default` or are
wildcard strings with a slash in them, such as `"country/*"`. Note that only wildcard strings are currently allowed
directly in the placetype data; everything else is handled through category handlers, either per-placetype or special
(such as `political_division_cat_handler`). The algorithm for how category keys and handlers are used to generate
categories is described at the top of [[Module:place]].
There are several recognized property keys, of various types:
1. The following link-related property keys are recognized:
* `link`: '''Required''' except in category-only placetypes ending in `!`. Describes how to link and display the
placetype in the formatted description when occurring as an entry placetype. Also used for formatting pluralized
placetypes (which may occur in entry placetypes, esp. new-format ones, such as `two <<islands>>`) and may occur in
categories). The possible values are:
*# `true`: Link to the same-named Wiktionary entry. This creates a raw link, e.g. `<nowiki>[[city]]</nowiki>`, which is
converted to an English-specific link by JavaScript postprocessing. If the placetype is plural, this creates a
two-part raw link e.g. `<nowiki>[[city|cities]]</nowiki>`.
*# `"w"`: Link to the same-named Wikipedia entry. This creates a two-part link, e.g.
`<nowiki>[[w:census town|census town]]</nowiki>`, or `<nowiki>[[w:census town|census towns]]</nowiki>` if the
placetype is given plural.
*# `"+..."`: Create a two-part link to the entry following the `+` sign. For example, if `cercle` specifies
`"+w:cercles of Mali"`, a two-part link `<nowiki>[[w:cercles of Mali|cercle]]</nowiki>` will be generated, or
`<nowiki>[[w:cercles of Mali|cercles]]</nowiki>` if plural `cercles` is specified.
*# `"separately"`: Link each word separately. For example, if `administrative territory` specifies `"separately"`, it
will be linked as `<nowiki>[[administrative]] [[territory]]</nowiki>`, or as
`<nowiki>[[administrative]] [[territory|territories]]</nowiki>` if plural `administrative territories` is given.
*# another string: Use that string directly. If the placetype is plural, `pluralize()` in [[Module:en-utilities]] is
called on the string, which will correctly pluralize most strings, including those with links in them. (If there
are multiple links, the display form of the last link is pluralized.)
*# `false`: This placetype is not allowed as an entry placetype. An error will be thrown if this placetype is given as
an entry placetype. This is specified for internal-use placetypes, especially placetypes used in conjunction with
the qualifiers `former`, `ancient`, `historical` and such.
* `plural_link`: If specified and the placetype is plural, use the value in place of generating a pluralized version of
the link spec in `link`. Most commonly, this is either a string with links in it (which is used directly) or the
value `false`, indicating that the placetype cannot occur plural. (This is used for example by `caplc`, which displays
as `<nowiki>[[capital]] and [[large]]st [[city]]</nowiki>`, where a plural version doesn't make sense.) Generally if
this is specified, `plural` also needs to be specified to give a special placetype plural; this situation occurs
especially with multiword placetypes where something other than the last word is pluralized. An example is
`town with bystatus`, whose plural is `towns with bystatus`, which needs to be explicitly given. This example uses
`link = <nowiki>"[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>` ({{m|nb|bystatus}}) is a Norwegian
Bokmål word, and template calls aren't currently permitted in link strings), along with
`plural_link = <nowiki>"[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>`.
* `category_link`: Spec indicating how to display the placetype when occurring in category descriptions. Defaults to
the value of `link`, and in turn is overridden by more specific `category_link_*` keys; see below. Category-only
placetypes (which are plural and end in `!`) usually use `category_link` in preference to `link`. The value of
`category_link` can be any of the types of specs given above, but most commonly is a plural string with links in it,
spelling out the description; in this case it is used directly. When both `category_link` and `link` are given, the
value in `category_link` is typically longer and more descriptive. For example, `polity` uses `link = true`, which
just generates a link `<nowiki>[[polity]]</nowiki>` or plural `<nowiki>[[polity|polities]]</nowiki>`, but specifies a
separate `category_link = <nowiki>"[[independent]] or [[semi-]][[independent]] [[polity|polities]]"</nowiki>`, which
clarifies in the category description what a polity is.
* `category_link_top_level`: Spec indicating how to display top-level (bare/unqualified) categories, i.e. categories
where the placetype is not followed by `in ``location`` ` or `of ``location`` `. If given, this overrides
`category_link` for this type of category.
* `category_link_before_noncity`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` does not refer to a city. If given, this overrides
`category_link` for this type of category.
* `category_link_before_city`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` refer to a city. If given, this overrides `category_link` for
this type of category. An example where this is given is `neighborhood`, which uses the following specs:<ol>
<li>`link = true`</li>
<li>`category_link = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]"</nowiki>`</li>
<li>`category_link_before_city = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions"</nowiki>`</li>
</ol> This has the effect of making the entry placetype `neighborhood` display as just
`<nowiki>[[neighborhood]]</nowiki>`, while e.g. a category like `Neighborhoods of Chicago` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[Chicago]], ...</nowiki>` and a category like
`Neighborhoods in Illinois, USA` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]] in [[Illinois]], ...</nowiki>`.
* `disallow_in_entries`: If specified, this placetype cannot occur as an entry placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
* `disallow_in_holonyms`: If specified, this placetype cannot occur as a holonym placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
2. There is currently one fallback-related property key recognized:
* `fallback`: If specified, its value is a placetype which will be used for categorization purposes if no categories
get added using the placetype itself. As an example, `branch` sets a fallback of `river` but also sets
`preposition = "of"`, meaning that {{tl|place|en|branch|riv/Mississippi}} displays as `a branch of the Mississippi`
(whereas `river` itself uses the preposition `in`), but otherwise categorizes the same as `river`. A more complex
example is `area`, which sets a fallback of `geographic and cultural area` and also sets a category handler that
checks for cities or city-like entities (e.g. boroughs) occurring as holonyms and categorizes the toponym under
[[:Category:Neighborhoods of CITY]] (for recognized cities) or otherwise [[:Category:Neighborhoods of POLDIV]] (for
the nearest containing recognized location). In addition, `area` is set as a political division of Kuwait, meaning if
`c/Kuwait` occurs as holonym, the toponym is categorized under [[:Category:Areas of Kuwait]]. If none of these
categories trigger, the fallback of `geographic and cultural area` will take effect, and the toponym will be
categorized as e.g. [[:Category:Geographic and cultural areas of England]].
3. There is currently one property to control irregular plurals of placetypes:
* `plural`: If specified, its value is the plural of the placetype. Otherwise, the default pluralization algorithm in
[[Module:en-utilities]] applies (which correctly pluralizes most words, including those ending in `-y`, `-ch`, `-sh`,
`-x`, etc.). The value of `plural` is also used when converting a pluralized placetype into its singular equivalent;
for example, since the placetype `kibbutz` has `plural = "kibbutzim"`, the placetype `kibbutzim` will be recognized
as a plural and singularized to `kibbutz`. For this reason, it's occasionally necessary to specify a `plural` value
even when the default pluralization algorithm works correctly, if the default singularization algorithm won't
correctly reverse the pluralization (as with `pass` and other terms ending in `-ss`).
4. The following property keys relate to generating categories for entry placetypes and specifying the parents of those
categories:
* `class`: The general class of placetype. This is used for various purposes: (a) to categorize placetypes preceded by
a qualifier such as `former`, `ancient`, `medieval` or `historical` (note that these placetypes are not all treated
alike); (b) to determine the parent category of bare placetype categories (e.g. [[:Category:Villages]] for placetype
`village`); (c) to determine whether to add a parent category `political divisions of specific countries` to
qualified placetype categories (e.g. [[:Category:Villages in Mali]]). The possible values are:
*# `polity`: a more-or-less sovereign/independent polity, such as a country, kingdom or empire.
*# `subpolity`: a non-sovereign division of a polity, above the level of an individual settlement.
*# `settlement`: a city or smaller equivalent, such as a village. This also includes administrative divisions of a
settlement, such as wards and barangays.
*# `non-admin settlement`: similar to a settlement but without administrative or political significance, such as an
unincorporated community, farm or neighborhood.
*# `capital`: a settlement that is a capital. A former capital is generally still in existence, just not the capital
any more.
*# `natural feature`: any non-man-made feature, such as a lake, mountain, island, ocean, etc.
*# `man-made structure`: a man-made feature below the level of a neighborhood, such as a house, airport, university,
metro station, park or the like.
*# `geographic region`: a geographic or cultural region or area that has no administrative significance. These may vary
greatly in size but typically have some sort of cultural significance (possibly historical). The `former`, `ancient`,
etc. qualifier has no effect on the category of these placetypes.
*# `generic place`: a place that isn't further qualified into any specific subtype.
* `former_type`: The class of placetype used for categorizing placetypes preceded by a qualifier such as `former`,
`ancient`, `medieval` or `historical`. The possible values are the same as for `class` but with the addition of
`dependent territory` (for colonies, protectorates and the like) and `!` (ignore the historical/former/ancient/etc.
qualifier; used e.g. with `fictional location` and `mythological location`). If not specified, the value of `class`
is used. When a qualifier such as `former`, `ancient`, `medieval` or `historical` is encountered (specifically, those
in `former_qualifiers`), it is mapped using `former_qualifiers` to the appropriate internal qualifier or qualifiers
(one or both of `ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
qualifiers), which is prepended to the value of `former_type` or `class` to form a placetype whose properties are
looked up to determine how to categorize the toponym in question. For example, if `medieval village` is given, we map
`medieval` to `ANCIENT` and `FORMER`, and `village` to its `class` of `settlement`, and enter the placetypes
`ANCIENT settlement` and `FORMER settlement` (in that order) into the list of equivalent placetypes returned by
`get_placetype_equivs`. In this case, there is an entry in `placetype_data` for `ANCIENT settlement`, so its default
category spec `Ancient settlements` is used as the category. If on the other hand `medieval kingdom` is given, where
`kingdom` has a `class` value `polity`, we first look up `ANCIENT polity`, see there is no entry in `placetype_data`
for it, and then look up `FORMER polity`, which exists and has a default category spec `Former polities`, which is
used as the category. Note that if the placetype following the "former" qualifier is recognized in `placetype_data`
but has no `former_type` or `class` and no fallback with a `former_type` or `class` specified, it is an internal
error; but if the placetype isn't recognized (e.g. something like `former greenhouse` is specified and we don't have
an entry for `greenhouse`), we just track the occurrence and end up not categorizing.
* `bare_category_parent`: This specifies the first parent category of a bare placetype category named according to the
placetype in question (e.g. [[:Category:Atolls]] for placetype `atoll`, or [[:Category:Named buildings]] for
placetype `named buildings!`). If not specified, the first parent category is determined by the value of `class`,
using the mapping `class_to_bare_category_parent` in [[Module:category tree/topic cat/data/Places]].
* `addl_bare_category_parents`: Extra parent categories to add a bare placetype category to (see `bare_category_parent`
just above).
* `bare_category_breadcrumb`: Breadcrumb for bare placetype categories. Also used as the sort key of
`bare_category_parent` if it is a string.
* `inherently_former`: If specified and the given placetype is used as an entry placetype, act as if `former` or
`ancient` (depending on the value of `inherently_former`) were prefixed to the placetype. This is for placetypes that
always refer to no-longer-existing entities, such as `satrapy` and `treaty port`. The value of `inherently_former` is
a list of internal qualifiers (one or more of `ANCIENT` and/or `FORMER`), just as for `former_qualifiers`, and the
implementation is the same.
* `cat_handler`: Handler used to generate the categories to add a given toponym to, if its entry placetype is the
placetype in question. Generally the `cat_handler` function checks the holonyms specified in order to determine which
category or categories to generate. For example, `district_neighborhood_cat_handler` handles placetypes `district`,
`neighborhood`, `subdivision`, `suburb` and the like, and either adds the toponym to a category like
`Neighborhoods of ``city`` ` (if a recognized city is given as a holonym), or otherwise a category like
`Neighborhoods in ``location`` ` (for the first recognized non-city location given as a holonym, if an unrecognized
city or city-like entity is given before the recognized non-city). The algorithm that runs the category handlers
iterates over holonyms from left to right, running the `cat_handler` function on each holonym in turn until one or
more categories are returned; see below for more specifics. (Note that countries for which e.g. a `district` is a
political division do not get the corresponding category added by the `district_neighborhood_cat_handler` function but
by `political_division_cat_handler`.) `cat_handler` functions are called with one argument, `data`, describing the
resolved entry placetype (i.e. after resolving placetype aliases and fallbacks) and the holonym being processed. The
return value should be a list of category specs (categories minus the langcode prefix, with `+++` standing for the
holonym key, or the value `true`, which stands for ` ``Placetypes`` in/of ``Holonym`` `, i.e. the pluralized placetype
with the appropriate preposition as specified in `placetype_data`). `data` contains the following fields:
** `entry_placetype`: the resolved entry placetype for the entry placetype being processed (i.e. it will always have an
entry in `placetype_data` but may not be the original placetype given by the user);
** `holonym_placetype` and `holonym_placename`: the holonym placetype and placename being processed;
** `holonym_index`: the index of the holonym being processed, or {nil} if we're handling an overriding holonym (FIXME:
we will change the overriding holonym algorithm so there will be an index even when processing overriding holonyms);
** `place_desc`: a full description of the {{tl|place}} call, as specified at the top of [[Module:place]];
** `from_demonym`: If set, we are called from [[Module:demonym]], triggered by {{tl|demonym-adj}} or
{{tl|demonym-noun}}, instead of being triggered by {{tl|place}}.
* `has_neighborhoods`: If `true`, the specified placetype is city-like. This is used in the
`district_neighborhood_cat_handler` to determine whether to add a category such as `Neighborhoods in ``location`` `;
see the section just above on `cat_handler`.
5. The following preposition-related property keys are recognized:
* `preposition`: The preposition used after this placetype when it occurs as an entry placetype. Defaults to `"in"`.
* `generic_before_non_cities`: If specified, the appropriate category description handler in
[[Module:category tree/topic cat/data/Places]] will recognize categories of the form
` ``Placetype`` in/of ``location`` ` for the specified placetype and preposition, if ``location`` is a non-city. This
is used to generate descriptions for categories added by category handlers and by explicit category specs in the
placetype data. All placetypes that specify `generic_before_non_cities` or `generic_before_cities` *MUST* also specify
a value for `class` so that the category tree code can determine whether it's a political or non-political division.
* `generic_before_cities`: Like `generic_before_non_cities` but for locations referring to cities.
6. The following property keys control the auto-addition of affixes when formatting holonyms of a particular placetype:
* `affix_type`: If specified, add the placetype as an affix before or after holonyms of this placetype. Possible values
are:
*# `"pref"` (the holonym will display as `(the) placetype of Holonym`, where `the` appears when the holonym directly
follows an entry placetype);
*# `"Pref"` (same as `"pref"` but the placetype is capitalized; each word is capitalized if there are multiple);
*# `"suf"` (the holonym will display as `Holonym placetype`);
*# `"Suf"` (the holonym will display as `Holonym Placetype`, i.e. same as `"suf"` but the placetype is capitalized).
* `suffix`: String to use in place of the placetype itself when the placetype is displayed as a suffix after a holonym.
Note that `suffix` can be used independently of `affix_type` because the user can also request a suffix explicitly
using a syntax like `adr:suf/Occitania`, which will display as `Occitania region` because the placetype
`administrative region` specifies `suffix = "region"`.
* `prefix`: Like `suffix` but for use when the placetype is displayed as a prefix before the holonym.
* `affix`: Like `suffix` and `prefix` but for use when the placetype is displayed as an affix either before or after the
holonym. If both `suffix` or `prefix` and `affix` are given for a single placetype, `suffix` or `prefix` take
precedence.
* `no_affix_strings`: String or list of strings that, if they occur in the holonym, suppress the addition of any affix
requested using `affix_type`. Defaults to the placetype itself. For example, `autonomous okrug` specifies
`affix_type = "Suf"` so that `aokr/Nenets` displays as `Nenets Autonomous Okrug`, but also specifies
`no_affix_strings = "okrug"` so that `aokr/Nenets Okrug` or `aokr/Nenets Autonomous Okrug` displays as specified,
without a redundant `Autonomous Okrug` added. Matching is case-insensitive but whole-word.
* `display_handler`: A function of two arguments, `holonym_placetype` and `holonym_placename` (specifying a holonym).
Its return value is a string specifying the display form of the holonym.
7. The following property keys control the indefinite and definite articles used before entry placetypes and/or holonyms
of the specified placetype.
* `entry_placetype_use_the`: Use `"the"` before this placetype when it occurs as an entry placetype.
* `entry_placetype_indefinite_article`: Indefinite article used before this placetype when it occurs as an entry
placetype (usually `"a"`, specifically for placetypes beginning with u- that don't take the indefinite article
`"an"`). Defaults to the appropriate indefinite article (`"a"` or `"an"` depending on whether the placetype begins
with a vowel). Overridden by `entry_placetype_use_the`, and unlike for most properties, does not apply to equivalent
placetypes (i.e. fallbacks or those formed by removing a qualifier from the beginning); only to the exact placetype
specified.
* `holonym_use_the`: Use `"the"` before holonyms of this placetype.
'''NOTE:'''
# The `link` property must be specified on all placetypes, except those ending in `!` (category-only placetypes), which
must have either `link` or `category_link` specified.
# Either the `class` or `former_type` property must be specified on all placetypes not ending in `!` that do not have a
fallback (if a placetype has a fallback and omits the `class` and `former_type` properties, they are taken from the
fallback). An internal error will result if a placetype has no `class` or `former_type` property derivable either
directly or through a fallback, if an attempt is made to categorize a former/ancient/historical/etc. entity of this
placetype.
# It is possible to have multiple levels of fallback (e.g. `frazione` falls back to `hamlet`, which falls back
to `village`). Fallback loops will cause an internal error. All placetypes specified as fallbacks must exist in
`placetype_data` or an internal error occurs.
]==]
export.placetype_data = {
--[=[
If you need to sort the following, do this (using Vim):
1. Make sure all full-line comments are within the { ... } table, or are moved after and on the same line as single-line
entries.
2. Make sure the table uses tabs everywhere for indent, and not spaces.
3. Mark the top of the table with `ma`, go to the bottom and execute the following two lines in sequence:
:'a,.s/\n/\\n/g
:s/\\n\(\t\[\)/\r\1/g
The first command converts every newline to a literal `\n` sequence, so the whole thing becomes a single line, while
the second command restores the newlines before the beginning of each entry. The effect is to convert all entries to
a single line while not losing any information. (Potentially a negative lookahead could be used to do it all in one
command.)
4. Execute the following to sort:
:'a,.!perl -pe 's/^(\t\[")(.*?)(".*)$/$2 @@@ $1$2$3/' | sort -f | perl -pe 's/.*? @@@ //'
Note that a simple `sort -f` (where `-f` means case-insensitive) would almost work, but it would sort "hill station"
before "hill" and "county borough" before "county" because the space after e.g. "hill station" sorts before the
quotation mark after e.g. "hill". The above command deals with this by extracting the key, prepending it followed by
` @@@ `, sorting, and then removing key (the classic decorate-sort-undecorate pattern).
5. Put the table back to multi-line format by marking the top of the table with `ma`, going to the bottom and executing
:'a,.s/\\n/\r/g
Note that for some reason, in order to get a match a newline in the left side of a replacement, you must use \n, but
to insert a newline in the right sode of a replacement you must use \r.
]=]
["*"] = {
link = false,
cat_handler = generic_place_cat_handler,
},
["administrative atoll"] = {
-- Maldives
link = "+w:administrative divisions of the Maldives",
preposition = "of",
class = "subpolity",
},
["administrative capital"] = {
link = "w",
fallback = "capital city",
},
["administrative center"] = {
link = "w",
fallback = "non-city capital",
},
["administrative centre"] = {
link = "w",
fallback = "administrative center",
},
["administrative county"] = {
link = "w",
fallback = "county",
},
["administrative district"] = {
link = "w",
fallback = "district",
},
["administrative headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["administrative region"] = {
link = true,
preposition = "của",
suffix = "region", -- but prefix is still "administrative region (of)"
fallback = "region",
class = "subpolity",
},
["administrative seat"] = {
link = "w",
fallback = "administrative centre",
},
["administrative territory"] = {
link = "separately",
preposition = "of",
suffix = "territory", -- but prefix is still "administrative territory (of)"
fallback = "territory",
class = "subpolity",
},
["administrative unit"] = {
-- Grrr, it's difficult to generalize about "administrative units". In Albania, "administrative unit" is an
-- official term for a city-level division of municipalities; Wikipedia renders it using the more practical term
-- "commune". In Pakistan, "administrative unit" is a collective term used to refer to all the different types
-- of first-level divisions (four provinces, one federal territory, and two "disputed territories", i.e. Azad
-- Kashmir and Gilgit-Balistan, that are variously described). For this reason, we set no fallback, but we need
-- to include this so that it can be used as a placetype for Albania, categorizing as communes.
link = "w",
class = "subpolity",
},
["administrative village"] = {
link = "w",
preposition = "of",
has_neighborhoods = true,
class = "settlement",
},
["aimag"] = {
-- used in Mongolia, Russia and China (Inner Mongolia); in Mongolia, equivalent to a province;
-- in China, equivalent to a prefecture (below a province); in Russia, equivalent to a municipal district.
link = "w",
fallback = "prefecture",
},
["airport"] = {
link = true,
class = "man-made structure",
default = {true},
},
["alliance"] = {
link = true,
fallback = "confederation",
},
["archipelago"] = {
link = true,
fallback = "island",
},
["area"] = {
link = true,
preposition = "of",
fallback = "geographic and cultural area",
-- Areas can either be administrative divisions (specifically of Kuwait) or geographic areas. Assume the former
-- when categorizing 'Areas' but the latter when handling e.g. 'historical area'.
class = "subpolity",
former_type = "geographic region",
cat_handler = district_neighborhood_cat_handler,
},
["arm"] = {
link = true,
preposition = "of",
class = "natural feature",
default = {"Seas"},
},
["arrondissement"] = {
link = true,
preposition = "of",
-- FIXME!!! Grrrrr!!! In some countries, arrondissements are divisions of cities; in others, they are divisions
-- of departments or provinces. Need to conditionalize on the country for both of the following.
class = "subpolity",
has_neighborhoods = true,
},
["associated province"] = {
link = "separately",
fallback = "province",
},
["atoll"] = {
-- FIXME! Atolls are administrative divisions of the Maldives but natural features elsewhere. Need to
-- conditionalize `class` on the country. See also `administrative atoll`.
link = true,
class = "natural feature",
bare_category_parent = "islands",
default = {true},
},
["autonomous city"] = {
link = "w",
preposition = "of",
fallback = "city",
has_neighborhoods = true,
},
["autonomous community"] = {
-- Spain; refers to regional entities, not village-like entities, as might be expected from "community"
link = true,
preposition = "of",
class = "subpolity",
},
["autonomous island"] = {
-- Comoros; seems like an administrative atoll of the Maldives.
link = "+w:autonomous islands of Comoros",
preposition = "of",
class = "subpolity",
},
["autonomous oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "oblast",
class = "subpolity",
},
["autonomous okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "okrug",
class = "subpolity",
},
["autonomous prefecture"] = {
link = true,
fallback = "prefecture",
},
["autonomous province"] = {
link = "w",
fallback = "province",
},
["autonomous region"] = {
link = "w",
preposition = "of",
fallback = "administrative region",
-- "administrative region" sets an affix of "region" but we want to display as "Tibet Autonomous Region"
-- if the user writes 'ar:Suf/Tibet'.
affix = "autonomous region",
},
["autonomous republic"] = {
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territorial unit"] = {
-- Moldova; only two of them, one for Gagauzia and one for Transnistria.
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territory"] = {
link = "w",
fallback = "dependent territory",
},
["bailiwick"] = {
-- Jersey, etc.
link = true,
fallback = "polity",
},
["barangay"] = {
-- Philippines
link = true,
class = "settlement",
-- Barangays are formal administrative divisions of a city rather than informal neighborhoods, but can use
-- some of the properties of a neighborhood.
fallback = "neighborhood",
},
["barrio"] = {
-- Spanish-speaking countries; Philippines
link = true,
-- FIXME: Not completely correct, in some countries barrios are formal administrative divisions of a city.
-- `class` will need to conditionalize on the country to be completely correct.
fallback = "neighborhood",
},
["basin"] = {
link = true,
fallback = "lake",
},
["vịnh"] = {
link = true,
preposition = "của",
class = "natural feature",
addl_bare_category_parents = {"Vùng nước"},
default = {true},
},
["bãi biển"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"nước"},
default = {true},
},
["beach resort"] = {
link = "w",
fallback = "resort town",
},
["bishopric"] = {
link = true,
fallback = "polity",
},
["vùng nước!"] = {
-- FIXME: This is (maybe?) a type category not a name category. There should be an option for this. We need to
-- straighten out the type vs. name vs. related-to issue.
category_link = "vùng nước",
class = "natural feature",
addl_bare_category_parents = {"địa mạo", "hệ thống sinh thái", "nước"},
},
["borough"] = {
link = true,
preposition = "of",
display_handler = borough_display_handler,
has_neighborhoods = true,
-- "former borough" could be a former settlement or a former part of a city but seems more likely to
-- be a former subpolity, particularly in England. FIXME, we really need a handler to take care of this
-- properly.
class = "subpolity",
-- Grr, some boroughs are city-like but some (e.g. in Britain) may be larger.
},
["borough seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["branch"] = {
link = true,
preposition = "of",
fallback = "river",
},
["bridge"] = {
link = true,
class = "man-made structure",
default = {"Named bridges"},
},
["building"] = {
link = true,
class = "man-made structure",
default = {"Named buildings"},
},
["built-up area"] = {
link = "w",
fallback = "area",
},
["burgh"] = {
link = true,
fallback = "borough",
},
["business park"] = {
link = true,
fallback = "park",
},
["caliphate"] = {
link = true,
fallback = "polity",
},
["canton"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["cape"] = {
link = true,
fallback = "headland",
},
["capital"] = {
link = true,
fallback = "capital city",
},
["capital city"] = {
link = true,
category_link = "[[capital city|capital cities]]: the [[seat of government|seats of government]] for a country or [[political]] [[division]] of a country",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
bare_category_parent = "cities",
cat_handler = capital_city_cat_handler,
default = {true},
-- The following is necessary so that e.g. [[Melbourne]] defined as {{place|en|capital city|s/Victoria|c/Australia}}
-- gets categorized in the bare category [[Category:en:Melbourne]]; otherwise placetype 'capital city' wouldn't
-- match against the placetype 'city' of Melbourne.
fallback = "city",
},
["caplc"] = {
link = "[[capital]] and [[large]]st [[city]]",
plural_link = false,
fallback = "capital city",
},
["captaincy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["caravan city"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"ANCIENT", "FORMER"},
},
["castle"] = {
link = true,
fallback = "building",
},
["cathedral city"] = {
link = true,
fallback = "city",
},
["cattle station"] = {
-- Australia
link = true,
fallback = "farm",
},
["census area"] = {
link = true,
affix_type = "Suf",
has_neighborhoods = true,
class = "non-admin settlement",
},
["census-designated place"] = {
-- United States
link = true,
class = "non-admin settlement",
},
["census division"] = {
-- Canada
link = "w",
preposition = "of",
class = "subpolity",
},
["census town"] = {
link = "w",
fallback = "town",
},
["central business district"] = {
link = true,
fallback = "neighborhood",
},
["cercle"] = {
-- Mali
link = "+w:cercles of Mali",
preposition = "of",
class = "subpolity",
},
["ceremonial county"] = {
link = true,
fallback = "county",
},
["chain of islands"] = {
link = "[[chain]] of [[island]]s",
plural = "chains of islands",
plural_link = "[[chain]]s of [[island]]s",
fallback = "island",
},
["channel"] = {
link = true,
fallback = "strait",
},
["charter community"] = {
-- Northwest Territories, Canada
link = "w",
fallback = "village",
},
["city"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["city-state"] = {
link = true,
category_link = "[[sovereign]] [[microstate]]s consisting of a single [[city]] and [[w:dependent territory|dependent territories]]",
has_neighborhoods = true,
class = "settlement",
["continent/*"] = {"City-states", "Cities in +++", "Quốc gia của +++", "National capitals"},
default = {"City-states", "Cities", "Quốc gia", "National capitals"},
},
["civil parish"] = {
-- Mostly England; similar to municipalities
link = true,
preposition = "of",
affix_type = "suf",
has_neighborhoods = true,
class = "subpolity",
},
["claimed political division"] = {
link = "[[claim]]ed [[political]] [[division]]",
class = "subpolity",
default = {true},
},
["co-capital"] = {
link = "[[co-]][[capital]]",
fallback = "capital city",
},
["coal city"] = {
link = "+w:coal town",
fallback = "city",
},
["coal town"] = {
link = "w",
fallback = "town",
},
["collectivity"] = {
link = "w",
preposition = "of",
-- No default; these are weird one-off governmental divisions in France (esp. for overseas collectivities)
class = "subpolity",
},
["colony"] = {
link = true,
fallback = "dependent territory",
},
["comarca"] = {
-- per Wikipedia: traditional region or local administrative division found in Portugal, Spain, and some of
-- their former colonies, like Brazil, Nicaragua, and Panama. In the Valencian Community, for example, it
-- sits between municipalities and provinces, something like a county or district.
link = true,
preposition = "of",
class = "subpolity",
},
["commandery"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["commonwealth"] = {
link = true,
preposition = "of",
-- No default; applies specifically to Puerto Rico
class = "subpolity",
},
["commune"] = {
link = true,
fallback = "municipality",
},
["community"] = {
link = true,
category_link = "[[community|communities]] of all sizes",
fallback = "village",
},
["community development block"] = {
-- in India; appears to be similar to a rural municipality; groups several villages, unclear if there will be
-- neighborhoods so I'm not setting `has_neighborhoods` for now
link = "w",
affix_type = "suf",
no_affix_strings = "block",
class = "subpolity",
},
["comune"] = {
-- Italy, Switzerland
link = true,
fallback = "municipality",
},
["condominium"] = {
link = true,
fallback = "polity",
},
["confederacy"] = {
link = true,
fallback = "confederation",
},
["confederation"] = {
link = true,
fallback = "polity",
},
["constituency"] = {
-- currently we have them as political divisions of Namibia but many countries have them
link = true,
preposition = "of",
class = "subpolity",
},
["constituent country"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["constituent part"] = {
link = "separately",
preposition = "of",
class = "subpolity",
},
["constituent republic"] = {
-- Of Russia, Yugoslavia, etc.
link = "separately",
preposition = "of",
class = "subpolity",
},
["counties and county-level cities!"] = {
-- This is used when grouping counties and county-level cities under prefecture-level cities in China.
category_link = "[[county|counties]] and [[county-level city|county-level cities]]",
class = "subpolity",
},
["continent"] = {
link = true,
category_link = false, -- can't occur as a bare category
class = "natural feature",
default = {"Continents and continental regions"},
},
["continental region"] = {
link = "separately",
category_link = false, -- can't occur as a bare category
class = "geographic region",
fallback = "continent",
},
["continents and continental regions!"] = {
category_link = "[[continent]]s and [[continent]]-[[level]] [[region]]s (e.g. [[Polynesia]])",
class = "geographic region",
},
["council area"] = {
link = true,
-- in Scotland; similar to a county
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["quốc gia"] = {
link = true,
class = "polity",
["continent/*"] = {true, "Quốc gia"},
default = {true},
},
["country-like entities!"] = {
category_link = "[[polity|polities]] not normally considered [[country|countries]] but treated similarly for categorization purposes; typically, [[unrecognized]] [[de-facto]] countries or [[w:dependent territory|dependent territories]]",
class = "polity",
},
["county"] = {
link = true,
preposition = "of",
display_handler = county_display_handler,
class = "subpolity",
},
["county borough"] = {
link = true,
-- in Wales; similar to a county
preposition = "of",
affix_type = "suf",
fallback = "borough",
class = "subpolity",
},
["county seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["county town"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
fallback = "town",
has_neighborhoods = true,
class = "capital",
},
["county-administered city"] = {
-- In Taiwan, per Wikipedia similar to a Taiwanese township or district, which is a small city.
-- NOT anything like a "county-level city" in PR China, which is a county masquerading as a city.
link = "w",
fallback = "city",
has_neighborhoods = true,
class = "settlement",
},
["county-controlled city"] = {
-- Taiwan
link = "w",
fallback = "county-administered city",
},
["county-level city"] = {
-- PR China
link = "w",
fallback = "prefecture-level city",
},
["crater lake"] = {
link = true,
fallback = "lake",
},
["creek"] = {
link = true,
fallback = "stream",
},
["Crown colony"] = {
link = "+crown colony",
fallback = "crown colony",
},
["crown colony"] = {
link = true,
fallback = "colony",
},
["Crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["cultural area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["cultural region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["delegation"] = {
-- Tunisia
link = "+w:delegations of Tunisia",
preposition = "of",
class = "subpolity",
},
["department"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["departmental capital"] = {
link = "separately",
fallback = "capital city",
},
["dependency"] = {
link = true,
fallback = "dependent territory",
},
["dependent territory"] = {
link = "w",
preposition = "of",
class = "subpolity",
former_type = "dependent territory",
bare_category_parent = "political divisions",
["country/*"] = {true},
default = {true},
},
["hoang mạc"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"hệ thống sinh thái"},
default = {true},
},
["deserted mediaeval village"] = {
link = "w",
fallback = "deserted medieval village",
},
["deserted medieval village"] = {
link = "w",
fallback = "ANCIENT settlement",
},
["direct-administered municipality"] = {
-- China
link = "+w:direct-administered municipalities of China",
fallback = "municipality",
},
["direct-controlled municipality"] = {
-- several countries
link = "w",
fallback = "municipality",
},
["distributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["district"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- Grrr! FIXME! Here is where we need handlers for `class`. Using similar logic to
-- district_neighborhood_cat_handler, we need to check if we're below or above a city to determine if the class
-- is "settlement" or "subpolity".
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
-- No default. Countries for which districts are political divisions will get entries.
},
["districts and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Portugal.
category_link = "[[district]]s and [[autonomous region]]s",
class = "subpolity",
},
["districts and autonomous territorial units!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Moldova.
category_link = "[[district]]s and [[w:autonomous territorial unit|autonomous territorial unit]]s",
class = "subpolity",
},
["district capital"] = {
link = "separately",
fallback = "capital city",
},
["district headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["district municipality"] = {
-- In Canada, a district municipality is equivalent to a rural municipality and won't have neighborhoods; in
-- South Africa, district municipalities group local municipalities and hence won't have neighborhoods.
link = "w",
preposition = "of",
affix_type = "suf",
no_affix_strings = {"district", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["division"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["division capital"] = {
link = "separately",
fallback = "capital city",
},
["dome"] = {
link = true,
fallback = "mountain",
},
["dormant volcano"] = {
link = true,
fallback = "volcano",
},
["duchy"] = {
link = true,
fallback = "polity",
},
["emirate"] = {
link = true,
preposition = "of",
-- FIXME: Can be subpolities (of the United Arab Emirates).
fallback = "polity",
},
["empire"] = {
link = true,
fallback = "polity",
},
["enclave"] = {
link = true,
preposition = "of",
-- Enclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["entity"] = {
-- Bosnia and Herzegovina
link = "+w:entities of Bosnia and Herzegovina",
preposition = "of",
class = "subpolity",
},
["escarpment"] = {
link = true,
fallback = "mountain",
},
["ethnographic region"] = {
-- used in Lithuania
link = "+w:ethnographic regions of Lithuania",
fallback = "geographic and cultural area",
},
["exclave"] = {
link = true,
preposition = "of",
-- exclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["external territory"] = {
link = "separately",
fallback = "dependent territory",
},
["farm"] = {
link = true,
class = "non-admin settlement",
default = {"Farms and ranches"},
},
["farms and ranches!"] = {
category_link = "[[farm]]s and [[ranch]]es",
class = "non-admin settlement",
},
["federal city"] = {
link = "w",
preposition = "of",
fallback = "city",
},
["federal district"] = {
link = true,
preposition = "of",
-- Might have neighborhoods as federal districts are often cities (e.g. Mexico City)
has_neighborhoods = true,
class = "settlement",
},
["federal subject"] = {
-- In Russia; a generic term for first-level administrative divisions (republics, oblasts, okrugs, krais,
-- autonomous okrugs and autonomous oblasts).
link = "w",
preposition = "of",
class = "subpolity",
},
["federal territory"] = {
link = "w",
fallback = "territory",
},
["fictional location"] = {
link = "separately",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "places",
default = {true},
},
["First Nations reserve"] = {
-- Canada
link = "[[First Nations]] [[w:Indian reserve|reserve]]",
-- Wikipedia uses "Indian reserve"; presumably that is the legal term
fallback = "Indian reserve",
class = "subpolity",
},
["fjord"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["footpath"] = {
link = true,
fallback = "road",
},
["rừng"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"hệ thống sinh thái", "lâm nghiệp"},
default = {true},
},
["fort"] = {
link = true,
fallback = "building",
},
["fortress"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- fortresses -> fortresse, so put an entry here to ensure we singularize correctly.
plural = "fortresses",
fallback = "building",
},
["frazione"] = {
link = "w",
fallback = "hamlet",
},
["freeway"] = {
link = true,
fallback = "road",
},
["French prefecture"] = {
link = "[[w:prefectures in France|prefecture]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["geographic and cultural area"] = {
link = "+w:cultural area",
-- `generic_before_non_cities` is used when generating the category description of categories of the format
-- `Geographic and cultural areas of PLACE`. `preposition` is used when generating {{place}} description and
-- categories for any placetype that falls back to `geographic and cultural area`.
generic_before_non_cities = "of",
preposition = "of",
class = "geographic region",
bare_category_parent = "places",
["country/*"] = {true},
["constituent country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["geographic area"] = {
link = "+w:geographic region",
fallback = "geographic and cultural area",
},
["geographic region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geopolitical zone"] = {
-- Nigeria
link = true,
preposition = "of",
class = "subpolity",
},
["gewog"] = {
-- Bhutan
link = true,
preposition = "of",
class = "subpolity",
},
["ghost town"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
bare_category_parent = "former settlements",
cat_handler = city_type_cat_handler,
default = {true},
},
["glen"] = {
link = true,
fallback = "valley",
},
["governorate"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["greater administrative region"] = {
-- China (former division)
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["gromada"] = {
-- Poland (former division)
link = "w",
preposition = "of",
affix_type = "Pref",
class = "subpolity",
inherently_former = {"FORMER"},
},
["group of islands"] = {
link = "[[group]] of [[island]]s",
plural = "groups of islands",
plural_link = "[[group]]s of [[island]]s",
fallback = "island group",
},
["vịnh biển"] = {
link = true,
preposition = "của",
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["hamlet"] = {
link = true,
fallback = "village",
},
["harbor city"] = {
link = "separately",
fallback = "city",
},
["harbor town"] = {
link = "separately",
fallback = "town",
},
["harbour city"] = {
link = "separately",
fallback = "city",
},
["harbour town"] = {
link = "separately",
fallback = "town",
},
["mũi đất"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"địa mạo"},
default = {true},
},
["headquarters"] = {
link = "w",
fallback = "administrative centre",
},
["bãi hoang"] = {
link = true,
fallback = "đồng hoang",
},
["hemisphere"] = {
link = true,
entry_placetype_use_the = true,
fallback = "continental region",
},
["highway"] = {
link = true,
fallback = "road",
},
["đồi"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"địa mạo"},
default = {true},
},
["hill station"] = {
link = "w",
fallback = "town",
},
["hill town"] = {
link = "w",
fallback = "town",
},
["historic region"] = {
-- provided only for the link
link = "+w:historical region",
fallback = "FORMER geographic region",
},
["historical county"] = {
-- needed for historical counties of England/etc.
link = "+w:historic county",
fallback = "FORMER subpolity",
},
["historical region"] = {
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["home rule city"] = {
link = "w",
fallback = "city",
},
["home rule municipality"] = {
link = "w",
fallback = "municipality",
},
["hot spring"] = {
link = true,
fallback = "spring",
},
["house"] = {
link = true,
fallback = "building",
},
["housing estate"] = {
-- not the same as a housing project (i.e. public housing)
link = true,
-- not exactly the case but approximately
fallback = "neighborhood",
},
["hromada"] = {
-- Ukraine
link = "w",
disallow_in_entries = "Use placetype 'urban hromada', 'rural hromada' or 'settlement hromada' in place of bare 'hromada'",
disallow_in_holonyms = "Use placetype 'urban hromada'/'uhrom', 'rural hromada'/'rhrom' or 'settlement hromada'/'shrom' in place of bare 'hromada'",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["inactive volcano"] = {
link = "w",
fallback = "dormant volcano",
},
["independent city"] = {
link = true,
fallback = "city",
},
["independent town"] = {
link = "+independent city",
fallback = "town",
},
["Indian reservation"] = {
link = "w",
-- In the US. Also known as "Native American reservation" or "domestic dependent nation", and the reservations
-- themselves often use the term "nation" in their official name (e.g. the "Navajo Nation"). But Wikipedia puts
-- the article at [[w:Indian reservation]] and uses that term when describing e.g. what the Navajo Nation is,
-- so this must still be the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["Indian reserve"] = {
link = "w",
-- In Canada. "First Nations reserve" sounds more modern/PC but Wikipedia uses "Indian reserve"; presumably that
-- is still the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["inland sea"] = {
-- note, we also have 'inland' as a qualifier
link = true,
fallback = "sea",
},
["inner city area"] = {
link = "[[inner city]] [[area]]",
fallback = "neighborhood",
},
["đảo"] = {
link = true,
preposition = "của",
class = "natural feature",
addl_bare_category_parents = {"địa mạo"},
default = {true},
},
["island country"] = {
-- FIXME: The following should map to both 'island' and 'country'.
link = "w",
fallback = "country",
},
["island group"] = {
link = "separately",
fallback = "island",
},
["island municipality"] = {
link = "w",
fallback = "municipality",
},
["islet"] = {
link = "w",
fallback = "island",
},
["Israeli settlement"] = {
link = "w",
class = "settlement",
default = {true},
},
["judicial capital"] = {
link = "w",
fallback = "capital city",
},
["khanate"] = {
link = true,
fallback = "polity",
},
["kibbutz"] = {
link = true,
plural = "kibbutzim",
class = "non-admin settlement",
default = {true},
},
["kingdom"] = {
link = true,
fallback = "monarchy",
},
["krai"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["hồ"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["địa mạo!"] = {
category_link = "[[địa mạo]]",
bare_category_parent = "địa danh",
addl_bare_category_parents = {"Trái Đất"},
},
["largest city"] = {
link = "[[large]]st [[city]]",
entry_placetype_use_the = true,
fallback = "city",
has_neighborhoods = true,
},
["league"] = {
link = true,
fallback = "confederation",
},
["legislative capital"] = {
link = "separately",
fallback = "capital city",
},
["library"] = {
link = true,
fallback = "building",
},
["lieutenancy area"] = {
-- used in the United Kingdom; per Wikipedia:
-- In England, lieutenancy areas are colloquially known as the ceremonial counties, although this phrase does
-- not appear in any legislation referring to them. The lieutenancy areas of Scotland are subdivisions of
-- Scotland that are more or less based on the counties of Scotland, making use of the major cities as separate
-- entities.[2] In Wales, the lieutenancy areas are known as the preserved counties of Wales and are based on
-- those used for lieutenancy and local government between 1974 and 1996. The lieutenancy areas of Northern
-- Ireland correspond to the six counties and two former county boroughs.[3]
link = "w",
fallback = "ceremonial county",
},
["local authority district"] = {
link = "w",
fallback = "local government district",
},
["local government area"] = {
-- Australia
link = "w",
preposition = "of",
class = "subpolity",
},
["local council"] = {
-- Malta; similar to municipalities
link = "+w:local councils of Malta",
preposition = "of",
fallback = "municipality",
},
["local government district"] = {
link = "w",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local government district with borough status"] = {
link = "[[w:local government district|local government district]] with [[w:borough status|borough status]]",
plural = "local government districts with borough status",
plural_link = "[[w:local government district|local government districts]] with [[w:borough status|borough status]]",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local urban district"] = {
link = "w",
fallback = "unincorporated community",
},
["locality"] = {
link = "+w:locality (settlement)",
-- not necessarily true, but usually is the case
fallback = "village",
},
["London borough"] = {
link = "w",
preposition = "of",
affix_type = "pref",
affix = "borough",
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["macroregion"] = {
link = true,
fallback = "region",
},
["man-made structures!"] = {
category_link = "[[w:geographical feature#Engineered constructs|man-made structures]] such as [[airport]]s, [[university|universities]] and [[metro station]]s",
bare_category_parent = "places",
},
["manor"] = {
-- FIXME: or is this more like a farm?
link = true,
fallback = "building",
},
["marginal sea"] = {
link = true,
preposition = "of",
fallback = "sea",
},
["market city"] = {
link = "+market town",
fallback = "city",
},
["market town"] = {
link = true,
fallback = "town",
},
["massif"] = {
link = true,
fallback = "mountain",
},
["megacity"] = {
link = true,
fallback = "city",
},
["metro station"] = {
link = true,
class = "man-made structure",
},
["metropolitan borough"] = {
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"borough", "city"},
fallback = "local government district",
has_neighborhoods = true,
},
["metropolitan city"] = {
-- These exist e.g. in Italy and are more like municipalities or even provinces than cities.
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"metropolitan", "city"},
class = "subpolity",
},
["metropolitan county"] = {
link = true,
fallback = "county",
},
["metropolitan municipality"] = {
-- In South Africa, metropolitan municipalities group local municipalities and are like districts, between
-- provinces and municipalities.
-- In Turkey, metropolitan municipalities are provinces-level.
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"metropolitan", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["microdistrict"] = {
-- residential complex in post-Soviet states
link = true,
fallback = "neighborhood",
},
["micronations!"] = {
-- FIXME, merge with microstate
category_link = "[[micronation]]s",
bare_category_parent = "quốc gia",
},
["microstate"] = {
link = true,
fallback = "country",
},
["military base"] = {
link = "w",
class = "settlement", -- or "man-made structure"?
default = {true},
},
["minster town"] = {
-- England
link = "separately",
fallback = "town",
},
["monarchy"] = {
link = true,
fallback = "polity",
},
["đồng hoang"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"địa mạo", "hệ thống sinh thái"},
default = {true},
},
["thảo nguyên"] = {
link = true,
fallback = "đồng hoang",
},
["motorway"] = {
link = true,
fallback = "road",
},
["mountain"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["mountain indigenous district"] = {
-- Taiwan
link = "+w:district (Taiwan)",
fallback = "district",
},
["mountain indigenous township"] = {
-- Taiwan
link = "+w:township (Taiwan)",
fallback = "township",
},
["mountain pass"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "mountain passes",
class = "natural feature",
addl_bare_category_parents = {"mountains"},
default = {true},
},
["mountain range"] = {
link = true,
fallback = "mountain",
},
["mountainous region"] = {
link = "separately",
fallback = "region",
},
["mukim"] = {
-- Malaysia, Brunei, Indonesia, Singapore
link = true,
preposition = "of",
class = "subpolity",
},
["municipal district"] = {
link = "w",
-- meaning varies depending on the country; for now, assume no neighborhoods.
-- FIXME: has_neighborhoods might have to be a function that looks at the containing holonyms.
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "municipality",
},
["municipality"] = {
link = true,
preposition = "of",
has_neighborhoods = true,
class = "subpolity",
},
["municipality with city status"] = {
link = "[[municipality]] with [[w:city status|city status]]",
plural = "municipalities with city status",
plural_link = "[[municipality|municipalities]] with [[w:city status|city status]]",
fallback = "municipality",
},
["museum"] = {
link = true,
fallback = "building",
},
["địa danh thần thoại"] = {
link = "địa danh thần thoại",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "địa danh",
default = {true},
},
["named bridges!"] = {
category_link = "notable [[bridge]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"bridges"},
},
["named buildings!"] = {
category_link = "notable [[house]]s, [[library|libraries]] and other [[building]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"buildings"},
},
["named roads!"] = {
category_link = "notable [[road]]s, [[highway]]s, [[trail]]s and similar linear structures",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"roads"},
},
["national capital"] = {
link = "w",
fallback = "capital city",
},
["national park"] = {
link = true,
fallback = "park",
},
["đặc điểm tự nhiên!"] = {
category_link = "tổng hợp các yếu tố vật chất hình thành tồn tại",
bare_category_parent = "địa danh",
},
["neighborhood"] = {
-- The majority of the properties here apply to both `neighborhoods` and `neighbourhoods`; the choice of which
-- one to use is made by district_neighborhood_cat_handler() based on the value of `british_spelling` for the
-- location (city, political division, etc.) of the holonym that follows the word "neighbo(u)hoods" in the
-- category name. It does *NOT* depend on whether the {{place}} call uses "neighborhoods" or "neighbourhoods".
-- (In general it can't, because other things like "urban areas", "districts", "subdivisions" and the like also
-- categorize as neighbo(u)rhoods.)
link = true,
-- See below. These are used by category handlers in [[Module:category tree/topic cat/data/Places]].
generic_before_non_cities = "in",
generic_before_cities = "of",
-- The following text is suitable for the top-level description of a neighborhood as well as categories of the
-- form `Neighborhoods in POLDIV` e.g. `Neighborhoods in Illinois, USA` but not for categories of the form
-- `Neighborhoods of Chicago`, where we'd get "... and other subportions of [[city|cities]] of [[Chicago]]".
category_link = "[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighborhood]]s, [[district]]s and other subportions",
-- NOTE: This setting is needed for administrative divisions like barangays that fall back to `neighborhood`,
-- when set in [[Module:place/locations]] for a specific country (e.g. the Philippines). The above settings
-- for `generic_before_non_cities` and `generic_before_cities` are used by category handlers in
-- [[Module:category tree/topic cat/data/Places]] for `Neighborhoods in POLDIV` and `Neighborhoods of CITY`
-- categories. In fact, district_neighborhood_cat_handler() does not currently pay attention to them, but
-- generates "of" before cities and "in" before non-cities regardless. (FIXME: We should change that.)
preposition = "of",
class = "non-admin settlement",
cat_handler = district_neighborhood_cat_handler,
},
["neighbourhood"] = {
link = true,
category_link = "[[neighbourhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighbourhood]]s, [[district]]s and other subportions",
fallback = "neighborhood",
},
["new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
preposition = "in",
class = "subpolity", --?
},
["new town"] = {
link = true,
fallback = "town",
},
["non-city capital"] = {
link = "[[capital]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
cat_handler = function(data)
return capital_city_cat_handler(data, "non-city")
end,
-- FIXME, do we need the following?
default = {true},
},
["non-metropolitan county"] = {
link = "w",
fallback = "county",
},
["non-metropolitan district"] = {
link = "w",
fallback = "local government district",
},
["non-sovereign kingdom"] = {
-- especially in Africa and Asia
link = "+w:non-sovereign monarchy",
generic_before_non_cities = "in",
class = "subpolity",
["country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["non-sovereign monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["oblasts and autonomous republics!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Ukraine.
category_link = "[[oblast]]s and [[w:autonomous republic|autonomous republic]]s",
class = "subpolity",
},
["đại dương"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"biển", "vùng nước"},
default = {true},
},
["okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["overseas collectivity"] = {
link = "w",
fallback = "collectivity",
},
["overseas department"] = {
link = "w",
fallback = "department",
},
["overseas territory"] = {
link = "w",
fallback = "dependent territory",
},
["parish"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["parish municipality"] = {
-- in Quebec, often similar to a rural village; the famous [[Saint-Louis-du-Ha! Ha!]] is one of them.
link = "+w:parish municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true,
},
["parish seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
class = "capital",
has_neighborhoods = true,
},
["park"] = {
link = true,
class = "man-made structure",
default = {true},
},
["pass"] = {
link = "+mountain pass",
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "passes",
fallback = "mountain pass",
},
["path"] = {
link = true,
fallback = "road",
},
["peak"] = {
link = true,
fallback = "mountain",
},
["peninsula"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["periphery"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["địa danh!"] = {
generic_before_non_cities = "của",
generic_before_cities = "của",
class = "generic place",
category_link = "[[place]]s of all sorts",
-- `category_link_top_level` control the description used in the top-level [[Category:Places]] and
-- language-specific variants such as [[Category:en:Places]]. The actual text for a language-spefic variant is
-- "{{{langname}}} names of [[geographical]] [[place]]s of all sorts; [[toponym]]s." where the "names of"
-- portion is automatically generated by the appropriate handler in
-- [[Module:category tree/topic cat/data/Places]].
category_link_top_level = "[[geographical]] [[place]]s of all sorts; [[toponym]]s",
bare_category_parent = "tên",
},
["planned community"] = {
-- Include this so we don't categorize 'planned community' into villages, as 'community' does.
link = true,
class = "settlement",
has_neighborhoods = true,
},
["plateau"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
-- FIXME: Should generate both "Plateaus" and the appropriate 'geographic and cultural area' category
},
["Polish colony"] = {
link = "[[w:colony (Poland)|colony]]",
affix_type = "suf",
affix = "colony",
fallback = "village",
has_neighborhoods = true,
},
["political divisions!"] = {
category_link = "[[political]] [[division]]s and [[subdivision]]s, such as [[state]]s, [[province]]s, [[county|counties]] or [[district]]s",
bare_category_parent = "places",
},
["tổ chức chính trị"] = {
link = true,
category_link = "[[independent]] or [[semi-]][[independent]] [[polity|polities]]",
class = "polity",
bare_category_parent = "địa danh",
default = {true},
},
["populated place"] = {
link = "+w:populated place",
-- not necessarily true, but usually is the case
fallback = "village",
},
["port"] = {
link = true,
class = "man-made structure",
default = {true},
},
["port city"] = {
-- FIXME: should categorize into "Ports" as well as "Cities"
link = true,
fallback = "city",
},
["port town"] = {
-- FIXME: should categorize into "Ports" as well as "Towns"
link = "w",
fallback = "town",
},
["prefecture"] = {
-- FIXME! `prefecture` is like a county in Japan and elsewhere but a department capital city in France.
-- May need `has_neighborhoods` to be a function.
link = true,
preposition = "of",
display_handler = prefecture_display_handler,
class = "subpolity",
},
["prefecture-level city"] = {
-- China; they are huge entities with a central city; not cities themselves.
link = "w",
preposition = "of",
class = "subpolity",
},
["preserved county"] = {
-- In Wales; they are former counties enshrined in law; there are 8 of them and each consists of one or more
-- "principal areas" (styled as "counties" or "county boroughs"), of which there are 22.
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["primary area"] = {
-- a grouping of "districts" (neighborhoods) in Gothenburg, Sweden
link = "+w:sv:primärområde",
fallback = "neighborhood",
},
["principality"] = {
link = true,
fallback = "monarchy",
},
["promontory"] = {
link = true,
fallback = "headland",
},
["protectorate"] = {
link = true,
fallback = "dependent territory",
},
["province"] = {
link = true,
preposition = "of",
display_handler = province_display_handler,
class = "subpolity",
},
["provinces and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case China.
category_link = "[[province]]s and [[autonomous region]]s",
class = "subpolity",
},
["provinces and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Canada and Pakistan.
category_link = "[[province]]s and [[territory|territories]]",
class = "subpolity",
},
["provincial capital"] = {
link = true,
fallback = "capital city",
},
["raion"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["ranch"] = {
link = true,
fallback = "farm",
},
["range"] = {
-- FIXME: Where is this used? Is it a mountain range?
link = true,
class = "natural feature",
},
["regency"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["region"] = {
link = true,
preposition = "of",
-- If 'region' isn't a specific administrative division, fall back to 'geographic and cultural area'
fallback = "geographic and cultural area",
-- "former region" is a subpolity but traditional/historic(al)/ancient/medieval/etc. is a geographic region
class = "geographic region",
},
["regional capital"] = {
link = "separately",
fallback = "capital city",
},
["regional county municipality"] = {
-- Quebec
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"municipality", "county"},
fallback = "municipality",
},
["regional district"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "district",
},
["regional municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
},
["regional unit"] = {
link = "w",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["registration county"] = {
-- Used in Scotland for land registration purposes; formerly used in England, Wales and Ireland for statistical
-- purposes (registration of births, deaths and marriages, and for the output of census information).
link = "w",
fallback = "county",
},
["republic"] = {
-- Of Russia, Yugoslavia, etc. "Republics" in general are sovereign but we use "country" in that case.
link = true,
fallback = "constituent republic",
},
["research base"] = {
link = "+w:research station",
fallback = "research station",
},
["research station"] = {
link = "w",
class = "non-admin settlement", -- or "man-made structure"?
default = {true},
},
["reservoir"] = {
link = true,
fallback = "lake",
},
["residential area"] = {
link = "separately",
fallback = "neighborhood",
},
["resort city"] = {
link = "w",
fallback = "city",
},
["resort town"] = {
link = "w",
fallback = "town",
},
["sông"] = {
link = true,
generic_before_non_cities = "của",
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
cat_handler = city_type_cat_handler,
["continent/*"] = {true},
default = {true},
},
["river island"] = {
link = "w",
fallback = "island",
},
["road"] = {
link = true,
class = "man-made structure",
default = {"Named roads"},
},
["Roman province"] = {
-- FIXME! Eliminate this in favor of 'former province|emp/Roman Empire'
link = "w",
default = {"Provinces of the Roman Empire"},
class = "subpolity",
},
["royal borough"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"royal", "borough"},
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["royal burgh"] = {
link = true,
fallback = "borough",
},
["royal capital"] = {
link = "w",
fallback = "capital city",
},
["rural committee"] = {
-- Hong Kong; a group of villages
link = "w",
affix_type = "Suf",
has_neighborhoods = true,
class = "settlement",
},
["rural community"] = {
-- New Brunswick
link = "+w:list of municipalities in New_Brunswick#Rural communities",
fallback = "municipality",
},
["rural hromada"] = {
link = "[[rural]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["rural municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
has_neighborhoods = true, --?
},
["rural township"] = {
-- Taiwan
link = "+w:rural township (Taiwan)",
fallback = "township",
},
["sanctuary"] = {
link = true,
fallback = "temple",
},
["satrapy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["biển"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["seaport"] = {
link = true,
fallback = "port",
},
["seat"] = {
link = true,
fallback = "administrative centre",
},
["self-administered area"] = {
-- Myanmar (groups self-administered divisions and zones)
link = "+w:self-administered zone",
preposition = "of",
class = "subpolity",
},
["self-administered division"] = {
-- Myanmar (only one of them: Wa Self-Administered Division)
link = "w",
fallback = "self-administered area",
},
["self-administered zone"] = {
-- Myanmar (five of them)
link = "w",
fallback = "self-administered area",
},
["separatist state"] = {
link = "separately",
fallback = "unrecognized country",
},
["settlement"] = {
link = true,
category_link = "[[settlement]]s such as [[city|cities]], [[village]]s and [[farm]]s",
bare_category_parent = "places",
-- not necessarily true, but usually is the case
fallback = "village",
},
["settlement hromada"] = {
link = "[[w:Populated places in Ukraine#Rural settlements|settlement]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["sheading"] = {
-- Isle of Man
link = true,
fallback = "district",
},
["sheep station"] = {
-- Australia
link = true,
fallback = "farm",
},
["shire"] = {
link = true,
fallback = "county",
},
["shire county"] = {
link = "w",
fallback = "county",
},
["shire town"] = {
link = true,
fallback = "county seat",
},
["ski resort city"] = {
link = "[[ski resort]] [[city]]",
fallback = "city",
},
["ski resort town"] = {
link = "[[ski resort]] [[town]]",
fallback = "town",
},
["spa city"] = {
link = "+w:spa town",
fallback = "city",
},
["spa town"] = {
link = "w",
fallback = "town",
},
["space station"] = {
link = true,
fallback = "research station",
},
["special administrative region"] = {
-- in China; in practice they are city-like (Hong Kong, Macau); also [[Oecusse]] in East Timor is formally a
-- "special administrative region"; North Korea had one such region planned (Sinuiju) but abandoned; Indonesia
-- has similar "special regions" of Jakarta, Yogyakarta and Aceh; and South Sudan has three "special
-- administrative areas"
link = "+w:special administrative regions of China",
preposition = "of",
class = "subpolity",
has_neighborhoods = true, --?
-- no suffix since places in Hong Kong or Macau are listed without China, except Hong Kong and Macau themselves
-- they also contain regions (or areas), e.g. [[Kowloon]], so it would be confusing
suffix = "",
},
["special collectivity"] = {
link = "w",
fallback = "collectivity",
},
["special municipality"] = {
-- formerly linked to the Taiwan article but there are also special municipalities of the Netherlands
link = "w",
fallback = "municipality",
},
["special ward"] = {
-- Tokyo
link = true,
fallback = "municipality",
},
["spit"] = {
link = true,
fallback = "peninsula",
},
["spring"] = {
link = true,
class = "natural feature",
default = {true},
},
["star"] = {
link = true,
class = "natural feature",
default = {true},
},
["state"] = {
link = true,
preposition = "of",
class = "subpolity",
-- 'former/historical state' could refer either to a state of a country (a division) or a state = sovereign
-- entity. The latter appears more common (e.g. in various "ancient states" of East Asia).
former_type = "polity",
},
["states and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Australia.
category_link = "[[state]]s and [[territory|territories]]",
class = "subpolity",
},
["states and union territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case India.
category_link = "[[state]]s and [[union territory|union territories]]",
class = "subpolity",
},
["state capital"] = {
link = true,
fallback = "capital city",
},
["state park"] = {
link = true,
fallback = "park",
},
["state-level new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
fallback = "new area",
},
["statistical region"] = {
-- Slovenia
link = true,
fallback = "administrative region",
},
["statutory city"] = {
link = "w",
fallback = "city",
},
["statutory town"] = {
link = "w",
fallback = "town",
},
["strait"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["stream"] = {
link = true,
fallback = "river",
},
["street"] = {
link = true,
fallback = "road",
},
["strip"] = {
link = true,
fallback = "geographic region",
},
["strip of land"] = {
link = "[[strip]] of [[land]]",
plural = "strips of land",
plural_link = "[[strip]]s of [[land]]",
fallback = "geographic region",
},
["sub-metropolitan city"] = {
link = "+w:List of cities in Nepal#Sub-metropolitan cities",
fallback = "city",
},
["sub-prefectural city"] = {
link = "w",
fallback = "subprovincial city",
},
["subdistrict"] = {
link = true,
preposition = "of",
has_neighborhoods = true, --?
-- FIXME: subdistricts can be neighborhood-like (of Jakarta) or larger (in China); need a handler
class = "subpolity",
default = {true},
},
["subdivision"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- FIXME: subdivisions can be neighborhood-like or larger; need a handler
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
},
["submerged ghost town"] = {
-- FIXME: Consider just having "submerged" as a qualifier.
link = "[[submerged]] [[ghost town]]",
fallback = "ghost town",
},
["subnational kingdom"] = {
link = "+w:subnational monarchy",
fallback = "non-sovereign kingdom",
},
["subnational monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["subprefecture"] = {
link = true,
affix_type = "suf",
preposition = "of",
class = "subpolity",
},
["subprovince"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["subprovincial city"] = {
link = "w",
-- China; special status given to certain prefecture-level cities
fallback = "prefecture-level city",
},
["subprovincial district"] = {
link = "w",
-- China; special status given to Binhai New Area and Pudong New Area, which are county-level districts
preposition = "of",
class = "subpolity",
},
["subregion"] = {
link = true,
fallback = "geographic region",
},
["suburb"] = {
link = true,
-- The following text is suitable for the top-level description of a suburb as well as categories of the form
-- 'Suburbs in POLDIV' e.g. 'Suburbs in Illinois, USA' but not for categories of the form 'Suburbs of Chicago',
-- where we'd get "[[suburb]]s of [[city|cities]] of [[Chicago]]".
category_link = "[[suburb]]s of [[city|cities]]",
category_link_before_city = "[[suburb]]s",
-- See comments under "neighborhood" for the following three settings. They are used by
-- [[Module:category tree/topic cat/data/Places]] for generating the text of 'Suburbs in/of PLACE' categories
-- but currently ignored by district_neighborhood_cat_handler (which actually generates the categories for a
-- given page), which hardcodes "in" for non-cities and "of" for cities. (FIXME: Change this.)
generic_before_non_cities = "in",
generic_before_cities = "of",
preposition = "of",
has_neighborhoods = true, --?
class = "non-admin settlement", --?
cat_handler = district_neighborhood_cat_handler,
},
["suburban area"] = {
link = "w",
fallback = "suburb",
},
["subway station"] = {
link = "w",
fallback = "metro station",
},
["sum"] = {
-- In China, Mongolia, Russia; something like a county in Mongolia but a township in China (Inner Mongolia),
-- and equivalent to a [[selsoviet]] in the parts of Russia where it's in use (a rural council, below a raion).
link = "+w:sum (administrative division)",
-- This fallback is somewha arbitrary. We could use "county" but that has a display handler
-- which we don't want to be active (FIXME: If the display handler would be active, that's a bug).
fallback = "division",
},
["supercontinent"] = {
link = true,
fallback = "continent",
},
["tehsil"] = {
link = true,
affix_type = "suf",
no_affix_strings = {"tehsil", "tahsil"},
class = "subpolity",
},
["temple"] = {
link = true,
fallback = "building",
},
["territorial authority"] = {
link = "w",
fallback = "district",
},
["territory"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["theme"] = {
link = "+w:theme (Byzantine district)",
preposition = "of",
class = "subpolity",
},
["town"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["town with bystatus"] = {
-- can't use templates in links currently
link = "[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]",
plural = "towns with bystatus",
plural_link = "[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]",
fallback = "town",
},
["township"] = {
link = true,
has_neighborhoods = true,
class = "settlement", --?
default = {true},
},
["township municipality"] = {
-- Quebec
link = "+w:township municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["traditional county"] = {
link = true,
fallback = "county",
},
["traditional region"] = {
-- FIXME: Verify this works. Same for 'historic(al) region'.
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["trail"] = {
link = true,
fallback = "road",
},
["treaty port"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"FORMER"},
},
["tributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["underground station"] = {
link = "w",
fallback = "metro station",
},
["unincorporated area"] = {
link = "w",
-- I don't know if this fallback makes sense everywhere.
fallback = "unincorporated community",
},
["unincorporated community"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
},
["unincorporated territory"] = {
link = "w",
fallback = "territory",
},
["union territory"] = {
-- India
link = true,
preposition = "of",
entry_placetype_indefinite_article = "a",
class = "subpolity",
},
["unitary authority"] = {
-- UK, New Zealand
link = true,
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["unitary district"] = {
link = "w",
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["united township municipality"] = {
-- Quebec
link = "+w:united township municipality (Quebec)",
entry_placetype_indefinite_article = "a",
fallback = "township municipality",
has_neighborhoods = true, --?
},
["university"] = {
link = true,
entry_placetype_indefinite_article = "a",
class = "man-made structure",
default = {true},
},
["unrecognised country"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized and nearly unrecognized countries!"] = {
category_link = "[[de facto]] [[independent]] [[state]]s with little or no {{w|international recognition}}",
bare_category_parent = "country-like entities",
},
["unrecognized country"] = {
link = "w",
class = "polity",
default = {"Unrecognized and nearly unrecognized countries"},
},
["unrecognised state"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized state"] = {
link = "w",
fallback = "unrecognized country",
},
["urban area"] = {
link = "separately",
fallback = "neighborhood",
},
["urban hromada"] = {
link = "[[urban]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["urban service area"] = {
-- A strange beast existing in Alberta; technically a type of hamlet but in practice used for much larger
-- cities and treated equivalent to a city. (There are only two of them, [[Fort McMurray]] and [[Sherwood Park]]).
link = "w",
fallback = "city",
},
["urban township"] = {
link = "w",
fallback = "township",
},
["urban-type settlement"] = {
-- appears to be a particular type of small urban settlement in post-Soviet states,
-- had an administrative function.
link = "w",
fallback = "town",
},
["valley"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "water"},
default = {true},
},
["viceroyalty"] = {
-- in essence, a type of colony
link = true,
fallback = "dependent territory",
},
["village"] = {
link = true,
generic_before_non_cities = "in",
category_link = "[[village]]s, [[hamlet]]s, and other small [[community|communities]] and [[settlement]]s",
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["village development committee"] = {
-- former administrative structure in Nepal; also exists in India but not as a formal unit
link = "+w:village development committee (Nepal)",
inherently_former = {"FORMER"},
fallback = "village",
},
["village municipality"] = {
-- Quebec
link = "+w:village municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["voivodeship"] = {
-- Poland
link = true,
display_handler = voivodeship_display_handler,
preposition = "of",
class = "subpolity",
},
["volcano"] = {
link = true,
plural = "volcanoes",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true, "Mountains"},
},
["ward"] = {
link = true,
class = "settlement",
-- Wards are formal administrative divisions of a city but have some properties of neighborhoods.
fallback = "neighborhood",
},
["watercourse"] = {
link = true,
fallback = "channel",
},
["Welsh community"] = {
-- Wales
link = "[[w:community (Wales)|community]]",
preposition = "of",
affix_type = "suf",
affix = "community",
has_neighborhoods = true,
class = "settlement",
},
["zone"] = {
-- administrative division of Ethiopia, Qatar, Nepal, India
link = "+w:zone#Place names",
preposition = "of",
class = "subpolity",
},
----------------------------------------------------------------------------------------------
-- Categories for former places --
----------------------------------------------------------------------------------------------
["ANCIENT capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
-- FIXME: Consider removing 'ancient settlements' here. Ancient capitals, like former capitals, often still
-- exist but just aren't the capital any more. Maybe we should have an 'Ancient capitals' category.
default = {"Ancient settlements", "Former capitals"},
},
["ANCIENT non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "ANCIENT settlement",
},
["ANCIENT settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Ancient settlements"},
},
["ancient settlements!"] = {
category_link = "former [[city|cities]], [[town]]s and [[village]]s that existed in [[antiquity]]",
bare_category_parent = "former settlements",
},
["FORMER capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
default = {"Former capitals"},
},
["former capitals!"] = {
category_link = "former [[capital]] [[city|cities]] and [[town]]s",
bare_category_parent = "settlements",
},
["former counties and county-level cities!"] = {
-- For categorizing former counties and county-level cities of China
category_link = "no-longer existing [[county|counties]] and [[county-level city|county-level cities]]",
bare_category_breadcrumb = "counties and county-level cities",
bare_category_parent = "former political divisions",
},
["FORMER county"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER county-level city"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["former countries and country-like entities!"] = {
category_link = "[[country|countries]] and similar [[polity|polities]] that no longer exist",
bare_category_breadcrumb = "countries and country-like entities",
bare_category_parent = "former polities",
},
["FORMER country"] = {
link = false,
class = "polity",
default = {"Former countries and country-like entities"},
},
["former dependent territories!"] = {
category_link = "[[w:dependent territory|dependent territories]] (colonies, dependencies, protectorates, etc.) that no longer exist",
bare_category_breadcrumb = "dependent territories",
bare_category_parent = "former political divisions",
},
["FORMER dependent territory"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former dependent territories"},
},
["former districts!"] = {
-- For categorizing former districts of China
category_link = "no-longer-existing [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "former political divisions",
},
["FORMER district"] = {
-- For categorizing former districts of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER geographic region"] = {
link = false,
fallback = "geographic and cultural area",
},
["FORMER man-made structure"] = {
link = false,
class = "man-made structure",
default = {"Former man-made structures"},
},
["former man-made structures!"] = {
category_link = "man-made structures such as [[airport]]s and [[park]]s that no longer exist",
bare_category_breadcrumb = "man-made structures",
bare_category_parent = "former places",
},
["former municipalities!"] = {
-- For categorizing former municipalities of the Netherlands
category_link = "no-longer-existing [[municipality|municipalities]]",
bare_category_breadcrumb = "municipalities",
bare_category_parent = "former political divisions",
},
["FORMER municipality"] = {
-- For categorizing former municipalities of the Netherlands
link = false,
fallback = "FORMER subpolity",
},
["FORMER natural feature"] = {
link = false,
class = "natural feature",
default = {"Former natural features"},
},
["former natural features!"] = {
category_link = "natural features such as [[lake]]s, [[river]]s and [[island]]s that no longer exist",
bare_category_breadcrumb = "natural features",
bare_category_parent = "former places",
},
["FORMER non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "FORMER settlement",
},
["former places!"] = {
category_link = "[[place]]s of all sorts that no longer exist",
bare_category_breadcrumb = "former",
bare_category_parent = "places",
},
["former political divisions!"] = {
category_link = "[[political]] [[division]]s (states, provinces, counties, etc.) that no longer exist",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former places",
},
["former polities!"] = {
category_link = "[[polity|polities]] (countries, kingdoms, empires, etc.) that no longer exist",
bare_category_breadcrumb = "polities",
bare_category_parent = "former places",
},
["FORMER polity"] = {
link = false,
class = "polity",
default = {"Former polities"},
},
["former prefectures!"] = {
-- For categorizing former prefectures of China
category_link = "no-longer-existing [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "former political divisions",
},
["FORMER prefecture"] = {
-- For categorizing former prefectures of China
link = false,
fallback = "FORMER subpolity",
},
["former provinces!"] = {
-- For categorizing former provinces of China, etc.
category_link = "no-longer-existing [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "former political divisions",
},
["FORMER province"] = {
-- For categorizing ancient/historical/former provinces of the Roman Empire
link = false,
fallback = "FORMER subpolity",
},
["former region"] = {
-- A former region is considered a former political division, but not a 'historical/traditional/etc.' region.
link = "separately",
preposition = "of",
inherently_former = {"FORMER"},
class = "subpolity",
},
["FORMER settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Former settlements"},
},
["former settlements!"] = {
category_link = "[[city|cities]], [[town]]s and [[village]]s that no longer exist or have been merged or reclassified",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former political divisions",
},
["FORMER subpolity"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former political divisions"},
},
----------------------------------------------------------------------------------------------
-- form-of categories --
----------------------------------------------------------------------------------------------
---------- Abbreviations ----------
["abbreviations of counties!"] = {
-- For categorizing abbreviations of counties of e.g. England
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[county|counties]]",
bare_category_breadcrumb = "counties",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of places",
},
["abbreviations of departments!"] = {
-- For categorizing abbreviations of departments of e.g. France
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[department]]s",
bare_category_breadcrumb = "departments",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of districts!"] = {
-- For categorizing abbreviations of districts of e.g. ???
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of divisions!"] = {
-- For categorizing abbreviations of divisions of e.g. Bangladesh
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[division]]s",
bare_category_breadcrumb = "divisions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of former countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of former places",
},
["abbreviations of former places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "abbreviations of places", sort = "former"}},
},
["abbreviations of places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "places",
},
["abbreviations of political divisions!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[political]] [[division]]s",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "abbreviations of places",
},
["abbreviations of prefectures!"] = {
-- For categorizing abbreviations of prefectures of e.g. Japan
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces!"] = {
-- For categorizing abbreviations of provinces of e.g. Canada
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s and [[territory|territories]]",
bare_category_breadcrumb = "provinces and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of regions!"] = {
-- For categorizing abbreviations of regions of e.g. Italy
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[administrative region]]s",
bare_category_breadcrumb = "regions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states!"] = {
-- For categorizing abbreviations of states of e.g. the United States
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[territory|territories]]",
bare_category_breadcrumb = "states and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and union territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[union territory|union territories]]",
bare_category_breadcrumb = "states and union territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[territory|territories]]",
bare_category_breadcrumb = "territories",
bare_category_parent = "abbreviations of political divisions",
},
["ABBREVIATION_OF country"] = {
link = false,
default = {"Abbreviations of countries"},
},
["ABBREVIATION_OF county"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF department"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF district"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF division"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF FORMER country"] = {
link = false,
default = {"Abbreviations of former countries"},
},
["ABBREVIATION_OF FORMER place"] = {
link = false,
default = {"Abbreviations of former places"},
},
["ABBREVIATION_OF place"] = {
link = false,
default = {"Abbreviations of places"},
},
["ABBREVIATION_OF prefecture"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF province"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF region"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF state"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF subpolity"] = {
link = false,
default = {"Abbreviations of political divisions"},
},
["ABBREVIATION_OF territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF union territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
---------- Archaic forms ----------
["archaic forms of places!"] = {
full_category_link = "{{glossary|archaic}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "archaic forms",
bare_category_parent = "places",
},
["ARCHAIC_FORM_OF place"] = {
link = false,
default = {"Archaic forms of places"},
},
---------- Clippings ----------
["clippings of places!"] = {
full_category_link = "{{glossary|clipping}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "clippings",
bare_category_parent = "places",
},
["CLIPPING_OF place"] = {
link = false,
default = {"Clippings of places"},
},
---------- Dated forms ----------
["dated forms of places!"] = {
full_category_link = "{{glossary|dated}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "dated forms",
bare_category_parent = "places",
},
["DATED_FORM_OF place"] = {
link = false,
default = {"Dated forms of places"},
},
---------- Derogatory names ----------
["derogatory names for cities!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[city|cities]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["derogatory names for continents!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for continents"},
},
["derogatory names for countries!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for countries"},
},
["derogatory names for places!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[place]]s",
bare_category_breadcrumb = "derogatory names",
bare_category_parent = "nicknames for places",
},
["derogatory names for states!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for states"},
},
["DEROGATORY_NAME_FOR capital"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR city"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR continent"] = {
link = false,
default = {"Derogatory names for continents"},
},
["DEROGATORY_NAME_FOR country"] = {
link = false,
default = {"Derogatory names for countries"},
},
["DEROGATORY_NAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR place"] = {
link = false,
default = {"Derogatory names for places"},
},
["DEROGATORY_NAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR state"] = {
link = false,
default = {"Derogatory names for states"},
},
["DEROGATORY_NAME_FOR town"] = {
link = false,
default = {"Derogatory names for cities"},
},
---------- Ellipses ----------
["ellipses of places!"] = {
full_category_link = "{{glossary|ellipsis|ellipses}} of [[name]]s of [[place]]s",
bare_category_breadcrumb = "ellipses",
bare_category_parent = "places",
},
["ELLIPSIS_OF place"] = {
link = false,
default = {"Ellipses of places"},
},
---------- Former long-form names ----------
["former long-form names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former long-form names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "long-form"}},
},
["former long-form names of places!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form",
bare_category_parent = "former names of places",
},
["FORMER_LONG_FORM_OF country"] = {
link = false,
default = {"Former long-form names of countries"},
},
["FORMER_LONG_FORM_OF place"] = {
link = false,
default = {"Former long-form names of places"},
},
---------- Former names ----------
["former names of capitals!"] = {
full_category_link = "[[former]] [[name]]s of [[capital city|capital cities]] that generally still exist but under a different name",
bare_category_breadcrumb = "capitals",
bare_category_parent = "former names of settlements",
},
["former names of countries!"] = {
full_category_link = "[[former]] [[name]]s of [[country|countries]] that generally still exist but under a different name",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former names of places",
},
["former names of places!"] = {
full_category_link = "[[former]] [[name]]s of [[place]]s that generally still exist but under a different name",
bare_category_breadcrumb = "former names",
bare_category_parent = "places",
},
["former names of political divisions!"] = {
full_category_link = "[[former]] [[name]]s of [[political]] [[division]]s (states, provinces, counties, etc.) that generally still exist but under a different name",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former names of places",
},
["former names of polities!"] = {
full_category_link = "[[former]] [[name]]s of [[polity|polities]] (e.g. [[country|countries]]) that generally still exist but under a different name",
bare_category_breadcrumb = "polities",
bare_category_parent = "former names of places",
},
["former names of settlements!"] = {
full_category_link = "[[former]] [[name]]s of [[city|cities]], [[town]]s, [[village]]s, etc. that generally still exist but under a different name",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former names of political divisions",
},
["FORMER_NAME_OF capital"] = {
link = false,
default = {"Former names of capitals"},
},
["FORMER_NAME_OF country"] = {
link = false,
default = {"Former names of countries"},
},
["FORMER_NAME_OF place"] = {
link = false,
default = {"Former names of places"},
},
["FORMER_NAME_OF polity"] = {
link = false,
default = {"Former names of polities"},
},
["FORMER_NAME_OF region"] = {
link = false,
fallback = "FORMER_NAME_OF subpolity",
},
["FORMER_NAME_OF settlement"] = {
link = false,
default = {"Former names of settlements"},
},
["FORMER_NAME_OF subpolity"] = {
link = false,
default = {"Former names of political divisions"},
},
---------- Former nicknames ----------
["former nicknames for cities!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[city|cities]], e.g. the [[Eternal City]] for [[Kyoto]] during the {{w|Heian period}} ({{circa2|800–1100|short=yes}} {{AD}})",
bare_category_breadcrumb = "cities",
bare_category_parent = "former nicknames for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["former nicknames for places!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "former",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {{name = "former names of places", sort = "nicknames"}},
},
["FORMER_NICKNAME_FOR capital"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR city"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR place"] = {
link = false,
default = {"Former nicknames for places"},
},
["FORMER_NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR town"] = {
link = false,
default = {"Former nicknames for cities"},
},
---------- Former official names ----------
["former official names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former official names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "official"}},
},
["former official names of places!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "former names of places",
},
["FORMER_OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Former official names of countries"},
},
["FORMER_OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Former official names of places"},
},
---------- Long-form names ----------
["long-form names of countries!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "long-form names of places",
},
["long-form names of places!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form names",
bare_category_parent = "places",
},
["LONG_FORM_OF country"] = {
link = false,
default = {"Long-form names of countries"},
},
["LONG_FORM_OF place"] = {
link = false,
default = {"Long-form names of places"},
},
---------- Nicknames ----------
["nicknames for cities!"] = {
full_category_link = "[[nickname]]s for [[city|cities]], e.g. the [[Big Apple]] for [[New York City]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"cities"},
},
["nicknames for continents!"] = {
full_category_link = "[[nickname]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"continents"},
},
["nicknames for countries!"] = {
full_category_link = "[[nickname]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"quốc gia"},
},
["nicknames for places!"] = {
full_category_link = "[[nickname]]s for [[place]]s",
bare_category_breadcrumb = "places",
bare_category_parent = "nicknames",
addl_bare_category_parents = {"places"},
},
["nicknames for states!"] = {
-- For categorizing nicknames for states of e.g. the United States
full_category_link = "[[nicknames]] for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"states"},
},
["NICKNAME_FOR capital"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR city"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR continent"] = {
link = false,
default = {"Nicknames for continents"},
},
["NICKNAME_FOR country"] = {
link = false,
default = {"Nicknames for countries"},
},
["NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR place"] = {
link = false,
default = {"Nicknames for places"},
},
["NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR state"] = {
link = false,
default = {"Nicknames for states"},
},
["NICKNAME_FOR town"] = {
link = false,
default = {"Nicknames for cities"},
},
---------- Obsolete forms ----------
["obsolete forms of places!"] = {
full_category_link = "{{glossary|obsolete}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "obsolete forms",
bare_category_parent = "places",
},
["OBSOLETE_FORM_OF place"] = {
link = false,
default = {"Obsolete forms of places"},
},
---------- Official names ----------
["official names of countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of places",
},
["official names of former countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of former places",
},
["official names of former places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "official names",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "official names of places", sort = "former"}},
},
["official names of places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official names",
bare_category_parent = "places",
},
["OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Official names of countries"},
},
["OFFICIAL_NAME_OF FORMER country"] = {
link = false,
default = {"Official names of former countries"},
},
["OFFICIAL_NAME_OF FORMER place"] = {
link = false,
default = {"Official names of former places"},
},
["OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Official names of places"},
},
---------- Official nicknames ----------
["official nicknames for places!"] = {
full_category_link = "[[official]] [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for places",
},
["official nicknames for states!"] = {
-- For categorizing official nicknames for states of e.g. the United States
full_category_link = "[[official]] [[nicknames]] for [[state]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for states",
addl_bare_category_parents = {"states"},
},
["OFFICIAL_NICKNAME_FOR place"] = {
link = false,
default = {"Official nicknames for places"},
},
["OFFICIAL_NICKNAME_FOR state"] = {
link = false,
default = {"Official nicknames for states"},
},
}
export.plural_placetype_to_singular = {}
for sg_placetype, spec in pairs(export.placetype_data) do
if spec.plural then
export.plural_placetype_to_singular[spec.plural] = sg_placetype
end
end
return export
7568mi1xsu3njnfxly39mjl59w0cwi0
2350253
2350245
2026-05-05T10:17:49Z
TheHighFighter2
42988
2350253
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true for testing
local m_locations = require("Module:place/locations")
local m_links = require("Module:links")
local m_table = require("Module:table")
local m_strutils = require("Module:string utilities")
local debug_track_module = "Module:debug/track"
local en_utilities_module = "Module:en-utilities"
local dump = mw.dumpObject
local insert = table.insert
local concat = table.concat
local internal_error = m_locations.internal_error
export.internal_error = internal_error
local process_error = m_locations.process_error
export.process_error = process_error
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local ucfirst = m_strutils.ucfirst
local ulower = m_strutils.lower
local rmatch = m_strutils.match
local split = m_strutils.split
--[==[ intro:
This module contains placetype data used by [[Module:place]] and {{tl|place}}, along with a significant amount of code
to work with both placetypes and locations, as well as some placename-related info (FIXME: Consider moving it to
[[Module:place/locations]]). See also [[Module:place/locations]], which has definitions of all known locations. You must
currently load this module using {{cd|require()}}, not using {{cd|mw.loadData()}}.
In particular, it contains two fundamental and tricky functions:
# `get_placetype_equivs`, which finds the equivalent placetypes to look under in order to find a given property, and in
the process correctly handles placetypes with qualifiers (including qualifiers that act similar to "type-raising"
operators in that they do something non-trivial to the placetype to their right) as well as form-of directives and
fallbacks.
# `find_matching_holonym_location`, which looks up a holonym to find a matching known location, but in the process
checks holonyms to the right to make sure there isn't a clash between the user-specified containing holonyms and the
containers of the known location being considered. This is done to prevent overcategorizing when either there are two
known locations with the same name (e.g. Birmingham in England and Birmingham, Alabama in the US), or more generally
two locations with the same name, one of which is a known location but where the other is not (e.g. we're processing
non-known-location Mérida, Spain and don't want it categorized like known location Mérida, Yucatán, Mexico).
Both of these functions are invoked repeatedly, and probably are invoked several times on the same inputs and as a
result are candidates for memoization to speed up the operation of {{tl|place}}.
]==]
------------------------------------------------------------------------------------------
-- Basic utilities --
------------------------------------------------------------------------------------------
--[==[
Return true if `force_cat` is set either in this module or in [[Module:place/locations]].
]==]
function export.get_force_cat()
return export.force_cat or m_locations.force_cat
end
-- Add the page to a tracking "category". To see the pages in the "category",
-- go to [[Wiktionary:Tracking/place/PAGE]] and click on "What links here".
local function track(page)
require(debug_track_module)("place/" .. page)
return true
end
function export.remove_links_and_html(text)
text = m_links.remove_links(text)
return text:gsub("<.->", "")
end
--[==[
Return the singular version of a maybe-plural placetype, or nil if not plural. This correctly handles placetypes with
irregular plurals such as `kibbutzim` plural of `kibbutz` by looking up in a table constructed from the `plural` values
specified in `placetype_data`. If a special plural value is not found, the regular singularization algorithm in
[[Module:en-utilities]] is invoked, which reverses the y -> ies change after vowels and the 'es' addition after sh/ch/x,
and otherwise just subtracts a final 's' (which will incorrectly generate 'passe' for plural 'passes'; FIXME: consider
changing this for words ending in '-sses'). If the generated singular is the same as the passed-in value, nil is
returned.
]==]
function export.maybe_singularize_placetype(placetype)
if not placetype then
return nil
end
if export.plural_placetype_to_singular[placetype] then
return export.plural_placetype_to_singular[placetype]
end
local retval = require(en_utilities_module).singularize(placetype)
if retval == placetype then
return nil
end
return retval
end
-- Return the correct plural of a placetype, and (if `do_ucfirst` is given) make the first letter uppercase. We first
-- look up the plural in `placetype_data`, falling back to pluralize() in [[Module:en-utilities]], which is almost
-- always correct.
function export.pluralize_placetype(placetype, do_ucfirst)
local ptdata = export.placetype_data[placetype]
if ptdata and ptdata.plural then
placetype = ptdata
else
placetype = placetype
end
if do_ucfirst then
return ucfirst(placetype)
else
return placetype
end
end
--[==[
Get the data associated with a placetype, which may be in its singular or plural form. If `from_category` is specified,
we also look for category-only placetypes (generally plural) followed by `!`. Return three values: (a) the placetype
under which the data can be looked up (i.e. in its singular form if the passed-in `placetype` is plural and did not
match a category-only placetype followed by `!`); (b) the placetype data structure; (c) the type of `placetype` match
that occurred, one of `"direct"` if the canonical placetype is the same as the passed-in `placetype` and also the same
as the key under which `ptdata` was looked up, or `"direct-category"` if the `ptdata` was looked up under a key formed
from the passed-in `placetype` by adding `!`, or `"plural"` if the `ptdata` was looked up under the singularized version
of the plural passed-in `placetype`.
]==]
function export.get_placetype_data(placetype, from_category)
local ptdata = export.placetype_data[placetype]
if ptdata then
return placetype, ptdata, "direct"
end
if from_category then
ptdata = export.placetype_data[placetype .. "!"]
if ptdata then
return placetype .. "!", ptdata, "direct-category"
end
end
local sg_placetype = export.maybe_singularize_placetype(placetype)
if sg_placetype then
ptdata = export.placetype_data[sg_placetype]
if ptdata then
return sg_placetype, ptdata, "plural"
end
end
return nil
end
--[==[
Check for special pseudo-placetypes that should be ignored for categorization purposes.
]==]
function export.placetype_is_ignorable(placetype)
return placetype == "and" or placetype == "or" or placetype:find("^%(")
end
function export.resolve_placetype_aliases(placetype)
return export.placetype_aliases[placetype] or placetype
end
--[==[
Return a property from `placetype_data` for a given placetype. If the placetype isn't found in `placetype_data`, or the
key isn't found in the placetype's entry in `placetype_data`, return nil.
]==]
function export.get_placetype_prop(placetype, key)
-- Usually we are called on equivalent placetypes returned from `get_placetype_equivs`, in which case placetype
-- aliases have been resolved, but sometimes not, e.g. when fetching the indefinite article in
-- get_placetype_article(). `resolve_placetype_aliases` is just a simple lookup and it doesn't hurt to do it twice.
placetype = export.resolve_placetype_aliases(placetype)
if export.placetype_data[placetype] then
return export.placetype_data[placetype][key]
else
return nil
end
end
--[==[
Given a placetype, split the placetype into one or more potential ''splits'', each consisting of a three-element list
{ {``prev_qualifiers``, ``this_qualifier``, ``reduced_placetype``}}, i.e.
# the concatenation of zero or more previously-recognized qualifiers on the left, normally canonicalized (if there are
zero such qualifiers, the value will be nil);
# a single recognized qualifier, normally canonicalized (if there is no qualifier, the value will be nil);
# the "reduced placetype" on the right.
Splitting between the qualifier in (2) and the reduced placetype in (3) happens at each space character, proceeding from
left to right, and stops if a qualifier isn't recognized. All placetypes are canonicalized by checking for aliases
in `placetype_aliases`, but no other checks are made as to whether the reduced placetype is recognized. Canonicalization
of qualifiers does not happen if `no_canon_qualifiers` is specified.
For example, given the placetype `"small beachside unincorporated community"`, the return value will be
{ {
{nil, nil, "small beachside unincorporated community"},
{nil, "small", "beachside unincorporated community"},
{"small", "[[beachfront]]", "unincorporated community"},
{"small [[beachfront]]", "[[unincorporated]]", "community"},
}}
Here, `"beachside"` is canonicalized to `"[[beachfront]]"` and `"unincorporated"` is canonicalized to
`"[[unincorporated]]"`, in both cases according to the entry in `placetype_qualifiers`.
On the other hand, if given `"small former haunted community"`, the return value will be
{ {
{nil, nil, "small former haunted community"},
{nil, "small", "former haunted community"},
{"small", "former", "haunted community"},
}}
because `"small"` and `"former"` but not `"haunted"` are recognized as qualifiers.
Finally, if given `"former adr"`, the return value will be
{ {
{nil, nil, "former adr"},
{nil, "former", "administrative region"},
}}
because `"adr"` is a recognized placetype alias for `"administrative region"`.
]==]
function export.split_qualifiers_from_placetype(placetype, no_canon_qualifiers)
local splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
local prev_qualifier = nil
while true do
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if canon == nil then
break
end
local new_qualifier = qualifier
if type(canon) == "table" then
canon = canon.link
end
if not no_canon_qualifiers and canon ~= false then
if canon == true then
new_qualifier = "[[" .. qualifier .. "]]"
else
new_qualifier = canon
end
end
insert(splits, {prev_qualifier, new_qualifier, export.resolve_placetype_aliases(reduced_placetype)})
prev_qualifier = prev_qualifier and prev_qualifier .. " " .. new_qualifier or new_qualifier
placetype = reduced_placetype
else
break
end
end
return splits
end
--[==[
Given a `placetype` (which may be pluralized), return an ordered list of equivalent placetypes to look under to find the
placetype's properties (such as the category or categories to be inserted). The return value is actually an ordered list
of objects of the form `{qualifier=``qualifier``, placetype=``equiv_placetype``}` where ``equiv_placetype`` is a
placetype whose properties to look up, derived from the passed-in placetype or from a contiguous subsequence of the
words in the passed-in placetype (always including the rightmost word in the placetype, i.e. we successively chop off
qualifier words from the left and use the remainder to find equivalent placetypes). ``qualifier`` is the remaining words
not part of the subsequence used to find ``equiv_placetype``; or nil if all words in the passed-in placetype were used
to find ``equiv_placetype``. (FIXME: This qualifier is not currently used anywhere.) Only placetypes for which there is
an entry in `placetype_data` are included. The placetype passed in is always checked first, and will form the first
entry if it exists in `placetype_data`.
'''NOTE:''' This is a tricky function as it implements handling of (a) qualifiers, (b) fallback logic, (c)
"type-raising" qualifiers such as `former`/`ancient`/etc. as well as `fictional` and `mythological`, and (d) form-of
directives, which act somewhat similarly to `former`, and allows interaction between more than one of these
simultaneously (e.g. official names of former places, which have their own categorization).
If {{tl|place}} gets too slow, one potential speedup is to memoize the results of this function, as it appears to be
getting called more than once on the same inputs. Another similar potential speedup is to memoize the results of
`iterate_matching_holonym_location()`.
For example, given the placetype `left tributary`, the following placetype/qualifier combinations are checked in turn:
```
{qualifier = nil, placetype="left tributary"}
{qualifier = "left", placetype="tributary"}
{qualifier = "left", placetype="river"}
```
and the return value will be
{ {
{qualifier = "left", placetype="tributary"},
{qualifier = "left", placetype="river"},
}}
The algorithm first enters the placetype itself into the list, then checks for `left tributary` as a recognized
placetype in `placetype_data` and doesn't find it, so it doesn't enter it into the returned list (if it found it, it
would add it as well as any fallbacks directly after it). It then splits off the recognized qualifier `left` to form the
''reduced placetype'' `tributary`, which is entered into the list because it is found in `placetype_data`. Then, because
it has a fallback `river`, which exists in `placetype_data`, the fallback is entered next.
Another example is `small rural fraziones` (where a ''frazione'' is type of subdivision of a ''comune'' or municipality,
often specifically an outlying hamlet). the placetype/qualifier combinations checked are:
```
{qualifier = nil, placetype="small rural fraziones"}
{qualifier = nil, placetype="small rural frazione"}
{qualifier = "small", placetype="rural fraziones"}
{qualifier = "small", placetype="rural frazione"}
{qualifier = "small [[rural]]", placetype="fraziones"}
{qualifier = "small [[rural]]", placetype="frazione"}
{qualifier = "small [[rural]]", placetype="hamlet"}
{qualifier = "small [[rural]]", placetype="village"}
```
The return value ends up as
{qualifier = "small [[rural]]", placetype="frazione"},
{qualifier = "small [[rural]]", placetype="hamlet"},
{qualifier = "small [[rural]]", placetype="village"},
}}
Here, because the result of singularizing `fraziones` returns a different value from the placetype itself, that
singularized value is checked after the original plural value. Also, in the process of splitting off qualifiers,
they are canonicalized if the entry in `placetype_qualifiers` says to do so; in this case, links are placed around
`rural`. Finally, `frazione` has `hamlet` as its fallback, which in turn has `village` as its fallback, so both
fallbacks end up being returned.
`no_fallback`, if set, disables returning equivalent placetypes based on the `fallback` setting for a placetype. This is
used in the first of two loops in find_placetype_cat_specs() in [[Module:place]] to prefer exact matches for placetypes
such as barangays with later holonyms to matches based on a fallback such as `neighborhood` with an earlier holonym.
See the comment in that function in [[Module:place]] for a more detailed explanation of why this is needed. Only the
placetype itself, and any reduced placetypes created by chopping off recognized qualifiers at the beginning, are
returned; but we do not return reduced placetypes if a containing placetype exists in `placetype_data`. (For example,
`"overseas territory"` has a fallback `"dependent territory"`, and `"overseas"` is also a recognized qualifier. When
`no_fallback` is in place, without the above proviso, we would return `"overseas territory"` followed by `"territory"`
with the incorrect effect of classifying an `"overseas territory"` of the United Kingdom such as `"Gibraltar"` under
[[:Category:Territories of the United Kingdom]] instead of [[:Category:Dependent territories of the United Kingdom]].)
As an exception, if `historical`, `ancient`, `former` or the like are found, they proceed ignoring `no_fallback`,
because it seems tricky to handle them correctly in the presence of `no_fallback`, and historical/former placetypes
rarely occur with exact match category specs anyway.
`no_split_qualifiers` prevents splitting off recognized qualifiers and returning the remainder of the placetype as an
equivalent placetype. Only the passed-in placetype, and any fallbacks, will be returned. This is used in
[[Module:category tree/topic cat/data/Places]] when looking up placetypes found in categories. Such placetypes won't
have qualifiers and so it doesn't make sense to try and look for them.
`from_category`, if set, causes category-only placetypes (those ending in `!`) to also be checked.
`form_of_directive`, if set, causes the specified form-of directive (e.g. `FORMER_NAME_OF`) to be prepended to checked
placetypes, their directive-specific type (e.g. `FORMER_NAME_OF_type`), and their classes (`class`) to get the
appropriate placetypes to check for form-of-directive categories. It falls back to the prepended generic `place` as a
placetype, e.g. `FORMER_NAME_OF place`, if nothing else matches.
`no_check_for_inherently_former` is used internally to prevent an infinite loop when checking for `inherently_former`.
`register_former_as_non_former` is a major hack used in `get_bare_categories` to deal with the mismatch between e.g.
known location `Yugoslavia` declaring itself a `country` but definitions of it declaring it a `former country`. It
causes the non-former version of the specified placetype to be included in the returned equivalents along with the
former placetypes. [FIXME: This should apply only to the entries in `former_countries` but it's tricky to do that now;
fix this in the known-location refactor. -- The known-location refactor is already done but we haven't yet fixed this.]
]==]
function export.get_placetype_equivs(placetype, props)
local no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former
local form_of_directive
if props then
no_fallback, no_split_qualifiers, no_check_for_inherently_former, from_category, register_former_as_non_former =
props.no_fallback, props.no_split_qualifiers, props.no_check_for_inherently_former, props.from_category,
props.register_former_as_non_former
form_of_directive = props.form_of_directive
end
local equivs = {}
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. `qualifier` is
-- the preceding qualifier to insert into `equivs` along with the placetype (see comment at top of function). If
-- `from_category` is given, we also check for a category-specific entry consisting of the placetype followed by
-- `!`, and in all cases we also check to see if `placetype` is plural, and if so, insert the singularized version
-- along with its fallbacks (if any) in `placetype_data`. `form_of_prefix` is a form-of prefix such as
-- `OFFICIAL_NAME_OF`. If specified, we check the fallbacks of `placetype` without the prefix but then insert into
-- `equivs` the prefixed placetype. This way, if the user says e.g. {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}},
-- we will correctly categorize into [[:Category:Official names of countries]], rather than only trying to look up
-- `OFFICIAL_NAME_OF island country` and failing, falling back ultimately to [[:Category:Official names of places]].
local function insert_placetype_and_fallbacks(qualifier, placetype, form_of_prefix)
local function insert_equiv(pt)
if form_of_prefix then
-- Let's say the user says {{tl|place|pt|@official name of:Cuba|island country|r/Caribbean}} and we have
-- no entry for `OFFICIAL_NAME_OF island country` but we do for `OFFICIAL_NAME_OF country` (which we end
-- up processing because `island country` falls back to `country`), and that entry in turn is defined
-- using a fallback. We have to insert that fallback-of-fallback, and the easiest/cleanest way of
-- handling this is by calling ourselves recursively.
insert_placetype_and_fallbacks(qualifier, form_of_prefix .. " " .. pt)
else
insert(equivs, {qualifier=qualifier, placetype=pt})
end
end
-- Insert the placetype, along with any fallbacks.
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if ptdata then
insert_equiv(canon_placetype)
if no_fallback then
return
end
local first_placetype = #equivs + 1
local prev_placetype = nil
while true do
local pt_value = export.placetype_data[canon_placetype]
if not pt_value then
internal_error("Fallback value %s specified for placetype %s but is not in `placetype_data`",
canon_placetype, prev_placetype)
end
if pt_value.fallback then
insert_equiv(pt_value.fallback)
local last_placetype = #equivs
if last_placetype - first_placetype >= 10 then
local fallback_loop = {}
for i = first_placetype, last_placetype do
insert(fallback_loop, equivs[i].placetype)
end
internal_error("Apparent loop in fallback chain: %s", table.concat(fallback_loop, " -> "))
end
prev_placetype = canon_placetype
canon_placetype = pt_value.fallback
else
break
end
end
end
end
-- Insert `placetype` into `equivs`, along with any fallback placetypes listed in `placetype_data`. This is a
-- wrapper around the more basic `insert_placetype_and_fallbacks()` which handles form-of directives. If there is no
-- form-of directive, this function directly calls `insert_placetype_and_fallbacks()`. We do things this way so that
-- form-of directives correctly combine with `former`-type qualifiers. Note that we also have special backups for
-- form-of directives that check `DIRECTIVE place` (and before that, `DIRECTIVE FORMER/ANCIENT place` is there's a
-- `former`-type directive); these backups live outside this function because we want them done once, late, rather
-- than in each invocation of `process_and_insert_placetype()`.
local function process_and_insert_placetype(qualifier, reduced_placetype)
if form_of_directive then
-- First check for e.g. `OFFICIAL_NAME_OF island country` and its fallbacks; then we look for fallbacks of
-- `island country` and check e.g. `OFFICIAL_NAME_OF country` and its fallbacks. All of this is handled by
-- `insert_placetype_and_fallbacks()` with appropriate parameters. After that, check the general class of
-- the directive, e.g. `subpolity` if something like `district` is given. (Eventually, we check for
-- `OFFICIAL_NAME_OF place` as a backup, but this happens at the end outside the loop over qualifiers.)
insert_placetype_and_fallbacks(qualifier, reduced_placetype, form_of_directive)
if not no_fallback then
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype)
local directive_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, form_of_directive .. "_type") or
export.get_placetype_prop(pt, "class") end
)
if not directive_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s in conjunction with form-of directive %s, placetype data " ..
'located but directive-specific type property %s missing, and so is "class"; ' ..
"placetypes searched are %s", reduced_placetype, form_of_directive,
form_of_directive .. "_type", reduced_placetype_equivs)
else
-- This should be allowed, as we allow unrecognized placetypes in general.
end
elseif directive_type ~= "!" then
insert_placetype_and_fallbacks(qualifier, directive_type, form_of_directive)
end
end
else
insert_placetype_and_fallbacks(qualifier, reduced_placetype)
end
end
-- Successively split off recognized qualifiers and loop over successively greater sets of qualifiers from the left
-- (unless `no_split_qualifiers` is specified, in which case we don't check for qualifiers).
local splits
if no_split_qualifiers then
splits = {{nil, nil, export.resolve_placetype_aliases(placetype)}}
else
splits = export.split_qualifiers_from_placetype(placetype)
end
for _, split in ipairs(splits) do
local prev_qualifier, this_qualifier, reduced_placetype = unpack(split, 1, 3)
-- If a special "former" qualifier like `former` or `historical` isn't present, and
-- `no_check_for_inherently_former` is not given (this flag is used to avoid infinite loops), check for
-- "inherently former" placetypes like `satrapy` and `treaty port` that always refer to no-longer-existing
-- placetypes, and handle accordingly.
local unlinked_this_qualifier
if this_qualifier and this_qualifier:find("%[") then
unlinked_this_qualifier = export.remove_links_and_html(this_qualifier)
else
unlinked_this_qualifier = this_qualifier
end
local former_qualifiers = this_qualifier and export.former_qualifiers[unlinked_this_qualifier] or nil
if not former_qualifiers and not no_check_for_inherently_former then
former_qualifiers = export.get_equiv_placetype_prop(reduced_placetype,
function(pt) return export.get_placetype_prop(pt, "inherently_former") end,
{no_check_for_inherently_former = true})
end
-- If a special "former" qualifier like `former` or `historical` is present, map it to the appropriate internal
-- qualifiers (`ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
-- qualifiers), fetch the `former_type` property, and treat the placetype as if a concatenation of the mapped
-- qualifier(s) and the value of `former_type`. For example, if `medieval village` is given, we map `medieval`
-- to `ANCIENT` and `FORMER`, and `village` to its `former_type` of `settlement`, and enter the placetypes
-- `ANCIENT settlement` and `FORMER settlement` (in that order) into `equivs`. If the placetype following the
-- "former" qualifier is recognized in `placetype_data` but has no `former_type` and no fallback with a
-- `former_type` specified, it is an internal error; but if the placetype isn't recognized (e.g. something like
-- `former greenhouse` is specified and we don't have an entry for `greenhouse`), just track the occurrence and
-- don't enter anything into `equivs`.
if former_qualifiers then
-- FIXME: Should we respect `no_fallback` here? My instinct says no.
local reduced_placetype_equivs = export.get_placetype_equivs(reduced_placetype, {
no_check_for_inherently_former = true
})
local former_type = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.get_placetype_prop(pt, "former_type") or
export.get_placetype_prop(pt, "class") end
)
if not former_type then
local pt_data = export.get_equiv_placetype_prop_from_equivs(reduced_placetype_equivs,
function(pt) return export.placetype_data[pt] end
)
if pt_data then
internal_error("For placetype %s, placetype data located but `former_type` missing; " ..
"placetypes searched are %s", reduced_placetype, reduced_placetype_equivs)
else
-- Enable error when we've verified there aren't any examples.
track("bad-former-placetype")
track("bad-former-placetype/" .. reduced_placetype)
--process_error("For placetype '%s', unrecognized placetype following 'former'-type " ..
-- "qualifier; searched placetype(s) %s", reduced_placetype, dump(reduced_placetype_equivs))
end
elseif former_type ~= "!" then
-- First check directly for `ANCIENT/FORMER` + the original following placetype. This makes it possible
-- for (e.g.) former provinces of the Roman empire to be categorized specially.
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. reduced_placetype)
end
for _, former_qualifier in ipairs(former_qualifiers) do
process_and_insert_placetype(prev_qualifier, former_qualifier .. " " .. former_type)
end
-- HACK! See explanation above for `register_former_as_non_former`.
if register_former_as_non_former then
process_and_insert_placetype(prev_qualifier, reduced_placetype)
end
-- If we're processing a form-of directive, after doing everything else we do
-- `DIRECTIVE ANCIENT/FORMER place` e.g. `OFFICIAL_NAME_OF FORMER place` as a backup.
if form_of_directive and not no_fallback then
for _, former_qualifier in ipairs(former_qualifiers) do
insert_placetype_and_fallbacks(prev_qualifier, form_of_directive .. " " .. former_qualifier ..
" place")
end
end
-- Don't continue processing equivs. The reason is probably the same as the `break` below for
-- qualifier_to_placetype_equivs[]; categories for `former BLAH` are set using `default`, and
-- non-former equivs will otherwise take precedence.
break
end
end
-- Then see if the rightmost split-off qualifier is in qualifier_to_placetype_equivs
-- (e.g. 'fictional *' -> 'fictional location'). If so, add the mapping.
if this_qualifier and export.qualifier_to_placetype_equivs[unlinked_this_qualifier] then
insert(equivs, {
qualifier=prev_qualifier,
placetype=export.qualifier_to_placetype_equivs[unlinked_this_qualifier]
})
-- Don't continue processing equivs; otherwise, if we specify 'mythological city', even though the
-- equivalent entry for 'mythological location' gets inserted ahead of the entry for 'city', the
-- latter ends up generating the category because the category for 'mythological location' is set as
-- the default value, which is used only when no non-default category can be found.
break
end
-- Finally, join the rightmost split-off qualifier to the previously split-off qualifiers to form a combined
-- qualifier, and add it along with reduced_placetype and any mapping in placetype_data for reduced_placetype.
-- NOTE: The first time through this loop, both `prev_qualifier` and `this_qualifier` are nil, and this inserts
-- the full placetype into `equivs`.
local qualifier = prev_qualifier and prev_qualifier .. " " .. this_qualifier or this_qualifier
process_and_insert_placetype(qualifier, reduced_placetype)
-- If `no_fallback` and there's an entry in `placetype_data` for this placetype, don't include any reduced
-- placetypes to avoid the "overseas territory treated as a territory" issue describe above.
if no_fallback then
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(reduced_placetype, from_category)
if canon_placetype then
break
end
end
end
-- If we're processing a form-of directive, after doing everything else we do `DIRECTIVE place` e.g.
-- `OFFICIAL_NAME_OF place` as a backup; but only if either the placetype as a whole is recognized or the placetype
-- begins with a recognized qualifier. This latter check is to avoid categorizing into e.g.
-- [[Category:en:Former names of places]] in an invocation like
-- {{place|en|@former name of:Democratic Republic of the Congo|country|r/Central Africa|;|used from 1971–1997}};
-- the `used from 1971–1997` gets treated as a placetype and we're called on it.
if form_of_directive and not no_fallback and (splits[2] or export.get_placetype_data(placetype, from_category)) then
insert_placetype_and_fallbacks(nil, form_of_directive .. " place")
end
return equivs
end
function export.get_equiv_placetype_prop_from_equivs(equivs, fun, continue_on_nil_only)
for _, equiv in ipairs(equivs) do
local retval = fun(equiv.placetype)
if continue_on_nil_only and retval ~= nil or not continue_on_nil_only and retval then
return retval, equiv
end
end
return nil, nil
end
--[==[
Given a placetype `placetype` and a function `fun` of one argument, iteratively call the function on equivalent
placetypes fetched from `get_placetype_equivs` until the function returns a non-falsy value (i.e. not {nil} or {false});
but if `continue_on_nil_only` is specified, the iterations continue until the function returns non non-{nil} value.
FIXME: We should make `continue_on_nil_only` the default; but this requires changing some callers.) When `fun` returns a
non-falsy or non-{nil} value, `get_equiv_placetype_prop` returns two values: the value returned by `fun` and the
equivalent placetype that triggered the non-falsy (or non-{nil}) return value. If `fun` never returns a non-falsy (or
non-{nil}) value, `get_equiv_placetype_prop` returns {nil} for both return values. If `placetype` is passed in as {nil},
the return value is the result of calling `fun` on {nil} (whatever it is) with {nil} for the second return value.
]==]
function export.get_equiv_placetype_prop(placetype, fun, props)
if not placetype then
return fun(nil), nil
end
return export.get_equiv_placetype_prop_from_equivs(export.get_placetype_equivs(placetype, props), fun,
props and props.continue_on_nil_only)
end
--[==[
Return the article that is used with an entry placetype. We proceed as follows:
# See if there is a recognized qualifier at the beginning that specifies an article (including `false` for no article).
This takes precedence over anything else, so that e.g. `various capitals` gets no article rather than "`the"`.
# Then check the placetype or any equivalent placetype for the `entry_placetype_use_the` property, indicating that
`"the"` should be used.
# Otherwise we look to see if the placetype itself (not any equivalents, even those involving deleting a qualifier from
the beginning) has an entry in `placetype_data` that specifies the indefinite article using `entry_placetype_use_the`
(principally for use with placetypes like `union territory`).
# Otherwise, we use [[Module:en-utilities]] to apply the standard algorithm to generate `"an"` for words beginning with
a vowel and `"a"` otherwise.
If `ucfirst` is true, the first letter of the article is made upper-case.
]==]
function export.get_placetype_article(placetype, ucfirst)
local art
local qualifier, reduced_placetype = placetype:match("^(.-) (.*)$")
if qualifier then
local canon = export.placetype_qualifiers[qualifier]
if type(canon) == "table" then
art = canon.article
end
end
if art == false then
return art
end
if art == nil then
local placetype_use_the = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "entry_placetype_use_the") end)
if placetype_use_the then
art = "tên"
else
art = export.get_placetype_prop(placetype, "entry_placetype_indefinite_article")
if not art then
art = require(en_utilities_module).get_indefinite_article(placetype)
end
end
end
if ucfirst then
art = m_strutils.ucfirst(art)
end
return art
end
--[==[
Return the preposition that should be used after `placetype` when occurring as an entry placetype or in categories
(e.g. `city >in< France` but `country >of< South America`). The preposition defaults to `"của"` if not specified.
]==]
function export.get_placetype_entry_preposition(placetype)
local pt_prep = export.get_equiv_placetype_prop(placetype,
function(pt) return export.get_placetype_prop(pt, "preposition") end
)
return pt_prep or "của"
end
--[==[
Given a place desc (see top of file) and a holonym object (see top of file), add a key/value into the place desc's
`holonyms_by_placetype` field corresponding to the placetype and placename of the holonym. For example, corresponding
to the holonym "c/Italy", a key with the list value {"Italy"} will be added to the place desc's
`holonyms_by_placetype` field. If there is already a key with that place type, the new placename will be added to the
end of the value's list.
]==]
function export.key_holonym_into_place_desc(place_desc, holonym)
if not holonym.placetype then
return
end
-- Key in equivalent placetypes, so that e.g. `cities/San Francisco` gets keyed under `city`; but don't do
-- fallbacks, as it doesn't seem correct for the "do other holonyms of the same placetype" algorithm to do holonyms
-- of different types just because they have the same fallback.
local equiv_placetypes = export.get_placetype_equivs(holonym.placetype, {no_fallback = true})
local unlinked_placename = holonym.unlinked_placename
for _, equiv in ipairs(equiv_placetypes) do
local placetype = equiv.placetype
if not place_desc.holonyms_by_placetype then
place_desc.holonyms_by_placetype = {}
end
if not place_desc.holonyms_by_placetype[placetype] then
place_desc.holonyms_by_placetype[placetype] = {unlinked_placename}
else
insert(place_desc.holonyms_by_placetype[placetype], unlinked_placename)
end
end
end
--[=[
Construct a formatted link from the raw link spec `link` given the canonical singular placetype `sg_placetype`. If the
placetype was originally plural, `orig_placetype` should contain this plural value; otherwise it should be nil. This
will construct the appropriate type of link that displays as `orig_placetype` (or otherwise `sg_placetype`) but links to
whatever the `link` spec specifies (which may be `sg_placetype`, a Wikipedia article, etc.). `ptdata` is the placetype
data structure for the placetype, and `from_category` indicates that we are generating the description of a category
(otherwise we are generating the display form of an entry placetype).
]=]
local function make_placetype_link(link, sg_placetype, orig_placetype, ptdata, from_category, noerror)
if not from_category and ptdata.disallow_in_entries then
if noerror then
return "[not meant to be specified directly, with warning: " .. ptdata.disallow_in_entries .. "]"
else
process_error("Placetype %s is not meant to be specified directly: " .. ptdata.disallow_in_entries, sg_placetype)
end
end
if link == nil then
internal_error("Placetype data present for placetype %s but no link= setting given", sg_placetype)
elseif link == true then
if orig_placetype then
return ("[[%s|%s]]"):format(sg_placetype, orig_placetype)
else
return ("[[%s]]"):format(sg_placetype)
end
elseif link == false then
process_error("Placetype %s is not meant to be specified directly, but is only for internal use", sg_placetype)
elseif link == "w" then
return ("[[w:%s|%s]]"):format(sg_placetype, orig_placetype or sg_placetype)
elseif link == "separately" then
if orig_placetype then
local sg_words = split(sg_placetype, " ")
local orig_words = split(orig_placetype, " ")
if #sg_words ~= #orig_words then
internal_error("Can't construct 'separately' link for plural placetype %s as original placetype %s " ..
"has different number of words", orig_placetype, sg_placetype)
else
for i = 1, #sg_words do
if sg_words[i] == orig_words[i] then
sg_words[i] = ("[[%s]]"):format(sg_words[i])
else
sg_words[i] = ("[[%s|%s]]"):format(sg_words[i], orig_words[i])
end
end
return concat(sg_words, " ")
end
else
return (sg_placetype:gsub("([^ ]+)", "[[%1]]"))
end
elseif link:find("^%+") then
link = link:sub(2) -- discard initial +
return ("[[%s|%s]]"):format(link, orig_placetype or sg_placetype)
elseif not orig_placetype then
return link
else
return link
end
end
--[==[
Get the display form of a placetype by looking it up in `placetype_data`. If the placetype is recognized, or is the
plural of a recognized placetype, the corresponding linked display form is returned (with plural placetypes displaying
as plural but linked to the singular form of the placetype). Otherwise, return nil. If we're generating the description
of a category, `category_type` should be set to one of `"top-level"` (for top-level categories like
[[:Category:Neighborhoods]]), `"noncity"` (for non-city categories like [[:Category:Neighborhoods in Illinois, USA]]) or
`"city"` (for city categories like [[:Category:Neighborhoods of Chicago]]). Otherwise, we're generating the description
for use in formatting a {{tl|place}} call, and category-only placetypes ending in `!` will be ignored, along with
special `category_link*` settings. `return_full` is used along with `category_type` and will preferably return the
"full" variant of category link settings, i.e. `full_category_link*`; if they don't exist, the `category_link*` value is
prepended with `"names of"`. `noerror` says to not throw an error when encountering entry placetypes that would be
disallowed.
]==]
function export.get_placetype_display_form(placetype, category_type, return_full, noerror)
local from_category = not not category_type
local canon_placetype, ptdata, ptmatch = export.get_placetype_data(placetype, from_category)
if canon_placetype then
local raw_link
local function is_linked_string(str)
return type(str) == "string" and str:find("%[%[")
end
if category_type then
local fetched_full
local function fetch_maybe_full(prop)
local retval = ptdata["full_" .. prop]
if retval ~= nil then
if return_full then
return retval, true
else
internal_error("Saw full_" .. prop .. "=%s but `return_full` not set, can't handle", retval)
end
end
return ptdata[prop], false
end
local function maybe_prefix(str)
if return_full and not fetched_full then
return "names of " .. str
else
return str
end
end
-- Careful with `false` as possible value.
if category_type == "top-level" then
raw_link, fetched_full = fetch_maybe_full("category_link_top_level")
elseif category_type == "noncity" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_noncity")
elseif category_type == "city" then
raw_link, fetched_full = fetch_maybe_full("category_link_before_city")
else
internal_error('Unrecognized value for `category_type` %s, should be "top-level", "noncity" or "city"',
category_type)
end
if type(raw_link) == "string" then
return maybe_prefix(raw_link), ptdata
elseif raw_link ~= nil then
return raw_link, ptdata
end
raw_link, fetched_full = fetch_maybe_full("category_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
if ptmatch == "plural" then
raw_link, fetched_full = fetch_maybe_full("plural_link")
if raw_link == false then
return raw_link, ptdata
end
if is_linked_string(raw_link) then
return maybe_prefix(raw_link), ptdata
end
end
if raw_link == nil then
raw_link, fetched_full = fetch_maybe_full("link")
end
if raw_link == false then
return raw_link, ptdata
end
return maybe_prefix(make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror)), ptdata
else
if ptmatch == "plural" then
raw_link = ptdata.plural_link
if raw_link == false then
process_error("Placetype %s cannot appear plural", placetype)
end
if is_linked_string(raw_link) then
return raw_link, ptdata
end
end
if raw_link == nil then
raw_link = ptdata.link
end
return make_placetype_link(raw_link, canon_placetype,
placetype ~= canon_placetype and placetype or nil, ptdata, from_category, noerror), ptdata
end
end
return nil
end
local function resolve_unlinked_placename_display_aliases(placetype, placename)
local equiv_placetypes = export.get_placetype_equivs(placetype)
for i, equiv in ipairs(equiv_placetypes) do
equiv_placetypes[i] = equiv.placetype
end
local all_display_aliases_found = {}
local all_others_found = {}
for group, key, spec in m_locations.iterate_matching_location {
placetypes = equiv_placetypes,
placename = placename,
alias_resolution = "display",
} do
if spec.alias_of and spec.display then
insert(all_display_aliases_found, {group, key, spec, spec.display_as_full})
else
insert(all_others_found, {group, key, spec})
end
end
if not all_display_aliases_found[1] then
return placename
elseif all_display_aliases_found[2] then
internal_error("Found multiple matching display aliases for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
elseif all_others_found[1] then
internal_error("Found a display alias along with other possible meanings for placename %s, placetype %s: " ..
"all_display_aliases_found=%s, all_others_found=%s", placename, placetype, all_display_aliases_found,
all_others_found)
else
local group, key, spec, as_full = unpack(all_display_aliases_found[1])
local full, elliptical = m_locations.key_to_placename(group, key)
return as_full and full or elliptical
end
end
--[==[
If `placename` of type `placetype` is a display alias, convert it to its canonical form; otherwise, return unchanged.
Display aliases transform certain placenames into canonical displayed forms. For example, if any of `country/US`,
`country/USA` or `country/United States of America` (or `c/US`, etc.) are given, the result will be displayed as
`United States`.
'''NOTE''': Display aliases change what is displayed from what the editor wrote in the Wikitext. As a result, they
should (a) be non-political in nature, and (b) not involve a change where the word `the` needs to be added or removed.
For example, normalizing `US` and `USA` to `United States` for display purposes is OK but normalizing `Burma` to
`Myanmar` is not (instead a cat alias should be used) because the terms `Burma` and `Myanmar` have clear political
connotations. Similarly, we have a display alias that maps the old name of `Macedonia` as a country (but not a region!)
to `North Macedonia`, but `Republic of Macedonia` is mapped to `North Macedonia` only as a cat alias because the two
terms differ in their use of `the`. (For example, if we had a display alias mapping `Republic of Macedonia` to
`North Macedonia`, the call {{tl|place|en|the <<capital city>> of the <<c/Republic of Macedonia>>}} would wrongly
display as `the [[capital city]] of the [[North Macedonia]]`.) Generally, display normalizations tend to involve
alternative forms (e.g. abbreviations, ellipses, foreign spellings) where the normalization improves clarity and
consistency.
]==]
function export.resolve_placename_display_aliases(placetype, placename)
-- If the placename is a link, apply the alias inside the link.
-- This pattern matches both piped and unpiped links. If the link is not piped, the second capture (linktext) will
-- be empty.
local link, linktext = rmatch(placename, "^%[%[([^|%[%]]+)|?([^|%[%]]-)%]%]$")
if link then
if linktext ~= "" then
local alias = resolve_unlinked_placename_display_aliases(placetype, linktext)
return "[[" .. link .. "|" .. alias .. "]]"
else
local alias = resolve_unlinked_placename_display_aliases(placetype, link)
return "[[" .. alias .. "]]"
end
else
return resolve_unlinked_placename_display_aliases(placetype, placename)
end
end
--[==[
Generate the "prefixed" version of a bare key, i.e. prefix it with `the` if correct for this key.
]==]
function export.get_prefixed_key(key, spec)
if spec.the then
return key
else
return key
end
end
-- Necessary for use by [[Module:place]]. FIXME: Reorganize the modules so this isn't necessary.
export.iterate_matching_location = m_locations.iterate_matching_location
--[=[
Iterator that iterates over holonyms in `place_desc`. If `first_holonym_index` is given, start iterating at the
specified holonym and stop either when there are no more holonyms or a holonym with modifier `:also` is found. If
`first_holonym_index` is nil or omitted, iterate over all holonyms regardless. If `include_raw_text_holonyms` is
specified, raw text holonyms (those not of the form `placetype/placename`) are returned as well; they can be identified
by the fact that the `placetype` field in the holonym structure is nil. Two values are returned at each iteration, the
holonym index and holonym structure, similar to `ipairs()`.
]=]
function export.get_holonyms_to_check(place_desc, first_holonym_index, include_raw_text_holonyms)
local stop_at_also = not not first_holonym_index
return function(place_desc, index)
while true do
index = index + 1
local this_holonym = place_desc.holonyms[index]
-- If we were passed in a starting holonym index, go up to but not including a holonym marked with `:also`
-- (continue_cat_loop); the categorization code will then restart the loop at that holonym. That holonym
-- will have `:also` marked on it, so make sure not to stop immediately if the first holonym is marked with
-- `:also`.
if not this_holonym or stop_at_also and index > first_holonym_index and this_holonym.continue_cat_loop then
return nil
end
-- If not placetype, we're processing raw text, which we normally want to skip.
if include_raw_text_holonyms or this_holonym.placetype then
return index, this_holonym
end
end
end, place_desc, first_holonym_index and first_holonym_index - 1 or 0
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, iterate over all
such known locations, returning for each location the corresponding key, spec and group as well as the trail of
ancestral containers. Unlike `iterate_matching_location()`, this specifically checks that there is no mismatch between
the location's containers at any level and any of the following holonyms in the {{tl|place}} spec. The fields in `data`
are:
* `holonym_placetype`: The placetype of the holonym. It can actually be a list of possible placetypes, as with
`iterate_matching_location()`.
* `holonym_placename`: The placename of the holonym.
* `holonym_index`: The index of the holonym among the holonyms in `place_desc`, or nil if the holonym is not among the
holonyms in `place_desc`. (If a holonym index is given, we check for container mismatches among the holonyms
following the specified index, stopping either when encountering a holonym marked with modifier `:also` or, if none
exist, when we run out of holonyms. If no holonym index is given, we check all holonyms for container mismatches.)
* `place_desc`: Description of the place; used for the holonyms, to check for container mismatches.
Returns four values: the location group, the canonical key by which the location is known, the spec object describing
the location and the trail of ancestral containers for the location. The first three values are the same as for
`iterate_matching_location`.
]==]
function export.iterate_matching_holonym_location(data)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
local matching_location_iterator = m_locations.iterate_matching_location {
placetypes = holonym_placetype,
placename = holonym_placename,
}
return function()
while true do
local group, key, spec = matching_location_iterator()
if not group then
return nil
end
local container_trail = {}
-- For each level of container, check that there are no mismatches (i.e. other location of the same
-- placetype) mentioned. We allow a mismatch at a given level if there's also a match with the container
-- at that level. For example, in the case of Kansas City, defined in [[Module:place/locations]] as a city
-- in Missouri, if we define it as {{tl|place|city|s/Missouri,Kansas}}, we ignore the mismatching state of
-- Kansas because the correct state of Missouri was also mentioned. But imagine we are defining Newark,
-- Delaware as {{tl|place|city|s/Delaware|c/US}} and (as is the case) we have an entry for Newark, New
-- Jersey in [[Module:place/locations]]. Just because the containing location `US` matches isn't enough,
-- because Newark, NJ also has New Jersey as a containing location and there's a mismatch at that level. If
-- there are no mismatches at any level we assume we're dealing with the right known location.
--
-- If at a given level there are multiple containing locations, we count a match if any holonym matches any
-- containing location, and a mismatch only if a holonym exists of the same placetype that doesn't match any
-- containing location.
local containers_mismatch = false
for containers in m_locations.iterate_containers(group, key, spec) do
insert(container_trail, containers)
local match_at_level = false
local mismatch_at_level = false
for other_holonym_index, other_holonym in export.get_holonyms_to_check(place_desc,
holonym_index and holonym_index + 1 or nil) do
local other_source_holonym = other_holonym.augmented_from_holonym
if other_source_holonym and other_source_holonym.placetype == holonym_placetype and
other_source_holonym.unlinked_placename ~= holonym_placename then
-- Ignore holonyms added during the augmentation process for other holonyms of the same
-- placetype as the placetype of the holonym we're considering. See comment in
-- augment_holonyms_with_container() for why we do this.
-- continue; grrr, no 'continue' in Lua
else
local holonym_matches_at_level = false
local holonym_exists_with_same_placetype = false
for _, container in ipairs(containers) do
if not container.spec.no_check_holonym_mismatch then
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
local placetypes = container.spec.placetype
if type(placetypes) ~= "table" then
placetypes = {placetypes}
end
local placetype_equivs = {}
for _, pt in ipairs(placetypes) do
m_table.extend(placetype_equivs, export.get_placetype_equivs(pt))
end
local this_holonym_matches = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype and
(other_holonym.unlinked_placename == full_container_placename or
other_holonym.unlinked_placename == elliptical_container_placename)
end
)
if this_holonym_matches then
holonym_matches_at_level = true
break
end
local this_holonym_exists_with_same_placetype = export.get_equiv_placetype_prop_from_equivs(
placetype_equivs, function(placetype)
return other_holonym.placetype == placetype
end
)
if this_holonym_exists_with_same_placetype then
-- We seem to have a mismatch at this level. But before we decide conclusively that this
-- is the case, check to see whether the putative mismatch is an alias and matches when
-- we resolve the alias.
for oh_group, oh_key, oh_spec, oh_container_trail in
export.iterate_matching_holonym_location {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = place_desc,
} do
local oh_full_placename, oh_elliptical_placename =
m_locations.key_to_placename(oh_group, oh_key)
if oh_full_placename == full_container_placename or
oh_elliptical_placename == elliptical_container_placename then
-- Alias matched when resolved.
this_holonym_matches = true
break
end
end
if this_holonym_matches then
-- Alias matched above when resolved.
holonym_matches_at_level = true
break
else
-- Not an alias, or doesn't match when resolved. We have a true mismatch.
holonym_exists_with_same_placetype = true
end
end
end
end
if holonym_matches_at_level then
match_at_level = true
break
end
if holonym_exists_with_same_placetype then
mismatch_at_level = true
end
end
end
if not match_at_level and mismatch_at_level then
containers_mismatch = true
break
end
end
if not containers_mismatch then
return group, key, spec, container_trail
end
end
end
end
--[==[
If the holonym in `data` (in the format as passed to a category handler) refers to a known location, find and return the
corresponding key, spec and group as well as the trail of ancestral containers. This is like
`iterate_matching_holonym_location()` but throws an error if more than one location matches. (An example where this
would happen is {{tl|place|en|neighborhood|city/Newcastle}}, because there are two known locations named Newcastle. To
fix this, specify additional following disambiguating holonyms, e.g.
{{tl|place|en|neighborhood|city/Newcastle|s/New South Wales}}.
]==]
function export.find_matching_holonym_location(data)
local all_found = {}
for group, key, spec, container_trail in export.iterate_matching_holonym_location(data) do
insert(all_found, {group, key, spec, container_trail})
end
if not all_found[1] then
return nil
elseif all_found[2] then
local holonym_placetype = data.holonym_placetype
if type(holonym_placetype) == "table" then
holonym_placetype = concat(holonym_placetype, ",")
end
local found_keys = {}
for _, found in ipairs(all_found) do
local _, key, _, _ = unpack(found)
insert(found_keys, key)
end
error(("Found multiple matching locations for holonym '%s/%s'; specify disambiguating context in the " ..
"containing holonyms: %s"):format(holonym_placetype, data.holonym_placename, dump(found_keys)))
else
return unpack(all_found[1])
end
end
------------------------------------------------------------------------------------------
-- Placename and placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
This is a map from aliases to their canonical forms. Any placetypes appearing as keys here will be mapped to their
canonical forms in all respects, including the display form. Contrast entries in 'placetype_data' with a fallback, which
applies to categorization and other processes but not to display.
The most important aliases are for holonym placetypes, particularly those that occur often such as "country", "state",
"province" and the like. Particularly long placetypes that mostly occur as entry placetypes (e.g.
"census-designated place") can be given abbreviations, but it is generally preferred to spell out the entry placetype.
Note also that we purposely avoid certain abbreviations that would be ambiguous (e.g. "d", which could variously be
interpreted as "department", "district" or "division").
]==]
export.placetype_aliases = {
["acomm"] = "autonomous community",
["adr"] = "administrative region",
["adterr"] = "administrative territory", -- Pakistan
["aobl"] = "autonomous oblast",
["aokr"] = "autonomous okrug",
["ap"] = "autonomous province",
["apref"] = "autonomous prefecture",
["aprov"] = "autonomous province",
["ar"] = "autonomous region",
["arch"] = "archipelago",
["arep"] = "autonomous republic",
["aterr"] = "autonomous territory",
["atu"] = "autonomous territorial unit",
["bor"] = "borough",
["c"] = "quốc gia",
["can"] = "canton",
["carea"] = "council area",
["cc"] = "constituent country",
["cdblock"] = "community development block",
["cdep"] = "Crown dependency",
["CDP"] = "census-designated place",
["cdp"] = "census-designated place",
["clcity"] = "county-level city",
["co"] = "county",
["cobor"] = "county borough",
["colcity"] = "county-level city",
["coll"] = "collectivity",
["comm"] = "community",
["cont"] = "lục địa",
["continent"] = "lục địa",
["contr"] = "continental region",
["contregion"] = "continental region",
["cpar"] = "civil parish",
["damun"] = "direct-administered municipality",
["dep"] = "dependency",
["department capital"] = "departmental capital",
["dept"] = "department",
["depterr"] = "dependent territory",
["dist"] = "district",
["distmun"] = "district municipality",
["div"] = "division",
["emp"] = "empire",
["fpref"] = "French prefecture",
["gov"] = "governorate",
["govnat"] = "governorate",
["home-rule city"] = "home rule city",
["home-rule municipality"] = "home rule municipality",
["inner-city area"] = "inner city area",
["ires"] = "Indian reservation",
["isl"] = "island",
["lbor"] = "London borough",
["lga"] = "local government area",
["lgarea"] = "local government area",
["lgd"] = "local government district",
["lgdist"] = "local government district",
["metbor"] = "metropolitan borough",
["metcity"] = "metropolitan city",
["metmun"] = "metropolitan municipality",
["mtn"] = "mountain",
["mun"] = "municipality",
["mundist"] = "municipal district",
["nonmetropolitan county"] = "non-metropolitan county",
["obl"] = "oblast",
["okr"] = "okrug",
["p"] = "province",
["par"] = "parish",
["parmun"] = "parish municipality",
["pen"] = "peninsula",
["plcity"] = "prefecture-level city",
["plcolony"] = "Polish colony",
["pref"] = "prefecture",
["prefcity"] = "prefecture-level city",
["preflcity"] = "prefecture-level city",
["prov"] = "province",
["r"] = "region",
["range"] = "mountain range",
["rcm"] = "regional county municipality",
["rcomun"] = "regional county municipality",
["rdist"] = "regional district",
["rep"] = "republic",
["rhrom"] = "rural hromada",
["riv"] = "river",
["rmun"] = "regional municipality",
["robor"] = "royal borough",
["romp"] = "Roman province",
["runit"] = "regional unit",
["rurmun"] = "rural municipality",
["s"] = "state",
["sar"] = "special administrative region",
["shrom"] = "settlement hromada",
["spref"] = "subprefecture",
["sprefcity"] = "sub-prefectural city",
["sprovcity"] = "subprovincial city",
["submet city"] = "sub-metropolitan city",
["submetropolitan city"] = "sub-metropolitan city",
["sub-prefecture-level city"] = "sub-prefectural city",
["sub-provincial city"] = "subprovincial city",
["sub-provincial district"] = "subprovincial district",
["terr"] = "territory",
["terrauth"] = "territorial authority",
["twp"] = "township",
["twpmun"] = "township municipality",
["uauth"] = "unitary authority",
["ucomm"] = "unincorporated community",
["udist"] = "unitary district",
["uhrom"] = "urban hromada",
["uterr"] = "union territory",
["utwpmun"] = "united township municipality",
["val"] = "valley",
["vdc"] = "village development committee",
["vil"] = "village",
["voi"] = "voivodeship",
["wcomm"] = "Welsh community",
}
local no_link_def_article = {link = false, article = ""}
local no_link_no_article = {link = false, article = false}
--[==[ var:
These qualifiers can be prepended onto any placetype and will be handled correctly. For example, the placetype
`large city` will be displayed as `large <nowiki>[[city]]</nowiki>` and categorized as if `city` were specified. If the
value in the following table is a string, the qualifier will display according to the string. If the value is `true`,
the qualifier will be linked to its corresponding Wiktionary entry. If the value is `false`, the qualifier will not be
linked but will appear as-is. Note that these qualifiers do not override placetypes with entries elsewhere that contain
those same qualifiers. For example, the entry for `inland sea` in `placetype_data` will apply in preference to treating
`inland sea` as equivalent to `sea`.
]==]
export.placetype_qualifiers = {
-- generic qualifiers
["huge"] = false,
["tiny"] = false,
["large"] = false,
["big"] = false,
["mid-size"] = false,
["mid-sized"] = false,
["small"] = false,
["sizable"] = false,
["important"] = false,
["long"] = false,
["short"] = false,
["major"] = false,
["minor"] = false,
["high"] = false,
["tall"] = false,
["low"] = false,
["left"] = false, -- left tributary
["right"] = false, -- right tributary
["modern"] = false, -- for use in opposition to "ancient" in another definition
-- "former" qualifiers
["abandoned"] = true,
["ancient"] = true,
["deserted"] = true,
["extinct"] = true,
["former"] = false,
["historic"] = "historical",
["historical"] = true,
["medieval"] = true,
["mediaeval"] = true,
["ruined"] = true,
["traditional"] = true,
-- sea qualifiers
["coastal"] = true,
["inland"] = true, -- note, we also have an entry in placetype_data for 'inland sea' to get a link to [[inland sea]]
["maritime"] = true,
["overseas"] = true,
["seaside"] = true,
["beachfront"] = true,
["beachside"] = true,
["riverside"] = true,
-- lake qualifiers
["freshwater"] = true,
["saltwater"] = true,
["endorheic"] = true,
["oxbow"] = true,
["ox-bow"] = "[[oxbow]]", -- [[ox-bow]] is a red link
["tidal"] = true,
-- land qualifiers
["hilltop"] = true,
["hilly"] = true,
["insular"] = true,
["peninsular"] = true,
["chalk"] = true,
["karst"] = true,
["limestone"] = true,
["mountainous"] = true,
["mountaintop"] = true,
["alpine"] = true,
["volcanic"] = true, -- for an island
-- political status qualifiers
["autonomous"] = true,
["incorporated"] = true,
["special"] = true,
["unincorporated"] = true,
["coterminous"] = true,
-- monetary status/etc. qualifiers
["fashionable"] = true,
["wealthy"] = true,
["affluent"] = true,
["declining"] = true,
-- city vs. rural qualifiers
["urban"] = true,
["suburban"] = true,
["exurban"] = true,
["outlying"] = true,
["remote"] = true,
["rural"] = true,
["outback"] = true,
["inner"] = false,
["inner-city"] = true,
["central"] = false,
["outer"] = false,
-- land use qualifiers
["residential"] = true,
["agricultural"] = true,
["business"] = true,
["commercial"] = true,
["industrial"] = true,
-- business use qualifiers
["railroad"] = true,
["railway"] = true,
["farming"] = true,
["fishing"] = true,
["mining"] = true,
["logging"] = true,
["cattle"] = true,
-- tourism use qualifiers
["resort"] = true, -- note, we also have 'resort city' and 'resort town', that take precedecne
["spa"] = true, -- note, we also have 'spa city' and 'spa town', that take precedecne
["ski"] = true, -- note, we also have 'ski resort city' and 'ski resort town', that take precedecne
-- religious qualifiers
["holy"] = true,
["sacred"] = true,
["religious"] = true,
["secular"] = true,
-- qualifiers for nonexistent places
["claimed"] = false,
["fictional"] = true,
["legendary"] = true,
["mythical"] = true,
["mythological"] = true,
-- directional qualifiers
["northern"] = false,
["southern"] = false,
["eastern"] = false,
["western"] = false,
["north"] = false,
["south"] = false,
["east"] = false,
["west"] = false,
["northeastern"] = false,
["southeastern"] = false,
["northwestern"] = false,
["southwestern"] = false,
["northeast"] = false,
["southeast"] = false,
["northwest"] = false,
["southwest"] = false,
-- seasonal qualifiers
["summer"] = true, -- e.g. for 'summer capital'
["winter"] = true,
-- legal status qualifiers
-- FIXME: Two-word qualifiers don't work yet. But you can enter "de-facto" and it's canonicalized to [[de facto]].
["official"] = true,
["unofficial"] = true,
["de facto"] = true, -- 'de facto capital'
["de-facto"] = "[[de facto]]", -- [[de-facto]] is a red link
["de jure"] = true, -- 'de jure capital'
["de-jure"] = "[[de jure]]", -- [[de-jure]] is a red link
-- NOTE: 'unrecognized/unrecognised' are handled as placetypes 'unrecognized country', 'unrecognized state'
-- misc. qualifiers
["planned"] = true,
["chartered"] = true,
["landlocked"] = true,
["uninhabited"] = true,
-- superlative qualifiers
["first"] = no_link_def_article,
["second"] = no_link_def_article, -- for "second largest" etc.
["third"] = no_link_def_article,
["fourth"] = no_link_def_article,
["last"] = no_link_def_article,
["only"] = no_link_def_article,
["sole"] = no_link_def_article,
["main"] = no_link_def_article,
["largest"] = no_link_def_article,
["biggest"] = no_link_def_article,
["smallest"] = no_link_def_article,
["shortest"] = no_link_def_article,
["longest"] = no_link_def_article,
["tallest"] = no_link_def_article,
["highest"] = no_link_def_article,
["lowest"] = no_link_def_article,
["leftmost"] = no_link_def_article,
["rightmost"] = no_link_def_article,
["innermost"] = no_link_def_article,
["outermost"] = no_link_def_article,
["northernmost"] = no_link_def_article,
["southernmost"] = no_link_def_article,
["westernmost"] = no_link_def_article,
["easternmost"] = no_link_def_article,
["northwesternmost"] = no_link_def_article,
["southwesternmost"] = no_link_def_article,
["northeasternmost"] = no_link_def_article,
["southeasternmost"] = no_link_def_article,
-- several/various
["several"] = no_link_no_article,
["various"] = no_link_no_article,
["numerous"] = no_link_no_article,
["multiple"] = no_link_no_article,
["many"] = no_link_no_article,
["other"] = no_link_no_article,
}
--[==[ var:
In this table, the key qualifiers should be treated the same as the value qualifiers for categorization purposes. This
is overridden by `placetype_data` and `qualifier_to_placetype_equivs`.
]==]
export.former_qualifiers = {
["abandoned"] = {"FORMER"},
["ancient"] = {"ANCIENT", "FORMER"},
["former"] = {"FORMER"},
["extinct"] = {"FORMER"},
["historic"] = {"FORMER"},
["historical"] = {"FORMER"},
["medieval"] = {"ANCIENT", "FORMER"},
["mediaeval"] = {"ANCIENT", "FORMER"},
["ruined"] = {"ANCIENT", "FORMER"},
["traditional"] = {"FORMER"},
}
--[==[ var:
In this table, any placetypes containing these qualifiers that do not occur in `placetype_data` should be mapped to the
specified placetypes for categorization purposes. Entries here are overridden by `placetype_data`.
]==]
export.qualifier_to_placetype_equivs = {
["fictional"] = "fictional location",
["legendary"] = "mythological location",
["mythical"] = "mythological location",
["mythological"] = "mythological location",
-- For e.g. Taiwan as a "claimed province" of China; parts of Belize as claimed by Guatemala; various islands
-- claimed by various parties in East Asia. FIXME: We should conditionalize on what is being claimed since there are
-- also claimed capitals, e.g. Israel and Palestine claim Jerusalem as their capital.
["claimed"] = "claimed political division",
}
--[==[ var:
Mapping from placetypes to the corresponding plural category-only placetype for a capital of that placetype. The reverse
mapping also exists.
]==]
export.placetype_to_capital_cat = {
["autonomous community"] = "autonomous community capitals",
["canton"] = "cantonal capitals",
["comarca"] = "comarca capitals",
["country"] = "national capitals",
-- The following are not obviously different from 'county seats' but the latte terminology is used in the US.
["county"] = "county capitals",
["department"] = "departmental capitals",
["district"] = "district capitals",
["division"] = "division capitals",
["emirate"] = "emirate capitals",
["governorate"] = "governorate capitals",
["hromada"] = "hromada capitals",
["krai"] = "krai capitals",
["metropolitan city"] = "metropolitan city capitals",
["municipality"] = "municipal capitals",
["oblast"] = "oblast capitals",
["okrug"] = "okrug capitals",
["prefecture"] = "prefectural capitals",
["province"] = "provincial capitals",
["raion"] = "raion capitals",
["regency"] = "regency capitals",
["region"] = "regional capitals",
["regional unit"] = "regional unit capitals",
["republic"] = "republic capitals",
["state"] = "state capitals",
["territory"] = "territorial capitals",
["voivodeship"] = "voivodeship capitals",
}
--[==[ var:
This contains placenames that should be preceded by an article (almost always "the"). '''NOTE''': There are multiple
ways that placenames can come to be preceded by "the":
# Listed here.
# Given in [[Module:place/locations]] with an initial "the". All such placenames are added to this map by the code
just below the map.
# The placetype of the placename has `holonym_use_the = true` in its placetype_data.
# A regex in placename_the_re matches the placename.
Note that "the" is added only before the first holonym in a place description.
]==]
export.placename_article = {
-- This should only contain info that can't be inferred from [[Module:place/locations]].
["archipelago"] = {
["Cyclades"] = "the",
["Dodecanese"] = "the",
},
["country"] = {
["Holy Roman Empire"] = "the",
},
["empire"] = {
["Holy Roman Empire"] = "the",
},
["island"] = {
["North Island"] = "the",
["South Island"] = "the",
},
["region"] = {
["Balkans"] = "the",
["Russian Far East"] = "the",
["Caribbean"] = "the",
["Caucasus"] = "the",
["Middle East"] = "the",
["New Territories"] = "the",
["North Caucasus"] = "the",
["South Caucasus"] = "the",
["West Bank"] = "the",
["Gaza Strip"] = "the",
},
["valley"] = {
["San Fernando Valley"] = "the",
},
}
--[==[ var:
Regular expressions to apply to determine whether we need to put 'the' before a holonym. The key "*" applies to all
holonyms, otherwise only the regexes for the holonym's placetype apply.
]==]
export.placename_the_re = {
-- We don't need entries for peninsulas, seas, oceans, gulfs or rivers
-- because they have holonym_use_the = true.
["*"] = {"^Isle of ", " Islands$", " Mountains$", " Empire$", " Country$", " Region$", " District$", "^City of "},
["bay"] = {"^Vịnh của "},
["lake"] = {"^Hồ của "},
["country"] = {"^Republic of ", " Republic$"},
["republic"] = {"^Republic of ", " Republic$"},
["region"] = {"^Vùng của "},
["river"] = {"^Sông của "},
["local government area"] = {"^Shire of "},
["county"] = {"^Shire of "},
["Indian reservation"] = {" Reservation", " Nation"},
["tribal jurisdictional area"] = {" Reservation", " Nation"},
}
--[==[ var:
If any of the following holonyms are present, the associated holonyms are automatically added to the end of the list of
holonyms for categorization (but not display) purposes.
]==]
export.cat_implications = {
["region"] = {
["Eastern Europe"] = {"continent/Europe"},
["Central Europe"] = {"continent/Europe"},
["Western Europe"] = {"continent/Europe"},
["South Europe"] = {"continent/Europe"},
["Southern Europe"] = {"continent/Europe"},
["Northern Europe"] = {"continent/Europe"},
["Northeast Europe"] = {"continent/Europe"},
["Northeastern Europe"] = {"continent/Europe"},
["Southeast Europe"] = {"continent/Europe"},
["Southeastern Europe"] = {"continent/Europe"},
["North Caucasus"] = {"continent/Europe"},
["South Caucasus"] = {"continent/Asia"},
["South Asia"] = {"continent/Asia"},
["Southern Asia"] = {"continent/Asia"},
["East Asia"] = {"continent/Asia"},
["Eastern Asia"] = {"continent/Asia"},
["Central Asia"] = {"continent/Asia"},
["West Asia"] = {"continent/Asia"},
["Western Asia"] = {"continent/Asia"},
["Southeast Asia"] = {"continent/Asia"},
["North Asia"] = {"continent/Asia"},
["Northern Asia"] = {"continent/Asia"},
["Anatolia"] = {"continent/Asia"},
["Asia Minor"] = {"continent/Asia"},
["Mesopotamia"] = {"continent/Asia"},
["North Africa"] = {"continent/Africa"},
["Central Africa"] = {"continent/Africa"},
["West Africa"] = {"continent/Africa"},
["East Africa"] = {"continent/Africa"},
["Southern Africa"] = {"continent/Africa"},
["Central America"] = {"continent/Central America"},
["Caribbean"] = {"continent/North America"},
["Polynesia"] = {"continent/Oceania"},
["Micronesia"] = {"continent/Oceania"},
["Melanesia"] = {"continent/Oceania"},
["Siberia"] = {"country/Russia", "continent/Asia"},
["Russian Far East"] = {"country/Russia", "continent/Asia"},
["South Wales"] = {"constituent country/Wales", "continent/Europe"},
["Balkans"] = {"continent/Europe"},
["West Bank"] = {"country/Palestine", "continent/Asia"},
["Gaza"] = {"country/Palestine", "continent/Asia"},
["Gaza Strip"] = {"country/Palestine", "continent/Asia"},
}
}
------------------------------------------------------------------------------------------
-- Category and display handlers --
------------------------------------------------------------------------------------------
local function city_type_cat_handler(data)
local entry_placetype = data.entry_placetype
local generic_before_non_cities = export.get_placetype_prop(entry_placetype, "generic_before_non_cities")
if not generic_before_non_cities then
internal_error("city_type_cat_handler called on placetype %s that doesn't have a `generic_before_non_cities`" ..
" setting", entry_placetype)
end
local plural_entry_placetype = export.pluralize_placetype(entry_placetype)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and not spec.is_city then
-- Categorize both in key, and in the larger polity that the key is part of, e.g. [[Hirakata]] goes in both
-- "Cities in Osaka Prefecture" and "Cities in Japan". (But don't do the latter if no_container_cat is set.)
local cap_plural_entry_placetype = ucfirst(plural_entry_placetype)
local retcats = {("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(key, spec))}
if container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s %s %s"):format(cap_plural_entry_placetype, generic_before_non_cities,
export.get_prefixed_key(container.key, container.spec)))
end
end
return retcats
end
end
local function capital_city_cat_handler(data, non_city)
local holonym_placetype, holonym_placename, holonym_index, place_desc =
data.holonym_placetype, data.holonym_placename, data.holonym_index, data.place_desc
-- The first time we're called we want to return something; otherwise we will be called for later-mentioned
-- holonyms, which can result in wrongly classifying into e.g. `National capitals`. Simulate the loop in
-- find_placetype_cat_specs() over holonyms so we get the proper `Cities in ...` categories as well as the capital
-- category/categories we add below.
local retcats
if not non_city and place_desc.holonyms then
for h_index, holonym in export.get_holonyms_to_check(place_desc, holonym_index) do
local h_placetype, h_placename = holonym.placetype, holonym.unlinked_placename
retcats = city_type_cat_handler {
entry_placetype = "city",
holonym_placetype = h_placetype,
holonym_placename = h_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if retcats then
break
end
end
end
if not retcats then
retcats = {}
end
-- Now find the appropriate capital-type category for the placetype of the holonym, e.g. 'State capitals'. If we
-- recognize the holonym among the known holonyms in [[Module:place/locations]], also add a category like 'State
-- capitals of the United States'. Truncate e.g. 'autonomous region' to 'region', 'union territory' to 'territory'
-- when looking up the type of capital category, if we can't find an entry for the holonym placetype itself (there's
-- an entry for 'autonomous community').
local capital_cat = export.placetype_to_capital_cat[holonym_placetype]
if not capital_cat then
capital_cat = export.placetype_to_capital_cat[holonym_placetype:gsub("^.* ", "")]
end
if capital_cat then
capital_cat = ucfirst(capital_cat)
local inserted_specific_variant_cat = false
if holonym_index then
-- Now find the first recognized holonym location. We don't stop when :also is seen because of the common pattern
-- where we use :also to specify that a given city is the capital at multiple surrounding levels.
local matching_group, matching_key, matching_spec, matching_container_trail, matching_holonym_index
for h_index = holonym_index, #place_desc.holonyms do
if place_desc.holonyms[h_index].placetype then
matching_group, matching_key, matching_spec, matching_container_trail = export.find_matching_holonym_location {
holonym_placetype = place_desc.holonyms[h_index].placetype,
holonym_placename = place_desc.holonyms[h_index].unlinked_placename,
holonym_index = h_index,
place_desc = place_desc,
}
if matching_group then
matching_holonym_index = h_index
break
end
end
end
if matching_holonym_index == holonym_index then
if matching_container_trail[1] and not matching_spec.no_container_cat then
for _, container in ipairs(matching_container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
elseif matching_holonym_index then
-- Check to make sure that the holonym placetype we were called on is listed among the
-- divtypes of the location we found.
local function insert_specific_variant_if_possible(key, spec)
return export.get_equiv_placetype_prop(holonym_placetype, function(pt)
local plural_holonym_placetype = export.pluralize_placetype(pt)
local saw_matching_div
if spec.divs then
local divs = spec.divs
if type(divs) ~= "table" then
divs = {divs}
end
for _, div in ipairs(divs) do
if type(div) ~= "table" then
div = {type = div}
end
if plural_holonym_placetype == div.type then
saw_matching_div = true
break
end
end
end
if saw_matching_div then
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(key, spec)))
return true
end
return false
end)
end
if insert_specific_variant_if_possible(matching_key, matching_spec) then
inserted_specific_variant_cat = true
elseif not matching_spec.no_container_cat then
for _, containers in ipairs(matching_container_trail) do
local saw_no_container_cat = false
for _, container in ipairs(containers) do
if insert_specific_variant_if_possible(container.key, container.spec) then
inserted_specific_variant_cat = true
break
end
saw_no_container_cat = saw_no_container_cat or container.spec.no_container_cat
end
if inserted_specific_variant_cat or saw_no_container_cat then
break
end
end
end
end
else
-- This happens when in an invocation like {{place|en|capital city|s/Haryana,Punjab}} for
-- [[Chandigarh]]. We fall back to older code that doesn't depend on the holonym index existing.
-- FIXME: This may not be necessary. In the example just given, when processing Haryana we add to
-- [[:Category:en:State capitals of India]], and nothing extra gets added when processing Punjab.
-- Possibly we can just skip this case entirely.
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and container_trail[1] and not spec.no_container_cat then
for _, container in ipairs(container_trail[1]) do
insert(retcats, ("%s của %s"):format(capital_cat, export.get_prefixed_key(container.key,
container.spec)))
inserted_specific_variant_cat = true
end
end
end
if not inserted_specific_variant_cat then
insert(retcats, capital_cat)
end
else
-- We didn't recognize the holonym placetype; just put in 'Capital cities'.
insert(retcats, "Capital cities")
end
return retcats
end
--[=[
This is invoked specially for all placetypes (see the `*` placetype key at the bottom of `placetype_data`). This is used
in two ways:
# To add pages to generic holonym categories like [[:Category:en:Places in Merseyside, England]] (and
[[:Category:en:Places in England]]) for any pages that have `co/Merseyside` as their holonym.
# To categorize demonyms in bare placename categories like [[:Category:en:Merseyside, England]] if the demonym
description mentions `co/Merseyside` and doesn't mention a more specific placename that also has a category. (In this
case there are none, but we can have demonyms at multiple levels, e.g. in France for individual villages, departments,
administrative regions, and for the entire country, and for example we only want to categorize a demonym into
[[:Category:France]] if no more specific category applies.) Unlike when invoked from {{tl|place}}, a demonym
invocation only adds the most specific holonym category and not the category of any containing polity (hence if we
add [[:Category:en:Merseyside, England]] we won't also add [[:Category:England]]).
This code also handles cities; e.g. for the first use case above, it would be used to add a page that has `city/Boston`
as a holonym to [[:Category:en:Places in Boston]], along with [[:Category:en:Places in Massachusetts, USA]] and
[[:Category:en:Places in the United States]]. The city handler tries to deal with the possibility of multiple cities
having the same name. For example, the code in [[Module:place/locations]] knows about the city of [[Columbus]],
[[Ohio]], which has containing polities `Ohio` (a state) and `the United States` (a country). If either containing
polity is mentioned, the handler proceeds to return the key `Columbus` (along with `Ohio, USA` and `the United States`).
Otherwise, if any other state or country is mentioned, the handler returns nothing, and otherwise it assumes the
mentioned city is the one we're considering and returns `Columbus` etc. This works correctly if the place only mentions
Ohio and a holonym for a Columbus in a different country is encountered, because of the function
`augment_holonyms_with_container`, which adds the US as a holonym when Ohio is encountered.
The single parameter `data` is as in category handlers. The return value is a list of categories (without the preceding
language code).
]=]
local function generic_place_cat_handler(data)
local from_demonym = data.from_demonym
local retcats = {}
local function insert_retkey(key, spec)
if from_demonym then
insert(retcats, key)
else
insert(retcats, ("Địa danh của %s"):format(export.get_prefixed_key(key, spec)))
end
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
if not spec.no_generic_place_cat then
-- This applies to continents and continental regions.
insert_retkey(key, spec)
end
-- Categorize both in key, and in the larger location(s) that the key is part of, e.g. [[Hirakata]] goes in
-- both [[Category:Places in Osaka Prefecture, Japan]] and [[Category:Places in Japan]]. But not when
-- no_container_cat is set (e.g. for 'United Kingdom').
if not spec.no_container_cat then
for _, container_set in ipairs(container_trail) do
local stop_adding_containers = false
for _, container in ipairs(container_set) do
if not container.spec.no_generic_place_cat then
insert_retkey(container.key, container.spec)
end
if container.spec.no_container_cat then
stop_adding_containers = true
end
end
if stop_adding_containers then
break
end
end
end
return retcats
end
end
--[==[
Special category handler run for all placetypes that checks for specified division placetypes of known locations and
categorizes appropriately.
]==]
function export.political_division_cat_handler(data)
if data.from_demonym then
return
end
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group then
local divlists = {}
if spec.divs then
insert(divlists, spec.divs)
end
if spec.addl_divs then
insert(divlists, spec.addl_divs)
end
for _, divlist in ipairs(divlists) do
if type(divlist) ~= "table" then
divlist = {divlist}
end
for _, div in ipairs(divlist) do
if type(div) == "string" then
div = {type = div}
end
local sgdiv = export.maybe_singularize_placetype(div.type) or div.type
local prep = div.prep or "of"
local cat_as = div.cat_as or div.type
if type(cat_as) ~= "table" then
cat_as = {cat_as}
end
if not export.placetype_data[sgdiv] then
internal_error("Placetype %s associated with known location key %s and data %s not found in " ..
"`placetype_data`", sgdiv, key, spec)
end
if sgdiv == data.entry_placetype then
local retcats = {}
for _, pt_cat in ipairs(cat_as) do
if type(pt_cat) == "string" then
pt_cat = {type = pt_cat}
end
local pt_prep = pt_cat.prep or prep
insert(retcats, ucfirst(pt_cat.type) .. " " .. pt_prep .. " " ..
export.get_prefixed_key(key, spec))
end
return retcats
end
end
end
end
end
--[==[
This is used to add pages to "bare" categories like [[:Category:en:Georgia, USA]] for `[[Georgia]]` and any
foreign-language terms that are translations of the state of Georgia. We look at the page title (or its overridden value
in {{para|pagename}}) as well as the glosses in {{para|t}}/{{para|t2}} etc., various extra-info values such as the
modern names in {{para|modern}}, and any values specified using a form-of directive. We need to pay attention to the
entry placetypes specified so we don't overcategorize; e.g. the US state of Georgia is `[[Джорджия]]` in Russian but the
country of Georgia is `[[Грузия]]`, and if we just looked for matching names, we'd get both Russian terms categorized
into both [[:Category:ru:Georgia, USA]] and [[:Category:ru:Georgia]]. We also need to check the containing holonyms to
make sure there isn't a mismatch (so we don't e.g. categorize Newark, Delaware in [[:Category:en:Newark]], which is
intended for Newark, New Jersey).
]==]
function export.get_bare_categories(args, overall_place_spec)
local bare_cats = {}
local place_descs = overall_place_spec.descs
local possible_placetypes_by_place_desc = {}
for i, place_desc in ipairs(place_descs) do
possible_placetypes_by_place_desc[i] = {}
for _, placetype in ipairs(place_desc.placetypes) do
if not export.placetype_is_ignorable(placetype) then
local equivs = export.get_placetype_equivs(placetype, {register_former_as_non_former = true})
for _, equiv in ipairs(equivs) do
insert(possible_placetypes_by_place_desc[i], equiv.placetype)
end
end
end
end
local function check_term(term)
-- Treat Wikipedia links like local ones.
term = term:gsub("%[%[w:", "[["):gsub("%[%[wikipedia:", "[[")
term = export.remove_links_and_html(term)
term = term:gsub("^ ", "")
for i, place_desc in ipairs(place_descs) do
-- Iterate over all matching locations in case there are multiple, as with Delhi defined as
-- {{place|en|megacity/and/union territory|c/India|containing the national capital [[New Delhi]]}}.
for group, key, spec, container_trail in export.iterate_matching_holonym_location {
holonym_placetype = possible_placetypes_by_place_desc[i],
holonym_placename = term,
place_desc = place_desc,
} do
insert(bare_cats, key)
end
end
end
-- FIXME: Should we only do the following if the language is English (requires that the lang is passed in)?
-- We should always do it if `pagename` is given (as it is with {{tcl}}) but maybe not otherwise unless 1=en. There
-- are cases like [[Ankara]] = English name for capital of Turkey, but also the name in various languages for the
-- capital of Ghana (= English [[Accra]]). But this should get caught by mismatching the containing country. The
-- advantage of checking when the language isn't English is we catch those places that fail to give an English
-- translation but where the translation happens to be the same as the other-language spelling. However, I don't
-- know how often this situation occurs.
check_term(args.pagename or mw.loadData("Module:headword/data").pagename)
for _, t in ipairs(args.t) do
check_term(t)
end
local function check_termobj_list(terms)
for _, term in ipairs(terms) do
if term.eq then
check_term(term.eq)
end
if term.alt or term.term then
check_term(term.alt or term.term)
end
end
end
for _, extra_info_terms in ipairs(overall_place_spec.extra_info) do
local arg = extra_info_terms.arg
if arg == "modern" or arg == "now" or arg == "full" or arg == "short" then
check_termobj_list(extra_info_terms.terms)
end
end
for _, directive in ipairs(overall_place_spec.directives) do
check_termobj_list(directive.terms)
end
return bare_cats
end
--[==[
This is used to augment the holonyms associated with a place description with the containing polities. For example,
given the following:
`# {{tl|place|en|subprefecture|pref/Hokkaido}}.`
We auto-add Japan as another holonym so that the term gets categorized into [[:Category:Subprefectures of Japan]].
To avoid over-categorizing we need to check to make sure no other countries are specified as holonyms.
]==]
function export.augment_holonyms_with_container(place_descs)
for _, place_desc in ipairs(place_descs) do
if place_desc.holonyms then
-- This ends up containing a copy of the original holonyms, with the augmented holonyms inserted in their
-- appropriate position. We don't just put them at the end because some holonyms have use the `:also`
-- modifier, which causes category processing to restart at that point after generating categories for a
-- preceding holonym, and we don't want the preceding holonym's augmented holonyms interfering with
-- categorization of a later holonym. We proceed from right to left, and each time we augment, we copy
-- the holonyms with the augmented holonym(s) inserted appropriately and replace the place description's
-- holonyms with the augmented ones before the next iteration. The reason for this is so that e.g.
-- {{place|neighborhood|city/Birmingham|co/West Midlands|cc/England}} doesn't throw an error during the
-- augmentation process due to 'Birmingham' referring to two known locations (in England and Alabama). If
-- we go left to right, we will throw an ambiguity error on `city/Birmingham` because code to exclude
-- Birmingham, Alabama needs `c/United Kingdom` present (to cause a mismatch with `c/United States`),
-- which isn't yet present as the augmentation code hasn't gotten to `cc/England` yet. For similar
-- reasons, we need to include the augmented holonyms in the holonyms considered in the next iteration
-- rather than modifying the place description once at athe end.
for i = #place_desc.holonyms, 1, -1 do
local holonym = place_desc.holonyms[i]
if holonym.placetype and not export.placetype_is_ignorable(holonym.placetype) then
local group, key, spec, container_trail = export.find_matching_holonym_location {
holonym_placetype = holonym.placetype,
holonym_placename = holonym.unlinked_placename,
holonym_index = i,
place_desc = place_desc,
}
if group and container_trail[1] and not spec.no_auto_augment_container then
local augmented_holonyms = {}
for j = 1, i do
insert(augmented_holonyms, place_desc.holonyms[j])
end
for _, containers in ipairs(container_trail) do
local any_no_auto_augment_container = false
for _, container in ipairs(containers) do
any_no_auto_augment_container = any_no_auto_augment_container or
container.spec.no_auto_augment_container
local containing_type = container.spec.placetype
if type(containing_type) == "table" then
-- If the containing type is a list, use the first element as the canonical variant.
containing_type = containing_type[1]
end
local full_container_placename, elliptical_container_placename =
m_locations.key_to_placename(container.group, container.key)
-- Don't side-effect holonyms while processing them.
local new_holonym = {
-- By the time we run, the display has already been generated so we don't need to
-- set display_placename.
placetype = containing_type,
-- placename_to_key() for the group should correctly handle both full and elliptical
-- placenames, but the full placename seems less likely to be ambiguous. FIXME: We
-- should just store the key directly and use it when available to avoid having to
-- convert key to placename and back to key.
unlinked_placename = full_container_placename,
-- Indicate that this is an augmented holonym, and was derived from the specified
-- holonym. In iterate_matching_holonym_location(), we ignore augmented holonyms
-- derived from holonyms that are different from the holonym we're searching for but
-- of the same placetype. This is to correctly handle a situation like
-- {{place|river|dept/Ardèche,Gard,Vaucluse,Bouches-du-Rhône|c/France}}. Here,
-- `Ardèche` is in `r/Auvergne-Rhône-Alpes`, while `Gard` is in `r/Occitania` and
-- the other two are in `r/Provence-Alpes-Côte d'Azur`. Augmenting proceeds from
-- right to left, so after it adds `r/Provence-Alpes-Côte d'Azur` to
-- `Bouches-du-Rhône`, Vaucluse gets augmented correctly but `Gard` fails to match
-- in find_matching_holonym_location() because of the mismatch between augmented
-- `r/Provence-Alpes-Côte d'Azur` and actual `r/Occitania`. Similarly, all later
-- calls to find_matching_holonym_location() fail to match `Gard` (and likewise
-- `Ardèche`) against any known location. To deal with this, we mark augmented
-- holoynms as being augmented due to a source holonym, and when processing a given
-- holonym, ignore augmented holonyms from other holonyms of the same placetype.
-- The restriction to the same placetype is so that `Birmingham` still gets
-- correctly disambiguated to Birmingham, England in the example given above near
-- the top of this function, using the augmented holonym `c/United Kingdom` added by
-- the specified `cc/England` (whose placetype `constituent country` differs from
-- the placetype `city` of Birmingham).
augmented_from_holonym = holonym,
}
insert(augmented_holonyms, new_holonym)
-- But it is safe to modify other parts of the place_desc.
export.key_holonym_into_place_desc(place_desc, new_holonym)
end
if any_no_auto_augment_container then
break
end
end
for j = i + 1, #place_desc.holonyms do
insert(augmented_holonyms, place_desc.holonyms[j])
end
place_desc.holonyms = augmented_holonyms
end
end
end
end
end
end
-- Cat handler for district, areas, neighborhoods and suburbs. Districts are tricky because they can either be political
-- divisions or city neighborhoods. Areas similarly can be political divisions (rarely; specifically, in Kuwait), city
-- neighborhoods or larger geographical areas/regions. We handle this as follows:
-- (1) `placetype_data` cat entries for specific countries or country divisions take precedence over cat_handlers, so if
-- the user says {{tl|place|district|s/Maharashtra|c/India}}, we won't even be called because there is an entry that
-- categorizes into [[:Category|Districts of Maharashtra, India]].
-- (2) If we're called, we check the holonym we're called on to see if it is a recognized city, e.g. if we're called
-- using {{tl|place|district|city/Mumbai|s/Maharashtra|c/India}}. If so, we categorize under e.g.
-- [[:Category:Neighbourhoods of Mumbai]]. (Choosing the spelling "neighbourhoods" because we're in India.)
-- (3) If we're called and the holonym is not a recognized city, we check if the placetype has has_neighborhoods set.
-- If so, it's "city-like" and we categorize under the first containing polity that we recognize. For example, if
-- we're called using {{tl|place|district|town/Northampton|co/Hampshire|s/Massachusetts|c/US}}, we should recognize
-- town as "city-like" and categorize under [[:Category:Neighborhoods in Massachusetts]]. (Note "in" not "of", and
-- note the spelling "neighborhoods" because we're in the US.)
-- (4) If the holonym is not city-like, we do nothing. If there's a city or city-like placetype farther up (e.g. we're
-- called as {{tl|place|district|ward/Foo|mun/Bar|...}}), we will handle the city-like entity according to (2) or
-- (3) when called on that holonym. Otherwise either the categorization in (1) takes place or there's no
-- categorization.
local function district_neighborhood_cat_handler(data)
local function get_plural_entry_placetype(location_spec, container_trail)
if data.entry_placetype == "suburb" then
return "Suburbs"
else
-- Check for `british_spelling` setting on the spec itself or any container.
local uses_british_spelling = location_spec.british_spelling
if uses_british_spelling == nil and container_trail then
for _, container_set in ipairs(container_trail) do
local must_outer_break = false
for _, container in ipairs(container_set) do
if container.spec.british_spelling ~= nil then
uses_british_spelling = container.spec.british_spelling
must_outer_break = true
break
end
end
if must_outer_break then
break
end
end
end
return uses_british_spelling and "Neighbourhoods" or "Neighborhoods"
end
end
-- First check the immediate holonym to see if it's a city or a city-like top-level entity (Hong Kong, Bonaire,
-- etc.)
local group, key, spec, container_trail = export.find_matching_holonym_location(data)
if group and not spec.is_former_place and spec.is_city then
return {get_plural_entry_placetype(spec, container_trail) .. " of " .. export.get_prefixed_key(key, spec)}
end
-- If the entry placetype is neighbo(u)rhood, assume it is a neighborhood even if there isn't a city-like
-- entity father up the chain. (E.g. due to a mistaken use of m/ instead of mun/ for municipality.)
local has_neighborhoods
local entry_placetype = data.entry_placetype
if entry_placetype == "neighborhood" or entry_placetype == "neighbourhood" or entry_placetype == "suburb" then
has_neighborhoods = true
else
-- Otherwise, make sure the current holonym is city-like.
has_neighborhoods = export.get_equiv_placetype_prop(data.holonym_placetype, function(pt)
return export.get_placetype_prop(pt, "has_neighborhoods")
end, {continue_on_nil_only = true})
end
if has_neighborhoods then
-- Loop up the holonyms, looking for city and city-like entities in case of e.g. [[Sepulveda]] written
-- {{place|en|neighborhood|valley/San Fernando Valley|city/Los Angeles|s/California|c/USA}}
-- but also look for a recognizable poldiv, and if so categorize as "Neighborhoods in POLDIV". We need
-- to start with the current holonym, which is especially important for neighborhoods and suburbs that
-- may have the first holonym be a recognizable province, etc. but can't hurt otherwise. (Previously
-- we skipped the first/current holonym.)
for other_holonym_index, other_holonym in export.get_holonyms_to_check(data.place_desc,
data.holonym_index) do
local other_holonym_data = {
holonym_placetype = other_holonym.placetype,
holonym_placename = other_holonym.unlinked_placename,
holonym_index = other_holonym_index,
place_desc = data.place_desc,
}
local group, key, spec, container_trail = export.find_matching_holonym_location(other_holonym_data)
if group and not spec.is_former_place then
return {get_plural_entry_placetype(spec, container_trail) .. (spec.is_city and " of " or " in ") ..
export.get_prefixed_key(key, spec)}
end
end
end
end
function export.check_already_seen_string(holonym_placename, already_seen_strings)
local canon_placename = ulower(m_links.remove_links(holonym_placename))
if type(already_seen_strings) ~= "table" then
already_seen_strings = {already_seen_strings}
end
for _, already_seen_string in ipairs(already_seen_strings) do
if canon_placename:find(already_seen_string) then
return true
end
end
return false
end
-- Prefix display handler that adds a prefix such as "Metropolitan Borough of " to the display
-- form of holonyms. We make sure the holonym doesn't contain the prefix or some variant already.
-- We do this by checking if any of the strings in ALREADY_SEEN_STRINGS, either a single string or
-- a list of strings, or the prefix if ALREADY_SEEN_STRINGS is omitted, are found in the holonym
-- placename, ignoring case and links. If the prefix isn't already present, we create a link that
-- uses the raw form as the link destination but the prefixed form as the display form, unless the
-- holonym already has a link in it, in which case we just add the prefix.
local function prefix_display_handler(prefix, holonym_placename, already_seen_strings)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(prefix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return prefix .. " " .. holonym_placename
end
return prefix .. " [[" .. holonym_placename .. "]]"
end
-- Suffix display handler that adds a suffix such as " parish" to the display form of holonyms.
-- Works identically to prefix_display_handler but for suffixes instead of prefixes.
local function suffix_display_handler(suffix, holonym_placename, already_seen_strings, include_suffix_in_link)
if export.check_already_seen_string(holonym_placename, already_seen_strings or ulower(suffix)) then
return holonym_placename
end
if holonym_placename:find("%[%[") then
return holonym_placename .. " " .. suffix
end
if include_suffix_in_link then
return "[[" .. holonym_placename .. " " .. suffix .. "]]"
else
return "[[" .. holonym_placename .. "]] " .. suffix
end
end
-- Display handler for boroughs. New York City boroughs are display as-is. Others are suffixed
-- with "borough".
local function borough_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.new_york_boroughs[unlinked_placename] then
-- Hack: don't display "borough" after the names of NYC boroughs
return holonym_placename
end
return suffix_display_handler("borough", holonym_placename)
end
local function county_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
-- Display handler for Irish counties. Irish counties are displayed as e.g. "County [[Cork]]".
if m_locations.ireland_counties["Hạt " .. unlinked_placename .. ", Ireland"] or
m_locations.northern_ireland_counties["Hạt " .. unlinked_placename .. ", Bắc Ireland"] then
return prefix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Taiwanese counties. Taiwanese counties are displayed as e.g. "[[Chiayi]] County".
if m_locations.taiwan_counties[unlinked_placename .. ", Đài Loan"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- Display handler for Romanian counties. Romanian counties are displayed as e.g. "[[Cluj]] County".
if m_locations.romania_counties[unlinked_placename .. ", România"] then
return suffix_display_handler("Hạt", holonym_placename)
end
-- FIXME, we need the same for US counties but need to key off the country, not the specific county.
-- Others are displayed as-is.
return holonym_placename
end
-- Display handler for prefectures. Japanese prefectures are displayed as e.g. "[[Fukushima]] Prefecture".
-- Others are displayed as e.g. "[[Fthiotida]] prefecture".
local function prefecture_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
local suffix = m_locations.japan_prefectures[unlinked_placename .. ", Nhật Bản"] and "Prefecture" or "prefecture"
return suffix_display_handler(suffix, holonym_placename)
end
-- Display handler for provinces of Bulgaria, Iran, Laos, North and South Korea, Thailand, Turkey and Vietnam. Recognized
-- provinces are displayed as e.g. "[[Gyeonggi]] Province" or "[[Antalya]] Province". Others are displayed as-is.
local function province_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if
m_locations.bulgaria_provinces[unlinked_placename .. ", Bulgaria"] or
m_locations.iran_provinces[unlinked_placename .. ", Iran"] or
m_locations.laos_provinces[unlinked_placename .. ", Lào"] or
m_locations.north_korea_provinces[unlinked_placename .. ", Cộng hòa Dân chủ Nhân dân Triều Tiên"] or
m_locations.south_korea_provinces[unlinked_placename .. ", Hàn Quốc"] or
m_locations.thailand_provinces[unlinked_placename .. ", Thái Lan"] or
m_locations.turkey_provinces[unlinked_placename .. ", Thổ Nhĩ Kỳ"] or
m_locations.vietnam_provinces[unlinked_placename .. ", Việt Nam"] then
return suffix_display_handler("Province", holonym_placename)
end
return holonym_placename
end
-- Display handler for Nigerian states. Nigerian states are display as "[[Kano]] State". Others are displayed as-is.
local function state_display_handler(holonym_placetype, holonym_placename)
local unlinked_placename = m_links.remove_links(holonym_placename)
if m_locations.nigeria_states[unlinked_placename .. ", Nigeria"] then
return suffix_display_handler("State", holonym_placename)
end
return holonym_placename
end
-- Display handler for voivodeships. Display as e.g. [[Subcarpathian Voivodeship]].
local function voivodesip_display_handler(holonym_placetype, holonym_placename)
return suffix_display_handler("Voivodeship", holonym_placename, nil, "include_suffix_in_link")
end
------------------------------------------------------------------------------------------
-- Placetype data --
------------------------------------------------------------------------------------------
--[==[ var:
Main placetype data structure. This specifies, for each canonicalized placetype, various properties. The keys are
placetypes (in the singular, except for category-only placetypes, which are plural and followed by `!`), and the value
is a table of properties. The `"*"` key is special and is used for adding "generic" categories of the form
`Places in ``location`` `; it runs for all entry placetypes. Keys in the form of plural placetypes followed by `!` are
used only in [[Module:category tree/topic cat/data/Places]] for specifying the properties of categories containing the
specified placetype, esp. bare categories like [[:Category:States and territories]] (rather than qualified categories
like [[:Category:States and territories of Australia]]).
Keys under the value table for a given placetype of are two types: ''property keys'' (which specify the value of
specific properties) and ''categorization keys'' (which tell how to categorize certain sorts of holonyms if the
placetype in question occurs as an entry placetype). Categorization keys are either the special value `default` or are
wildcard strings with a slash in them, such as `"country/*"`. Note that only wildcard strings are currently allowed
directly in the placetype data; everything else is handled through category handlers, either per-placetype or special
(such as `political_division_cat_handler`). The algorithm for how category keys and handlers are used to generate
categories is described at the top of [[Module:place]].
There are several recognized property keys, of various types:
1. The following link-related property keys are recognized:
* `link`: '''Required''' except in category-only placetypes ending in `!`. Describes how to link and display the
placetype in the formatted description when occurring as an entry placetype. Also used for formatting pluralized
placetypes (which may occur in entry placetypes, esp. new-format ones, such as `two <<islands>>`) and may occur in
categories). The possible values are:
*# `true`: Link to the same-named Wiktionary entry. This creates a raw link, e.g. `<nowiki>[[city]]</nowiki>`, which is
converted to an English-specific link by JavaScript postprocessing. If the placetype is plural, this creates a
two-part raw link e.g. `<nowiki>[[city|cities]]</nowiki>`.
*# `"w"`: Link to the same-named Wikipedia entry. This creates a two-part link, e.g.
`<nowiki>[[w:census town|census town]]</nowiki>`, or `<nowiki>[[w:census town|census towns]]</nowiki>` if the
placetype is given plural.
*# `"+..."`: Create a two-part link to the entry following the `+` sign. For example, if `cercle` specifies
`"+w:cercles of Mali"`, a two-part link `<nowiki>[[w:cercles of Mali|cercle]]</nowiki>` will be generated, or
`<nowiki>[[w:cercles of Mali|cercles]]</nowiki>` if plural `cercles` is specified.
*# `"separately"`: Link each word separately. For example, if `administrative territory` specifies `"separately"`, it
will be linked as `<nowiki>[[administrative]] [[territory]]</nowiki>`, or as
`<nowiki>[[administrative]] [[territory|territories]]</nowiki>` if plural `administrative territories` is given.
*# another string: Use that string directly. If the placetype is plural, `pluralize()` in [[Module:en-utilities]] is
called on the string, which will correctly pluralize most strings, including those with links in them. (If there
are multiple links, the display form of the last link is pluralized.)
*# `false`: This placetype is not allowed as an entry placetype. An error will be thrown if this placetype is given as
an entry placetype. This is specified for internal-use placetypes, especially placetypes used in conjunction with
the qualifiers `former`, `ancient`, `historical` and such.
* `plural_link`: If specified and the placetype is plural, use the value in place of generating a pluralized version of
the link spec in `link`. Most commonly, this is either a string with links in it (which is used directly) or the
value `false`, indicating that the placetype cannot occur plural. (This is used for example by `caplc`, which displays
as `<nowiki>[[capital]] and [[large]]st [[city]]</nowiki>`, where a plural version doesn't make sense.) Generally if
this is specified, `plural` also needs to be specified to give a special placetype plural; this situation occurs
especially with multiword placetypes where something other than the last word is pluralized. An example is
`town with bystatus`, whose plural is `towns with bystatus`, which needs to be explicitly given. This example uses
`link = <nowiki>"[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>` ({{m|nb|bystatus}}) is a Norwegian
Bokmål word, and template calls aren't currently permitted in link strings), along with
`plural_link = <nowiki>"[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]"</nowiki>`.
* `category_link`: Spec indicating how to display the placetype when occurring in category descriptions. Defaults to
the value of `link`, and in turn is overridden by more specific `category_link_*` keys; see below. Category-only
placetypes (which are plural and end in `!`) usually use `category_link` in preference to `link`. The value of
`category_link` can be any of the types of specs given above, but most commonly is a plural string with links in it,
spelling out the description; in this case it is used directly. When both `category_link` and `link` are given, the
value in `category_link` is typically longer and more descriptive. For example, `polity` uses `link = true`, which
just generates a link `<nowiki>[[polity]]</nowiki>` or plural `<nowiki>[[polity|polities]]</nowiki>`, but specifies a
separate `category_link = <nowiki>"[[independent]] or [[semi-]][[independent]] [[polity|polities]]"</nowiki>`, which
clarifies in the category description what a polity is.
* `category_link_top_level`: Spec indicating how to display top-level (bare/unqualified) categories, i.e. categories
where the placetype is not followed by `in ``location`` ` or `of ``location`` `. If given, this overrides
`category_link` for this type of category.
* `category_link_before_noncity`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` does not refer to a city. If given, this overrides
`category_link` for this type of category.
* `category_link_before_city`: Spec indicating how to display qualified categories of the form
` ``placetypes`` in/of ``location`` ` where ``location`` refer to a city. If given, this overrides `category_link` for
this type of category. An example where this is given is `neighborhood`, which uses the following specs:<ol>
<li>`link = true`</li>
<li>`category_link = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]"</nowiki>`</li>
<li>`category_link_before_city = <nowiki>"[[neighborhood]]s, [[district]]s and other subportions"</nowiki>`</li>
</ol> This has the effect of making the entry placetype `neighborhood` display as just
`<nowiki>[[neighborhood]]</nowiki>`, while e.g. a category like `Neighborhoods of Chicago` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[Chicago]], ...</nowiki>` and a category like
`Neighborhoods in Illinois, USA` displays as
`<nowiki>[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]] in [[Illinois]], ...</nowiki>`.
* `disallow_in_entries`: If specified, this placetype cannot occur as an entry placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
* `disallow_in_holonyms`: If specified, this placetype cannot occur as a holonym placetype, and the specified value
(a message indicating what to use instead) is displayed in the error message.
2. There is currently one fallback-related property key recognized:
* `fallback`: If specified, its value is a placetype which will be used for categorization purposes if no categories
get added using the placetype itself. As an example, `branch` sets a fallback of `river` but also sets
`preposition = "of"`, meaning that {{tl|place|en|branch|riv/Mississippi}} displays as `a branch of the Mississippi`
(whereas `river` itself uses the preposition `in`), but otherwise categorizes the same as `river`. A more complex
example is `area`, which sets a fallback of `geographic and cultural area` and also sets a category handler that
checks for cities or city-like entities (e.g. boroughs) occurring as holonyms and categorizes the toponym under
[[:Category:Neighborhoods of CITY]] (for recognized cities) or otherwise [[:Category:Neighborhoods of POLDIV]] (for
the nearest containing recognized location). In addition, `area` is set as a political division of Kuwait, meaning if
`c/Kuwait` occurs as holonym, the toponym is categorized under [[:Category:Areas of Kuwait]]. If none of these
categories trigger, the fallback of `geographic and cultural area` will take effect, and the toponym will be
categorized as e.g. [[:Category:Geographic and cultural areas of England]].
3. There is currently one property to control irregular plurals of placetypes:
* `plural`: If specified, its value is the plural of the placetype. Otherwise, the default pluralization algorithm in
[[Module:en-utilities]] applies (which correctly pluralizes most words, including those ending in `-y`, `-ch`, `-sh`,
`-x`, etc.). The value of `plural` is also used when converting a pluralized placetype into its singular equivalent;
for example, since the placetype `kibbutz` has `plural = "kibbutzim"`, the placetype `kibbutzim` will be recognized
as a plural and singularized to `kibbutz`. For this reason, it's occasionally necessary to specify a `plural` value
even when the default pluralization algorithm works correctly, if the default singularization algorithm won't
correctly reverse the pluralization (as with `pass` and other terms ending in `-ss`).
4. The following property keys relate to generating categories for entry placetypes and specifying the parents of those
categories:
* `class`: The general class of placetype. This is used for various purposes: (a) to categorize placetypes preceded by
a qualifier such as `former`, `ancient`, `medieval` or `historical` (note that these placetypes are not all treated
alike); (b) to determine the parent category of bare placetype categories (e.g. [[:Category:Villages]] for placetype
`village`); (c) to determine whether to add a parent category `political divisions of specific countries` to
qualified placetype categories (e.g. [[:Category:Villages in Mali]]). The possible values are:
*# `polity`: a more-or-less sovereign/independent polity, such as a country, kingdom or empire.
*# `subpolity`: a non-sovereign division of a polity, above the level of an individual settlement.
*# `settlement`: a city or smaller equivalent, such as a village. This also includes administrative divisions of a
settlement, such as wards and barangays.
*# `non-admin settlement`: similar to a settlement but without administrative or political significance, such as an
unincorporated community, farm or neighborhood.
*# `capital`: a settlement that is a capital. A former capital is generally still in existence, just not the capital
any more.
*# `natural feature`: any non-man-made feature, such as a lake, mountain, island, ocean, etc.
*# `man-made structure`: a man-made feature below the level of a neighborhood, such as a house, airport, university,
metro station, park or the like.
*# `geographic region`: a geographic or cultural region or area that has no administrative significance. These may vary
greatly in size but typically have some sort of cultural significance (possibly historical). The `former`, `ancient`,
etc. qualifier has no effect on the category of these placetypes.
*# `generic place`: a place that isn't further qualified into any specific subtype.
* `former_type`: The class of placetype used for categorizing placetypes preceded by a qualifier such as `former`,
`ancient`, `medieval` or `historical`. The possible values are the same as for `class` but with the addition of
`dependent territory` (for colonies, protectorates and the like) and `!` (ignore the historical/former/ancient/etc.
qualifier; used e.g. with `fictional location` and `mythological location`). If not specified, the value of `class`
is used. When a qualifier such as `former`, `ancient`, `medieval` or `historical` is encountered (specifically, those
in `former_qualifiers`), it is mapped using `former_qualifiers` to the appropriate internal qualifier or qualifiers
(one or both of `ANCIENT` and/or `FORMER`, which are written in all-caps to distinguish them from user-specified
qualifiers), which is prepended to the value of `former_type` or `class` to form a placetype whose properties are
looked up to determine how to categorize the toponym in question. For example, if `medieval village` is given, we map
`medieval` to `ANCIENT` and `FORMER`, and `village` to its `class` of `settlement`, and enter the placetypes
`ANCIENT settlement` and `FORMER settlement` (in that order) into the list of equivalent placetypes returned by
`get_placetype_equivs`. In this case, there is an entry in `placetype_data` for `ANCIENT settlement`, so its default
category spec `Ancient settlements` is used as the category. If on the other hand `medieval kingdom` is given, where
`kingdom` has a `class` value `polity`, we first look up `ANCIENT polity`, see there is no entry in `placetype_data`
for it, and then look up `FORMER polity`, which exists and has a default category spec `Former polities`, which is
used as the category. Note that if the placetype following the "former" qualifier is recognized in `placetype_data`
but has no `former_type` or `class` and no fallback with a `former_type` or `class` specified, it is an internal
error; but if the placetype isn't recognized (e.g. something like `former greenhouse` is specified and we don't have
an entry for `greenhouse`), we just track the occurrence and end up not categorizing.
* `bare_category_parent`: This specifies the first parent category of a bare placetype category named according to the
placetype in question (e.g. [[:Category:Atolls]] for placetype `atoll`, or [[:Category:Named buildings]] for
placetype `named buildings!`). If not specified, the first parent category is determined by the value of `class`,
using the mapping `class_to_bare_category_parent` in [[Module:category tree/topic cat/data/Places]].
* `addl_bare_category_parents`: Extra parent categories to add a bare placetype category to (see `bare_category_parent`
just above).
* `bare_category_breadcrumb`: Breadcrumb for bare placetype categories. Also used as the sort key of
`bare_category_parent` if it is a string.
* `inherently_former`: If specified and the given placetype is used as an entry placetype, act as if `former` or
`ancient` (depending on the value of `inherently_former`) were prefixed to the placetype. This is for placetypes that
always refer to no-longer-existing entities, such as `satrapy` and `treaty port`. The value of `inherently_former` is
a list of internal qualifiers (one or more of `ANCIENT` and/or `FORMER`), just as for `former_qualifiers`, and the
implementation is the same.
* `cat_handler`: Handler used to generate the categories to add a given toponym to, if its entry placetype is the
placetype in question. Generally the `cat_handler` function checks the holonyms specified in order to determine which
category or categories to generate. For example, `district_neighborhood_cat_handler` handles placetypes `district`,
`neighborhood`, `subdivision`, `suburb` and the like, and either adds the toponym to a category like
`Neighborhoods of ``city`` ` (if a recognized city is given as a holonym), or otherwise a category like
`Neighborhoods in ``location`` ` (for the first recognized non-city location given as a holonym, if an unrecognized
city or city-like entity is given before the recognized non-city). The algorithm that runs the category handlers
iterates over holonyms from left to right, running the `cat_handler` function on each holonym in turn until one or
more categories are returned; see below for more specifics. (Note that countries for which e.g. a `district` is a
political division do not get the corresponding category added by the `district_neighborhood_cat_handler` function but
by `political_division_cat_handler`.) `cat_handler` functions are called with one argument, `data`, describing the
resolved entry placetype (i.e. after resolving placetype aliases and fallbacks) and the holonym being processed. The
return value should be a list of category specs (categories minus the langcode prefix, with `+++` standing for the
holonym key, or the value `true`, which stands for ` ``Placetypes`` in/of ``Holonym`` `, i.e. the pluralized placetype
with the appropriate preposition as specified in `placetype_data`). `data` contains the following fields:
** `entry_placetype`: the resolved entry placetype for the entry placetype being processed (i.e. it will always have an
entry in `placetype_data` but may not be the original placetype given by the user);
** `holonym_placetype` and `holonym_placename`: the holonym placetype and placename being processed;
** `holonym_index`: the index of the holonym being processed, or {nil} if we're handling an overriding holonym (FIXME:
we will change the overriding holonym algorithm so there will be an index even when processing overriding holonyms);
** `place_desc`: a full description of the {{tl|place}} call, as specified at the top of [[Module:place]];
** `from_demonym`: If set, we are called from [[Module:demonym]], triggered by {{tl|demonym-adj}} or
{{tl|demonym-noun}}, instead of being triggered by {{tl|place}}.
* `has_neighborhoods`: If `true`, the specified placetype is city-like. This is used in the
`district_neighborhood_cat_handler` to determine whether to add a category such as `Neighborhoods in ``location`` `;
see the section just above on `cat_handler`.
5. The following preposition-related property keys are recognized:
* `preposition`: The preposition used after this placetype when it occurs as an entry placetype. Defaults to `"in"`.
* `generic_before_non_cities`: If specified, the appropriate category description handler in
[[Module:category tree/topic cat/data/Places]] will recognize categories of the form
` ``Placetype`` in/of ``location`` ` for the specified placetype and preposition, if ``location`` is a non-city. This
is used to generate descriptions for categories added by category handlers and by explicit category specs in the
placetype data. All placetypes that specify `generic_before_non_cities` or `generic_before_cities` *MUST* also specify
a value for `class` so that the category tree code can determine whether it's a political or non-political division.
* `generic_before_cities`: Like `generic_before_non_cities` but for locations referring to cities.
6. The following property keys control the auto-addition of affixes when formatting holonyms of a particular placetype:
* `affix_type`: If specified, add the placetype as an affix before or after holonyms of this placetype. Possible values
are:
*# `"pref"` (the holonym will display as `(the) placetype of Holonym`, where `the` appears when the holonym directly
follows an entry placetype);
*# `"Pref"` (same as `"pref"` but the placetype is capitalized; each word is capitalized if there are multiple);
*# `"suf"` (the holonym will display as `Holonym placetype`);
*# `"Suf"` (the holonym will display as `Holonym Placetype`, i.e. same as `"suf"` but the placetype is capitalized).
* `suffix`: String to use in place of the placetype itself when the placetype is displayed as a suffix after a holonym.
Note that `suffix` can be used independently of `affix_type` because the user can also request a suffix explicitly
using a syntax like `adr:suf/Occitania`, which will display as `Occitania region` because the placetype
`administrative region` specifies `suffix = "region"`.
* `prefix`: Like `suffix` but for use when the placetype is displayed as a prefix before the holonym.
* `affix`: Like `suffix` and `prefix` but for use when the placetype is displayed as an affix either before or after the
holonym. If both `suffix` or `prefix` and `affix` are given for a single placetype, `suffix` or `prefix` take
precedence.
* `no_affix_strings`: String or list of strings that, if they occur in the holonym, suppress the addition of any affix
requested using `affix_type`. Defaults to the placetype itself. For example, `autonomous okrug` specifies
`affix_type = "Suf"` so that `aokr/Nenets` displays as `Nenets Autonomous Okrug`, but also specifies
`no_affix_strings = "okrug"` so that `aokr/Nenets Okrug` or `aokr/Nenets Autonomous Okrug` displays as specified,
without a redundant `Autonomous Okrug` added. Matching is case-insensitive but whole-word.
* `display_handler`: A function of two arguments, `holonym_placetype` and `holonym_placename` (specifying a holonym).
Its return value is a string specifying the display form of the holonym.
7. The following property keys control the indefinite and definite articles used before entry placetypes and/or holonyms
of the specified placetype.
* `entry_placetype_use_the`: Use `"the"` before this placetype when it occurs as an entry placetype.
* `entry_placetype_indefinite_article`: Indefinite article used before this placetype when it occurs as an entry
placetype (usually `"a"`, specifically for placetypes beginning with u- that don't take the indefinite article
`"an"`). Defaults to the appropriate indefinite article (`"a"` or `"an"` depending on whether the placetype begins
with a vowel). Overridden by `entry_placetype_use_the`, and unlike for most properties, does not apply to equivalent
placetypes (i.e. fallbacks or those formed by removing a qualifier from the beginning); only to the exact placetype
specified.
* `holonym_use_the`: Use `"the"` before holonyms of this placetype.
'''NOTE:'''
# The `link` property must be specified on all placetypes, except those ending in `!` (category-only placetypes), which
must have either `link` or `category_link` specified.
# Either the `class` or `former_type` property must be specified on all placetypes not ending in `!` that do not have a
fallback (if a placetype has a fallback and omits the `class` and `former_type` properties, they are taken from the
fallback). An internal error will result if a placetype has no `class` or `former_type` property derivable either
directly or through a fallback, if an attempt is made to categorize a former/ancient/historical/etc. entity of this
placetype.
# It is possible to have multiple levels of fallback (e.g. `frazione` falls back to `hamlet`, which falls back
to `village`). Fallback loops will cause an internal error. All placetypes specified as fallbacks must exist in
`placetype_data` or an internal error occurs.
]==]
export.placetype_data = {
--[=[
If you need to sort the following, do this (using Vim):
1. Make sure all full-line comments are within the { ... } table, or are moved after and on the same line as single-line
entries.
2. Make sure the table uses tabs everywhere for indent, and not spaces.
3. Mark the top of the table with `ma`, go to the bottom and execute the following two lines in sequence:
:'a,.s/\n/\\n/g
:s/\\n\(\t\[\)/\r\1/g
The first command converts every newline to a literal `\n` sequence, so the whole thing becomes a single line, while
the second command restores the newlines before the beginning of each entry. The effect is to convert all entries to
a single line while not losing any information. (Potentially a negative lookahead could be used to do it all in one
command.)
4. Execute the following to sort:
:'a,.!perl -pe 's/^(\t\[")(.*?)(".*)$/$2 @@@ $1$2$3/' | sort -f | perl -pe 's/.*? @@@ //'
Note that a simple `sort -f` (where `-f` means case-insensitive) would almost work, but it would sort "hill station"
before "hill" and "county borough" before "county" because the space after e.g. "hill station" sorts before the
quotation mark after e.g. "hill". The above command deals with this by extracting the key, prepending it followed by
` @@@ `, sorting, and then removing key (the classic decorate-sort-undecorate pattern).
5. Put the table back to multi-line format by marking the top of the table with `ma`, going to the bottom and executing
:'a,.s/\\n/\r/g
Note that for some reason, in order to get a match a newline in the left side of a replacement, you must use \n, but
to insert a newline in the right sode of a replacement you must use \r.
]=]
["*"] = {
link = false,
cat_handler = generic_place_cat_handler,
},
["administrative atoll"] = {
-- Maldives
link = "+w:administrative divisions of the Maldives",
preposition = "of",
class = "subpolity",
},
["administrative capital"] = {
link = "w",
fallback = "capital city",
},
["administrative center"] = {
link = "w",
fallback = "non-city capital",
},
["administrative centre"] = {
link = "w",
fallback = "administrative center",
},
["administrative county"] = {
link = "w",
fallback = "county",
},
["administrative district"] = {
link = "w",
fallback = "district",
},
["administrative headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["administrative region"] = {
link = true,
preposition = "của",
suffix = "region", -- but prefix is still "administrative region (of)"
fallback = "region",
class = "subpolity",
},
["administrative seat"] = {
link = "w",
fallback = "administrative centre",
},
["administrative territory"] = {
link = "separately",
preposition = "of",
suffix = "territory", -- but prefix is still "administrative territory (of)"
fallback = "territory",
class = "subpolity",
},
["administrative unit"] = {
-- Grrr, it's difficult to generalize about "administrative units". In Albania, "administrative unit" is an
-- official term for a city-level division of municipalities; Wikipedia renders it using the more practical term
-- "commune". In Pakistan, "administrative unit" is a collective term used to refer to all the different types
-- of first-level divisions (four provinces, one federal territory, and two "disputed territories", i.e. Azad
-- Kashmir and Gilgit-Balistan, that are variously described). For this reason, we set no fallback, but we need
-- to include this so that it can be used as a placetype for Albania, categorizing as communes.
link = "w",
class = "subpolity",
},
["administrative village"] = {
link = "w",
preposition = "of",
has_neighborhoods = true,
class = "settlement",
},
["aimag"] = {
-- used in Mongolia, Russia and China (Inner Mongolia); in Mongolia, equivalent to a province;
-- in China, equivalent to a prefecture (below a province); in Russia, equivalent to a municipal district.
link = "w",
fallback = "prefecture",
},
["airport"] = {
link = true,
class = "man-made structure",
default = {true},
},
["alliance"] = {
link = true,
fallback = "confederation",
},
["archipelago"] = {
link = true,
fallback = "island",
},
["area"] = {
link = true,
preposition = "of",
fallback = "geographic and cultural area",
-- Areas can either be administrative divisions (specifically of Kuwait) or geographic areas. Assume the former
-- when categorizing 'Areas' but the latter when handling e.g. 'historical area'.
class = "subpolity",
former_type = "geographic region",
cat_handler = district_neighborhood_cat_handler,
},
["arm"] = {
link = true,
preposition = "of",
class = "natural feature",
default = {"Seas"},
},
["arrondissement"] = {
link = true,
preposition = "of",
-- FIXME!!! Grrrrr!!! In some countries, arrondissements are divisions of cities; in others, they are divisions
-- of departments or provinces. Need to conditionalize on the country for both of the following.
class = "subpolity",
has_neighborhoods = true,
},
["associated province"] = {
link = "separately",
fallback = "province",
},
["atoll"] = {
-- FIXME! Atolls are administrative divisions of the Maldives but natural features elsewhere. Need to
-- conditionalize `class` on the country. See also `administrative atoll`.
link = true,
class = "natural feature",
bare_category_parent = "islands",
default = {true},
},
["autonomous city"] = {
link = "w",
preposition = "of",
fallback = "city",
has_neighborhoods = true,
},
["autonomous community"] = {
-- Spain; refers to regional entities, not village-like entities, as might be expected from "community"
link = true,
preposition = "of",
class = "subpolity",
},
["autonomous island"] = {
-- Comoros; seems like an administrative atoll of the Maldives.
link = "+w:autonomous islands of Comoros",
preposition = "of",
class = "subpolity",
},
["autonomous oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "oblast",
class = "subpolity",
},
["autonomous okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
no_affix_strings = "okrug",
class = "subpolity",
},
["autonomous prefecture"] = {
link = true,
fallback = "prefecture",
},
["autonomous province"] = {
link = "w",
fallback = "province",
},
["autonomous region"] = {
link = "w",
preposition = "of",
fallback = "administrative region",
-- "administrative region" sets an affix of "region" but we want to display as "Tibet Autonomous Region"
-- if the user writes 'ar:Suf/Tibet'.
affix = "autonomous region",
},
["autonomous republic"] = {
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territorial unit"] = {
-- Moldova; only two of them, one for Gagauzia and one for Transnistria.
link = "w",
preposition = "of",
class = "subpolity",
},
["autonomous territory"] = {
link = "w",
fallback = "dependent territory",
},
["bailiwick"] = {
-- Jersey, etc.
link = true,
fallback = "polity",
},
["barangay"] = {
-- Philippines
link = true,
class = "settlement",
-- Barangays are formal administrative divisions of a city rather than informal neighborhoods, but can use
-- some of the properties of a neighborhood.
fallback = "neighborhood",
},
["barrio"] = {
-- Spanish-speaking countries; Philippines
link = true,
-- FIXME: Not completely correct, in some countries barrios are formal administrative divisions of a city.
-- `class` will need to conditionalize on the country to be completely correct.
fallback = "neighborhood",
},
["basin"] = {
link = true,
fallback = "lake",
},
["vịnh"] = {
link = true,
preposition = "của",
class = "natural feature",
addl_bare_category_parents = {"Vùng nước"},
default = {true},
},
["bãi biển"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"nước"},
default = {true},
},
["beach resort"] = {
link = "w",
fallback = "resort town",
},
["bishopric"] = {
link = true,
fallback = "polity",
},
["vùng nước!"] = {
-- FIXME: This is (maybe?) a type category not a name category. There should be an option for this. We need to
-- straighten out the type vs. name vs. related-to issue.
category_link = "vùng nước",
class = "natural feature",
addl_bare_category_parents = {"địa mạo", "hệ thống sinh thái", "nước"},
},
["borough"] = {
link = true,
preposition = "of",
display_handler = borough_display_handler,
has_neighborhoods = true,
-- "former borough" could be a former settlement or a former part of a city but seems more likely to
-- be a former subpolity, particularly in England. FIXME, we really need a handler to take care of this
-- properly.
class = "subpolity",
-- Grr, some boroughs are city-like but some (e.g. in Britain) may be larger.
},
["borough seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["branch"] = {
link = true,
preposition = "of",
fallback = "river",
},
["bridge"] = {
link = true,
class = "man-made structure",
default = {"Named bridges"},
},
["building"] = {
link = true,
class = "man-made structure",
default = {"Named buildings"},
},
["built-up area"] = {
link = "w",
fallback = "area",
},
["burgh"] = {
link = true,
fallback = "borough",
},
["business park"] = {
link = true,
fallback = "park",
},
["caliphate"] = {
link = true,
fallback = "polity",
},
["canton"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["cape"] = {
link = true,
fallback = "headland",
},
["capital"] = {
link = true,
fallback = "capital city",
},
["capital city"] = {
link = true,
category_link = "[[capital city|capital cities]]: the [[seat of government|seats of government]] for a country or [[political]] [[division]] of a country",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
bare_category_parent = "cities",
cat_handler = capital_city_cat_handler,
default = {true},
-- The following is necessary so that e.g. [[Melbourne]] defined as {{place|en|capital city|s/Victoria|c/Australia}}
-- gets categorized in the bare category [[Category:en:Melbourne]]; otherwise placetype 'capital city' wouldn't
-- match against the placetype 'city' of Melbourne.
fallback = "city",
},
["caplc"] = {
link = "[[capital]] and [[large]]st [[city]]",
plural_link = false,
fallback = "capital city",
},
["captaincy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["caravan city"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"ANCIENT", "FORMER"},
},
["castle"] = {
link = true,
fallback = "building",
},
["cathedral city"] = {
link = true,
fallback = "city",
},
["cattle station"] = {
-- Australia
link = true,
fallback = "farm",
},
["census area"] = {
link = true,
affix_type = "Suf",
has_neighborhoods = true,
class = "non-admin settlement",
},
["census-designated place"] = {
-- United States
link = true,
class = "non-admin settlement",
},
["census division"] = {
-- Canada
link = "w",
preposition = "of",
class = "subpolity",
},
["census town"] = {
link = "w",
fallback = "town",
},
["central business district"] = {
link = true,
fallback = "neighborhood",
},
["cercle"] = {
-- Mali
link = "+w:cercles of Mali",
preposition = "of",
class = "subpolity",
},
["ceremonial county"] = {
link = true,
fallback = "county",
},
["chain of islands"] = {
link = "[[chain]] of [[island]]s",
plural = "chains of islands",
plural_link = "[[chain]]s of [[island]]s",
fallback = "island",
},
["channel"] = {
link = true,
fallback = "strait",
},
["charter community"] = {
-- Northwest Territories, Canada
link = "w",
fallback = "village",
},
["city"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["city-state"] = {
link = true,
category_link = "[[sovereign]] [[microstate]]s consisting of a single [[city]] and [[w:dependent territory|dependent territories]]",
has_neighborhoods = true,
class = "settlement",
["continent/*"] = {"City-states", "Cities in +++", "Quốc gia của +++", "National capitals"},
default = {"City-states", "Cities", "Quốc gia", "National capitals"},
},
["civil parish"] = {
-- Mostly England; similar to municipalities
link = true,
preposition = "of",
affix_type = "suf",
has_neighborhoods = true,
class = "subpolity",
},
["claimed political division"] = {
link = "[[claim]]ed [[political]] [[division]]",
class = "subpolity",
default = {true},
},
["co-capital"] = {
link = "[[co-]][[capital]]",
fallback = "capital city",
},
["coal city"] = {
link = "+w:coal town",
fallback = "city",
},
["coal town"] = {
link = "w",
fallback = "town",
},
["collectivity"] = {
link = "w",
preposition = "of",
-- No default; these are weird one-off governmental divisions in France (esp. for overseas collectivities)
class = "subpolity",
},
["colony"] = {
link = true,
fallback = "dependent territory",
},
["comarca"] = {
-- per Wikipedia: traditional region or local administrative division found in Portugal, Spain, and some of
-- their former colonies, like Brazil, Nicaragua, and Panama. In the Valencian Community, for example, it
-- sits between municipalities and provinces, something like a county or district.
link = true,
preposition = "of",
class = "subpolity",
},
["commandery"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["commonwealth"] = {
link = true,
preposition = "of",
-- No default; applies specifically to Puerto Rico
class = "subpolity",
},
["commune"] = {
link = true,
fallback = "municipality",
},
["community"] = {
link = true,
category_link = "[[community|communities]] of all sizes",
fallback = "village",
},
["community development block"] = {
-- in India; appears to be similar to a rural municipality; groups several villages, unclear if there will be
-- neighborhoods so I'm not setting `has_neighborhoods` for now
link = "w",
affix_type = "suf",
no_affix_strings = "block",
class = "subpolity",
},
["comune"] = {
-- Italy, Switzerland
link = true,
fallback = "municipality",
},
["condominium"] = {
link = true,
fallback = "polity",
},
["confederacy"] = {
link = true,
fallback = "confederation",
},
["confederation"] = {
link = true,
fallback = "polity",
},
["constituency"] = {
-- currently we have them as political divisions of Namibia but many countries have them
link = true,
preposition = "of",
class = "subpolity",
},
["constituent country"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["constituent part"] = {
link = "separately",
preposition = "of",
class = "subpolity",
},
["constituent republic"] = {
-- Of Russia, Yugoslavia, etc.
link = "separately",
preposition = "of",
class = "subpolity",
},
["counties and county-level cities!"] = {
-- This is used when grouping counties and county-level cities under prefecture-level cities in China.
category_link = "[[county|counties]] and [[county-level city|county-level cities]]",
class = "subpolity",
},
["continent"] = {
link = true,
category_link = false, -- can't occur as a bare category
class = "natural feature",
default = {"Continents and continental regions"},
},
["continental region"] = {
link = "separately",
category_link = false, -- can't occur as a bare category
class = "geographic region",
fallback = "continent",
},
["continents and continental regions!"] = {
category_link = "[[continent]]s and [[continent]]-[[level]] [[region]]s (e.g. [[Polynesia]])",
class = "geographic region",
},
["council area"] = {
link = true,
-- in Scotland; similar to a county
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["quốc gia"] = {
link = true,
class = "polity",
["continent/*"] = {true, "Quốc gia"},
default = {true},
},
["country-like entities!"] = {
category_link = "[[polity|polities]] not normally considered [[country|countries]] but treated similarly for categorization purposes; typically, [[unrecognized]] [[de-facto]] countries or [[w:dependent territory|dependent territories]]",
class = "polity",
},
["county"] = {
link = true,
preposition = "of",
display_handler = county_display_handler,
class = "subpolity",
},
["county borough"] = {
link = true,
-- in Wales; similar to a county
preposition = "of",
affix_type = "suf",
fallback = "borough",
class = "subpolity",
},
["county seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["county town"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
fallback = "town",
has_neighborhoods = true,
class = "capital",
},
["county-administered city"] = {
-- In Taiwan, per Wikipedia similar to a Taiwanese township or district, which is a small city.
-- NOT anything like a "county-level city" in PR China, which is a county masquerading as a city.
link = "w",
fallback = "city",
has_neighborhoods = true,
class = "settlement",
},
["county-controlled city"] = {
-- Taiwan
link = "w",
fallback = "county-administered city",
},
["county-level city"] = {
-- PR China
link = "w",
fallback = "prefecture-level city",
},
["crater lake"] = {
link = true,
fallback = "lake",
},
["creek"] = {
link = true,
fallback = "stream",
},
["Crown colony"] = {
link = "+crown colony",
fallback = "crown colony",
},
["crown colony"] = {
link = true,
fallback = "colony",
},
["Crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["crown dependency"] = {
link = true,
fallback = "dependent territory",
},
["cultural area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["cultural region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["delegation"] = {
-- Tunisia
link = "+w:delegations of Tunisia",
preposition = "of",
class = "subpolity",
},
["department"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["departmental capital"] = {
link = "separately",
fallback = "capital city",
},
["dependency"] = {
link = true,
fallback = "dependent territory",
},
["dependent territory"] = {
link = "w",
preposition = "of",
class = "subpolity",
former_type = "dependent territory",
bare_category_parent = "political divisions",
["country/*"] = {true},
default = {true},
},
["hoang mạc"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"hệ thống sinh thái"},
default = {true},
},
["deserted mediaeval village"] = {
link = "w",
fallback = "deserted medieval village",
},
["deserted medieval village"] = {
link = "w",
fallback = "ANCIENT settlement",
},
["direct-administered municipality"] = {
-- China
link = "+w:direct-administered municipalities of China",
fallback = "municipality",
},
["direct-controlled municipality"] = {
-- several countries
link = "w",
fallback = "municipality",
},
["distributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["district"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- Grrr! FIXME! Here is where we need handlers for `class`. Using similar logic to
-- district_neighborhood_cat_handler, we need to check if we're below or above a city to determine if the class
-- is "settlement" or "subpolity".
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
-- No default. Countries for which districts are political divisions will get entries.
},
["districts and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Portugal.
category_link = "[[district]]s and [[autonomous region]]s",
class = "subpolity",
},
["districts and autonomous territorial units!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Moldova.
category_link = "[[district]]s and [[w:autonomous territorial unit|autonomous territorial unit]]s",
class = "subpolity",
},
["district capital"] = {
link = "separately",
fallback = "capital city",
},
["district headquarters"] = {
link = "separately",
fallback = "administrative centre",
},
["district municipality"] = {
-- In Canada, a district municipality is equivalent to a rural municipality and won't have neighborhoods; in
-- South Africa, district municipalities group local municipalities and hence won't have neighborhoods.
link = "w",
preposition = "of",
affix_type = "suf",
no_affix_strings = {"district", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["division"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["division capital"] = {
link = "separately",
fallback = "capital city",
},
["dome"] = {
link = true,
fallback = "mountain",
},
["dormant volcano"] = {
link = true,
fallback = "volcano",
},
["duchy"] = {
link = true,
fallback = "polity",
},
["emirate"] = {
link = true,
preposition = "of",
-- FIXME: Can be subpolities (of the United Arab Emirates).
fallback = "polity",
},
["empire"] = {
link = true,
fallback = "polity",
},
["enclave"] = {
link = true,
preposition = "of",
-- Enclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["entity"] = {
-- Bosnia and Herzegovina
link = "+w:entities of Bosnia and Herzegovina",
preposition = "of",
class = "subpolity",
},
["escarpment"] = {
link = true,
fallback = "mountain",
},
["ethnographic region"] = {
-- used in Lithuania
link = "+w:ethnographic regions of Lithuania",
fallback = "geographic and cultural area",
},
["exclave"] = {
link = true,
preposition = "of",
-- exclaves can theoretically be any size but assume a subpolity.
class = "subpolity",
},
["external territory"] = {
link = "separately",
fallback = "dependent territory",
},
["farm"] = {
link = true,
class = "non-admin settlement",
default = {"Farms and ranches"},
},
["farms and ranches!"] = {
category_link = "[[farm]]s and [[ranch]]es",
class = "non-admin settlement",
},
["federal city"] = {
link = "w",
preposition = "of",
fallback = "city",
},
["federal district"] = {
link = true,
preposition = "of",
-- Might have neighborhoods as federal districts are often cities (e.g. Mexico City)
has_neighborhoods = true,
class = "settlement",
},
["federal subject"] = {
-- In Russia; a generic term for first-level administrative divisions (republics, oblasts, okrugs, krais,
-- autonomous okrugs and autonomous oblasts).
link = "w",
preposition = "of",
class = "subpolity",
},
["federal territory"] = {
link = "w",
fallback = "territory",
},
["fictional location"] = {
link = "separately",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "places",
default = {true},
},
["First Nations reserve"] = {
-- Canada
link = "[[First Nations]] [[w:Indian reserve|reserve]]",
-- Wikipedia uses "Indian reserve"; presumably that is the legal term
fallback = "Indian reserve",
class = "subpolity",
},
["fjord"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["footpath"] = {
link = true,
fallback = "road",
},
["rừng"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"hệ thống sinh thái", "lâm nghiệp"},
default = {true},
},
["fort"] = {
link = true,
fallback = "building",
},
["fortress"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- fortresses -> fortresse, so put an entry here to ensure we singularize correctly.
plural = "fortresses",
fallback = "building",
},
["frazione"] = {
link = "w",
fallback = "hamlet",
},
["freeway"] = {
link = true,
fallback = "road",
},
["French prefecture"] = {
link = "[[w:prefectures in France|prefecture]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
},
["geographic and cultural area"] = {
link = "+w:cultural area",
-- `generic_before_non_cities` is used when generating the category description of categories of the format
-- `Geographic and cultural areas of PLACE`. `preposition` is used when generating {{place}} description and
-- categories for any placetype that falls back to `geographic and cultural area`.
generic_before_non_cities = "of",
preposition = "of",
class = "geographic region",
bare_category_parent = "places",
["country/*"] = {true},
["constituent country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["geographic area"] = {
link = "+w:geographic region",
fallback = "geographic and cultural area",
},
["geographic region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical area"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geographical region"] = {
link = "w",
fallback = "geographic and cultural area",
},
["geopolitical zone"] = {
-- Nigeria
link = true,
preposition = "of",
class = "subpolity",
},
["gewog"] = {
-- Bhutan
link = true,
preposition = "of",
class = "subpolity",
},
["ghost town"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
bare_category_parent = "former settlements",
cat_handler = city_type_cat_handler,
default = {true},
},
["glen"] = {
link = true,
fallback = "valley",
},
["governorate"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["greater administrative region"] = {
-- China (former division)
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["gromada"] = {
-- Poland (former division)
link = "w",
preposition = "of",
affix_type = "Pref",
class = "subpolity",
inherently_former = {"FORMER"},
},
["group of islands"] = {
link = "[[group]] of [[island]]s",
plural = "groups of islands",
plural_link = "[[group]]s of [[island]]s",
fallback = "island group",
},
["vịnh biển"] = {
link = true,
preposition = "của",
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["hamlet"] = {
link = true,
fallback = "village",
},
["harbor city"] = {
link = "separately",
fallback = "city",
},
["harbor town"] = {
link = "separately",
fallback = "town",
},
["harbour city"] = {
link = "separately",
fallback = "city",
},
["harbour town"] = {
link = "separately",
fallback = "town",
},
["mũi đất"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"địa mạo"},
default = {true},
},
["headquarters"] = {
link = "w",
fallback = "administrative centre",
},
["bãi hoang"] = {
link = true,
fallback = "đồng hoang",
},
["hemisphere"] = {
link = true,
entry_placetype_use_the = true,
fallback = "continental region",
},
["highway"] = {
link = true,
fallback = "road",
},
["đồi"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"địa mạo"},
default = {true},
},
["hill station"] = {
link = "w",
fallback = "town",
},
["hill town"] = {
link = "w",
fallback = "town",
},
["historic region"] = {
-- provided only for the link
link = "+w:historical region",
fallback = "FORMER geographic region",
},
["historical county"] = {
-- needed for historical counties of England/etc.
link = "+w:historic county",
fallback = "FORMER subpolity",
},
["historical region"] = {
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["home rule city"] = {
link = "w",
fallback = "city",
},
["home rule municipality"] = {
link = "w",
fallback = "municipality",
},
["hot spring"] = {
link = true,
fallback = "spring",
},
["house"] = {
link = true,
fallback = "building",
},
["housing estate"] = {
-- not the same as a housing project (i.e. public housing)
link = true,
-- not exactly the case but approximately
fallback = "neighborhood",
},
["hromada"] = {
-- Ukraine
link = "w",
disallow_in_entries = "Use placetype 'urban hromada', 'rural hromada' or 'settlement hromada' in place of bare 'hromada'",
disallow_in_holonyms = "Use placetype 'urban hromada'/'uhrom', 'rural hromada'/'rhrom' or 'settlement hromada'/'shrom' in place of bare 'hromada'",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["inactive volcano"] = {
link = "w",
fallback = "dormant volcano",
},
["independent city"] = {
link = true,
fallback = "city",
},
["independent town"] = {
link = "+independent city",
fallback = "town",
},
["Indian reservation"] = {
link = "w",
-- In the US. Also known as "Native American reservation" or "domestic dependent nation", and the reservations
-- themselves often use the term "nation" in their official name (e.g. the "Navajo Nation"). But Wikipedia puts
-- the article at [[w:Indian reservation]] and uses that term when describing e.g. what the Navajo Nation is,
-- so this must still be the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["Indian reserve"] = {
link = "w",
-- In Canada. "First Nations reserve" sounds more modern/PC but Wikipedia uses "Indian reserve"; presumably that
-- is still the legal term.
preposition = "of",
class = "subpolity",
default = {true},
},
["inland sea"] = {
-- note, we also have 'inland' as a qualifier
link = true,
fallback = "sea",
},
["inner city area"] = {
link = "[[inner city]] [[area]]",
fallback = "neighborhood",
},
["đảo"] = {
link = true,
preposition = "của",
class = "natural feature",
addl_bare_category_parents = {"địa mạo"},
default = {true},
},
["island country"] = {
-- FIXME: The following should map to both 'island' and 'country'.
link = "w",
fallback = "country",
},
["island group"] = {
link = "separately",
fallback = "island",
},
["island municipality"] = {
link = "w",
fallback = "municipality",
},
["islet"] = {
link = "w",
fallback = "island",
},
["Israeli settlement"] = {
link = "w",
class = "settlement",
default = {true},
},
["judicial capital"] = {
link = "w",
fallback = "capital city",
},
["khanate"] = {
link = true,
fallback = "polity",
},
["kibbutz"] = {
link = true,
plural = "kibbutzim",
class = "non-admin settlement",
default = {true},
},
["kingdom"] = {
link = true,
fallback = "monarchy",
},
["krai"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["hồ"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["địa mạo!"] = {
category_link = "[[địa mạo]]",
bare_category_parent = "địa danh",
addl_bare_category_parents = {"Trái Đất"},
},
["largest city"] = {
link = "[[large]]st [[city]]",
entry_placetype_use_the = true,
fallback = "city",
has_neighborhoods = true,
},
["league"] = {
link = true,
fallback = "confederation",
},
["legislative capital"] = {
link = "separately",
fallback = "capital city",
},
["library"] = {
link = true,
fallback = "building",
},
["lieutenancy area"] = {
-- used in the United Kingdom; per Wikipedia:
-- In England, lieutenancy areas are colloquially known as the ceremonial counties, although this phrase does
-- not appear in any legislation referring to them. The lieutenancy areas of Scotland are subdivisions of
-- Scotland that are more or less based on the counties of Scotland, making use of the major cities as separate
-- entities.[2] In Wales, the lieutenancy areas are known as the preserved counties of Wales and are based on
-- those used for lieutenancy and local government between 1974 and 1996. The lieutenancy areas of Northern
-- Ireland correspond to the six counties and two former county boroughs.[3]
link = "w",
fallback = "ceremonial county",
},
["local authority district"] = {
link = "w",
fallback = "local government district",
},
["local government area"] = {
-- Australia
link = "w",
preposition = "of",
class = "subpolity",
},
["local council"] = {
-- Malta; similar to municipalities
link = "+w:local councils of Malta",
preposition = "of",
fallback = "municipality",
},
["local government district"] = {
link = "w",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local government district with borough status"] = {
link = "[[w:local government district|local government district]] with [[w:borough status|borough status]]",
plural = "local government districts with borough status",
plural_link = "[[w:local government district|local government districts]] with [[w:borough status|borough status]]",
preposition = "of",
affix_type = "suf",
affix = "district",
class = "subpolity",
},
["local urban district"] = {
link = "w",
fallback = "unincorporated community",
},
["locality"] = {
link = "+w:locality (settlement)",
-- not necessarily true, but usually is the case
fallback = "village",
},
["London borough"] = {
link = "w",
preposition = "of",
affix_type = "pref",
affix = "borough",
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["macroregion"] = {
link = true,
fallback = "region",
},
["man-made structures!"] = {
category_link = "[[w:geographical feature#Engineered constructs|man-made structures]] such as [[airport]]s, [[university|universities]] and [[metro station]]s",
bare_category_parent = "places",
},
["manor"] = {
-- FIXME: or is this more like a farm?
link = true,
fallback = "building",
},
["marginal sea"] = {
link = true,
preposition = "of",
fallback = "sea",
},
["market city"] = {
link = "+market town",
fallback = "city",
},
["market town"] = {
link = true,
fallback = "town",
},
["massif"] = {
link = true,
fallback = "mountain",
},
["megacity"] = {
link = true,
fallback = "city",
},
["metro station"] = {
link = true,
class = "man-made structure",
},
["metropolitan borough"] = {
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"borough", "city"},
fallback = "local government district",
has_neighborhoods = true,
},
["metropolitan city"] = {
-- These exist e.g. in Italy and are more like municipalities or even provinces than cities.
link = true,
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"metropolitan", "city"},
class = "subpolity",
},
["metropolitan county"] = {
link = true,
fallback = "county",
},
["metropolitan municipality"] = {
-- In South Africa, metropolitan municipalities group local municipalities and are like districts, between
-- provinces and municipalities.
-- In Turkey, metropolitan municipalities are provinces-level.
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"metropolitan", "municipality"},
fallback = "municipality",
class = "subpolity",
},
["microdistrict"] = {
-- residential complex in post-Soviet states
link = true,
fallback = "neighborhood",
},
["micronations!"] = {
-- FIXME, merge with microstate
category_link = "[[micronation]]s",
bare_category_parent = "quốc gia",
},
["microstate"] = {
link = true,
fallback = "country",
},
["military base"] = {
link = "w",
class = "settlement", -- or "man-made structure"?
default = {true},
},
["minster town"] = {
-- England
link = "separately",
fallback = "town",
},
["monarchy"] = {
link = true,
fallback = "polity",
},
["đồng hoang"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"địa mạo", "hệ thống sinh thái"},
default = {true},
},
["thảo nguyên"] = {
link = true,
fallback = "đồng hoang",
},
["motorway"] = {
link = true,
fallback = "road",
},
["mountain"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["mountain indigenous district"] = {
-- Taiwan
link = "+w:district (Taiwan)",
fallback = "district",
},
["mountain indigenous township"] = {
-- Taiwan
link = "+w:township (Taiwan)",
fallback = "township",
},
["mountain pass"] = {
link = true,
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "mountain passes",
class = "natural feature",
addl_bare_category_parents = {"mountains"},
default = {true},
},
["mountain range"] = {
link = true,
fallback = "mountain",
},
["mountainous region"] = {
link = "separately",
fallback = "region",
},
["mukim"] = {
-- Malaysia, Brunei, Indonesia, Singapore
link = true,
preposition = "of",
class = "subpolity",
},
["municipal district"] = {
link = "w",
-- meaning varies depending on the country; for now, assume no neighborhoods.
-- FIXME: has_neighborhoods might have to be a function that looks at the containing holonyms.
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "municipality",
},
["municipality"] = {
link = true,
preposition = "of",
has_neighborhoods = true,
class = "subpolity",
},
["municipality with city status"] = {
link = "[[municipality]] with [[w:city status|city status]]",
plural = "municipalities with city status",
plural_link = "[[municipality|municipalities]] with [[w:city status|city status]]",
fallback = "municipality",
},
["museum"] = {
link = true,
fallback = "building",
},
["địa danh thần thoại"] = {
link = "địa danh thần thoại",
former_type = "!",
class = "hypothetical location",
bare_category_parent = "địa danh",
default = {true},
},
["named bridges!"] = {
category_link = "notable [[bridge]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"bridges"},
},
["named buildings!"] = {
category_link = "notable [[house]]s, [[library|libraries]] and other [[building]]s",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"buildings"},
},
["named roads!"] = {
category_link = "notable [[road]]s, [[highway]]s, [[trail]]s and similar linear structures",
bare_category_parent = "man-made structures",
addl_bare_category_parents = {"roads"},
},
["national capital"] = {
link = "w",
fallback = "capital city",
},
["national park"] = {
link = true,
fallback = "park",
},
["đặc điểm tự nhiên!"] = {
category_link = "tổng hợp các yếu tố vật chất hình thành tồn tại",
bare_category_parent = "địa danh",
},
["neighborhood"] = {
-- The majority of the properties here apply to both `neighborhoods` and `neighbourhoods`; the choice of which
-- one to use is made by district_neighborhood_cat_handler() based on the value of `british_spelling` for the
-- location (city, political division, etc.) of the holonym that follows the word "neighbo(u)hoods" in the
-- category name. It does *NOT* depend on whether the {{place}} call uses "neighborhoods" or "neighbourhoods".
-- (In general it can't, because other things like "urban areas", "districts", "subdivisions" and the like also
-- categorize as neighbo(u)rhoods.)
link = true,
-- See below. These are used by category handlers in [[Module:category tree/topic cat/data/Places]].
generic_before_non_cities = "in",
generic_before_cities = "of",
-- The following text is suitable for the top-level description of a neighborhood as well as categories of the
-- form `Neighborhoods in POLDIV` e.g. `Neighborhoods in Illinois, USA` but not for categories of the form
-- `Neighborhoods of Chicago`, where we'd get "... and other subportions of [[city|cities]] of [[Chicago]]".
category_link = "[[neighborhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighborhood]]s, [[district]]s and other subportions",
-- NOTE: This setting is needed for administrative divisions like barangays that fall back to `neighborhood`,
-- when set in [[Module:place/locations]] for a specific country (e.g. the Philippines). The above settings
-- for `generic_before_non_cities` and `generic_before_cities` are used by category handlers in
-- [[Module:category tree/topic cat/data/Places]] for `Neighborhoods in POLDIV` and `Neighborhoods of CITY`
-- categories. In fact, district_neighborhood_cat_handler() does not currently pay attention to them, but
-- generates "of" before cities and "in" before non-cities regardless. (FIXME: We should change that.)
preposition = "of",
class = "non-admin settlement",
cat_handler = district_neighborhood_cat_handler,
},
["neighbourhood"] = {
link = true,
category_link = "[[neighbourhood]]s, [[district]]s and other subportions of [[city|cities]]",
category_link_before_city = "[[neighbourhood]]s, [[district]]s and other subportions",
fallback = "neighborhood",
},
["new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
preposition = "in",
class = "subpolity", --?
},
["new town"] = {
link = true,
fallback = "town",
},
["non-city capital"] = {
link = "[[capital]]",
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
cat_handler = function(data)
return capital_city_cat_handler(data, "non-city")
end,
-- FIXME, do we need the following?
default = {true},
},
["non-metropolitan county"] = {
link = "w",
fallback = "county",
},
["non-metropolitan district"] = {
link = "w",
fallback = "local government district",
},
["non-sovereign kingdom"] = {
-- especially in Africa and Asia
link = "+w:non-sovereign monarchy",
generic_before_non_cities = "in",
class = "subpolity",
["country/*"] = {true},
["continent/*"] = {true},
default = {true},
},
["non-sovereign monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["oblast"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["oblasts and autonomous republics!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Ukraine.
category_link = "[[oblast]]s and [[w:autonomous republic|autonomous republic]]s",
class = "subpolity",
},
["đại dương"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"biển", "vùng nước"},
default = {true},
},
["okrug"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["overseas collectivity"] = {
link = "w",
fallback = "collectivity",
},
["overseas department"] = {
link = "w",
fallback = "department",
},
["overseas territory"] = {
link = "w",
fallback = "dependent territory",
},
["parish"] = {
link = true,
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["parish municipality"] = {
-- in Quebec, often similar to a rural village; the famous [[Saint-Louis-du-Ha! Ha!]] is one of them.
link = "+w:parish municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true,
},
["parish seat"] = {
link = true,
entry_placetype_use_the = true,
preposition = "of",
class = "capital",
has_neighborhoods = true,
},
["park"] = {
link = true,
class = "man-made structure",
default = {true},
},
["pass"] = {
link = "+mountain pass",
-- The default plural algorithm gets this right but the singularization algorithm incorrectly converts
-- passes -> passe, so put an entry here to ensure we singularize correctly.
plural = "passes",
fallback = "mountain pass",
},
["path"] = {
link = true,
fallback = "road",
},
["peak"] = {
link = true,
fallback = "mountain",
},
["peninsula"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
},
["periphery"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["địa danh!"] = {
generic_before_non_cities = "của",
generic_before_cities = "của",
class = "generic place",
category_link = "[[place]]s of all sorts",
-- `category_link_top_level` control the description used in the top-level [[Category:Places]] and
-- language-specific variants such as [[Category:en:Places]]. The actual text for a language-spefic variant is
-- "{{{langname}}} names of [[geographical]] [[place]]s of all sorts; [[toponym]]s." where the "names of"
-- portion is automatically generated by the appropriate handler in
-- [[Module:category tree/topic cat/data/Places]].
category_link_top_level = "[[geographical]] [[place]]s of all sorts; [[toponym]]s",
bare_category_parent = "tên",
},
["planned community"] = {
-- Include this so we don't categorize 'planned community' into villages, as 'community' does.
link = true,
class = "settlement",
has_neighborhoods = true,
},
["plateau"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true},
-- FIXME: Should generate both "Plateaus" and the appropriate 'geographic and cultural area' category
},
["Polish colony"] = {
link = "[[w:colony (Poland)|colony]]",
affix_type = "suf",
affix = "colony",
fallback = "village",
has_neighborhoods = true,
},
["political divisions!"] = {
category_link = "[[political]] [[division]]s and [[subdivision]]s, such as [[state]]s, [[province]]s, [[county|counties]] or [[district]]s",
bare_category_parent = "places",
},
["tổ chức chính trị"] = {
link = true,
category_link = "[[independent]] or [[semi-]][[independent]] [[polity|polities]]",
class = "polity",
bare_category_parent = "địa danh",
default = {true},
},
["populated place"] = {
link = "+w:populated place",
-- not necessarily true, but usually is the case
fallback = "village",
},
["port"] = {
link = true,
class = "man-made structure",
default = {true},
},
["port city"] = {
-- FIXME: should categorize into "Ports" as well as "Cities"
link = true,
fallback = "city",
},
["port town"] = {
-- FIXME: should categorize into "Ports" as well as "Towns"
link = "w",
fallback = "town",
},
["prefecture"] = {
-- FIXME! `prefecture` is like a county in Japan and elsewhere but a department capital city in France.
-- May need `has_neighborhoods` to be a function.
link = true,
preposition = "of",
display_handler = prefecture_display_handler,
class = "subpolity",
},
["prefecture-level city"] = {
-- China; they are huge entities with a central city; not cities themselves.
link = "w",
preposition = "of",
class = "subpolity",
},
["preserved county"] = {
-- In Wales; they are former counties enshrined in law; there are 8 of them and each consists of one or more
-- "principal areas" (styled as "counties" or "county boroughs"), of which there are 22.
link = "w",
preposition = "of",
class = "subpolity",
inherently_former = {"FORMER"},
},
["primary area"] = {
-- a grouping of "districts" (neighborhoods) in Gothenburg, Sweden
link = "+w:sv:primärområde",
fallback = "neighborhood",
},
["principality"] = {
link = true,
fallback = "monarchy",
},
["promontory"] = {
link = true,
fallback = "headland",
},
["protectorate"] = {
link = true,
fallback = "dependent territory",
},
["province"] = {
link = true,
preposition = "of",
display_handler = province_display_handler,
class = "subpolity",
},
["provinces and autonomous regions!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case China.
category_link = "[[province]]s and [[autonomous region]]s",
class = "subpolity",
},
["provinces and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Canada and Pakistan.
category_link = "[[province]]s and [[territory|territories]]",
class = "subpolity",
},
["provincial capital"] = {
link = true,
fallback = "capital city",
},
["raion"] = {
link = true,
preposition = "of",
affix_type = "Suf",
class = "subpolity",
},
["ranch"] = {
link = true,
fallback = "farm",
},
["range"] = {
-- FIXME: Where is this used? Is it a mountain range?
link = true,
class = "natural feature",
},
["regency"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["region"] = {
link = true,
preposition = "of",
-- If 'region' isn't a specific administrative division, fall back to 'geographic and cultural area'
fallback = "geographic and cultural area",
-- "former region" is a subpolity but traditional/historic(al)/ancient/medieval/etc. is a geographic region
class = "geographic region",
},
["regional capital"] = {
link = "separately",
fallback = "capital city",
},
["regional county municipality"] = {
-- Quebec
link = "w",
preposition = "of",
affix_type = "Suf",
no_affix_strings = {"municipality", "county"},
fallback = "municipality",
},
["regional district"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "district",
fallback = "district",
},
["regional municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
},
["regional unit"] = {
link = "w",
preposition = "of",
affix_type = "suf",
class = "subpolity",
},
["registration county"] = {
-- Used in Scotland for land registration purposes; formerly used in England, Wales and Ireland for statistical
-- purposes (registration of births, deaths and marriages, and for the output of census information).
link = "w",
fallback = "county",
},
["republic"] = {
-- Of Russia, Yugoslavia, etc. "Republics" in general are sovereign but we use "country" in that case.
link = true,
fallback = "constituent republic",
},
["research base"] = {
link = "+w:research station",
fallback = "research station",
},
["research station"] = {
link = "w",
class = "non-admin settlement", -- or "man-made structure"?
default = {true},
},
["reservoir"] = {
link = true,
fallback = "lake",
},
["residential area"] = {
link = "separately",
fallback = "neighborhood",
},
["resort city"] = {
link = "w",
fallback = "city",
},
["resort town"] = {
link = "w",
fallback = "town",
},
["sông"] = {
link = true,
generic_before_non_cities = "của",
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
cat_handler = city_type_cat_handler,
["continent/*"] = {true},
default = {true},
},
["river island"] = {
link = "w",
fallback = "island",
},
["road"] = {
link = true,
class = "man-made structure",
default = {"Named roads"},
},
["Roman province"] = {
-- FIXME! Eliminate this in favor of 'former province|emp/Roman Empire'
link = "w",
default = {"Provinces of the Roman Empire"},
class = "subpolity",
},
["royal borough"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = {"royal", "borough"},
fallback = "local government district with borough status",
has_neighborhoods = true,
},
["royal burgh"] = {
link = true,
fallback = "borough",
},
["royal capital"] = {
link = "w",
fallback = "capital city",
},
["rural committee"] = {
-- Hong Kong; a group of villages
link = "w",
affix_type = "Suf",
has_neighborhoods = true,
class = "settlement",
},
["rural community"] = {
-- New Brunswick
link = "+w:list of municipalities in New_Brunswick#Rural communities",
fallback = "municipality",
},
["rural hromada"] = {
link = "[[rural]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["rural municipality"] = {
link = "w",
preposition = "of",
affix_type = "Pref",
no_affix_strings = "municipality",
fallback = "municipality",
has_neighborhoods = true, --?
},
["rural township"] = {
-- Taiwan
link = "+w:rural township (Taiwan)",
fallback = "township",
},
["sanctuary"] = {
link = true,
fallback = "temple",
},
["satrapy"] = {
link = true,
preposition = "of",
class = "subpolity",
inherently_former = {"ANCIENT", "FORMER"},
},
["biển"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"vùng nước"},
default = {true},
},
["seaport"] = {
link = true,
fallback = "port",
},
["seat"] = {
link = true,
fallback = "administrative centre",
},
["self-administered area"] = {
-- Myanmar (groups self-administered divisions and zones)
link = "+w:self-administered zone",
preposition = "of",
class = "subpolity",
},
["self-administered division"] = {
-- Myanmar (only one of them: Wa Self-Administered Division)
link = "w",
fallback = "self-administered area",
},
["self-administered zone"] = {
-- Myanmar (five of them)
link = "w",
fallback = "self-administered area",
},
["separatist state"] = {
link = "separately",
fallback = "unrecognized country",
},
["settlement"] = {
link = true,
category_link = "[[settlement]]s such as [[city|cities]], [[village]]s and [[farm]]s",
bare_category_parent = "places",
-- not necessarily true, but usually is the case
fallback = "village",
},
["settlement hromada"] = {
link = "[[w:Populated places in Ukraine#Rural settlements|settlement]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["sheading"] = {
-- Isle of Man
link = true,
fallback = "district",
},
["sheep station"] = {
-- Australia
link = true,
fallback = "farm",
},
["shire"] = {
link = true,
fallback = "county",
},
["shire county"] = {
link = "w",
fallback = "county",
},
["shire town"] = {
link = true,
fallback = "county seat",
},
["ski resort city"] = {
link = "[[ski resort]] [[city]]",
fallback = "city",
},
["ski resort town"] = {
link = "[[ski resort]] [[town]]",
fallback = "town",
},
["spa city"] = {
link = "+w:spa town",
fallback = "city",
},
["spa town"] = {
link = "w",
fallback = "town",
},
["space station"] = {
link = true,
fallback = "research station",
},
["special administrative region"] = {
-- in China; in practice they are city-like (Hong Kong, Macau); also [[Oecusse]] in East Timor is formally a
-- "special administrative region"; North Korea had one such region planned (Sinuiju) but abandoned; Indonesia
-- has similar "special regions" of Jakarta, Yogyakarta and Aceh; and South Sudan has three "special
-- administrative areas"
link = "+w:special administrative regions of China",
preposition = "of",
class = "subpolity",
has_neighborhoods = true, --?
-- no suffix since places in Hong Kong or Macau are listed without China, except Hong Kong and Macau themselves
-- they also contain regions (or areas), e.g. [[Kowloon]], so it would be confusing
suffix = "",
},
["special collectivity"] = {
link = "w",
fallback = "collectivity",
},
["special municipality"] = {
-- formerly linked to the Taiwan article but there are also special municipalities of the Netherlands
link = "w",
fallback = "municipality",
},
["special ward"] = {
-- Tokyo
link = true,
fallback = "municipality",
},
["spit"] = {
link = true,
fallback = "peninsula",
},
["spring"] = {
link = true,
class = "natural feature",
default = {true},
},
["star"] = {
link = true,
class = "natural feature",
default = {true},
},
["state"] = {
link = true,
preposition = "of",
class = "subpolity",
-- 'former/historical state' could refer either to a state of a country (a division) or a state = sovereign
-- entity. The latter appears more common (e.g. in various "ancient states" of East Asia).
former_type = "polity",
},
["states and territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case Australia.
category_link = "[[state]]s and [[territory|territories]]",
class = "subpolity",
},
["states and union territories!"] = {
-- This and other similar "combined placetypes" are for use in the plural when grouping first-level
-- administrative regions of certain countries, in this case India.
category_link = "[[state]]s and [[union territory|union territories]]",
class = "subpolity",
},
["state capital"] = {
link = true,
fallback = "capital city",
},
["state park"] = {
link = true,
fallback = "park",
},
["state-level new area"] = {
-- China (type of economic development zone, varying greatly in size)
link = "w",
fallback = "new area",
},
["statistical region"] = {
-- Slovenia
link = true,
fallback = "administrative region",
},
["statutory city"] = {
link = "w",
fallback = "city",
},
["statutory town"] = {
link = "w",
fallback = "town",
},
["strait"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"bodies of water"},
default = {true},
},
["stream"] = {
link = true,
fallback = "river",
},
["street"] = {
link = true,
fallback = "road",
},
["strip"] = {
link = true,
fallback = "geographic region",
},
["strip of land"] = {
link = "[[strip]] of [[land]]",
plural = "strips of land",
plural_link = "[[strip]]s of [[land]]",
fallback = "geographic region",
},
["sub-metropolitan city"] = {
link = "+w:List of cities in Nepal#Sub-metropolitan cities",
fallback = "city",
},
["sub-prefectural city"] = {
link = "w",
fallback = "subprovincial city",
},
["subdistrict"] = {
link = true,
preposition = "of",
has_neighborhoods = true, --?
-- FIXME: subdistricts can be neighborhood-like (of Jakarta) or larger (in China); need a handler
class = "subpolity",
default = {true},
},
["subdivision"] = {
link = true,
preposition = "of",
affix_type = "suf",
-- FIXME: subdivisions can be neighborhood-like or larger; need a handler
class = "subpolity",
cat_handler = district_neighborhood_cat_handler,
},
["submerged ghost town"] = {
-- FIXME: Consider just having "submerged" as a qualifier.
link = "[[submerged]] [[ghost town]]",
fallback = "ghost town",
},
["subnational kingdom"] = {
link = "+w:subnational monarchy",
fallback = "non-sovereign kingdom",
},
["subnational monarchy"] = {
link = "w",
fallback = "non-sovereign kingdom",
},
["subprefecture"] = {
link = true,
affix_type = "suf",
preposition = "of",
class = "subpolity",
},
["subprovince"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["subprovincial city"] = {
link = "w",
-- China; special status given to certain prefecture-level cities
fallback = "prefecture-level city",
},
["subprovincial district"] = {
link = "w",
-- China; special status given to Binhai New Area and Pudong New Area, which are county-level districts
preposition = "of",
class = "subpolity",
},
["subregion"] = {
link = true,
fallback = "geographic region",
},
["suburb"] = {
link = true,
-- The following text is suitable for the top-level description of a suburb as well as categories of the form
-- 'Suburbs in POLDIV' e.g. 'Suburbs in Illinois, USA' but not for categories of the form 'Suburbs of Chicago',
-- where we'd get "[[suburb]]s of [[city|cities]] of [[Chicago]]".
category_link = "[[suburb]]s of [[city|cities]]",
category_link_before_city = "[[suburb]]s",
-- See comments under "neighborhood" for the following three settings. They are used by
-- [[Module:category tree/topic cat/data/Places]] for generating the text of 'Suburbs in/of PLACE' categories
-- but currently ignored by district_neighborhood_cat_handler (which actually generates the categories for a
-- given page), which hardcodes "in" for non-cities and "of" for cities. (FIXME: Change this.)
generic_before_non_cities = "in",
generic_before_cities = "of",
preposition = "of",
has_neighborhoods = true, --?
class = "non-admin settlement", --?
cat_handler = district_neighborhood_cat_handler,
},
["suburban area"] = {
link = "w",
fallback = "suburb",
},
["subway station"] = {
link = "w",
fallback = "metro station",
},
["sum"] = {
-- In China, Mongolia, Russia; something like a county in Mongolia but a township in China (Inner Mongolia),
-- and equivalent to a [[selsoviet]] in the parts of Russia where it's in use (a rural council, below a raion).
link = "+w:sum (administrative division)",
-- This fallback is somewha arbitrary. We could use "county" but that has a display handler
-- which we don't want to be active (FIXME: If the display handler would be active, that's a bug).
fallback = "division",
},
["supercontinent"] = {
link = true,
fallback = "continent",
},
["tehsil"] = {
link = true,
affix_type = "suf",
no_affix_strings = {"tehsil", "tahsil"},
class = "subpolity",
},
["temple"] = {
link = true,
fallback = "building",
},
["territorial authority"] = {
link = "w",
fallback = "district",
},
["territory"] = {
link = true,
preposition = "of",
class = "subpolity",
},
["theme"] = {
link = "+w:theme (Byzantine district)",
preposition = "of",
class = "subpolity",
},
["town"] = {
link = true,
generic_before_non_cities = "in",
has_neighborhoods = true,
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["town with bystatus"] = {
-- can't use templates in links currently
link = "[[town]] with [[bystatus#Norwegian Bokmål|bystatus]]",
plural = "towns with bystatus",
plural_link = "[[town]]s with [[bystatus#Norwegian Bokmål|bystatus]]",
fallback = "town",
},
["township"] = {
link = true,
has_neighborhoods = true,
class = "settlement", --?
default = {true},
},
["township municipality"] = {
-- Quebec
link = "+w:township municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["traditional county"] = {
link = true,
fallback = "county",
},
["traditional region"] = {
-- FIXME: Verify this works. Same for 'historic(al) region'.
-- provided only for the link
link = "w",
fallback = "FORMER geographic region",
},
["trail"] = {
link = true,
fallback = "road",
},
["treaty port"] = {
link = "w",
fallback = "city",
class = "settlement",
inherently_former = {"FORMER"},
},
["tributary"] = {
link = true,
preposition = "of",
fallback = "river",
},
["underground station"] = {
link = "w",
fallback = "metro station",
},
["unincorporated area"] = {
link = "w",
-- I don't know if this fallback makes sense everywhere.
fallback = "unincorporated community",
},
["unincorporated community"] = {
link = true,
generic_before_non_cities = "in",
class = "non-admin settlement",
},
["unincorporated territory"] = {
link = "w",
fallback = "territory",
},
["union territory"] = {
-- India
link = true,
preposition = "of",
entry_placetype_indefinite_article = "a",
class = "subpolity",
},
["unitary authority"] = {
-- UK, New Zealand
link = true,
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["unitary district"] = {
link = "w",
entry_placetype_indefinite_article = "a",
fallback = "local government district",
},
["united township municipality"] = {
-- Quebec
link = "+w:united township municipality (Quebec)",
entry_placetype_indefinite_article = "a",
fallback = "township municipality",
has_neighborhoods = true, --?
},
["university"] = {
link = true,
entry_placetype_indefinite_article = "a",
class = "man-made structure",
default = {true},
},
["unrecognised country"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized and nearly unrecognized countries!"] = {
category_link = "[[de facto]] [[independent]] [[state]]s with little or no {{w|international recognition}}",
bare_category_parent = "country-like entities",
},
["unrecognized country"] = {
link = "w",
class = "polity",
default = {"Unrecognized and nearly unrecognized countries"},
},
["unrecognised state"] = {
link = "w",
fallback = "unrecognized country",
},
["unrecognized state"] = {
link = "w",
fallback = "unrecognized country",
},
["urban area"] = {
link = "separately",
fallback = "neighborhood",
},
["urban hromada"] = {
link = "[[urban]] [[w:hromada|hromada]]",
affix_type = "suf",
fallback = "hromada",
},
["urban service area"] = {
-- A strange beast existing in Alberta; technically a type of hamlet but in practice used for much larger
-- cities and treated equivalent to a city. (There are only two of them, [[Fort McMurray]] and [[Sherwood Park]]).
link = "w",
fallback = "city",
},
["urban township"] = {
link = "w",
fallback = "township",
},
["urban-type settlement"] = {
-- appears to be a particular type of small urban settlement in post-Soviet states,
-- had an administrative function.
link = "w",
fallback = "town",
},
["valley"] = {
link = true,
class = "natural feature",
addl_bare_category_parents = {"landforms", "water"},
default = {true},
},
["viceroyalty"] = {
-- in essence, a type of colony
link = true,
fallback = "dependent territory",
},
["village"] = {
link = true,
generic_before_non_cities = "in",
category_link = "[[village]]s, [[hamlet]]s, and other small [[community|communities]] and [[settlement]]s",
class = "settlement",
cat_handler = city_type_cat_handler,
default = {true},
},
["village development committee"] = {
-- former administrative structure in Nepal; also exists in India but not as a formal unit
link = "+w:village development committee (Nepal)",
inherently_former = {"FORMER"},
fallback = "village",
},
["village municipality"] = {
-- Quebec
link = "+w:village municipality (Quebec)",
preposition = "of",
fallback = "municipality",
has_neighborhoods = true, --?
},
["voivodeship"] = {
-- Poland
link = true,
display_handler = voivodeship_display_handler,
preposition = "of",
class = "subpolity",
},
["volcano"] = {
link = true,
plural = "volcanoes",
class = "natural feature",
addl_bare_category_parents = {"landforms"},
default = {true, "Mountains"},
},
["ward"] = {
link = true,
class = "settlement",
-- Wards are formal administrative divisions of a city but have some properties of neighborhoods.
fallback = "neighborhood",
},
["watercourse"] = {
link = true,
fallback = "channel",
},
["Welsh community"] = {
-- Wales
link = "[[w:community (Wales)|community]]",
preposition = "of",
affix_type = "suf",
affix = "community",
has_neighborhoods = true,
class = "settlement",
},
["zone"] = {
-- administrative division of Ethiopia, Qatar, Nepal, India
link = "+w:zone#Place names",
preposition = "of",
class = "subpolity",
},
----------------------------------------------------------------------------------------------
-- Categories for former places --
----------------------------------------------------------------------------------------------
["ANCIENT capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
-- FIXME: Consider removing 'ancient settlements' here. Ancient capitals, like former capitals, often still
-- exist but just aren't the capital any more. Maybe we should have an 'Ancient capitals' category.
default = {"Ancient settlements", "Former capitals"},
},
["ANCIENT non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "ANCIENT settlement",
},
["ANCIENT settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Ancient settlements"},
},
["ancient settlements!"] = {
category_link = "former [[city|cities]], [[town]]s and [[village]]s that existed in [[antiquity]]",
bare_category_parent = "former settlements",
},
["FORMER capital"] = {
link = false,
entry_placetype_use_the = true,
preposition = "of",
has_neighborhoods = true,
class = "capital",
default = {"Former capitals"},
},
["former capitals!"] = {
category_link = "former [[capital]] [[city|cities]] and [[town]]s",
bare_category_parent = "settlements",
},
["former counties and county-level cities!"] = {
-- For categorizing former counties and county-level cities of China
category_link = "no-longer existing [[county|counties]] and [[county-level city|county-level cities]]",
bare_category_breadcrumb = "counties and county-level cities",
bare_category_parent = "former political divisions",
},
["FORMER county"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER county-level city"] = {
-- For categorizing former counties and county-level cities of China
link = false,
fallback = "FORMER subpolity",
},
["former countries and country-like entities!"] = {
category_link = "[[country|countries]] and similar [[polity|polities]] that no longer exist",
bare_category_breadcrumb = "countries and country-like entities",
bare_category_parent = "former polities",
},
["FORMER country"] = {
link = false,
class = "polity",
default = {"Former countries and country-like entities"},
},
["former dependent territories!"] = {
category_link = "[[w:dependent territory|dependent territories]] (colonies, dependencies, protectorates, etc.) that no longer exist",
bare_category_breadcrumb = "dependent territories",
bare_category_parent = "former political divisions",
},
["FORMER dependent territory"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former dependent territories"},
},
["former districts!"] = {
-- For categorizing former districts of China
category_link = "no-longer-existing [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "former political divisions",
},
["FORMER district"] = {
-- For categorizing former districts of China
link = false,
fallback = "FORMER subpolity",
},
["FORMER geographic region"] = {
link = false,
fallback = "geographic and cultural area",
},
["FORMER man-made structure"] = {
link = false,
class = "man-made structure",
default = {"Former man-made structures"},
},
["former man-made structures!"] = {
category_link = "man-made structures such as [[airport]]s and [[park]]s that no longer exist",
bare_category_breadcrumb = "man-made structures",
bare_category_parent = "former places",
},
["former municipalities!"] = {
-- For categorizing former municipalities of the Netherlands
category_link = "no-longer-existing [[municipality|municipalities]]",
bare_category_breadcrumb = "municipalities",
bare_category_parent = "former political divisions",
},
["FORMER municipality"] = {
-- For categorizing former municipalities of the Netherlands
link = false,
fallback = "FORMER subpolity",
},
["FORMER natural feature"] = {
link = false,
class = "natural feature",
default = {"Former natural features"},
},
["former natural features!"] = {
category_link = "natural features such as [[lake]]s, [[river]]s and [[island]]s that no longer exist",
bare_category_breadcrumb = "natural features",
bare_category_parent = "former places",
},
["FORMER non-admin settlement"] = {
link = false,
class = "non-admin settlement",
fallback = "FORMER settlement",
},
["former places!"] = {
category_link = "[[place]]s of all sorts that no longer exist",
bare_category_breadcrumb = "former",
bare_category_parent = "places",
},
["former political divisions!"] = {
category_link = "[[political]] [[division]]s (states, provinces, counties, etc.) that no longer exist",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former places",
},
["former polities!"] = {
category_link = "[[polity|polities]] (countries, kingdoms, empires, etc.) that no longer exist",
bare_category_breadcrumb = "polities",
bare_category_parent = "former places",
},
["FORMER polity"] = {
link = false,
class = "polity",
default = {"Former polities"},
},
["former prefectures!"] = {
-- For categorizing former prefectures of China
category_link = "no-longer-existing [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "former political divisions",
},
["FORMER prefecture"] = {
-- For categorizing former prefectures of China
link = false,
fallback = "FORMER subpolity",
},
["former provinces!"] = {
-- For categorizing former provinces of China, etc.
category_link = "no-longer-existing [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "former political divisions",
},
["FORMER province"] = {
-- For categorizing ancient/historical/former provinces of the Roman Empire
link = false,
fallback = "FORMER subpolity",
},
["former region"] = {
-- A former region is considered a former political division, but not a 'historical/traditional/etc.' region.
link = "separately",
preposition = "of",
inherently_former = {"FORMER"},
class = "subpolity",
},
["FORMER settlement"] = {
link = false,
has_neighborhoods = true,
class = "settlement",
default = {"Former settlements"},
},
["former settlements!"] = {
category_link = "[[city|cities]], [[town]]s and [[village]]s that no longer exist or have been merged or reclassified",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former political divisions",
},
["FORMER subpolity"] = {
link = false,
preposition = "of",
class = "subpolity",
default = {"Former political divisions"},
},
----------------------------------------------------------------------------------------------
-- form-of categories --
----------------------------------------------------------------------------------------------
---------- Abbreviations ----------
["abbreviations of counties!"] = {
-- For categorizing abbreviations of counties of e.g. England
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[county|counties]]",
bare_category_breadcrumb = "counties",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of places",
},
["abbreviations of departments!"] = {
-- For categorizing abbreviations of departments of e.g. France
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[department]]s",
bare_category_breadcrumb = "departments",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of districts!"] = {
-- For categorizing abbreviations of districts of e.g. ???
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[district]]s",
bare_category_breadcrumb = "districts",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of divisions!"] = {
-- For categorizing abbreviations of divisions of e.g. Bangladesh
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[division]]s",
bare_category_breadcrumb = "divisions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of former countries!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "abbreviations of former places",
},
["abbreviations of former places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "abbreviations of places", sort = "former"}},
},
["abbreviations of places!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "abbreviations",
bare_category_parent = "places",
},
["abbreviations of political divisions!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[political]] [[division]]s",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "abbreviations of places",
},
["abbreviations of prefectures!"] = {
-- For categorizing abbreviations of prefectures of e.g. Japan
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[prefecture]]s",
bare_category_breadcrumb = "prefectures",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces!"] = {
-- For categorizing abbreviations of provinces of e.g. Canada
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s",
bare_category_breadcrumb = "provinces",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of provinces and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[province]]s and [[territory|territories]]",
bare_category_breadcrumb = "provinces and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of regions!"] = {
-- For categorizing abbreviations of regions of e.g. Italy
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[administrative region]]s",
bare_category_breadcrumb = "regions",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states!"] = {
-- For categorizing abbreviations of states of e.g. the United States
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[territory|territories]]",
bare_category_breadcrumb = "states and territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of states and union territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[state]]s and [[union territory|union territories]]",
bare_category_breadcrumb = "states and union territories",
bare_category_parent = "abbreviations of political divisions",
},
["abbreviations of territories!"] = {
full_category_link = "{{glossary|abbreviation}}s of [[name]]s of [[territory|territories]]",
bare_category_breadcrumb = "territories",
bare_category_parent = "abbreviations of political divisions",
},
["ABBREVIATION_OF country"] = {
link = false,
default = {"Abbreviations of countries"},
},
["ABBREVIATION_OF county"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF department"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF district"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF division"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF FORMER country"] = {
link = false,
default = {"Abbreviations of former countries"},
},
["ABBREVIATION_OF FORMER place"] = {
link = false,
default = {"Abbreviations of former places"},
},
["ABBREVIATION_OF place"] = {
link = false,
default = {"Abbreviations of places"},
},
["ABBREVIATION_OF prefecture"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF province"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF region"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF state"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF subpolity"] = {
link = false,
default = {"Abbreviations of political divisions"},
},
["ABBREVIATION_OF territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
["ABBREVIATION_OF union territory"] = {
link = false,
fallback = "ABBREVIATION_OF subpolity",
},
---------- Archaic forms ----------
["archaic forms of places!"] = {
full_category_link = "{{glossary|archaic}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "archaic forms",
bare_category_parent = "places",
},
["ARCHAIC_FORM_OF place"] = {
link = false,
default = {"Archaic forms of places"},
},
---------- Clippings ----------
["clippings of places!"] = {
full_category_link = "{{glossary|clipping}}s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "clippings",
bare_category_parent = "places",
},
["CLIPPING_OF place"] = {
link = false,
default = {"Clippings of places"},
},
---------- Dated forms ----------
["dated forms of places!"] = {
full_category_link = "{{glossary|dated}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "dated forms",
bare_category_parent = "places",
},
["DATED_FORM_OF place"] = {
link = false,
default = {"Dated forms of places"},
},
---------- Derogatory names ----------
["derogatory names for cities!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[city|cities]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["derogatory names for continents!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for continents"},
},
["derogatory names for countries!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for countries"},
},
["derogatory names for places!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[place]]s",
bare_category_breadcrumb = "derogatory names",
bare_category_parent = "nicknames for places",
},
["derogatory names for states!"] = {
full_category_link = "{{glossary|derogatory}} [[name]]s for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "derogatory names for places",
addl_bare_category_parents = {"nicknames for states"},
},
["DEROGATORY_NAME_FOR capital"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR city"] = {
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR continent"] = {
link = false,
default = {"Derogatory names for continents"},
},
["DEROGATORY_NAME_FOR country"] = {
link = false,
default = {"Derogatory names for countries"},
},
["DEROGATORY_NAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR place"] = {
link = false,
default = {"Derogatory names for places"},
},
["DEROGATORY_NAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Derogatory names for cities"},
},
["DEROGATORY_NAME_FOR state"] = {
link = false,
default = {"Derogatory names for states"},
},
["DEROGATORY_NAME_FOR town"] = {
link = false,
default = {"Derogatory names for cities"},
},
---------- Ellipses ----------
["ellipses of places!"] = {
full_category_link = "{{glossary|ellipsis|ellipses}} of [[name]]s of [[place]]s",
bare_category_breadcrumb = "ellipses",
bare_category_parent = "places",
},
["ELLIPSIS_OF place"] = {
link = false,
default = {"Ellipses of places"},
},
---------- Former long-form names ----------
["former long-form names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former long-form names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "long-form"}},
},
["former long-form names of places!"] = {
full_category_link = "no-longer-[[use]]d [[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form",
bare_category_parent = "former names of places",
},
["FORMER_LONG_FORM_OF country"] = {
link = false,
default = {"Former long-form names of countries"},
},
["FORMER_LONG_FORM_OF place"] = {
link = false,
default = {"Former long-form names of places"},
},
---------- Former names ----------
["former names of capitals!"] = {
full_category_link = "[[former]] [[name]]s of [[capital city|capital cities]] that generally still exist but under a different name",
bare_category_breadcrumb = "capitals",
bare_category_parent = "former names of settlements",
},
["former names of countries!"] = {
full_category_link = "[[former]] [[name]]s of [[country|countries]] that generally still exist but under a different name",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former names of places",
},
["former names of places!"] = {
full_category_link = "[[former]] [[name]]s of [[place]]s that generally still exist but under a different name",
bare_category_breadcrumb = "former names",
bare_category_parent = "places",
},
["former names of political divisions!"] = {
full_category_link = "[[former]] [[name]]s of [[political]] [[division]]s (states, provinces, counties, etc.) that generally still exist but under a different name",
bare_category_breadcrumb = "political divisions",
bare_category_parent = "former names of places",
},
["former names of polities!"] = {
full_category_link = "[[former]] [[name]]s of [[polity|polities]] (e.g. [[country|countries]]) that generally still exist but under a different name",
bare_category_breadcrumb = "polities",
bare_category_parent = "former names of places",
},
["former names of settlements!"] = {
full_category_link = "[[former]] [[name]]s of [[city|cities]], [[town]]s, [[village]]s, etc. that generally still exist but under a different name",
bare_category_breadcrumb = "settlements",
bare_category_parent = "former names of political divisions",
},
["FORMER_NAME_OF capital"] = {
link = false,
default = {"Former names of capitals"},
},
["FORMER_NAME_OF country"] = {
link = false,
default = {"Former names of countries"},
},
["FORMER_NAME_OF place"] = {
link = false,
default = {"Former names of places"},
},
["FORMER_NAME_OF polity"] = {
link = false,
default = {"Former names of polities"},
},
["FORMER_NAME_OF region"] = {
link = false,
fallback = "FORMER_NAME_OF subpolity",
},
["FORMER_NAME_OF settlement"] = {
link = false,
default = {"Former names of settlements"},
},
["FORMER_NAME_OF subpolity"] = {
link = false,
default = {"Former names of political divisions"},
},
---------- Former nicknames ----------
["former nicknames for cities!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[city|cities]], e.g. the [[Eternal City]] for [[Kyoto]] during the {{w|Heian period}} ({{circa2|800–1100|short=yes}} {{AD}})",
bare_category_breadcrumb = "cities",
bare_category_parent = "former nicknames for places",
addl_bare_category_parents = {"nicknames for cities"},
},
["former nicknames for places!"] = {
full_category_link = "no-longer-used [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "former",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {{name = "former names of places", sort = "nicknames"}},
},
["FORMER_NICKNAME_FOR capital"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR city"] = {
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR place"] = {
link = false,
default = {"Former nicknames for places"},
},
["FORMER_NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Former nicknames for cities"},
},
["FORMER_NICKNAME_FOR town"] = {
link = false,
default = {"Former nicknames for cities"},
},
---------- Former official names ----------
["former official names of countries!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "former official names of places",
addl_bare_category_parents = {{name = "former names of countries", sort = "official"}},
},
["former official names of places!"] = {
full_category_link = "no-longer-[[use]]d [[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "former names of places",
},
["FORMER_OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Former official names of countries"},
},
["FORMER_OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Former official names of places"},
},
---------- Long-form names ----------
["long-form names of countries!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "long-form names of places",
},
["long-form names of places!"] = {
full_category_link = "[[long]]-[[form]] (but typically [[unofficial]]) [[name]]s of [[place]]s",
bare_category_breadcrumb = "long-form names",
bare_category_parent = "places",
},
["LONG_FORM_OF country"] = {
link = false,
default = {"Long-form names of countries"},
},
["LONG_FORM_OF place"] = {
link = false,
default = {"Long-form names of places"},
},
---------- Nicknames ----------
["nicknames for cities!"] = {
full_category_link = "[[nickname]]s for [[city|cities]], e.g. the [[Big Apple]] for [[New York City]]",
bare_category_breadcrumb = "cities",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"cities"},
},
["nicknames for continents!"] = {
full_category_link = "[[nickname]]s for [[continent]]s",
bare_category_breadcrumb = "continents",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"continents"},
},
["nicknames for countries!"] = {
full_category_link = "[[nickname]]s for [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"quốc gia"},
},
["nicknames for places!"] = {
full_category_link = "[[nickname]]s for [[place]]s",
bare_category_breadcrumb = "places",
bare_category_parent = "nicknames",
addl_bare_category_parents = {"places"},
},
["nicknames for states!"] = {
-- For categorizing nicknames for states of e.g. the United States
full_category_link = "[[nicknames]] for [[state]]s",
bare_category_breadcrumb = "states",
bare_category_parent = "nicknames for places",
addl_bare_category_parents = {"states"},
},
["NICKNAME_FOR capital"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR city"] = {
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR continent"] = {
link = false,
default = {"Nicknames for continents"},
},
["NICKNAME_FOR country"] = {
link = false,
default = {"Nicknames for countries"},
},
["NICKNAME_FOR metropolitan city"] = {
-- "metropolitan city" doesn't fall back to "city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR place"] = {
link = false,
default = {"Nicknames for places"},
},
["NICKNAME_FOR prefecture-level city"] = {
-- "prefecture-level city" doesn't fall back to "city" but things like "county-level city" and
-- "subprovincial city" fall back to "prefecture-level city"
link = false,
default = {"Nicknames for cities"},
},
["NICKNAME_FOR state"] = {
link = false,
default = {"Nicknames for states"},
},
["NICKNAME_FOR town"] = {
link = false,
default = {"Nicknames for cities"},
},
---------- Obsolete forms ----------
["obsolete forms of places!"] = {
full_category_link = "{{glossary|obsolete}} [[form]]s of [[name]]s of [[place]]s",
bare_category_breadcrumb = "obsolete forms",
bare_category_parent = "places",
},
["OBSOLETE_FORM_OF place"] = {
link = false,
default = {"Obsolete forms of places"},
},
---------- Official names ----------
["official names of countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of places",
},
["official names of former countries!"] = {
full_category_link = "[[official]] [[name]]s of [[country|countries]] that no longer [[exist]]",
bare_category_breadcrumb = "quốc gia",
bare_category_parent = "official names of former places",
},
["official names of former places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s that no longer [[exist]]",
bare_category_breadcrumb = "official names",
bare_category_parent = "former places",
addl_bare_category_parents = {{name = "official names of places", sort = "former"}},
},
["official names of places!"] = {
full_category_link = "[[official]] [[name]]s of [[place]]s",
bare_category_breadcrumb = "official names",
bare_category_parent = "places",
},
["OFFICIAL_NAME_OF country"] = {
link = false,
default = {"Official names of countries"},
},
["OFFICIAL_NAME_OF FORMER country"] = {
link = false,
default = {"Official names of former countries"},
},
["OFFICIAL_NAME_OF FORMER place"] = {
link = false,
default = {"Official names of former places"},
},
["OFFICIAL_NAME_OF place"] = {
link = false,
default = {"Official names of places"},
},
---------- Official nicknames ----------
["official nicknames for places!"] = {
full_category_link = "[[official]] [[nickname]]s for [[place]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for places",
},
["official nicknames for states!"] = {
-- For categorizing official nicknames for states of e.g. the United States
full_category_link = "[[official]] [[nicknames]] for [[state]]s",
bare_category_breadcrumb = "official",
bare_category_parent = "nicknames for states",
addl_bare_category_parents = {"states"},
},
["OFFICIAL_NICKNAME_FOR place"] = {
link = false,
default = {"Official nicknames for places"},
},
["OFFICIAL_NICKNAME_FOR state"] = {
link = false,
default = {"Official nicknames for states"},
},
}
export.plural_placetype_to_singular = {}
for sg_placetype, spec in pairs(export.placetype_data) do
if spec.plural then
export.plural_placetype_to_singular[spec.plural] = sg_placetype
end
end
return export
4nlnavonpkbkiiqrevr7cspi6ylj56y
Mô đun:place/locations
828
282249
2350132
2350128
2026-05-04T12:10:40Z
TheHighFighter2
42988
2350132
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "Asia", divs = {"provinces", "districts"}},
["Albania"] = {container = "Europe", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "Africa", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "Europe", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "Africa", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribbean", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "South America", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"Europe", "Asia"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Australia"] = {container = "Oceania", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Austria"] = {container = "Europe", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"Europe", "Asia"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribbean", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "Asia", divs = {"governorates"}},
["Bangladesh"] = {container = "Asia", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "Europe", divs = {"regions", "districts"}, british_spelling = true},
["Belgium"] = {container = "Europe", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Central America", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "Africa", divs = {"departments", "communes"}},
["Bhutan"] = {container = "Asia", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "South America", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "Europe", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "Africa", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "South America", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "Asia", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "Europe", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "Africa", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "Africa", divs = {"provinces", "communes"}},
["Cambodia"] = {container = "Asia", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "Africa", divs = {"regions", "departments"}},
["Canada"] = {container = "North America", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "Africa", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "Africa", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "Africa", divs = {"regions", "departments"}},
["Chile"] = {container = "South America", divs = {"regions", "provinces", "communes"}},
["China"] = {container = "Asia", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "China", the = true}, -- differs in "the"
["Colombia"] = {container = "South America", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "Africa", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Central America", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "Europe", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribbean", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"Europe", "Asia"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "Europe", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "Africa", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Denmark"] = {container = "Europe", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "Africa", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribbean", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["East Timor"] = {container = "Asia", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "East Timor", display = true},
["Ecuador"] = {container = "South America", divs = {"provinces", "cantons"}},
["Egypt"] = {container = "Africa", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Equatorial Guinea"] = {container = "Africa", divs = {"provinces"}},
["Eritrea"] = {container = "Africa", divs = {"regions", "subregions"}},
["Estonia"] = {container = "Europe", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "Africa", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "Africa", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Finland"] = {container = "Europe", divs = {"regions", "municipalities"}, british_spelling = true},
["France"] = {container = "Europe", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "Africa", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "Africa", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"Europe", "Asia"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Germany"] = {container = "Europe", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "Africa", divs = {"regions", "districts"}, british_spelling = true},
["Greece"] = {container = "Europe", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "Africa", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "Africa", divs = {"regions"}},
["Guyana"] = {container = "South America", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribbean", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "Europe", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "Europe", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["India"] = {container = "Asia", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "Asia", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "Asia", divs = {"provinces", "counties"}},
["Iraq"] = {container = "Asia", divs = {"governorates", "districts"}},
["Ireland"] = {container = "Europe", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "Asia", divs = {"districts"}},
["Italy"] = {container = "Europe", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Ivory Coast"] = {container = "Africa", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Ivory Coast"},
["Jamaica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Japan"] = {container = "Asia", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "Asia", divs = {"governorates"}},
["Kazakhstan"] = {container = {"Asia", "Europe"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "Africa", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "Europe", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "Asia", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "Asia", divs = {"regions", "districts"}},
["Laos"] = {container = "Asia", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "Asia", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "Africa", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "Africa", divs = {"counties", "districts"}},
["Libya"] = {container = "Africa", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "Europe", divs = {"municipalities"}, british_spelling = true},
["Lithuania"] = {container = "Europe", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "Europe", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "Africa", divs = {"regions", "districts"}},
["Malawi"] = {container = "Africa", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "Asia", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "Asia", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "Africa", divs = {"regions", "cercles"}},
["Malta"] = {container = "Europe", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "Africa", divs = {"regions", "departments"}},
["Mauritius"] = {container = "Africa", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "North America", addl_parents = {"Central America"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "Europe", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "Europe",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mongolia"] = {container = "Asia", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "Europe", divs = {"municipalities"}},
["Morocco"] = {container = "Africa", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "Africa", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "Asia",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "Africa", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "Asia", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "Europe",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Niger"] = {container = "Africa", divs = {"regions", "departments"}},
["Nigeria"] = {container = "Africa", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["North Korea"] = {container = "Asia", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "Europe", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Norway"] = {container = "Europe",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "Asia", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "Asia", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "Asia", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Central America", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "South America", divs = {"departments", "districts"}},
["Peru"] = {container = "South America", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "Asia", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Poland"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "Europe", british_spelling = true},
["Portugal"] = {container = "Europe", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "Asia", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "Africa", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "Europe", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Russia"] = {container = {"Europe", "Asia"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "Africa", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribbean", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "Europe", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "Africa", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Saudi Arabia"] = {container = "Asia", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "Africa", divs = {"regions", "departments"}},
["Serbia"] = {container = "Europe", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "Africa", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "Africa", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "Asia", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "Europe", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "Europe", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "Africa", divs = {"regions", "districts"}},
["South Africa"] = {container = "Africa", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["South Korea"] = {container = "Asia", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["South Sudan"] = {container = "Africa", divs = {"regions", "states", "counties"}, british_spelling = true},
["Spain"] = {container = "Europe", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "Asia", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "Africa", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "South America", divs = {"districts"}},
["Sweden"] = {container = "Europe", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "Europe", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "Asia", divs = {"governorates", "districts"}},
["Taiwan"] = {container = "Asia", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Taiwan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "Asia", divs = {"regions", "districts"}},
["Tanzania"] = {container = "Africa", divs = {"regions", "districts"}, british_spelling = true},
["Thailand"] = {container = "Asia", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "Africa", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribbean", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "Africa", divs = {"governorates", "delegations"}},
["Turkey"] = {container = {"Europe", "Asia"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Turkey", display = true},
["Turkmenistan"] = {container = "Asia", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "Africa", divs = {"districts", "counties"}, british_spelling = true},
["Ukraine"] = {container = "Europe", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "Asia", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "Europe", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["United States"] = {the = true, container = "North America",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "United States", display = true, the = true},
["U.S."] = {alias_of = "United States", display = true, the = true},
["USA"] = {alias_of = "United States", display = true, the = true},
["U.S.A."] = {alias_of = "United States", display = true, the = true},
["United States of America"] = {alias_of = "United States", display = true, the = true},
["Uruguay"] = {container = "South America", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "Asia", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "Europe",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "South America", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "Africa",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "Asia", divs = {"governorates", "districts"}},
["Zambia"] = {container = "Africa", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "Africa", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "Europe", "Asia"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "Europe", "Asia"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Asia"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"North America"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Asia"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Norway",
addl_parents = {"Africa"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Asia"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"North America"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Asia"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"South America"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"Europe"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"South America"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"Africa"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Europe"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"North America"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
addl_parents = {"Caribbean"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "Europe"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Africa"},
},
-- special administrative region of China
["Hong Kong"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "Europe"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Norway",
addl_parents = {"Europe"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "Europe"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Macau"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Africa"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "France",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Turkey", "Europe", "Asia"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Africa"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "Africa"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
divs = {"communes"},
addl_parents = {"North America"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "Africa"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "Europe", "Asia"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Norway",
addl_parents = {"Europe"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "Europe"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribbean"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "Europe", "Asia"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "Europe", british_spelling = true},
["East Germany"] = {container = "Europe", addl_parents = {"Germany"}, british_spelling = true},
["North Vietnam"] = {container = "Asia", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "Asia", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"Europe", "Africa", "Asia"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"Europe", "Africa", "Asia"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "Asia", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"Europe", "Asia"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "Europe", addl_parents = {"Germany"}, british_spelling = true},
["Yugoslavia"] = {container = "Europe", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Australia",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Austria",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "China",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Finland",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "France",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Germany",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Greece",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "India",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Italy",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Japan",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Laos",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Morocco",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Egypt",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "North Korea",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Norway",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Poland",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Russia",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Saudi Arabia",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "South Korea",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Spain",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Taiwan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thailand",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Turkey",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraine",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "United States",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Germany",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Japan",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Russia",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "South Korea",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Taiwan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "United States",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Egypt"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Egypt"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Egypt"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Egypt"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Ivory Coast"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Cambodia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "Asia" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "Asia", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mongolia"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "North Korea"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thailand"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Turkey"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Austria"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Belgium"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Belgium"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Denmark"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Greece"},
["Thessaloniki"] = {container = "Greece"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Sweden"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraine"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
a1nf9h8fvcm2yukdl29fukdihpyq4oo
2350136
2350132
2026-05-04T13:54:15Z
TheHighFighter2
42988
2350136
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "Africa", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "Africa", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribbean", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "South America", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Australia"] = {container = "Oceania", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Austria"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribbean", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Belgium"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Central America", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "Africa", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "South America", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "Africa", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "South America", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "Africa", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "Africa", divs = {"provinces", "communes"}},
["Cambodia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "Africa", divs = {"regions", "departments"}},
["Canada"] = {container = "North America", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "Africa", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "Africa", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "Africa", divs = {"regions", "departments"}},
["Chile"] = {container = "South America", divs = {"regions", "provinces", "communes"}},
["China"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "China", the = true}, -- differs in "the"
["Colombia"] = {container = "South America", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "Africa", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Central America", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribbean", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "Africa", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Denmark"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "Africa", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribbean", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["East Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "East Timor", display = true},
["Ecuador"] = {container = "South America", divs = {"provinces", "cantons"}},
["Egypt"] = {container = "Africa", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Equatorial Guinea"] = {container = "Africa", divs = {"provinces"}},
["Eritrea"] = {container = "Africa", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "Africa", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "Africa", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Finland"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["France"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "Africa", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "Africa", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Germany"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "Africa", divs = {"regions", "districts"}, british_spelling = true},
["Greece"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "Africa", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "Africa", divs = {"regions"}},
["Guyana"] = {container = "South America", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribbean", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["India"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Italy"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Ivory Coast"] = {container = "Africa", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Ivory Coast"},
["Jamaica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Japan"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "Africa", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Laos"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "Africa", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "Africa", divs = {"counties", "districts"}},
["Libya"] = {container = "Africa", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lithuania"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "Africa", divs = {"regions", "districts"}},
["Malawi"] = {container = "Africa", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "Africa", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "Africa", divs = {"regions", "departments"}},
["Mauritius"] = {container = "Africa", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "North America", addl_parents = {"Central America"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mongolia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Morocco"] = {container = "Africa", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "Africa", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "Africa", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Central America", divs = {"departments", "municipalities"}},
["Niger"] = {container = "Africa", divs = {"regions", "departments"}},
["Nigeria"] = {container = "Africa", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["North Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Norway"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Central America", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "South America", divs = {"departments", "districts"}},
["Peru"] = {container = "South America", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Poland"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "Africa", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Russia"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "Africa", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribbean", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "Africa", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Saudi Arabia"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "Africa", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "Africa", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "Africa", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "Africa", divs = {"regions", "districts"}},
["South Africa"] = {container = "Africa", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["South Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["South Sudan"] = {container = "Africa", divs = {"regions", "states", "counties"}, british_spelling = true},
["Spain"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "Africa", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "South America", divs = {"districts"}},
["Sweden"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Taiwan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Taiwan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "Africa", divs = {"regions", "districts"}, british_spelling = true},
["Thailand"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "Africa", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribbean", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "Africa", divs = {"governorates", "delegations"}},
["Turkey"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Turkey", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "Africa", divs = {"districts", "counties"}, british_spelling = true},
["Ukraine"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["United States"] = {the = true, container = "North America",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "United States", display = true, the = true},
["U.S."] = {alias_of = "United States", display = true, the = true},
["USA"] = {alias_of = "United States", display = true, the = true},
["U.S.A."] = {alias_of = "United States", display = true, the = true},
["United States of America"] = {alias_of = "United States", display = true, the = true},
["Uruguay"] = {container = "South America", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "South America", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "Africa",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "Africa", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "Africa", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"North America"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Norway",
addl_parents = {"Africa"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"North America"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"South America"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"South America"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"Africa"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"North America"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
addl_parents = {"Caribbean"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Africa"},
},
-- special administrative region of China
["Hong Kong"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Macau"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Africa"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "France",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Turkey", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Africa"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "Africa"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
divs = {"communes"},
addl_parents = {"North America"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "Africa"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribbean"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "Africa", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "Africa", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Australia",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Austria",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "China",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Finland",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "France",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Germany",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Greece",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "India",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Italy",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Japan",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Laos",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Morocco",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Egypt",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "North Korea",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Norway",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Poland",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Russia",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Saudi Arabia",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "South Korea",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Spain",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Taiwan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thailand",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Turkey",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraine",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "United States",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Germany",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Japan",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Russia",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "South Korea",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Taiwan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "United States",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Egypt"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Egypt"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Egypt"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Egypt"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Ivory Coast"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Cambodia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mongolia"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "North Korea"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thailand"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Turkey"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Austria"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Belgium"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Belgium"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Denmark"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Greece"},
["Thessaloniki"] = {container = "Greece"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Sweden"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraine"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
1e1l1s7sx13zih7f445o3hcelwrvzw3
2350138
2350136
2026-05-04T14:02:27Z
TheHighFighter2
42988
2350138
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "châu Phi", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "châu Phi", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribbean", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Australia"] = {container = "Oceania", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Austria"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribbean", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Belgium"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Trung Mỹ", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "châu Phi", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "châu Phi", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "Nam Mỹ", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "châu Phi", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "châu Phi", divs = {"provinces", "communes"}},
["Cambodia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Canada"] = {container = "Bắc Mỹ", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "châu Phi", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "châu Phi", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Chile"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "communes"}},
["China"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "China", the = true}, -- differs in "the"
["Colombia"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "châu Phi", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Trung Mỹ", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribbean", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Denmark"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribbean", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["East Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "East Timor", display = true},
["Ecuador"] = {container = "Nam Mỹ", divs = {"provinces", "cantons"}},
["Egypt"] = {container = "châu Phi", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Equatorial Guinea"] = {container = "châu Phi", divs = {"provinces"}},
["Eritrea"] = {container = "châu Phi", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "châu Phi", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "châu Phi", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Finland"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["France"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "châu Phi", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "châu Phi", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Germany"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Greece"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "châu Phi", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "châu Phi", divs = {"regions"}},
["Guyana"] = {container = "Nam Mỹ", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribbean", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["India"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Italy"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Ivory Coast"] = {container = "châu Phi", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Ivory Coast"},
["Jamaica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Japan"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "châu Phi", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Laos"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "châu Phi", divs = {"counties", "districts"}},
["Libya"] = {container = "châu Phi", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lithuania"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Malawi"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "châu Phi", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Mauritius"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "Bắc Mỹ", addl_parents = {"Trung Mỹ"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mongolia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Morocco"] = {container = "châu Phi", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "châu Phi", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Niger"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Nigeria"] = {container = "châu Phi", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["North Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Norway"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Trung Mỹ", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "Nam Mỹ", divs = {"departments", "districts"}},
["Peru"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Poland"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Russia"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribbean", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "châu Phi", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Saudi Arabia"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "châu Phi", divs = {"regions", "districts"}},
["South Africa"] = {container = "châu Phi", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["South Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["South Sudan"] = {container = "châu Phi", divs = {"regions", "states", "counties"}, british_spelling = true},
["Spain"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "châu Phi", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "Nam Mỹ", divs = {"districts"}},
["Sweden"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Taiwan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Taiwan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Thailand"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "châu Phi", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribbean", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "châu Phi", divs = {"governorates", "delegations"}},
["Turkey"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Turkey", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "châu Phi", divs = {"districts", "counties"}, british_spelling = true},
["Ukraine"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["United States"] = {the = true, container = "Bắc Mỹ",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "United States", display = true, the = true},
["U.S."] = {alias_of = "United States", display = true, the = true},
["USA"] = {alias_of = "United States", display = true, the = true},
["U.S.A."] = {alias_of = "United States", display = true, the = true},
["United States of America"] = {alias_of = "United States", display = true, the = true},
["Uruguay"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "Nam Mỹ", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "châu Phi",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Norway",
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"Bắc Mỹ"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"châu Phi"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"Bắc Mỹ"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
addl_parents = {"Caribbean"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Phi"},
},
-- special administrative region of China
["Hong Kong"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Macau"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "France",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Turkey", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "châu Phi"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
divs = {"communes"},
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "châu Phi"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribbean"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Australia",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Austria",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "China",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Finland",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "France",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Germany",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Greece",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "India",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Italy",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Japan",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Laos",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Morocco",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Egypt",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "North Korea",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Norway",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Poland",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Russia",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Saudi Arabia",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "South Korea",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Spain",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Taiwan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thailand",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Turkey",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraine",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "United States",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Germany",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Japan",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Russia",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "South Korea",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Taiwan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "United States",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Egypt"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Egypt"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Egypt"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Egypt"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Ivory Coast"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Cambodia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mongolia"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "North Korea"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thailand"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Turkey"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Austria"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Belgium"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Belgium"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Denmark"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Greece"},
["Thessaloniki"] = {container = "Greece"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Sweden"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraine"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
819mao7cqvtz1aqxf0b0e5rlxem6xjl
2350139
2350138
2026-05-04T14:09:02Z
TheHighFighter2
42988
2350139
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "châu Phi", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "châu Phi", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribbean", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Australia"] = {container = "Oceania", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Austria"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribbean", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Belgium"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Trung Mỹ", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "châu Phi", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "châu Phi", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "Nam Mỹ", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "châu Phi", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "châu Phi", divs = {"provinces", "communes"}},
["Campuchia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Canada"] = {container = "Bắc Mỹ", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "châu Phi", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "châu Phi", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Chile"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "communes"}},
["China"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "China", the = true}, -- differs in "the"
["Colombia"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "châu Phi", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Trung Mỹ", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribbean", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Denmark"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribbean", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["East Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "East Timor", display = true},
["Ecuador"] = {container = "Nam Mỹ", divs = {"provinces", "cantons"}},
["Egypt"] = {container = "châu Phi", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Equatorial Guinea"] = {container = "châu Phi", divs = {"provinces"}},
["Eritrea"] = {container = "châu Phi", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "châu Phi", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "châu Phi", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Finland"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["France"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "châu Phi", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "châu Phi", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Germany"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Greece"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "châu Phi", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "châu Phi", divs = {"regions"}},
["Guyana"] = {container = "Nam Mỹ", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribbean", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["India"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Italy"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Ivory Coast"] = {container = "châu Phi", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Ivory Coast"},
["Jamaica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Japan"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "châu Phi", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Laos"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "châu Phi", divs = {"counties", "districts"}},
["Libya"] = {container = "châu Phi", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lithuania"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Malawi"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "châu Phi", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Mauritius"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "Bắc Mỹ", addl_parents = {"Trung Mỹ"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mongolia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Morocco"] = {container = "châu Phi", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "châu Phi", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Niger"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Nigeria"] = {container = "châu Phi", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["North Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Norway"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Trung Mỹ", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "Nam Mỹ", divs = {"departments", "districts"}},
["Peru"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Poland"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Russia"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribbean", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "châu Phi", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Saudi Arabia"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "châu Phi", divs = {"regions", "districts"}},
["South Africa"] = {container = "châu Phi", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["South Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["South Sudan"] = {container = "châu Phi", divs = {"regions", "states", "counties"}, british_spelling = true},
["Spain"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "châu Phi", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "Nam Mỹ", divs = {"districts"}},
["Sweden"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Taiwan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Taiwan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Thailand"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "châu Phi", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribbean", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "châu Phi", divs = {"governorates", "delegations"}},
["Turkey"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Turkey", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "châu Phi", divs = {"districts", "counties"}, british_spelling = true},
["Ukraine"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["United States"] = {the = true, container = "Bắc Mỹ",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "United States", display = true, the = true},
["U.S."] = {alias_of = "United States", display = true, the = true},
["USA"] = {alias_of = "United States", display = true, the = true},
["U.S.A."] = {alias_of = "United States", display = true, the = true},
["United States of America"] = {alias_of = "United States", display = true, the = true},
["Uruguay"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "Nam Mỹ", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "châu Phi",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Norway",
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"Bắc Mỹ"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"châu Phi"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"Bắc Mỹ"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
addl_parents = {"Caribbean"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Phi"},
},
-- special administrative region of China
["Hong Kong"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Macau"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "France",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Turkey", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "châu Phi"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
divs = {"communes"},
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "châu Phi"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribbean"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Australia",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Austria",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "China",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Finland",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "France",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Germany",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Greece",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "India",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Italy",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Japan",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Laos",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Morocco",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Egypt",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "North Korea",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Norway",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Poland",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Russia",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Saudi Arabia",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "South Korea",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Spain",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Taiwan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thailand",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Turkey",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraine",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "United States",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Germany",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Japan",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Russia",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "South Korea",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Taiwan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "United States",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Egypt"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Egypt"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Egypt"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Egypt"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Ivory Coast"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Campuchia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mongolia"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "North Korea"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thailand"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Turkey"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Austria"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Belgium"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Belgium"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Denmark"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Greece"},
["Thessaloniki"] = {container = "Greece"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Sweden"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraine"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
5ec6ajza3k0fwj7a2wy9ip0kaia75yx
2350140
2350139
2026-05-04T14:11:23Z
TheHighFighter2
42988
2350140
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "châu Phi", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "châu Phi", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribbean", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Australia"] = {container = "Oceania", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Austria"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribbean", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Belgium"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Trung Mỹ", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "châu Phi", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "châu Phi", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "Nam Mỹ", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "châu Phi", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "châu Phi", divs = {"provinces", "communes"}},
["Campuchia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Canada"] = {container = "Bắc Mỹ", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "châu Phi", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "châu Phi", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Chile"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "communes"}},
["China"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "China", the = true}, -- differs in "the"
["Colombia"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "châu Phi", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Trung Mỹ", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribbean", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Denmark"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribbean", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["East Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "East Timor", display = true},
["Ecuador"] = {container = "Nam Mỹ", divs = {"provinces", "cantons"}},
["Egypt"] = {container = "châu Phi", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Equatorial Guinea"] = {container = "châu Phi", divs = {"provinces"}},
["Eritrea"] = {container = "châu Phi", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "châu Phi", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "châu Phi", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Finland"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["France"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "châu Phi", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "châu Phi", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Germany"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Greece"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "châu Phi", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "châu Phi", divs = {"regions"}},
["Guyana"] = {container = "Nam Mỹ", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribbean", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["India"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Italy"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Ivory Coast"] = {container = "châu Phi", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Ivory Coast"},
["Jamaica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Japan"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "châu Phi", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Laos"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "châu Phi", divs = {"counties", "districts"}},
["Libya"] = {container = "châu Phi", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lithuania"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Malawi"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "châu Phi", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Mauritius"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "Bắc Mỹ", addl_parents = {"Trung Mỹ"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mongolia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Morocco"] = {container = "châu Phi", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "châu Phi", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Niger"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Nigeria"] = {container = "châu Phi", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["North Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Norway"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Trung Mỹ", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "Nam Mỹ", divs = {"departments", "districts"}},
["Peru"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Poland"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Russia"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribbean", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "châu Phi", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Ả Rập Xê Út"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "châu Phi", divs = {"regions", "districts"}},
["South Africa"] = {container = "châu Phi", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["South Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["South Sudan"] = {container = "châu Phi", divs = {"regions", "states", "counties"}, british_spelling = true},
["Spain"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "châu Phi", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "Nam Mỹ", divs = {"districts"}},
["Sweden"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Taiwan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Taiwan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Thailand"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "châu Phi", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribbean", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "châu Phi", divs = {"governorates", "delegations"}},
["Turkey"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Turkey", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "châu Phi", divs = {"districts", "counties"}, british_spelling = true},
["Ukraine"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["United States"] = {the = true, container = "Bắc Mỹ",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "United States", display = true, the = true},
["U.S."] = {alias_of = "United States", display = true, the = true},
["USA"] = {alias_of = "United States", display = true, the = true},
["U.S.A."] = {alias_of = "United States", display = true, the = true},
["United States of America"] = {alias_of = "United States", display = true, the = true},
["Uruguay"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "Nam Mỹ", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "châu Phi",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Norway",
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"Bắc Mỹ"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"châu Phi"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Denmark",
addl_parents = {"Bắc Mỹ"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
addl_parents = {"Caribbean"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Phi"},
},
-- special administrative region of China
["Hong Kong"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Macau"] = {
placetype = {"special administrative region", "city"},
container = "China",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "France",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Turkey", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "châu Phi"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
divs = {"communes"},
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "châu Phi"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribbean"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Australia",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Austria",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "China",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "China",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Finland",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "France",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Germany",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Greece",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "India",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Italy",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Japan",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Laos",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Morocco",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Egypt",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "North Korea",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Norway",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Poland",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Russia",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Ả Rập Xê Út",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "South Korea",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Spain",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Taiwan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thailand",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Turkey",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraine",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "United States",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Germany",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Japan",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Russia",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "South Korea",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Taiwan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "United States",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Egypt"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Egypt"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Egypt"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Egypt"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Ivory Coast"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Campuchia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mongolia"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "North Korea"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thailand"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Turkey"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Austria"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Belgium"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Belgium"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Denmark"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Greece"},
["Thessaloniki"] = {container = "Greece"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Sweden"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraine"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
j0oul2edxlrjb1kim2coduagtsa2jth
2350141
2350140
2026-05-04T14:22:04Z
TheHighFighter2
42988
2350141
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "châu Phi", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "châu Phi", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribbean", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Australia"] = {container = "Oceania", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Áo"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribbean", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Bỉ"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Trung Mỹ", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "châu Phi", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "châu Phi", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "Nam Mỹ", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "châu Phi", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "châu Phi", divs = {"provinces", "communes"}},
["Campuchia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Canada"] = {container = "Bắc Mỹ", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "châu Phi", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "châu Phi", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Chile"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "communes"}},
["Trung Quốc"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "Trung Quốc", the = true}, -- differs in "the"
["Colombia"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "châu Phi", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Trung Mỹ", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribbean", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Đan Mạch"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribbean", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["Đông Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "Đông Timor", display = true},
["Ecuador"] = {container = "Nam Mỹ", divs = {"provinces", "cantons"}},
["Ai Cập"] = {container = "châu Phi", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Equatorial Guinea"] = {container = "châu Phi", divs = {"provinces"}},
["Eritrea"] = {container = "châu Phi", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "châu Phi", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "châu Phi", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Finland"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["France"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "châu Phi", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "châu Phi", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Germany"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Greece"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "châu Phi", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "châu Phi", divs = {"regions"}},
["Guyana"] = {container = "Nam Mỹ", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribbean", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["Ấn Độ"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Italy"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Ivory Coast"] = {container = "châu Phi", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Ivory Coast"},
["Jamaica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Nhật Bản"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "châu Phi", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Laos"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "châu Phi", divs = {"counties", "districts"}},
["Libya"] = {container = "châu Phi", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lithuania"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Malawi"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "châu Phi", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Mauritius"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "Bắc Mỹ", addl_parents = {"Trung Mỹ"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mongolia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Morocco"] = {container = "châu Phi", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "châu Phi", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Niger"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Nigeria"] = {container = "châu Phi", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["North Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Norway"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Trung Mỹ", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "Nam Mỹ", divs = {"departments", "districts"}},
["Peru"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Ba Lan"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Russia"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribbean", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "châu Phi", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Ả Rập Xê Út"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "châu Phi", divs = {"regions", "districts"}},
["South Africa"] = {container = "châu Phi", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["South Korea"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["South Sudan"] = {container = "châu Phi", divs = {"regions", "states", "counties"}, british_spelling = true},
["Spain"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "châu Phi", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "Nam Mỹ", divs = {"districts"}},
["Sweden"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Đài Loan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Đài Loan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Thailand"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "châu Phi", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribbean", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "châu Phi", divs = {"governorates", "delegations"}},
["Turkey"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Turkey", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "châu Phi", divs = {"districts", "counties"}, british_spelling = true},
["Ukraine"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["United States"] = {the = true, container = "Bắc Mỹ",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "United States", display = true, the = true},
["U.S."] = {alias_of = "United States", display = true, the = true},
["USA"] = {alias_of = "United States", display = true, the = true},
["U.S.A."] = {alias_of = "United States", display = true, the = true},
["United States of America"] = {alias_of = "United States", display = true, the = true},
["Uruguay"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "Nam Mỹ", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "châu Phi",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Norway",
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"Bắc Mỹ"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "France",
addl_parents = {"châu Phi"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"Bắc Mỹ"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
addl_parents = {"Caribbean"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"châu Phi"},
},
-- special administrative region of China
["Hong Kong"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Macau"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "France",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Australia",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Turkey", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "France",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "châu Phi"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
divs = {"communes"},
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "châu Phi"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Norway",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribbean"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "United States",
addl_parents = {"Caribbean"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "France",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Germany"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Australia",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Áo",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "Trung Quốc",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Finland",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "France",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Germany",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Greece",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "Ấn Độ",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Italy",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Nhật Bản",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Laos",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Morocco",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Ai Cập",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "North Korea",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Norway",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Ba Lan",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Russia",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Ả Rập Xê Út",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "South Korea",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Spain",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Đài Loan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thailand",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Turkey",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraine",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "United States",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Germany",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Nhật Bản",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Russia",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "South Korea",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Đài Loan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "United States",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Ai Cập"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Ai Cập"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Ai Cập"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Ai Cập"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Ivory Coast"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Campuchia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mongolia"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "North Korea"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thailand"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Turkey"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Áo"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Bỉ"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Bỉ"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Đan Mạch"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Greece"},
["Thessaloniki"] = {container = "Greece"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Sweden"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraine"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
rnahextzks5lzhh2gexmh49wvg3il82
2350155
2350141
2026-05-04T15:10:40Z
TheHighFighter2
42988
2350155
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "châu Phi", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "châu Phi", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribbean", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Úc"] = {container = "châu Đại Dương", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Áo"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribbean", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Bỉ"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Trung Mỹ", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "châu Phi", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "châu Phi", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "Nam Mỹ", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "châu Phi", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "châu Phi", divs = {"provinces", "communes"}},
["Campuchia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Canada"] = {container = "Bắc Mỹ", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "châu Phi", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "châu Phi", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Chile"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "communes"}},
["Trung Quốc"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "Trung Quốc", the = true}, -- differs in "the"
["Colombia"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "châu Phi", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Trung Mỹ", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribbean", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Đan Mạch"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribbean", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["Đông Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "Đông Timor", display = true},
["Ecuador"] = {container = "Nam Mỹ", divs = {"provinces", "cantons"}},
["Ai Cập"] = {container = "châu Phi", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea Xích Đạo"] = {container = "châu Phi", divs = {"provinces"}},
["Eritrea"] = {container = "châu Phi", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "châu Phi", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "châu Phi", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Phần Lan"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Pháp"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "châu Phi", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "châu Phi", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Đức"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Hy Lạp"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "châu Phi", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "châu Phi", divs = {"regions"}},
["Guyana"] = {container = "Nam Mỹ", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribbean", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["Ấn Độ"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Ý"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Bờ Biển Ngà"] = {container = "châu Phi", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Bờ Biển Ngà"},
["Jamaica"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Nhật Bản"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "châu Phi", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Lào"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "châu Phi", divs = {"counties", "districts"}},
["Libya"] = {container = "châu Phi", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Litva"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Malawi"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "châu Phi", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Mauritius"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "Bắc Mỹ", addl_parents = {"Trung Mỹ"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mông Cổ"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Maroc"] = {container = "châu Phi", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "châu Phi", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Niger"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Nigeria"] = {container = "châu Phi", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["Cộng hòa Dân chủ Nhân dân Triều Tiên"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Na Uy"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Trung Mỹ", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "Nam Mỹ", divs = {"departments", "districts"}},
["Peru"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Ba Lan"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Nga"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribbean", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribbean", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "châu Phi", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Ả Rập Xê Út"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "châu Phi", divs = {"regions", "districts"}},
["South Africa"] = {container = "châu Phi", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["Hàn Quốc"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["Nam Sudan"] = {container = "châu Phi", divs = {"regions", "states", "counties"}, british_spelling = true},
["Tây Ban Nha"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "châu Phi", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "Nam Mỹ", divs = {"districts"}},
["Thụy Điển"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Đài Loan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Đài Loan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Thái Lan"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "châu Phi", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribbean", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "châu Phi", divs = {"governorates", "delegations"}},
["Thổ Nhĩ Kỳ"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Thổ Nhĩ Kỳ", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "châu Phi", divs = {"districts", "counties"}, british_spelling = true},
["Ukraina"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["Hoa Kỳ"] = {the = true, container = "Bắc Mỹ",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["U.S."] = {alias_of = "Hoa Kỳ", display = true, the = true},
["USA"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["U.S.A."] = {alias_of = "Hoa Kỳ", display = true, the = true},
["United States of America"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["Uruguay"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "Nam Mỹ", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "châu Phi",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Na Uy",
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "Pháp",
addl_parents = {"Bắc Mỹ"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "Pháp",
addl_parents = {"châu Phi"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"Bắc Mỹ"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
addl_parents = {"Caribbean"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Phi"},
},
-- special administrative region of China
["Hồng Kông"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Na Uy",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Ma Cao"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Thổ Nhĩ Kỳ", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Caribbean"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "châu Phi"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribbean"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "châu Phi"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Na Uy",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribbean"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribbean"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Caribbean"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Đức"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Đức"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Úc",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Áo",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "Trung Quốc",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Phần Lan",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "Pháp",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Đức",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Hy Lạp",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "Ấn Độ",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Ý",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Nhật Bản",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Lào",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Maroc",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Ai Cập",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "Cộng hòa Dân chủ Nhân dân Triều Tiên",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Na Uy",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Ba Lan",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Nga",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Ả Rập Xê Út",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "Hàn Quốc",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Tây Ban Nha",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Đài Loan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thái Lan",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Thổ Nhĩ Kỳ",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraina",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "Hoa Kỳ",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Đức",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Nhật Bản",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Nga",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "Hàn Quốc",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Đài Loan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "Hoa Kỳ",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Ai Cập"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Ai Cập"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Ai Cập"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Ai Cập"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Bờ Biển Ngà"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Campuchia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mông Cổ"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "Cộng hòa Dân chủ Nhân dân Triều Tiên"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thái Lan"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Thổ Nhĩ Kỳ"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Áo"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Bỉ"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Bỉ"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Đan Mạch"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Hy Lạp"},
["Thessaloniki"] = {container = "Hy Lạp"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Thụy Điển"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraina"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
6yliha65eq9fph877kb24uk1mzep67v
2350158
2350155
2026-05-04T15:35:17Z
TheHighFighter2
42988
2350158
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", England$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", South Korea$", " County$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", England")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, England"`)
or
```
placename_to_key = make_placename_to_key(", South Korea", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon County, South Korea"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ", the = true},
["America"] = {alias_of = "châu Mỹ", the = true},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "châu Phi", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "châu Phi", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribe", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia", the = true}, -- differs in "the"
-- Both a country and continent
["Úc"] = {container = "châu Đại Dương", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Áo"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribe", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Bỉ"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Trung Mỹ", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "châu Phi", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Bosnia and Herzegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Bosnia"] = {alias_of = "Bosnia and Herzegovina", display = true},
["Botswana"] = {container = "châu Phi", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brazil"] = {container = "Nam Mỹ", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "châu Phi", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "châu Phi", divs = {"provinces", "communes"}},
["Campuchia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Canada"] = {container = "Bắc Mỹ", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "châu Phi", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Central African Republic"] = {the = true, container = "châu Phi", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Central African Republic", display = true, the = true},
["C.A.R"] = {alias_of = "Central African Republic", display = true, the = true},
["Chad"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Chile"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "communes"}},
["Trung Quốc"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "Trung Quốc", the = true}, -- differs in "the"
["Colombia"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "châu Phi", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Trung Mỹ", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribe", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Đan Mạch"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribe", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["Đông Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "Đông Timor", display = true},
["Ecuador"] = {container = "Nam Mỹ", divs = {"provinces", "cantons"}},
["Ai Cập"] = {container = "châu Phi", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea Xích Đạo"] = {container = "châu Phi", divs = {"provinces"}},
["Eritrea"] = {container = "châu Phi", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "châu Phi", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "châu Phi", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Phần Lan"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Pháp"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "châu Phi", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "châu Phi", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Đức"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Hy Lạp"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "châu Phi", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "châu Phi", divs = {"regions"}},
["Guyana"] = {container = "Nam Mỹ", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribe", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["Ấn Độ"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland", the = true}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Ý"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Bờ Biển Ngà"] = {container = "châu Phi", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Bờ Biển Ngà"},
["Jamaica"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Nhật Bản"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "châu Phi", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Lào"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "châu Phi", divs = {"counties", "districts"}},
["Libya"] = {container = "châu Phi", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Litva"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Malawi"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "châu Phi", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Mauritius"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "Bắc Mỹ", addl_parents = {"Trung Mỹ"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mông Cổ"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Maroc"] = {container = "châu Phi", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "châu Phi", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Niger"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Nigeria"] = {container = "châu Phi", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["Cộng hòa Dân chủ Nhân dân Triều Tiên"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia", the = true}, -- differs in "the"
["Na Uy"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine", the = true}, -- differs in "the"
["Panama"] = {container = "Trung Mỹ", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "Nam Mỹ", divs = {"departments", "districts"}},
["Peru"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Ba Lan"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Nga"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribe", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "châu Phi", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Ả Rập Xê Út"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "châu Phi", divs = {"regions", "districts"}},
["South Africa"] = {container = "châu Phi", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["Hàn Quốc"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["Nam Sudan"] = {container = "châu Phi", divs = {"regions", "states", "counties"}, british_spelling = true},
["Tây Ban Nha"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "châu Phi", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "Nam Mỹ", divs = {"districts"}},
["Thụy Điển"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Đài Loan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Đài Loan", the = true}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Thái Lan"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "châu Phi", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribe", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "châu Phi", divs = {"governorates", "delegations"}},
["Thổ Nhĩ Kỳ"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Thổ Nhĩ Kỳ", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "châu Phi", divs = {"districts", "counties"}, british_spelling = true},
["Ukraina"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["Hoa Kỳ"] = {the = true, container = "Bắc Mỹ",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["U.S."] = {alias_of = "Hoa Kỳ", display = true, the = true},
["USA"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["U.S.A."] = {alias_of = "Hoa Kỳ", display = true, the = true},
["United States of America"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["Uruguay"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City", the = true}, -- differs in "the"
["Venezuela"] = {container = "Nam Mỹ", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "châu Phi",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara", the = true},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribe"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Na Uy",
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "Pháp",
addl_parents = {"Bắc Mỹ"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "Pháp",
addl_parents = {"châu Phi"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"Bắc Mỹ"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
addl_parents = {"Caribe"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey", the = true},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Phi"},
},
-- special administrative region of China
["Hồng Kông"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Na Uy",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey", the = true},
-- special administrative region of China
["Ma Cao"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Caribe"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Thổ Nhĩ Kỳ", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Caribe"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribe"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "châu Phi"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribe"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "châu Phi"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Na Uy",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribe"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Caribe"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Đức"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Đức"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Úc",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Áo",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada", the = true},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "Trung Quốc",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Phần Lan",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "Pháp",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes", the = true}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Đức",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Hy Lạp",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "Ấn Độ",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Ý",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Nhật Bản",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Lào",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova", the = true},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Maroc",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Ai Cập",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "Cộng hòa Dân chủ Nhân dân Triều Tiên",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Na Uy",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Ba Lan",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia", the = true},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia", the = true},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia", the = true},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia", the = true},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia", the = true},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia", the = true},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia", the = true},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia", the = true},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia", the = true},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", the = true},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia", the = true},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia", the = true},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia", the = true},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", the = true},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia", the = true},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia", the = true},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia", the = true},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia", the = true},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia", the = true},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia", the = true},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia", the = true},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Nga",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Ả Rập Xê Út",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "Hàn Quốc",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain", the = true},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Tây Ban Nha",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Đài Loan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thái Lan",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Thổ Nhĩ Kỳ",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraina",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "Hoa Kỳ",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Đức",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Nhật Bản",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Nga",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "Hàn Quốc",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Đài Loan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "Hoa Kỳ",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Ai Cập"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Ai Cập"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Ai Cập"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Ai Cập"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Bờ Biển Ngà"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Campuchia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mông Cổ"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "Cộng hòa Dân chủ Nhân dân Triều Tiên"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thái Lan"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Thổ Nhĩ Kỳ"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Áo"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Bỉ"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Bỉ"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Đan Mạch"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Hy Lạp"},
["Thessaloniki"] = {container = "Hy Lạp"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Thụy Điển"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraina"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
4c4v5bp1sngato4jxnubwixdm9l8ehv
2350204
2350158
2026-05-05T03:59:50Z
Hiyuune
50834
loại bỏ mạo từ
2350204
Scribunto
text/plain
local export = {}
export.force_cat = false -- set to true to force category generation even on non-mainspace pages
local m_table = require("Module:table")
local string_utilities_module = "Module:string utilities"
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local concat = table.concat
local dump = mw.dumpObject
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
--[==[ intro:
This module contains data on all known locations, along with some lower-level code to process them (higher-level
known-location code is in [[Module:place/placetypes]]). You must load this module using require(), not using
mw.loadData().
===Location data===
'''NOTE: In order to understand the following better, first read the introductory documentation in [[Module:place]],
especially the section `More about known locations`.'''
The bulk of the code in this module (after some helper functions and placetype tables) describes the known locations
and their relationships. Locations are grouped into ''location groups'' that share some common properties (examples are
states of the United States and cities in Brazil). Each location group is associated with two tables, a ''data table''
that lists the locations and their individual properties, and a ''metadata table'' that lists group-level properties and
defaults for the location properties. Each metadata table points to the associated data table (i.e. contains the data
table as its `data` field), and the global `locations` variable holds a list of all group metadata tables. A given
location is generally described by three values: (a) the group metadata table for the group the location is part of; (b)
the location's canonical ''key'', which is the actual key in the group's data table and is globally unique across all
locations; and (c) the location's ''spec'', which is the initialized object describing the properties of the location
and comes from the value in the data table corresponding to the canonical key, transformed by the `initialize_spec()`
function. These are typically named `group`, `key` and `spec`, respectively and in that order, and are found in the
arguments to many functions.
In a per-group data table, the keys are either ''canonical keys'' describing locations (which, as mentioned above, must
be globally unique) or ''alias keys'' specifying an allowed alias for a given location. There may be multiple aliases
for a given location and the alias keys only need to be unique within a particular group data table, not across all
groups. It is also possible for the same string to serve as an alias key in one group and a canonical key in another
group. (For example, `Newcastle` appears as an alias key in two different groups, referring to two different locations,
canonically known as `Newcastle upon Tyne`, for the city in England, and `Newcastle, New South Wales`, for the city in
New South Wales, Australia; and `Birmingham` appears both as a canonical key in the group of English cities and an alias
key for canonical `Birmingham, Alabama` in the group of US cities.) The corresponding value objects are different for
canonical and alias keys. Corresponding to canonical keys are ''location specs'', describing the properies of the
location that cannot be derived from default properties of the group or global defaults. Corresponding to alias keys
are ''alias specs'', which are highly restricted in the properties they can contain, and whose properties do not have
per-group defaults, but only global defaults.
The canonical key is always the same as the bare category corresponding to the location, which is one of the reasons it
must be globally unique. For example, the country of Georgia uses the canonical key `Georgia` and corresponding bare
category [[:Category:Georgia]], while the US state of Georgia uses the canonical key `Georgia, USA` and corresponding
bare category [[:Category:Georgia, USA]]. The following conventions are followed in naming keys:
* Countries, ''country-like entities'' (which are a mixture of unrecognized de-facto states and dependent territories)
and ''former countries'' (which also includes other types of polities, such as the Roman Empire) use their unqualified
placename as the canonical key. (See the documentation for [[Module:place]] for the distinction between keys and
placenames, which is critical to understand when working with location data.) This also applies to constituent
countries (such as England, Aruba and the Faroe Islands) and constituent parts of grouped dependent territories (such
as the island of Saint Helena, which is administratively part of the British overseas territory of Saint Helena,
Ascension and Tristan da Cunha).
* Cities (including prefecture-level cities in China, which behave in most respects more like non-city administrative
divisions) also normally use their unqualified placename as the canonical key, but if this causes name conflicts or
ambiguities, they use a ''qualified key'' containing either the country name or immediate containing division (if
different) following a comma, such as the case of `Newcastle, New South Wales` and `Birmingham, Alabama` above.
Examples of name conflicts are the two cities just given; examples of ambiguities are the major cities of León and
Mérida in Mexico and city of Cartagena, Colombia, which are given the respective canonical keys of `León, Guanajuato`,
`Mérida, Yucatán` and `Cartagena, Colombia` to avoid ambiguity with the well-known respective cities of the same name
in Spain, even though none of those cities are large enough to be included as known locations in this module. (The
cutoff is generally having a metro area of at least 1,000,000 inhabitants, although there are exceptions.)
* Administrative divisions of countries, other than the exceptions noted above for constituent countries and dependent
territories, use a qualified key that contains the name of the country or constituent country in it, e.g.
`Normandy, France` (a region), `Calvados, France` (a department in the region of Normandy), `Herefordshire, England`
(a ceremonial county), `Northwest Territories, Canada` (a territory), `Central Finland, Finland` (a region),
`Antalya Province, Turkey` (a province), `Cluj County, Romania` (a county), `County Cork, Ireland` (a county) and
`New York, USA` (a state). As shown in these various examples, (a) first and second-level divisions are sometimes both
included (as in France, the United Kingdom and China); (b) the qualifier after the comma is sometimes a constituent
country (England) instead of a country (United Kingdom), and is sometimes abbreviated (USA rather than United States
or Unites States of America); (c) the word `the` is not normally included in the key even if the location is normally
preceded by `the` when following a preposition (there is a property in the location and alias specs to indicate this),
except in a very few cases (most notably `The Hague`); (d) the country is included as a qualifier even if it creates
an apparent redundancy, as with `Central Finland, Finland`; and (e) sometimes the placetype is included in the key, as
with provinces in Turkey and several other countries; states in Nigeria; and counties in Ireland, Romania and several
other countries. Whether the placetype is included, and whether it follows or precedes the placename, depends on
per-country conventions. For example, provinces in Turkey, Iran and several other countries (likewise for states in
Nigeria, oblasts in Russia, etc.) conventionally include the word "Province", "State", "Oblast" etc. in their name
because they are normally named after the largest city in the division, which would otherwise lead to ambiguity; and
counties in Ireland and Northern Ireland (and likewise County Durham, England) normally have the word "County"
preceding rather than following them in their conventional name, so we follow this practice. The Wikipedia article
naming scheme for a given administrative division is a strong clue as to how the division is normally referred to,
and we usually follow this practice. (A minor exception is that the Wikipedia articles for provinces in Iran, Laos and
Thailand include the word `province` with an initial lowercase letter while provinces elsewhere, e.g. North and South
Korea, Saudi Arabia and Turkey, use uppercase `Province`; we normalize to uppercase `Province` in all cases.)
As mentioned above, associated with canonical keys in the group data table are location specs, which are objects
containing properties. It is important here to distinguish ''initialized specs'' from ''uninitialized specs''.
Unininitialized specs are as directly specified in [[Module:place/locations]], containing only those properties that
differ from the per-group or global defaults. Initialized specs result from calling `initialize_spec()` on an
uninitialized spec (it is idempotent in that it will do nothing if encountering an already-initialized spec). This
copies all group-level defaults that are not overridden in the location spec itself from the group-level metadata table
into the location spec, so that in general, no more reference need be made to the group to fetch the correct value of a
given location property. (The initialization process also does more transformations in a few cases, noted below.) Note
that the default value of a given property is stored under a key in the group metadata table that is preceded by the
string `default_`; for example, the default value corresponding to the `placetype` property of a given location is
specified in the `default_placetype` key in the group metadata table.
The following are the properties of the location spec.
* `placetype`: String specifying the placetype of the location (e.g. "quốc gia", "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 location will be recognized (e.g. in a holonym, or for categorizing into the bare category) when tagged with any
of the specified types. The placetype '''must''' be either specified on an individual location or defaulted at the
group level, or an error occurs.
* `container`: Either a string, a ''canonicalized container'' structure or a list of either type, specifying the
immediate ''container'' (or containers) of the given location. A container is another location which this location is
considered to be directly part of, either politically or (above the country level) geographically. Some locations
belong to multiple immediate containers; this applies especially to transcontinental countries such as Russia and
Turkey. Containers can themselves have containers, forming a tree (or more correctly, a [[w:directed acyclic graph]])
of locations. The list of immediate container(s), followed by the container(s) of the container(s), etc., is termed
the ''container trail'', and some functions compute and return this trail as part of their operation. When a location
spec is initialized, the given container spec is canonicalized into ''canonical container form'', which consists of a
list of canonicalized container structures, each of which is of the form
`{key = "``container_key``", placetype = "``container_placetype``"}`, where ``container_key`` is a canonical location
key and ``container_placetype`` should be the listed placetype for the location, or the first listed placetype if
there are multiple. (FIXME: Since the key uniquely identifies the container location, we should eliminate the
placetype from the container structure.) The list of canonicalized container structures is stored into the
`.containers` field of the location spec (this happens even if the container value is unset in its uninitialized spec
form, causing it to default to the corresponding group-level value), and the `.container` field is set to {nil}. The
canonicalization process is described in more detail below under [[#Container spec canonicalization]].
* `divs`: List of recognized political divisions; e.g. for the Netherlands, a specification of the form
`divs = {"provinces", "municipalities"}` will allow categories such as [[:Category:de:Provinces of the Netherlands]]
and [[:Category:pt:Municipalities of the Netherlands]] to be created. Any division that appears here must also be
found in `placetype_data`, or an error occurs. The entities appearing in the `divs` list can be structures as well as
just strings; this is explained more below under [[#Location divisions]]. Additional political divisions that apply to
all locations in a group can be specified at the group level using the group-only property `addl_divs`, which has the
same format as `divs`. This is intended to be used in the situation where some division types are shared among all
locations in the group and others differ from location to location. An example where this is used is the United
States, where `census-designated places` is specified in the group-level `addl_divs` so that all 50 states have
census-designated places categorized as e.g. [[:Category:Census-designated places in Arizona, USA]], but `counties`
and `county seats` are specified in the group-level `default_divs` because not all states have counties and county
seats (Alaska has boroughs and borough seats and Louisiana has parishes and parish seats), and some states have
additional divisions (New Jersey and Pennsylvania also have boroughs, while Colorado and Connecticut have
municipalities). Note that under most circumstances (particularly, if `container_parent_type` is not set as a property
associated with the division type), any division type specified on a sub-country-level location must also be specified
on all containers up through the country. For example, since French departments specify `communes` and
`municipalities` in `default_divs`, the same division types must be (and are) specified on French regions and for
France itself.
* `keydesc`: String directly specifying a description of the location, for use in generating the contents of category
pages related to the location. In place of a string, a function of three arguments (`group`, `key`, `spec`, as is
normal for locations) that computes the location description can also be given. This is used, for example, for
Russian federal subjects; see `construct_russia_federal_subject_keydesc`. The special string `+++` contained in the
keydesc is replaced with the default value of the location description, which specifies the location's placename,
placetype, and the corresponding values for each container in the container trail, generally up through (but not
beyond) the country level; see `no_include_container_in_desc` below. The location description is used to construct
the full description of various categories, such as bare location categories, whose description generally reads
`"{{(((}}langname}}} terms related to the people, culture, or territory of ``keydesc``."` where ``keydesc`` is the
specified or auto-constructed location description.
* `fulldesc`: String overriding the full description for the bare location category (but not for any other category).
This is currently used only for the location `Earth`, at the very top of the tree (because the standard
`people, culture or territory of ...` text doesn't make sense here), and for `Antarctica` (because it has no permanent
inhabitants). FIXME: This should be renamed `bare_category_fulldesc`.
* `addl_parents`: Specify additional parents for the bare location category, in addition to the category or categories
generated based on the immediate container(s). For example, `Hawaii, USA` specifies `Polynesia` as an additional
parent category; both `North Korea` and `South Korea` specify `Korea` (which is a specially handled location category)
as an additional parent; and `Earth` specifies `nature` (not a location category, but still a topic category) as an
additional parent (which in this case becomes the first parent, as `Earth` has no container). The only restriction on
the categories in `addl_parents` is that they must be topic categories, because each language-specific version of the
bare location category gets the corresponding language-specific versions of the categories in `addl_parents`. FIXME:
This shoudl be renamed `bare_category_addl_parents`.
* `wp`: Spec describing how to construct the Wikipedia article for the location. Each spec is either `true` (equivalent
to `"%l"`, i.e. use the full location placename directly) or a string containing formatting directives, indicating how
to construct the article name. The allowed formatting directives are `%l` (the full location placename), `%e` (the
elliptical location placename) and `%c` (the full placename of the first immediate container). For example, the
default value of `wp` for the group of United States cities is `"%l, %c"` since the city articles tend to be named
e.g. `Austin, Texas` (but with many exceptions, specified using `wp` fields at the city level). Another example is
Thai provinces, which specify a group-level default of `"%e province"` as the Wikipedia articles have lowercase
`province` in their name but the Thai province keys specified in this module have uppercase `Province`. Here we have
to use `%e` to get the placename without the word `Province` in it. The default is `true`, which simply uses the full
location placename as the article name. Note that the Wikipedia article, along with the Wikipedia and Commons category
pages, are shown in the upper right of bare category pages.
* `wpcat`: Spec describing how to construct the Wikipedia category page for the location (i.e. the page listing articles
and categories relevant to the location). The format is the same as with `wp`, and it defaults to the value of `wp`.
It rarely needs to be specified because the category page and the article page almost always follow the same format.
* `commonscat`: Spec describing how to construct the Commons category page for the location (i.e. the page on the
MediaWiki Commons site listing articles and categories relevant to the location). It has the same format as `wp` and
`wpcat` and defaults to `wpcat`, which is usually (but not always) correct.
* `the`: Boolean specifying whether a location should be preceded by `the` when following a preposition, e.g. in
category names such as [[:Category:Cities in the Northern Territory, Australia]] and in old-style place descriptions
when the location occurs as the first holonym, such as the city [[Darwin]] described using
{{tl|place|city|terr/Northern Territory|c/Australia}}. Note that the global default for this and all Boolean
properties is {nil}, which amounts to the same as {false}.
* `british_spelling`: Boolean indicating whether the location in question uses British spelling. Currently this only
affects whether the spelling `neighborhoods` or `neighbourhoods` is used in categories such as
[[:Category:Neighborhoods of New York City]] and [[:Category:Neighbourhoods of Sydney]]. This usually needs to be set
only at the top level (i.e. country or country-like entity), because lower-level entities look up the container trail
for any container that has `british_spelling = true` set, and if found, assume that British spelling applies. The
general principle used in setting this is that all countries in Europe, all dependent territories of any such country,
all former British colonies, and any dependent territories of these former colonies, are assumed to use British
spelling, while all other countries and associated dependent territories are assumed to use American spelling. This
can potentially be modified on a case-by-case basis.
* `is_city`: Boolean indicating whether the location in question is a city. This is explicitly set to `true` for
city-states (e.g. Monaco and Vatican City), dependent territories that are cities (e.g. Hong Kong, Macau, Bonaire,
Gibraltar, etc.), certain city-level administrative divisions (such as `City of Belfast, Northern Ireland`) and
(through a group-levell setting) New York boroughs. In addition, it is set to `true` in initialize_spec() whenever
the group-level `default_placetype == "city"`, so that all cities get it set without explicitly needing to add a
group-level setting for this. Note that the condition `default_placetype == "city"` intentionally excludes Chinese
prefecture-level cities, which aren't really cities in that (for example) they don't directly contain neighborhoods,
but do contain cities within them. This setting is used in various places: (a) to add cities, rivers, etc. to
categories like [[:Category:Rivers in Osaka Prefecture, Japan]] and [[:Category:Cities in Wuhan]] for holonyms that
are ''not'' cities; (b) to add districts, neighborhoods, and the like to categories like
[[:Category:Neighborhoods of Brooklyn]] and [[:Category:Neighborhoods of Monaco]] for holoynms that ''are'' cities;
(c) generally, to determine which "generic" placetypes (cities, rivers, neighborhoods, etc.) apply to the location.
(Those that can occur with cities have a `generic_before_cities` setting in [[Module:place/placetypes]], and those
that can occur with non-cities have a `generic_before_non_cities` setting.)
* `is_former_place`: Boolean that should be set on former places such as the Soviet Union and the Roman Empire. For such
places, categories such as [[:Category:fr:Rivers in the Soviet Union]] are neither generated nor recognized (more
generally, no "generic" placetypes apply except for `places`), and category descriptions include the word `former`.
* `overriding_bare_label_parents`: Document me!
* `bare_category_parent_type`: Document me!
* `no_container_cat`: Document me!
* `no_container_parent`: Document me!
* `no_generic_place_cat`: Document me!
* `no_check_holonym_mismatch`: Document me!
* `no_auto_augment_container`: Document me!
* `no_include_container_in_desc`: Document me!
====Location divisions====
The `divs` field of a location describes the recognized political division types of that location. Specifying a given
division type will cause places defined as being of the specified division type and with the location as a holonym will
cause the place to be categorized as ` ``placetypes`` in/of ``location`` `; for example, specifying that the United
States has `"states"` as a division will cause anything defined as {{tl|place|fr|state|c/US}} to be categorized under
[[:Category:fr:States of the United States]]. Note that you do not have to explicitly specify division types for
"generic" placetypes (those that have a `generic_before_non_cities` field if the location is not a city, or that have a
`generic_before_cities` field if the location is a city); this includes things like cities, towns, villages,
neighbo(u)rhoods and rivers. A given element in the `divs` list is usually a string naming a plural placetype; the
placetype is automatically converted to the singular for recognizing the placetype in a {{tl|place}} spec, and irregular
plurals such as `kibbutzim` are handled correctly as long as the placetype specifies an appropriate `plural` field
(if the `plural` isn't explicitly given, the default singularization algorithm in [[Module:en-utilities]] is run, which
gets most things correctly but has problems with `passes` and `fortresses`, which are singularized to `passe` and
`fortresse`; for this reason, an explicit plural entry is added to terms in ''-ss''). In place of a string, an object
can be given with the plural placetype in the `type` field; this allows additional properties to be specified along with
the placetype. An example of this is the `divs` list for Canada:
{
["Canada"] = {divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
}, ...},
}
Here, both provinces and territories are set to categorize as `provinces and territories`, meaning that there is a
single category [[:Category:Provinces and territories of Canada]] rather than separate categories for provinces and
territories. Similar things are done for other countries that have more than one type of first-level administrative
division (e.g. Australia, China, India and Pakistan). Note that any placetype listed under `cat_as` must exist in the
table of placetypes in [[Module:place/placetypes]], and in fact there is a category-only entry there for `provinces and
territories!` (the use of exclamation point following a plural placetype means that the placetype is present only for
use in categories and won't be recognized as the placetype field in a {{tl|place}} description). In addition, townships
are declared to use `in` rather than `of` as the preposition in the category; hence the category name will be
[[:Category:Townships in Canada]] rather than [[:Category:Townships of Canada]]. (The use of `in` vs. `of` is somewhat
related to whether a given placetype is an official administrative or statistical division of the location in question
and comes in a defined list, in which case `of` should be used, or is more ill-defined, in which case `in` should be
used; the default is `of`, and the use of `in` with `townships` is probably by analogy with the use of `in` with cities
and towns.)
Another more complex example is the divisions given for Quebec:
{
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}, ...},
}
Here, `container_parent_type` controls the second parent category of the placetype/location category associated with the
entry. In this case, for example, [[:Category:Counties of Quebec, Canada]] will have [[:Category:Counties of Canada]] as
its second or ''container-level'' parent. However, this doesn't make sense for `regional county municipalities`, which
exist only in Quebec (so the parent category [[:Category:Regional county municipalities of Canada]] would have only one
subcategory); but they are similar to regional municipalities in British Columbia, Nova Scotia and Ontario, so the
`container_parent_type = "regional municipalities"` spec causes the container-level parent of this category to be
[[:Category:Regional municipalities of Canada]]. Likewise, `regions` as administrative divisions (as opposed to mere
geographic regions) exist only in Quebec; they have no equivalent elsewhere, so we disable the container-level parent
using `container_parent_type = false`. The specs for `parish municipalities`, `township municipalities` and
`village municipalities` show both that multiple types can be specified under `cat_as` (here, for example, we categorize
`parish municipalities` as both `parishes` and `municipalities`) and that these types can themselves have properties,
just as for entries directly under `divs`. Specifically, `{type = "parishes", container_parent_type = "counties"}`
means that any place defined as a parish municipality in Quebec will be categorized under both [[:Category:Parishes of
Quebec, Canada]] and [[:Category:Municipalities of Quebec, Canada]], and that the former will have a container-level
parent of [[:Category:Counties of Canada]] (rather than the default of [[:Category:Parishes of Canada]]). Similarly,
`township municipalities` will be categorized under both [[:Category:Townships in Quebec, Canada]] (''not''
[[:Category:Townships of Quebec, Canada]]) and [[:Category:Municipalities of Quebec, Canada]].
====Container spec canonicalization====
A fully canonicalized container spec for a given location consists of a list of ''canonicalized container objects'',
each with a `key` and `placetype` field. The `key` field should name the canonical key of some other location at a
higher level (e.g. French cities are contained in French departments, which are contained in French regions, which are
contained in France, which is contained in Europe, which is contained in Eurasia, which is contained in the Earth). The
`placetype` field should correspond to the first (canonical) placetype listed for the key in question. The process of
initializing a locaion spec converts the container spec in `.container` into a canonicalized spec in `.containers` and
removes the spec from `.container`. It works as follows:
# If the `container` field is missing, and there is a group-level `default_container` field, it is used in its place.
For example, none of the Brazilian states listed in `brazil_states` specifies a container, but the group specifies
`default_container = "Brazil"`.
# A single string or canonicalized container object is allowed and made into a one-element list.
# If a list element is a string that did ''not'' come from `default_container`, and there is a group-level
`canonicalize_key_container` field, it is assumed to be a one-argument function and is called on the string to get
a canonicalized container object.
# Any remaining strings are assumed to be countries and are used directly as the `key`, with `placetype` set to
`"quốc gia"`.
====Alias keys====
Aliases can be provided for canonical keys using ''alias keys''. Alias keys have a very different location spec
structure from canonical keys. This structure does not, in general, have defaults at the group level and is not
initialized using `initialize_spec()`, but is used as-is. The following properties are recognized in an alias location
spec:
* `alias_of`: The canonical key of which this key is an alias. Required.
* `the`: If true, this alias key is preceded by `the` following a preposition. Defaults to the group-level `default_the`
but does not pay attention to the value of `the` for the corresponding canonical key.
* `display`: This is a display alias, meaning that holonyms using the placename corresponding to this alias will be
converted to the placename corresponding to the canonical key when formatting the holonym for display. (Otherwise,
the aliasing applies only to categorization.) If the value is true, the display canonicalization is to the placename
of the canonical key; otherwise, the value should be a key whose corresponding placename is used when display
canonicalizing.
* `placetype`: The placetype of the alias. Rarely needs to be specified as it defaults to the canonical key's placetype,
and if that is unspecified, to the group-level default placetype.
====Location group metadata tables====
As mentioned above, associated with each location group is a ''metadata table'' listing group-level properties. The
metadata table contains two types of keys: group-level defaults (named like the corresponding location-level keys but
preceded by `default_`, e.g. `default_placetype` corresponding to the location-level `placetype` key) and group-only
keys, which are mostly functions. The following are the possible group-only keys:
* `data`: This points to the group data table for the group, as described above.
* `key_to_placename`: This is a function of one argument to transform the location's key (whether canonical or alias)
into the full and elliptical placenames. The difference between full and elliptical placenames is described in the
documentation for [[Module:place]], but in essence, it applies for keys that include the placetype in them (e.g.
`Phuket Province, Thailand` or `County Mayo, Ireland`), in which case the full placename includes the placetype and
the elliptical placename does not. For keys that do not include the placetype in them (e.g. `Arizona, USA` or
`Gloucestershire, England`), the full and elliptical placenames are identical. Note that neither the full nor the
elliptical placename includes the container in it; hence, for `Phuket Province, Thailand`, the full placename is
`Phuket Province` and the elliptical placename is just `Phuket`. (Note that the full vs. elliptical placename
distinction is intended only for handling cases where the placetype follows or precedes the raw placename and there
is no difference between the two in whether they are normally preceded by `the`. More complex situations, such as
`State of Mexico` (which normally takes `the`) vs. just `Mexico` (which doesn't), or `Islamabad Capital Territory` vs.
just `Islamabad`, should be handled instead by aliases.) The `key_to_placename` function takes one argument, the key,
and returns two arguments, the full and elliptical placenames, respectively. If left undefined, the default is to
chop off anything starting with a comma and return the result as both full and elliptical placename, and if
specifically set to `false`, the key is used directly as both full and elliptical placename. If it needs to be
defined, it is best to use the helper function `make_key_to_placename`, if possible (or
`make_irish_type_key_to_placename` in the case of Ireland and Northern Ireland, where `County` precedes), rather than
rolling your own. In addition, you should use the global `key_to_placename` function (which takes care of the default
implementation and such) rather than directly calling the function in the `key_to_placename` field.
* `placename_to_key`: This is approximately the inverse of `key_to_placename`, transforming a placename (which can be
either in full or elliptical form) into the corresponding key. As with `key_to_placename`, if you need to define this
(generally, when the full and elliptical placenames are different), prefer using `make_placename_to_key` (or
`make_irish_type_placename_to_key` for Ireland and Northern Ireland) to rolling your own. In addition, similarly to
`key_to_placename`, use the global `placename_to_key` function to convert placenames to keys rather than directly
invoking the function in the `placename_to_key` field. If the field is set to `false`, the placename is used unchanged
as the key. Otherwise, the default algorithm works as follows:
*# If the group-level `default_placetype == "city"`, use the placename unchanged as the key.
*# Otherwise, if the group-level `default_container` exists and is a string, append it to the placename after a comma +
space and use the result as the key.
*# Otherwise, if the group-level `default_container` is a canonical container object (an object with `key` and
`placetype` fields), and the `placetype` field is either `country` or `constituent country`, append the `key` field
to the placename after a comma + space and use the result as the key.
*# Otherwise, use the placename unchanged as the key.
* `canonicalize_key_container`: A function of one argument to convert the specified `container` field, when a string,
to canonical form. Described in more detail above under [[#Container spec canonicalization]]. It is preferable to
construct the function using `make_canonicalize_key_container`, if possible, rather than rolling your own.
* `addl_divs`: Additional political divisions appended, for all locations in the group, to the list of divisions derived
from the location-level `divs` or group-level `default_divs` fields to get the final list of divisions for the
location. See [[#Location divisions]] for more details.
]==]
-----------------------------------------------------------------------------------
-- Helper functions --
-----------------------------------------------------------------------------------
--[==[
Throw an error. `fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to
format the format string as if `fmt:format(...)` were called. In general, callers should use `internal_error` unless the
error was due to bad user input rather than a logic error (which usually isn't the case in deep back-end code like
this).
]==]
function export.process_error(fmt, ...)
local args = {...}
for i = 1, select("#", ...) do
args[i] = dump(args[i])
end
return error(string.format(fmt, unpack(args)))
end
--[==[
Throw an internal error (a logic error that should never happen unless there is a bug in the code, as opposed to a user
error triggered by bad input or a system error due to something like running out of memory or hitting a time limit).
`fmt` is a format string and the remaining arguments are passed through `mw.dumpObject` and then used to format the
format string as if `fmt:format(...)` were called.
]==]
function export.internal_error(fmt, ...)
export.process_error("Internal error: " .. fmt, ...)
end
local internal_error = export.internal_error
-- 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) and true or false
end
return list_or_element == item
end
--[==[
Call the location group's `key_to_placename` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames). Two values are returned, the full and elliptical placenames (e.g. full
`"County Durham"` vs. elliptical `"Durham"`). If the group does not define `key_to_placename`, both full and elliptical
placenames are computed by chopping off anything starting with a comma.
]==]
function export.key_to_placename(group, key)
if group.key_to_placename == false then
return key, key
end
if group.key_to_placename then
local full_placename, elliptical_placename = group.key_to_placename(key)
if type(full_placename) ~= "string" then
internal_error("Key %s returned a non-string full placename: %s", key, full_placename)
end
if type(elliptical_placename) ~= "string" then
internal_error("Key %s returned a non-string elliptical placename: %s", key, elliptical_placename)
end
return full_placename, elliptical_placename
end
key = key:gsub(",.*", "")
return key, key
end
--[==[
Call the location group's `placename_to_key` function if it exists (see the comment at the top of [[Module:place]] for
the distinction between keys and placenames) and return the result. If `placename_to_key` exists with the value `false`,
return the placename unchanged. If the group does not define `placename_to_key`, and it defines a `default_container`
whose placetype is either `country` or `constituent country`, the container name is appended to the placename after a
comma and a space. Otherwise the placename is returned unchanged.
]==]
function export.placename_to_key(group, placename)
if group.placename_to_key == false then
return placename
elseif group.placename_to_key then
local key = group.placename_to_key(placename)
if type(key) ~= "string" then
internal_error("Placename %s returned a non-string key: %s", placename, key)
end
return key
elseif group.default_placetype == "city" then
return placename
else
local defcon = group.default_container
if not defcon then
return placename
elseif type(defcon) == "string" then
return placename .. ", " .. defcon
elseif type(defcon) == "table" and (defcon.placetype == "quốc gia" or
defcon.placetype == "constituent country") then
return placename .. ", " .. defcon.key
else
return placename
end
end
end
--[==[
Initialize the location spec `spec`, augmenting it with default values taken from `group` if the spec itself doesn't
specify values for the properties. This sets `containers` to a canonicalized list of objects, each with `key` and
`placetype` keys, describing the immediate containers of the location, and erases (sets to nil) the original
non-canonicalized `container` field. (Most locations have only one immediate container but some, e.g. Russia, have more
than one. Containers should be carefully distinguished from category parents. Generally the container is the first
category parent, or the first ``n`` parents if there are ``n`` containers, but there may be additional category parents,
which indicate some sort of relation between the category parent and the location but not necessarily one of
containment.)
This function is idempotent in that nothing happens if called more than once on the same spec.
FIXME: Consider reimplementing this in a more standardly object-oriented way using metatables.
]==]
function export.initialize_spec(group, key, spec)
if spec.initialized then
return
end
local container = spec.container
local containers
local container_from_default
if not container then
container = group.default_container
container_from_default = true
end
if container then
if type(container) == "string" or container.key then
container = {container}
end
containers = {}
for _, cont in ipairs(container) do
if type(cont) == "string" then
if group.canonicalize_key_container and not container_from_default then
cont = group.canonicalize_key_container(cont)
else
cont = {key = cont, placetype = "quốc gia"}
end
end
insert(containers, cont)
end
end
spec.containers = containers
spec.container = nil
local function value_with_default(val, default_val)
if val == nil then
return default_val
else
return val
end
end
local function set_or_default(prop)
spec[prop] = value_with_default(spec[prop], group["default_" .. prop])
end
set_or_default("placetype")
if not spec.placetype then
internal_error("No placetype found in key %s for spec %s or in group `default_placetype`", key, spec)
end
set_or_default("divs")
spec.addl_divs = group.addl_divs
for _, prop in ipairs {
"keydesc",
"fulldesc",
"addl_parents",
"overriding_bare_label_parents",
"bare_category_parent_type",
"wp",
"wpcat",
"commonscat",
"british_spelling",
"the",
"no_container_cat",
"no_container_parent",
"no_generic_place_cat",
"no_check_holonym_mismatch",
"no_auto_augment_container",
"no_include_container_in_desc",
"is_city",
"is_former_place",
} do
set_or_default(prop)
end
-- `default_placetype == "city"` is correct; if `default_placetype` has something else like `prefecture-level city`
-- as the canonical placetype but also lists `city` (as Chinese prefecture-level cities do), don't mark as
-- is_city.
spec.is_city = value_with_default(spec.is_city, group.default_placetype == "city")
spec.initialized = true
end
--[=[
Given a location group, key and possible placetypes that the placename must match, check if the key exists in the group
with at least one of the group's key's placetypes matching one of the passed-in placetypes. If so, return two values:
the group key (which potentially could differ from the passed-in key due to aliases) and the corresponding spec object,
which (as with all functions that return spec objects) has been initialized using `initialize_spec()` (i.e. default
property values have been copied from the group into the spec, if the spec doesn't itself specify a value for the
property in question).
`alias_resolution` controls how aliases are resolved. Normally, both display and category aliases are followed, and
the returned key will reflect the canonical location key. However, if `alias_resolution` is {"none"}, no alias following
happens. In that case, if the key specifies an alias, the spec for the alias rather than the spec for the canonical
location is returned, and importantly, it is returned uninitialized, meaning that properties from the group are not
copied into the spec. (If the key specifies a canonical location, its spec is returned initialized, as in the normal
case where `alias_resolution` is unspecified.) The caller needs to check whether the returned spec is an alias by
looking for an `alias_of` property. If `alias_resolution` is {"display"}, the behavior is the same as for {"none"}
except that if the alias contains a setting `display = true`, the returned key will reflect the canonical location key,
and if the alias contains a setting `display = ``string`` `, the returned key will reflect that string.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_key_in_group(group, placetypes, key, alias_resolution)
if alias_resolution ~= nil and alias_resolution ~= "none" and alias_resolution ~= "display" and
alias_resolution ~= "all" then
internal_error("Bad value for 'alias_resolution': %s", alias_resolution)
end
local spec = group.data[key]
if not spec then
return nil
end
local function check_correct_placetype(placetype)
if type(placetype) == "table" then
for _, pt in ipairs(placetype) do
if list_or_element_contains(placetypes, pt) then
return true
end
end
return false
else
return list_or_element_contains(placetypes, placetype)
end
end
if spec.alias_of then
local resolved_key = spec.alias_of
local resolved_spec = group.data[resolved_key]
if not resolved_spec then
internal_error("Key %s is an alias of %s, which doesn't exist", key, resolved_key)
elseif resolved_spec.alias_of then
internal_error("Key %s is an alias of %s, which is itself an alias; indirect aliasing not allowed",
key, resolved_key)
end
if alias_resolution == "none" or alias_resolution == "display" then
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or resolved_spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in any of spec %s, alias-resolved spec %s or in group " ..
"`default_placetype`", key, spec, resolved_spec)
end
if not check_correct_placetype(placetype) then
return nil
end
if alias_resolution == "display" then
if spec.display == true then
key = resolved_key
elseif spec.display then
key = spec.display
end
end
return key, spec
end
key = resolved_key
spec = resolved_spec
end
-- We could be working with non-initialized/defaulted spec, since we're pulling it directly from the group.
local placetype = spec.placetype or group.default_placetype
if not placetype then
internal_error("No placetype found for key %s in spec %s or group `default_placetype`", key, spec)
end
if not check_correct_placetype(placetype) then
return nil
end
export.initialize_spec(group, key, spec)
return key, spec
end
--[=[
Given a location group, placename and possible placetypes that the placename must match, check if the placename exists
in the group with at least one of the placetypes of the key in the group that corresponds to the placename matching one
of the passed-in placetypes. If so, return two values: the key corrsponding to the passed-in placename and the
corresponding spec object. This is similar to `find_matching_key_in_group()` but works with placenames rather than keys.
`alias_resolution` is as in `find_matching_key_in_group()`.
This is a low-level function meant for internal use; external callers should generally use `get_matching_location` (for
internally-derived locations), `find_matching_holonym_location` (for externally-derived locations) or
`find_canonical_key` (for known-canonical locations where the placetype isn't known).
]=]
local function find_matching_placename_in_group(group, placetypes, placename, alias_resolution)
local key = export.placename_to_key(group, placename)
return find_matching_key_in_group(group, placetypes, key, alias_resolution)
end
--[==[
If `key` is a canonical known location key (i.e. not an alias), return the corresponding group and initialized spec.
If no such key exists, return {nil}. This throws an internal error if two locations with the same key are found.
]==]
function export.find_canonical_key(key)
local found_locations = {}
for _, group in ipairs(export.locations) do
local spec = group.data[key]
if not spec then
-- do nothing
elseif spec.alias_of then
mw.log(("Skipping alias '%s' of canonical '%s'"):format(key, spec.alias_of))
else
insert(found_locations, {group, spec})
end
end
if not found_locations[1] then
return nil
elseif found_locations[2] then
internal_error("Found multiple matching locations for canonical key %s: %s", key, found_locations)
else
local group, spec = unpack(found_locations[1])
export.initialize_spec(group, key, spec)
return group, spec
end
end
--[==[
Iterator that returns all locations matching a given description, where the description consists of either a placename
or a key along with a list of possible placetypes. Usually there will be at most one such location. The iterator
returns three values at each iteration: the location group, canonical key by which the location is known and the spec
object describing the location. `data` contains the following possible fields:
* `placetypes`: A list of possible placetypes, one of which must match one of the location's placetypes; or a string
specifying a placetype, which must match one of the location's placetypes. This must be specified.
* `placename`: The placename of the location. Either this or `key` must be specified.
* `key`: The key of the location. Either this or `placename` must be specified.
* `alias_resolution`: If specified, it behaves the same as for `find_matching_key_in_group`.
The spec is normally initialized using `initialize_spec()` prior to it being returned (but may not be if
`alias_resolution` is given and the specified key or placename is an alias; see the documentation for
`find_matching_key_in_group`).
]==]
function export.iterate_matching_location(data)
local i = 0
local n = #export.locations
return function()
while true do
i = i + 1
if i > n then
break
end
local group = export.locations[i]
local key, spec
if data.placename then
key, spec = find_matching_placename_in_group(group, data.placetypes, data.placename,
data.alias_resolution)
else
if not data.key then
internal_error("'.placename' or '.key' must be defined: %s", data)
end
key, spec = find_matching_key_in_group(group, data.placetypes, data.key, data.alias_resolution)
end
if key then
return group, key, spec
end
end
end
end
--[==[
Return the location matching a given description, where the description consists of either a placename or a key along
with a list of possible placetypes. This is similar to `iterate_matching_location()` but throws an internal error if
there is not exactly one location found; as such, it is for use with internally specified locations (such as the
containers of known locations) rather than externally specified locations, which may not match a known location and in
some cases may match multiple known locations. For finding an externally specified location, consider using
`find_matching_holonym_location`, which returns {nil} rather than throwing an error if the location isn't found, but
also (more importantly) checks to make sure there are no conflicting holonyms among the user-specified holonyms (e.g.
{{tl|place|city|s/Delaware|c/USA|t=Newark}} will not match the known location `Newark` (in New Jersey, not Delaware).
]==]
function export.get_matching_location(data)
local all_found = {}
for group, key, spec in export.iterate_matching_location(data) do
insert(all_found, {group, key, spec})
end
if not all_found[1] then
internal_error("Couldn't find matching location for data %s", data)
elseif all_found[2] then
internal_error("Found multiple matching locations for data %s: %s", data, all_found)
else
return unpack(all_found[1])
end
end
--[==[
Successively iterate over a location's containers, and then the containers of those containers, etc. Keep in mind that
locations may have multiple containers (e.g. Russia has both Europe and Asia as containers, and both Europe and Asia
have Eurasia as their container). A given container will never be returned twice (e.g. in the case where a specific
location A has locations B and C as containers, and B has C as its container, C will not be returned twice). An
internal error happens if a container loop is detected. The return value is a list of location objects, each of which
contains `group`, `key` and `spec` fields.
]==]
function export.iterate_containers(group, key, spec)
local keys_seen = {}
keys_seen[key] = true
local iterations = 0
local last_iteration_containers = {{group = group, key = key, spec = spec}}
return function()
iterations = iterations + 1
if iterations > 10 then
internal_error("Probable loop in containers when processing key %s", key)
end
local next_iteration_containers = {}
for _, location in ipairs(last_iteration_containers) do
local containers = location.spec.containers
if containers then
for _, container in ipairs(containers) do
local container_group, container_key, container_spec = export.get_matching_location {
placetypes = container.placetype,
key = container.key,
}
if not keys_seen[container_key] then
insert(next_iteration_containers, {
group = container_group, key = container_key, spec = container_spec
})
keys_seen[container_key] = true
end
end
end
end
if not next_iteration_containers[1] then
return nil
end
last_iteration_containers = next_iteration_containers
return next_iteration_containers
end
end
--[==[
Given a placename, convert it into a link (two-part if `display_form` is given and differs from `placename`) and add
`"the "` to the beginning if called for in `spec`.
]==]
function export.construct_linked_placename(spec, placename, display_form)
local linked_placename = display_form and placename ~= display_form and ("[[%s|%s]]"):format(placename,
display_form) or ("[[%s]]"):format(placename)
if spec.the then
linked_placename = "the " .. linked_placename
end
return linked_placename
end
--[=[
This is typically used to define `key_to_placename`. It generates a function that chops off parts of a string (a
location key), typically at the end, in order to get the full and elliptical versions of a placename. (See the
documentation above for `key_to_placename` under "Location group tables" for the difference between full and elliptical
placenames.) `container_patterns` is a Lua pattern or a list of possible patterns matching the container at the end of
the key, which will be used to remove that container. If multiple patterns are specified, each one is tried until one
matches. If `container_patterns` is omitted, this part of the process is skipped. The reulting string becomes the full
placename. If `divtype_patterns` is specified, it is likewise either a Lua pattern or list of possible patterns to match
and remove the political division affixed onto the end (or possibly the beginning) of the key in the keys of certain
countries (such as South Korean and North Korean counties, which include the word "County" in the key). The resulting
chopped string becomes the elliptical placename. If `divtype_patterns` is omitted, this part of the process is skipped
and the full and elliptical placenames are the same.
Typical usage is as follows:
```
key_to_placename = make_key_to_placename(", Anh$"),
```
or (when the political division is part of the key)
```
key_to_placename = make_key_to_placename(", Hàn Quốc$", "$")
```
]=]
local function make_key_to_placename(container_patterns, divtype_patterns)
if type(container_patterns) == "string" then
container_patterns = {container_patterns}
end
if type(divtype_patterns) == "string" then
divtype_patterns = {divtype_patterns}
end
return function(key)
local full_placename = key
if container_patterns then
for _, container_pattern in ipairs(container_patterns) do
local nsubs
full_placename, nsubs = full_placename:gsub(container_pattern, "")
if nsubs > 0 then
break
end
end
end
local elliptical_placename = full_placename
if divtype_patterns then
for _, divtype_pattern in ipairs(divtype_patterns) do
local nsubs
elliptical_placename, nsubs = elliptical_placename:gsub(divtype_pattern, "")
if nsubs > 0 then
break
end
end
end
return full_placename, elliptical_placename
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
placename to get the key (see the definition of `placename_to_key` above in the documentation under "Location group
tables"). Optional `divtype_suffix` is a raw string (which should not contain hyphens or other characters that have
special meaning in Lua patterns) to be appended first to the placename; if already present at the end, it is not
appended. `container_suffix` is then added in the same fashion if given. Typical usage is like this:
```
placename_to_key = make_placename_to_key(", Anh")
```
(which will convert e.g. `"Hampshire"` into `"Hampshire, Anh"`)
or
```
placename_to_key = make_placename_to_key(", Hàn Quốc", " County")
```
(which will convert e.g. `"Gangwon"` or `"Gangwon County"` into `"Gangwon, Hàn Quốc"`).
]=]
local function make_placename_to_key(container_suffix, divtype_suffix)
return function(placename)
local key = placename
if divtype_suffix then
if not key:find(divtype_suffix .. "$") then
key = key .. divtype_suffix
end
end
if container_suffix then
key = key .. container_suffix
end
return key
end
end
--[=[
This is typically used to define `canonicalize_key_container`, which converts a container as specified in the location
data into the canonical form containing both the full container key and its placetype. It generates a function to do
the canonicalization of a given container. If the container is a string, `suffix` is appended onto the string (use {nil}
or {""} if there is no suffix to append), and the placetype is set to `placetype`. Otherwise the container is left
as-is. Typical usage is like this:
```
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province")
```
which will convert e.g. `"Ontario"` into `{key = "Ontario, Canada", placetype = "province"}`.
]=]
local function make_canonicalize_key_container(suffix, placetype)
return function(container)
if type(container) == "string" then
return {key = container .. (suffix or ""), placetype = placetype}
else
return container
end
end
end
-----------------------------------------------------------------------------------
-- Top-level tables --
-----------------------------------------------------------------------------------
export.continents = {
["Trái Đất"] = {placetype = "planet", addl_parents = {"tự nhiên"},
fulldesc = "=là hành tinh thứ ba tính từ Mặt Trời", commonscat = "Earth"},
["châu Phi"] = {placetype = "continent", commonscat = "Africa", container = {key = "Trái Đất", placetype = "planet"}},
["châu Mỹ"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "[[America]], in the sense of [[North America]] and [[South America]] combined",
wp = "Châu Mỹ"},
["Americas"] = {alias_of = "châu Mỹ"},
["America"] = {alias_of = "châu Mỹ"},
["Bắc Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["Caribe"] = {the = true, placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Trung Mỹ"] = {placetype = {"continental region", "region"}, container = {key = "Bắc Mỹ", placetype = "continent"}},
["Nam Mỹ"] = {placetype = "continent", container = {key = "châu Mỹ", placetype = "supercontinent"}},
["châu Nam Cực"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"},
fulldesc = "=lục địa nằm xa về phía nam và tây nhất trên Trái Đất, chứa Cực Nam địa lý và nằm trong Vùng Nam Cực của Nam Bán cầu"},
["Đại lục Á Âu"] = {placetype = {"supercontinent", "continent"}, container = {key = "Trái Đất", placetype = "planet"},
keydesc = "một khu vực đất đai rộng lớn, bao gồm châu Âu và châu Á"},
["châu Á"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Âu"] = {placetype = "continent", container = {key = "Đại lục Á Âu", placetype = "supercontinent"}},
["châu Đại Dương"] = {placetype = "continent", container = {key = "Trái Đất", placetype = "planet"}},
["Melanesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Micronesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
["Polynesia"] = {placetype = {"continental region", "region"}, container = {key = "châu Đại Dương", placetype = "continent"}},
}
export.continents_group = {
default_overriding_bare_label_parents = {}, -- container parents should be used
default_divs = {{type = "quốc gia", prep = "của"}},
-- It's enough to mention the first-level continent or continent group. It seems excessive to write e.g.
-- "El Salvador, a country in Central America, a continental region in North America, a continent in America, ...".
default_no_include_container_in_desc = true,
default_no_container_cat = true,
default_no_container_parent = true,
default_no_auto_augment_container = true,
default_no_generic_place_cat = true,
-- French Guyana is in France but not in Europe, which should not be an issue, so don't check holonym mismatches at
-- this level. We also run into problems with supercontinents, which have "continent" as the fallback and cause
-- mismatches.
default_no_check_holonym_mismatch = true,
data = export.continents,
}
-- Countries: including those with partial recognition that are normally considered countries (e.g. Kosovo, Taiwan).
export.countries = {
["Afghanistan"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Albania"] = {container = "châu Âu", divs = {"counties", "municipalities", "communes",
{type = "administrative units", cat_as = "communes"},
}, british_spelling = true},
["Algeria"] = {container = "châu Phi", divs = {"provinces", "communes", "districts", "municipalities"}},
["Andorra"] = {container = "châu Âu", divs = {"parishes"}, british_spelling = true},
["Angola"] = {container = "châu Phi", divs = {"provinces", "municipalities"}},
["Antigua and Barbuda"] = {container = "Caribe", divs = {"provinces"}, british_spelling = true},
["Argentina"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Armenia"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts", "municipalities"},
british_spelling = true},
["Republic of Armenia"] = {alias_of = "Armenia"}, -- differs in "the"
-- Both a country and continent
["Úc"] = {container = "châu Đại Dương", divs = {
{type = "states", cat_as = "states and territories"},
{type = "territories", cat_as = "states and territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of states and territories"},
"local government areas", "dependent territories",
}, british_spelling = true},
["Australia"] = {alias_of = "Úc"},
["Áo"] = {container = "châu Âu", divs = {"states", "districts", "municipalities"}, british_spelling = true},
["Azerbaijan"] = {container = {"châu Âu", "châu Á"}, divs = {"districts", "municipalities"}, british_spelling = true},
["Bahamas"] = {the = true, container = "Caribe", divs = {"districts"}, british_spelling = true, wp = "The %l"},
["Bahrain"] = {container = "châu Á", divs = {"governorates"}},
["Bangladesh"] = {container = "châu Á", divs = {"divisions", "districts", "municipalities"}, british_spelling = true},
["Barbados"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Belarus"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Bỉ"] = {container = "châu Âu", divs = {"regions", "provinces", "municipalities"}, british_spelling = true},
["Belize"] = {container = "Trung Mỹ", divs = {"districts"}, british_spelling = true},
["Benin"] = {container = "châu Phi", divs = {"departments", "communes"}},
["Bhutan"] = {container = "châu Á", divs = {"districts", "gewogs"}},
["Bolivia"] = {container = "Nam Mỹ", divs = {"provinces", "departments", "municipalities"}},
["Bosna và Hercegovina"] = {container = "châu Âu", divs = {"entities", "cantons", "municipalities"}, british_spelling = true},
["Bosnia and Hercegovina"] = {alias_of = "Bosna và Hercegovina", display = true},
["Bosnia và Hercegovina"] = {alias_of = "Bosna và Hercegovina", display = true},
["Bosnia-Herzegovina"] = {alias_of = "Bosna và Hercegovina", display = true},
["Bosnia-Hercegovina"] = {alias_of = "Bosna và Hercegovina", display = true},
["Bosnia"] = {alias_of = "Bosna và Hercegovina", display = true},
["Botswana"] = {container = "châu Phi", divs = {"districts", "subdistricts"}, british_spelling = true},
["Brasil"] = {container = "Nam Mỹ", divs = {
"states", "municipalities", "macroregions",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Brazil"] = {alias_of = "Brasil", display = true},
["Brunei"] = {container = "châu Á", divs = {"districts", "mukims"}, british_spelling = true},
["Bulgaria"] = {container = "châu Âu", divs = {"provinces", "municipalities"}, british_spelling = true},
["Burkina Faso"] = {container = "châu Phi", divs = {"regions", "departments", "provinces"}},
["Burundi"] = {container = "châu Phi", divs = {"provinces", "communes"}},
["Campuchia"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Cameroon"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Canada"] = {container = "Bắc Mỹ", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces and territories"},
{type = "ABBREVIATION_OF territories", cat_as = "abbreviations of provinces and territories"},
"counties", "districts", "municipalities", "regional municipalities",
"rural municipalities", "parishes",
-- Don't change the following to something more politically correct (e.g. "First Nations reserves") until/unless
-- the Canadian government makes a similar switch (and note that as of Apr 18 2025, the Wikipedia article is
-- still at [[w:Indian reserves]]).
"Indian reserves",
"census divisions",
{type = "townships", prep = "in"},
},
british_spelling = true},
["Cape Verde"] = {container = "châu Phi", divs = {"municipalities", "parishes"}},
["Cabo Verde"] = {alias_of = "Cape Verde", display = true},
["Cộng hòa Trung Phi"] = {container = "châu Phi", divs = {"prefectures", "subprefectures"}},
["CAR"] = {alias_of = "Cộng hòa Trung Phi", display = true},
["C.A.R"] = {alias_of = "Cộng hòa Trung Phi", display = true},
["Tchad"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Chad"] = {alias_of = "Tchad", display = true},
["Chile"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "communes"}},
["Trung Quốc"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and autonomous regions"},
{type = "autonomous regions", cat_as = "provinces and autonomous regions"},
{type = "FORMER provinces", cat_as = "former provinces"},
"special administrative regions",
"prefectures",
{type = "FORMER prefectures", cat_as = "former prefectures"},
"prefecture-level cities",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
{type = "FORMER counties", cat_as = "former counties and county-level cities"},
{type = "FORMER county-level cities", cat_as = "former counties and county-level cities"},
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities.
"districts",
{type = "FORMER districts", cat_as = "former districts"},
"subdistricts",
"townships",
"municipalities",
{type = "direct-administered municipalities", cat_as = "municipalities"},
}},
["People's Republic of China"] = {alias_of = "Trung Quốc"}, -- differs in "the"
["Colombia"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Comoros"] = {the = true, container = "châu Phi", divs = {"autonomous islands"}},
["Costa Rica"] = {container = "Trung Mỹ", divs = {"provinces", "cantons"}},
["Croatia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Cuba"] = {container = "Caribe", divs = {"provinces", "municipalities"}},
["Cyprus"] = {container = {"châu Âu", "châu Á"}, divs = {"districts"}, british_spelling = true},
["Czech Republic"] = {the = true, container = "châu Âu", divs = {"regions", "districts", "municipalities"}, british_spelling = true},
["Czechia"] = {alias_of = "Czech Republic"}, -- differs in "the"
["Democratic Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"provinces", "territories"}},
["Congo"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["DRC"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["D.R.C"] = {alias_of = "Democratic Republic of the Congo", display = true, the = true},
["Đan Mạch"] = {container = "châu Âu", divs = {"regions", "municipalities", "dependent territories"},
british_spelling = true,
-- Wikipedia separates [[w:Denmark]] (constituent country) from [[w:Danish Realm]] (country)
},
["Djibouti"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Dominica"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Dominican Republic"] = {the = true, container = "Caribe", divs = {"provinces", "municipalities"},
keydesc = "the [[Dominican Republic]], the country that shares the [[Caribbean]] island of [[Hispaniola]] with [[Haiti]]"},
["Đông Timor"] = {container = "châu Á", divs = {"municipalities"}, wp = "Timor-Leste"},
["Timor-Leste"] = {alias_of = "Đông Timor", display = true},
["Ecuador"] = {container = "Nam Mỹ", divs = {"provinces", "cantons"}},
["Ai Cập"] = {container = "châu Phi", divs = {"governorates", "regions"}, british_spelling = true},
["El Salvador"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea Xích Đạo"] = {container = "châu Phi", divs = {"provinces"}},
["Eritrea"] = {container = "châu Phi", divs = {"regions", "subregions"}},
["Estonia"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Eswatini"] = {container = "châu Phi", british_spelling = true},
["Swaziland"] = {alias_of = "Eswatini", display = true},
["Ethiopia"] = {container = "châu Phi", divs = {"regions", "zones"}},
["Federated States of Micronesia"] = {the = true, container = "Micronesia", divs = {"states"}},
["Micronesia"] = {alias_of = "Federated States of Micronesia"},
["Fiji"] = {container = "Melanesia", divs = {"divisions", "provinces"}, british_spelling = true},
["Phần Lan"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Pháp"] = {container = "châu Âu", divs = {"regions", "cantons", "collectivities",
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
"dependent territories", "territories", "provinces",
}, british_spelling = true},
["Gabon"] = {container = "châu Phi", divs = {"provinces", "departments"}},
["Gambia"] = {the = true, container = "châu Phi", divs = {"divisions", "districts"}, british_spelling = true, wp = "The %l"},
["Georgia"] = {container = {"châu Âu", "châu Á"}, divs = {"regions", "districts"},
keydesc = "the country of [[Georgia]], in [[Eurasia]]", british_spelling = true, wp = "%l (country)"},
["Đức"] = {container = "châu Âu", divs = {
"states",
-- Bavaria, Baden-Württemberg, Hesse and North Rhine-Westphalia have administrative regions as divisions, but
-- there aren't really enough of them to categorize per state.
"regions",
"municipalities", "districts"}, british_spelling = true},
["Ghana"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Hy Lạp"] = {container = "châu Âu", divs = {"regions", "regional units", "municipalities",
{type = "peripheries", cat_as = {"regions"}},
}, british_spelling = true},
["Grenada"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Guatemala"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Guinea"] = {container = "châu Phi", divs = {"regions", "prefectures"}},
["Guinea-Bissau"] = {container = "châu Phi", divs = {"regions"}},
["Guyana"] = {container = "Nam Mỹ", divs = {"regions"}, british_spelling = true},
["Haiti"] = {container = "Caribe", divs = {"departments", "arrondissements"}},
["Honduras"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Hungary"] = {container = "châu Âu", divs = {"counties", "districts"}, british_spelling = true},
["Iceland"] = {container = "châu Âu", divs = {"regions", "municipalities", "counties"}, british_spelling = true},
["Ấn Độ"] = {container = "châu Á", divs = {
{type = "states", cat_as = "states and union territories"},
{type = "union territories", cat_as = "states and union territories"},
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states and union territories"},
{type = "ABBREVIATION_OF union territories", cat_as = "abbreviations of states and union territories"},
"divisions", "districts", "municipalities",
}, british_spelling = true},
["Indonesia"] = {container = "châu Á", divs = {"regencies", "provinces",
{type = "ABBREVIATION_OF provinces", cat_as = "abbreviations of provinces"},
}},
["Iran"] = {container = "châu Á", divs = {"provinces", "counties"}},
["Iraq"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Ireland"] = {container = "châu Âu", addl_parents = {"British Isles"},
divs = {"counties", "districts", "provinces"}, british_spelling = true, wp = "Republic of %l"},
["Republic of Ireland"] = {alias_of = "Ireland"}, -- differs in "the"
["Israel"] = {container = "châu Á", divs = {"districts"}},
["Ý"] = {container = "châu Âu", divs = {
"regions", "provinces", "metropolitan cities", "municipalities",
{type = "autonomous regions", cat_as = "regions"},
}, british_spelling = true},
["Bờ Biển Ngà"] = {container = "châu Phi", divs = {"districts", "regions"}},
-- We should really be using Ivory Coast (common name) but there are political ramifications to the use of
-- Côte d'Ivoire so don't make it a display alias.
["Côte d'Ivoire"] = {alias_of = "Bờ Biển Ngà"},
["Jamaica"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Nhật Bản"] = {container = "châu Á", divs = {"prefectures", "subprefectures", "municipalities"}},
["Jordan"] = {container = "châu Á", divs = {"governorates"}},
["Kazakhstan"] = {container = {"châu Á", "châu Âu"}, divs = {"regions", "districts"}},
["Kenya"] = {container = "châu Phi", divs = {"counties"}, british_spelling = true},
["Kiribati"] = {container = "Micronesia", british_spelling = true},
["Kosovo"] = {container = "châu Âu", divs = {"districts", "municipalities"}, british_spelling = true},
["Kuwait"] = {container = "châu Á", divs = {"governorates", "areas"}},
["Kyrgyzstan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Lào"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Latvia"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Lebanon"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Lesotho"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Liberia"] = {container = "châu Phi", divs = {"counties", "districts"}},
["Libya"] = {container = "châu Phi", divs = {"districts", "municipalities"}},
["Liechtenstein"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["Litva"] = {container = "châu Âu", divs = {"counties", "municipalities"}, british_spelling = true},
["Luxembourg"] = {container = "châu Âu", divs = {"cantons", "districts"}, british_spelling = true},
["Madagascar"] = {container = "châu Phi", divs = {"regions", "districts"}},
["Malawi"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Malaysia"] = {container = "châu Á", divs = {"states", "federal territories", "districts"}, british_spelling = true},
["Maldives"] = {the = true, container = "châu Á", divs = {"provinces", "administrative atolls"}, british_spelling = true},
["Mali"] = {container = "châu Phi", divs = {"regions", "cercles"}},
["Malta"] = {container = "châu Âu", divs = {"regions", "local councils"}, british_spelling = true},
["Marshall Islands"] = {the = true, container = "Micronesia", divs = {"municipalities"}},
["Mauritania"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Mauritius"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Mexico"] = {container = "Bắc Mỹ", addl_parents = {"Trung Mỹ"}, divs = {
"states", "municipalities",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
}},
["Moldova"] = {container = "châu Âu", divs = {
{type = "districts", cat_as = "districts and autonomous territorial units"},
{type = "autonomous territorial units", cat_as = "districts and autonomous territorial units"},
"communes", "municipalities",
}, british_spelling = true},
["Monaco"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- We want the first placetype to be 'city-state' so the description of Monaco says it's a city-state, but we
-- want its parent to be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
is_city = true, british_spelling = true},
["Mông Cổ"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Montenegro"] = {container = "châu Âu", divs = {"municipalities"}},
["Maroc"] = {container = "châu Phi", divs = {"regions", "prefectures", "provinces"}},
["Mozambique"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Myanmar"] = {container = "châu Á",
divs = {"regions", "states", "union territories",
{type = "self-administered zones", cat_as = "self-administered areas"},
{type = "self-administered divisions", cat_as = "self-administered areas"},
"districts"}},
["Burma"] = {alias_of = "Myanmar"}, -- not display-canonicalizing; has political connotations
["Namibia"] = {container = "châu Phi", divs = {"regions", "constituencies"}, british_spelling = true},
["Nauru"] = {container = "Micronesia", divs = {"districts"}, british_spelling = true},
["Nepal"] = {container = "châu Á", divs = {"provinces", "districts"}},
["Netherlands"] = {the = true, placetype = {"quốc gia", "constituent country"}, container = "châu Âu",
divs = {"provinces", "municipalities",
{type = "FORMER municipalities", cat_as = "former municipalities"},
"dependent territories", "constituent countries"}, british_spelling = true,
-- Wikipedia separates [[w:Netherlands]] (constituent country) from [[w:Kingdom of the Netherlands]]
-- (country)
},
["New Zealand"] = {container = "Polynesia", divs = {
"regions", "dependent territories", "territorial authorities",
{type = "districts", cat_as = "territorial authorities"},
},
british_spelling = true},
["Nicaragua"] = {container = "Trung Mỹ", divs = {"departments", "municipalities"}},
["Niger"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Nigeria"] = {container = "châu Phi", divs = {
"states",
-- Categorize the Federal Capital Territory as a state because there's only one of it; we could categorize
-- everything under 'states and territories' but that seems a bit pointless.
{type = "federal territories", cat_as = "states"},
"local government areas",
}, british_spelling = true},
["Cộng hòa Dân chủ Nhân dân Triều Tiên"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties"}},
["North Macedonia"] = {container = "châu Âu", divs = {"regions", "municipalities"}, british_spelling = true},
["Macedonia"] = {alias_of = "North Macedonia", display = true},
["Republic of North Macedonia"] = {alias_of = "North Macedonia"}, -- differs in "the"
["Republic of Macedonia"] = {alias_of = "North Macedonia"}, -- differs in "the"
["Na Uy"] = {container = "châu Âu",
divs = {"counties", "municipalities", "dependent territories", "districts", "unincorporated areas"},
british_spelling = true},
["Oman"] = {container = "châu Á", divs = {"governorates", "provinces"}},
["Pakistan"] = {container = "châu Á", divs = {
{type = "provinces", cat_as = "provinces and territories"},
{type = "administrative territories", cat_as = "provinces and territories"},
{type = "federal territories", cat_as = "provinces and territories"},
{type = "territories", cat_as = "provinces and territories"},
"divisions", "districts",
}, british_spelling = true},
["Palau"] = {container = "Micronesia", divs = {"states"}},
["Palestine"] = {container = "châu Á", divs = {"governorates"}},
["State of Palestine"] = {alias_of = "Palestine"}, -- differs in "the"
["Panama"] = {container = "Trung Mỹ", divs = {"provinces", "districts"}},
["Papua New Guinea"] = {container = "Melanesia", divs = {"provinces", "districts"}, british_spelling = true},
["Paraguay"] = {container = "Nam Mỹ", divs = {"departments", "districts"}},
["Peru"] = {container = "Nam Mỹ", divs = {"regions", "provinces", "districts"}},
["Philippines"] = {the = true, container = "châu Á", divs = {"regions", "provinces", "districts", "municipalities", "barangays"}},
["Ba Lan"] = {divs = {"voivodeships", "counties",
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
}, container = "châu Âu", british_spelling = true},
["Portugal"] = {container = "châu Âu", divs = {
{type = "autonomous regions", cat_as = "districts and autonomous regions"},
{type = "districts", cat_as = "districts and autonomous regions"},
"provinces", "municipalities"}, british_spelling = true},
["Qatar"] = {container = "châu Á", divs = {"municipalities", "zones"}},
["Republic of the Congo"] = {the = true, container = "châu Phi", divs = {"departments", "districts"}},
["Congo Republic"] = {alias_of = "Republic of the Congo", display = true, the = true},
["Romania"] = {container = "châu Âu", divs = {
"regions", "counties", "communes",
{type = "ABBREVIATION_OF counties", cat_as = "abbreviations of counties"},
}, british_spelling = true},
["Nga"] = {container = {"châu Âu", "châu Á"}, divs = {
"federal subjects", "republics", "autonomous oblasts", "autonomous okrugs", "oblasts", "krais", "federal cities",
"districts", "federal districts"},
british_spelling = true},
["Rwanda"] = {container = "châu Phi", divs = {"provinces", "districts"}},
["Saint Kitts and Nevis"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Saint Kitts"] = {alias_of = "Saint Kitts and Nevis", display = true},
["Saint Lucia"] = {container = "Caribe", divs = {"districts"}, british_spelling = true},
["Saint Vincent and the Grenadines"] = {container = "Caribe", divs = {"parishes"}, british_spelling = true},
["Saint Vincent"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["SVG"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["S.V.G"] = {alias_of = "Saint Vincent and the Grenadines", display = true},
["Samoa"] = {container = "Polynesia", divs = {"districts"}, british_spelling = true},
["San Marino"] = {container = "châu Âu", divs = {"municipalities"}, british_spelling = true},
["São Tomé and Príncipe"] = {container = "châu Phi", divs = {"districts"}},
["São Tome and Principe"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tomé"] = {alias_of = "São Tomé and Príncipe", display = true},
["São Tome"] = {alias_of = "São Tomé and Príncipe", display = true},
["Ả Rập Xê Út"] = {container = "châu Á", divs = {"provinces", "governorates"}},
["Senegal"] = {container = "châu Phi", divs = {"regions", "departments"}},
["Serbia"] = {container = "châu Âu", divs = {"districts", "municipalities", "autonomous provinces"}},
["Seychelles"] = {container = "châu Phi", divs = {"districts"}, british_spelling = true},
["Sierra Leone"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Singapore"] = {container = "châu Á", divs = {"districts", "regions"}, british_spelling = true},
["Slovakia"] = {container = "châu Âu", divs = {"regions", "districts"}, british_spelling = true},
["Slovenia"] = {container = "châu Âu", divs = {"statistical regions", "municipalities"}, british_spelling = true},
-- Note: While the official name does not include "the" at the beginning,
-- it sounds strange in English to leave it out and it's commonly included.
["Solomon Islands"] = {the = true, container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Somalia"] = {container = "châu Phi", divs = {"regions", "districts"}},
["South Africa"] = {container = "châu Phi", divs = {
"provinces",
"districts",
{type = "district municipalities", cat_as = "districts"},
{type = "metropolitan municipalities", cat_as = "districts"},
"municipalities",
}, british_spelling = true},
["Hàn Quốc"] = {container = "châu Á", addl_parents = {"Korea"}, divs = {"provinces", "counties", "districts"}},
["Nam Sudan"] = {container = "châu Phi", divs = {"regions", "states", "counties"}, british_spelling = true},
["Tây Ban Nha"] = {container = "châu Âu", divs = {"autonomous communities", "provinces", "municipalities",
"comarcas", "autonomous cities"},
british_spelling = true},
["Sri Lanka"] = {container = "châu Á", divs = {"provinces", "districts"}, british_spelling = true},
["Sudan"] = {container = "châu Phi", divs = {"states", "districts"}, british_spelling = true},
["Suriname"] = {container = "Nam Mỹ", divs = {"districts"}},
["Thụy Điển"] = {container = "châu Âu", divs = {"provinces", "counties", "municipalities"}, british_spelling = true},
["Switzerland"] = {container = "châu Âu", divs = {"cantons", "municipalities", "districts"}, british_spelling = true},
["Syria"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Đài Loan"] = {container = "châu Á", divs = {"counties", "districts", "townships", "special municipalities"}},
["Republic of China"] = {alias_of = "Đài Loan"}, -- differs in "the", different political connotations
["Tajikistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Tanzania"] = {container = "châu Phi", divs = {"regions", "districts"}, british_spelling = true},
["Thái Lan"] = {container = "châu Á", divs = {"provinces", "districts", "subdistricts"}},
["Togo"] = {container = "châu Phi", divs = {"provinces", "prefectures"}},
["Tonga"] = {container = "Polynesia", divs = {"divisions"}, british_spelling = true},
["Trinidad and Tobago"] = {container = "Caribe", divs = {"regions", "municipalities"}, british_spelling = true},
["Tunisia"] = {container = "châu Phi", divs = {"governorates", "delegations"}},
["Thổ Nhĩ Kỳ"] = {container = {"châu Âu", "châu Á"}, divs = {"provinces", "districts"}},
-- Foreign names generally get display-canonicalized.
["Türkiye"] = {alias_of = "Thổ Nhĩ Kỳ", display = true},
["Turkmenistan"] = {container = "châu Á", divs = {
-- The 5 regions are often also called provinces
"regions", {type = "provinces", cat_as = "regions"}, "districts"},
},
["Tuvalu"] = {container = "Polynesia", divs = {"atolls"}, british_spelling = true},
["Uganda"] = {container = "châu Phi", divs = {"districts", "counties"}, british_spelling = true},
["Ukraina"] = {container = "châu Âu", divs = {
{type = "oblasts", cat_as = "oblasts and autonomous republics"},
{type = "autonomous republics", cat_as = "oblasts and autonomous republics"},
"raions", "hromadas",
}, british_spelling = true},
["United Arab Emirates"] = {the = true, container = "châu Á", divs = {"emirates"}},
-- Abbreviations get display-canonicalized.
["UAE"] = {alias_of = "United Arab Emirates", display = true, the = true},
["U.A.E."] = {alias_of = "United Arab Emirates", display = true, the = true},
["United Kingdom"] = {the = true, container = "châu Âu", addl_parents = {"British Isles"},
divs = {"constituent countries", "counties", "districts", "boroughs", "territories", "dependent territories",
"traditional counties"},
keydesc = "the [[United Kingdom]] of Great Britain and Northern Ireland", british_spelling = true},
-- Abbreviations get display-canonicalized.
["UK"] = {alias_of = "United Kingdom", display = true, the = true},
["U.K."] = {alias_of = "United Kingdom", display = true, the = true},
["Hoa Kỳ"] = {the = true, container = "Bắc Mỹ",
divs = {"counties", "county seats", "states", "territories", "dependent territories",
{type = "ABBREVIATION_OF states", cat_as = "abbreviations of states"},
{type = "DEROGATORY_NAME_FOR states", cat_as = "derogatory names for states"},
{type = "NICKNAME_FOR states", cat_as = "nicknames for states"},
{type = "OFFICIAL_NICKNAME_FOR states", cat_as = "official nicknames for states"},
{type = "boroughs", prep = "in"}, -- exist in Pennsylvania and New Jersey
"municipalities", -- these exist politically at least in Colorado and Connecticut
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
-- Don't change the following to something more politically correct until/unless the US government makes a
-- similar switch (and note that as of Apr 18 2025, the Wikipedia article is still at
-- [[w:Indian reservations]]).
"Indian reservations",
}},
-- Abbreviations and long forms (when possible) get display-canonicalized.
["US"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["U.S."] = {alias_of = "Hoa Kỳ", display = true, the = true},
["USA"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["U.S.A."] = {alias_of = "Hoa Kỳ", display = true, the = true},
["United States of America"] = {alias_of = "Hoa Kỳ", display = true, the = true},
["Uruguay"] = {container = "Nam Mỹ", divs = {"departments", "municipalities"}},
["Uzbekistan"] = {container = "châu Á", divs = {"regions", "districts"}},
["Vanuatu"] = {container = "Melanesia", divs = {"provinces"}, british_spelling = true},
["Vatican City"] = {placetype = {"city-state", "quốc gia"}, container = "châu Âu",
-- First placetype should be 'city-state' for to shown up in its description,
-- Its parent should still be "countries in Europe".
bare_category_parent_type = {type = "quốc gia", prep = "của"},
addl_parents = {"Rome"}, is_city = true, british_spelling = true},
["Vatican"] = {alias_of = "Vatican City"}, -- differs in "the"
["Venezuela"] = {container = "Nam Mỹ", divs = {"states", "municipalities"}},
["Việt Nam"] = {container = "châu Á", divs = {"provinces", "districts", "municipalities"}},
["Western Sahara"] = {placetype = {"territory", "quốc gia"}, container = "châu Phi",
bare_category_parent_type = {type = "quốc gia", prep = "của"},
},
-- Not display-canonicalizable both due to differences in 'the' and the sovereignty dispute over Western Sahara
["Sahrawi Arab Democratic Republic"] = {alias_of = "Western Sahara"},
["SADR"] = {alias_of = "Sahrawi Arab Democratic Republic", display = true, the = true},
["Yemen"] = {container = "châu Á", divs = {"governorates", "districts"}},
["Zambia"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
["Zimbabwe"] = {container = "châu Phi", divs = {"provinces", "districts"}, british_spelling = true},
}
local function canonicalize_continent_container(key)
if type(key) ~= "string" then
return key
end
if export.continents[key] then
return {key = key, placetype = export.continents[key].placetype}
end
internal_error("Unrecognized key %s in `canonicalize_continent_like`", key)
end
export.countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"+++", "countries"},
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.countries,
}
-- Country-like entities: 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.
export.country_like_entities = {
-- British Overseas Territory
["Akrotiri and Dhekelia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Cyprus", "châu Âu", "châu Á"},
british_spelling = true,
},
-- Åland: Listed as a region of Finland. Wikipedia lists this under "dependent territories" in
-- [[w:List of sovereign states and dependent territories by continent]].
-- unincorporated territory of the United States
["American Samoa"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Anguilla"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["Abkhazia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Abkhazia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- Australian external territory
["Ashmore and Cartier Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
},
-- constituent country of the Netherlands
["Aruba"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- British Overseas Territory
["Bermuda"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Bonaire"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribe"},
is_city = true,
british_spelling = true,
},
-- British Overseas Territory
["British Indian Ocean Territory"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- British Overseas Territory
["British Virgin Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- Norwegian dependent territory
["Bouvet Island"] = {
placetype = {"dependent territory", "territory"},
container = "Na Uy",
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Cayman Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- Australian external territory
["Christmas Island"] = {
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
british_spelling = true,
},
-- Sui generis French "state private property" per Wikipedia; classify as overseas territory like the
-- French Southern and Antarctic Lands.
["Clipperton Island"] = {
placetype = {"overseas territory", "territory"},
container = "Pháp",
addl_parents = {"Bắc Mỹ"},
},
-- Australian external territory; also called the Keeling Islands or (officially) the Cocos (Keeling) Islands
["Cocos Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Á"},
wp = "Cocos (Keeling) Islands",
british_spelling = true,
},
["Cocos (Keeling) Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
["Keeling Islands"] = {alias_of = "Cocos Islands", display = true, the = true},
-- self-governing but in free association with New Zealand
["Cook Islands"] = {
the = true,
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- constituent country of the Netherlands
["Curaçao"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- special territory of Chile
["Easter Island"] = {
placetype = {"special territory", "territory"},
container = "Chile",
addl_parents = {"Polynesia"},
},
-- British Overseas Territory
["Falkland Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- autonomous territory of Denmark
["Faroe Islands"] = {
the = true,
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- overseas department and region of France
["French Guiana"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Nam Mỹ"},
british_spelling = true,
},
-- overseas collectivity of France
["French Polynesia"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- French overseas territory
["French Southern and Antarctic Lands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "Pháp",
addl_parents = {"châu Phi"},
},
-- British Overseas Territory
["Gibraltar"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"châu Âu"},
is_city = true,
british_spelling = true,
},
-- autonomous territory of Denmark
["Greenland"] = {
placetype = {"autonomous territory", "territory"},
container = "Đan Mạch",
addl_parents = {"Bắc Mỹ"},
divs = {"municipalities"},
british_spelling = true,
},
-- overseas department and region of France
["Guadeloupe"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
addl_parents = {"Caribe"},
divs = {"communes"},
british_spelling = true,
},
-- unincorporated territory of the United States
["Guam"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- self-governing British Crown dependency; technically called the Bailiwick of Guernsey
["Guernsey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
wp = "Bailiwick of %l",
},
["Bailiwick of Guernsey"] = {alias_of = "Guernsey"},
-- Australian external territory
["Heard Island and McDonald Islands"] = {
the = true,
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"châu Phi"},
},
-- special administrative region of China
["Hồng Kông"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- self-governing British Crown dependency
["Isle of Man"] = {
the = true,
placetype = {"crown dependency", "dependency", "dependent territory", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
-- Norwegian unincorporated area
["Jan Mayen"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "island"},
container = "Na Uy",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- self-governing British Crown dependency; technically called the Bailiwick of Jersey
["Jersey"] = {
placetype = {"crown dependency", "dependency", "dependent territory", "bailiwick", "territory"},
container = "United Kingdom",
addl_parents = {"British Isles", "châu Âu"},
british_spelling = true,
},
["Bailiwick of Jersey"] = {alias_of = "Jersey"},
-- special administrative region of China
["Ma Cao"] = {
placetype = {"special administrative region", "city"},
container = "Trung Quốc",
is_city = true,
british_spelling = true,
},
-- overseas department and region of France
["Martinique"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Caribe"},
british_spelling = true,
},
-- overseas department and region of France
["Mayotte"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- British Overseas Territory
["Montserrat"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- special collectivity of France
["New Caledonia"] = {
placetype = {"special collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Melanesia"},
british_spelling = true,
},
-- dependent territory of New Zealand
["New Zealand Subantarctic Islands"] = {
the = true,
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Antarctica"},
british_spelling = true,
},
-- self-governing but in free association with New Zealand
["Niue"] = {
placetype = {"quốc gia"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- Australian external territory
["Norfolk Island"] = {
placetype = {"external territory", "territory"},
container = "Úc",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Cyprus
["Northern Cyprus"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Cyprus", "Thổ Nhĩ Kỳ", "châu Âu", "châu Á"},
divs = {"districts"},
keydesc = "the de-facto independent state of [[Northern Cyprus]], internationally recognized as part of the country of [[Cyprus]]",
british_spelling = true,
},
-- commonwealth, unincorporated territory of the United States
["Northern Mariana Islands"] = {
the = true,
placetype = {"commonwealth", "unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- British Overseas Territory
["Pitcairn Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- commonwealth of the United States
["Puerto Rico"] = {
placetype = {"commonwealth", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Caribe"},
divs = {"municipalities"},
},
-- overseas department and region of France
["Réunion"] = {
placetype = {"overseas department", "department", "administrative region", "region"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"châu Phi"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Saba"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribe"},
is_city = true,
british_spelling = true,
},
-- overseas collectivity of France
["Saint Barthélemy"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- British Overseas Territory
["Saint Helena, Ascension and Tristan da Cunha"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
divs = {{type = "constituent parts", container_parent_type = false}},
addl_parents = {"Atlantic Ocean", "châu Phi"},
british_spelling = true,
},
-- constituent parts of the combined oveseas territory
["Ascension Island"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Saint Helena"] = {
placetype = {"constituent part", "territory", "island"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
["Tristan da Cunha"] = {
placetype = {"constituent part", "territory", "archipelago"},
container = {key = "Saint Helena, Ascension and Tristan da Cunha", placetype = "overseas territory"},
addl_parents = {"Atlantic Ocean"},
overriding_bare_label_parents = {},
no_container_cat = false,
no_container_parent = false,
no_auto_augment_container = false,
},
-- overseas collectivity of France
["Saint Martin"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- overseas collectivity of France
["Saint Pierre and Miquelon"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
divs = {"communes"},
addl_parents = {"Bắc Mỹ"},
british_spelling = true,
},
-- special municipality of the Netherlands
["Sint Eustatius"] = {
placetype = {"special municipality", "municipality", "overseas territory", "territory"},
container = "Netherlands",
addl_parents = {"Caribe"},
is_city = true,
british_spelling = true,
},
-- constituent country of the Netherlands
["Sint Maarten"] = {
placetype = {"constituent country", "quốc gia"},
container = "Netherlands",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Somalia
["Somaliland"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Somalia", "châu Phi"},
keydesc = "the de-facto independent state of [[Somaliland]], internationally recognized as part of the country of [[Somalia]]",
british_spelling = true,
},
-- British Overseas Territory
-- FIXME: We should form the group "South Georgia and the South Sandwich Islands" like we did for
-- "Saint Helena, Ascension and Tristan da Cunha".
["South Georgia"] = {
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Georgia
["South Ossetia"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Georgia", "châu Âu", "châu Á"},
keydesc = "the de-facto independent state of [[South Ossetia]], internationally recognized as part of the country of [[Georgia]]",
british_spelling = true,
},
-- British Overseas Territory
["South Sandwich Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Atlantic Ocean"},
wp = true,
wpcat = "South Georgia and the South Sandwich Islands",
british_spelling = true,
},
-- Norwegian unincorporated area
["Svalbard"] = {
placetype = {"unincorporated area", "dependent territory", "territory", "archipelago"},
container = "Na Uy",
addl_parents = {"châu Âu"},
british_spelling = true,
},
-- dependent territory of New Zealand
["Tokelau"] = {
placetype = {"dependent territory", "territory"},
container = "New Zealand",
addl_parents = {"Polynesia"},
british_spelling = true,
},
-- de-facto independent state, internationally recognized as part of Moldova
["Transnistria"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Moldova", "châu Âu"},
keydesc = "the de-facto independent state of [[Transnistria]], internationally recognized as part of [[Moldova]]",
british_spelling = true,
},
-- British Overseas Territory
["Turks and Caicos Islands"] = {
the = true,
placetype = {"overseas territory", "territory"},
container = "United Kingdom",
addl_parents = {"Caribe"},
british_spelling = true,
},
-- unincorporated territory of the United States
["United States Minor Outlying Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Islands", "Micronesia", "Polynesia", "Caribe"},
},
-- FIXME: We should add entries for the other minor outlying islands.
-- Baker Island (Oceania)
-- Howland Island (Oceania)
-- Jarvis Island (Oceania)
-- Johnston Atoll (Oceania)
-- Kingman Reef (Oceania)
-- Midway Atoll (Oceania)
-- Navassa Island (Caribbean)
-- Palmyra Atoll (Oceania)
-- Wake Island (Oceania)
["Wake Island"] = {
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Micronesia"},
},
-- unincorporated territory of the United States
["United States Virgin Islands"] = {
the = true,
placetype = {"unincorporated territory", "overseas territory", "territory"},
container = "Hoa Kỳ",
addl_parents = {"Caribe"},
},
["U.S. Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
["US Virgin Islands"] = {alias_of = "United States Virgin Islands", display = true, the = true},
-- overseas collectivity of France
["Wallis and Futuna"] = {
placetype = {"overseas collectivity", "collectivity"},
container = "Pháp",
addl_parents = {"Polynesia"},
british_spelling = true,
},
}
export.country_like_entities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Saint Helena, Ascension and Tristan da Cunha".
key_to_placename = false,
placename_to_key = false,
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_overriding_bare_label_parents = {"country-like entities"},
default_no_container_cat = true,
default_no_container_parent = true,
-- These entities often aren't really part of their container; a village in Wallis and Futuna (an overseas
-- collectivity of France in Polynesia), for example, shouldn't be treated as a village in France, nor as a village
-- in Europe.
default_no_auto_augment_container = true,
data = export.country_like_entities,
}
-- Former countries and such; we don't create "Cities in ..." categories because they don't exist anymore
export.former_countries = {
-- 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"] = {
placetype = {"unrecognized country", "quốc gia"},
addl_parents = {"Azerbaijan", "châu Âu", "châu Á"},
keydesc = "the former de-facto independent state of [[Artsakh]], internationally recognized as part of [[Azerbaijan]]",
british_spelling = true,
},
["Nagorno-Karabakh"] = {alias_of = "Artsakh"},
["Czechoslovakia"] = {container = "châu Âu", british_spelling = true},
["East Germany"] = {container = "châu Âu", addl_parents = {"Đức"}, british_spelling = true},
["North Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Persia"] = {placetype = {"empire", "quốc gia"}, container = "châu Á", divs = {"provinces"}},
["Byzantine Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"},
addl_parents = {"Ancient Europe", "Ancient Near East"},
divs = {
"provinces", "themes",
}},
["Roman Empire"] = {
the = true, placetype = {"empire", "quốc gia"}, container = {"châu Âu", "châu Phi", "châu Á"}, addl_parents = {"Rome"},
divs = {
"provinces",
{type = "FORMER provinces", cat_as = "provinces"},
}},
["South Vietnam"] = {container = "châu Á", addl_parents = {"Vietnam"}},
["Soviet Union"] = {
the = true, container = {"châu Âu", "châu Á"}, divs = {"republics", "autonomous republics"},
british_spelling = true},
["West Germany"] = {container = "châu Âu", addl_parents = {"Đức"}, british_spelling = true},
["Yugoslavia"] = {container = "châu Âu", divs = {"districts"},
keydesc = "the former [[Kingdom of Yugoslavia]] (1918–1943) or the former [[Socialist Federal Republic of Yugoslavia]] (1943–1992)", british_spelling = true},
}
export.former_countries_group = {
canonicalize_key_container = canonicalize_continent_container,
default_overriding_bare_label_parents = {"former countries and country-like entities"},
default_is_former_place = true,
default_placetype = "quốc gia",
default_no_container_cat = true,
default_no_container_parent = true,
-- No need to augment country holonyms with continents; not needed for disambiguation.
default_no_auto_augment_container = true,
data = export.former_countries,
}
-----------------------------------------------------------------------------------
-- Subpolity tables --
-----------------------------------------------------------------------------------
export.australia_states_and_territories = {
["Australian Capital Territory, Australia"] = {the = true, placetype = "territory"},
["Jervis Bay Territory, Australia"] = {the = true, placetype = "territory"},
["New South Wales, Australia"] = {},
["Northern Territory, Australia"] = {the = true, placetype = "territory"},
["Queensland, Australia"] = {},
["South Australia, Australia"] = {},
["Tasmania, Australia"] = {},
["Victoria, Australia"] = {},
["Western Australia, Australia"] = {},
}
-- states and territories of Australia
export.australia_group = {
default_container = "Úc",
default_placetype = "state",
default_divs = "local government areas",
data = export.australia_states_and_territories,
}
export.austria_states = {
["Vienna, Austria"] = {},
["Lower Austria, Austria"] = {},
["Upper Austria, Austria"] = {},
["Styria, Austria"] = {},
["Tyrol, Austria"] = {wp = "Tyrol (state)"},
["Carinthia, Austria"] = {},
["Salzburg, Austria"] = {wp = "Salzburg (state)"},
["Vorarlberg, Austria"] = {},
["Burgenland, Austria"] = {},
}
-- states of Austria
export.austria_group = {
default_container = "Áo",
default_placetype = "state",
default_divs = "municipalities",
data = export.austria_states,
}
export.bangladesh_divisions = {
["Barisal Division, Bangladesh"] = {},
["Chittagong Division, Bangladesh"] = {},
["Dhaka Division, Bangladesh"] = {},
["Khulna Division, Bangladesh"] = {},
["Mymensingh Division, Bangladesh"] = {},
["Rajshahi Division, Bangladesh"] = {},
["Rangpur Division, Bangladesh"] = {},
["Sylhet Division, Bangladesh"] = {},
}
-- divisions of Bangladesh
export.bangladesh_group = {
key_to_placename = make_key_to_placename(", Bangladesh$", " Division$"),
placename_to_key = make_placename_to_key(", Bangladesh", " Division"),
default_container = "Bangladesh",
default_placetype = "division",
default_divs = "districts",
data = export.bangladesh_divisions,
}
export.brazil_states = {
["Acre, Brazil"] = {wp = "%l (state)"},
["Alagoas, Brazil"] = {},
["Amapá, Brazil"] = {},
["Amazonas, Brazil"] = {wp = "%l (Brazilian state)"},
["Bahia, Brazil"] = {},
["Ceará, Brazil"] = {},
["Distrito Federal, Brazil"] = {wp = "Federal District (Brazil)"},
["Espírito Santo, Brazil"] = {},
["Goiás, Brazil"] = {},
["Maranhão, Brazil"] = {},
["Mato Grosso, Brazil"] = {},
["Mato Grosso do Sul, Brazil"] = {},
["Minas Gerais, Brazil"] = {},
["Pará, Brazil"] = {},
["Paraíba, Brazil"] = {},
["Paraná, Brazil"] = {wp = "%l (state)"},
["Pernambuco, Brazil"] = {},
["Piauí, Brazil"] = {},
["Rio de Janeiro, Brazil"] = {wp = "%l (state)"},
["Rio Grande do Norte, Brazil"] = {},
["Rio Grande do Sul, Brazil"] = {},
["Rondônia, Brazil"] = {},
["Roraima, Brazil"] = {},
["Santa Catarina, Brazil"] = {wp = "%l (state)"},
["São Paulo, Brazil"] = {wp = "%l (state)"},
["Sergipe, Brazil"] = {},
["Tocantins, Brazil"] = {},
}
-- states of Brazil
export.brazil_group = {
default_container = "Brazil",
default_placetype = "state",
default_divs = "municipalities",
data = export.brazil_states,
}
-- provinces (a.k.a. oblasts) of Bulgaria
export.bulgaria_provinces = {
["Blagoevgrad Province, Bulgaria"] = {},
["Burgas Province, Bulgaria"] = {},
["Dobrich Province, Bulgaria"] = {},
["Gabrovo Province, Bulgaria"] = {},
["Haskovo Province, Bulgaria"] = {},
["Kardzhali Province, Bulgaria"] = {},
["Kyustendil Province, Bulgaria"] = {},
["Lovech Province, Bulgaria"] = {},
["Montana Province, Bulgaria"] = {},
["Pazardzhik Province, Bulgaria"] = {},
["Pernik Province, Bulgaria"] = {},
["Pleven Province, Bulgaria"] = {},
["Plovdiv Province, Bulgaria"] = {},
["Razgrad Province, Bulgaria"] = {},
["Ruse Province, Bulgaria"] = {},
["Shumen Province, Bulgaria"] = {},
["Silistra Province, Bulgaria"] = {},
["Sliven Province, Bulgaria"] = {},
["Smolyan Province, Bulgaria"] = {},
["Sofia City Province, Bulgaria"] = {},
["Sofia Province, Bulgaria"] = {},
["Stara Zagora Province, Bulgaria"] = {},
["Targovishte Province, Bulgaria"] = {},
["Varna Province, Bulgaria"] = {},
["Veliko Tarnovo Province, Bulgaria"] = {},
["Vidin Province, Bulgaria"] = {},
["Vratsa Province, Bulgaria"] = {},
["Yambol Province, Bulgaria"] = {},
}
export.bulgaria_group = {
key_to_placename = make_key_to_placename(", Bulgaria$", " Province$"),
placename_to_key = make_placename_to_key(", Bulgaria", " Province"),
default_container = "Bulgaria",
--== source: https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Bulgaria ==
divs = {"regions", "planning regions", "provinces", "municipalities", "settlements"},
default_placetype = "province",
data = export.bulgaria_provinces,
}
export.canada_provinces_and_territories = {
["Alberta, Canada"] = {divs = {
{type = "municipal districts", container_parent_type = "rural municipalities"},
}},
["British Columbia, Canada"] = {divs =
{type = "regional districts", container_parent_type = false},
"regional municipalities",
},
["Manitoba, Canada"] = {divs = {"rural municipalities"}},
["New Brunswick, Canada"] = {divs = {"counties", "parishes", {type = "civil parishes", cat_as = "parishes"}}},
["Newfoundland and Labrador, Canada"] = {},
["Northwest Territories, Canada"] = {the = true, placetype = "territory"},
["Nova Scotia, Canada"] = {divs = {"counties", "regional municipalities"}},
["Nunavut, Canada"] = {placetype = "territory"},
["Ontario, Canada"] = {divs = {"counties", "regional municipalities", {type = "townships", prep = "in"}}},
["Prince Edward Island, Canada"] = {divs = {"counties", "parishes", "rural municipalities"}},
["Saskatchewan, Canada"] = {divs = {"rural municipalities"}},
["Quebec, Canada"] = {divs = {
"counties",
{type = "regional county municipalities", container_parent_type = "regional municipalities"},
-- administrative regions have an official (but non-governmental) function but there don't appear to be any
-- equivalent regions elsewhere in Canada, so disable the [[Category:Regions of Canada]] grouping
{type = "regions", container_parent_type = false},
{type = "townships", prep = "in"},
{type = "parish municipalities", cat_as = {{type = "parishes", container_parent_type = "counties"}, "municipalities"}},
{type = "township municipalities", cat_as = {{type = "townships", prep = "in"}, "municipalities"}},
{type = "village municipalities", cat_as = {{type = "villages", prep = "in"}, "municipalities"}},
}},
["Yukon, Canada"] = {placetype = "territory"},
["Yukon Territory, Canada"] = {alias_of = "Yukon, Canada"},
}
-- provinces and territories of Canada
export.canada_group = {
default_container = "Canada",
default_placetype = "province",
data = export.canada_provinces_and_territories,
}
export.china_provinces_and_autonomous_regions = {
-- direct-administered municipalities are not here but below under prefecture-level cities
["Anhui, China"] = {},
["Fujian, China"] = {},
["Fuchien, China"] = {alias_of = "Fujian, China", display = true},
["Gansu, China"] = {},
["Guangdong, China"] = {},
["Guangxi, China"] = {placetype = "autonomous region"},
["Guizhou, China"] = {},
["Hainan, China"] = {},
["Hebei, China"] = {},
["Heilongjiang, China"] = {},
["Henan, China"] = {},
["Hubei, China"] = {},
["Hunan, China"] = {},
["Inner Mongolia, China"] = {placetype = "autonomous region"},
["Jiangsu, China"] = {},
["Jiangxi, China"] = {},
["Jilin, China"] = {},
["Liaoning, China"] = {},
["Ningxia, China"] = {placetype = "autonomous region"},
["Qinghai, China"] = {},
["Shaanxi, China"] = {},
["Shandong, China"] = {},
["Shanxi, China"] = {},
["Sichuan, China"] = {},
["Tibet, China"] = {placetype = "autonomous region", wp = "Tibet Autonomous Region"},
["Xinjiang, China"] = {placetype = "autonomous region"},
["Yunnan, China"] = {},
["Zhejiang, China"] = {},
}
-- provinces and autonomous regions of China
export.china_group = {
default_container = "Trung Quốc",
default_placetype = "province",
default_divs = {
"prefectures", "prefecture-level cities",
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_provinces_and_autonomous_regions,
}
export.china_prefecture_level_cities = {
-- In China, a "prefecture-level city" is not a city in any real sense. It is rather a prefecture, which is an
-- administrative unit smaller than a province but bigger than a county, which is administratively controlled by
-- the chief city of the prefecture (which bears the same name as the prefecture), in a unified government. Prior
-- to the mid-1980's, in fact, prefecture-level cities *were* prefectures, and a few of them (especially in the
-- western portion of China) have not yet been converted. Generally a given province is entirely tiled by
-- prefecture-level cities, another indication that they should be treated as prefectures and not cities per se.
-- Yet another indication is that prefecture-level cities can contain counties and county-level cities (which, much
-- like prefecture-level cities, are effectively counties surrounding a chief city of the county, again which bears
-- the same name as the county-level city).
--
-- For this reason, we treat prefecture-level cities as non-city political divisions, and separately enumerate the
-- most populous so we can separately categorize districts and counties under them instead of lumping them at the
-- province level.
--
-- Note also that China separately distinguishes "urban area" from "metro area". Sometimes the two figures are
-- identical but sometimes the metro area is larger (and very occasionally smaller, which I assume is an error). I'm
-- guessing that the "urban area" is the contiguous urban area over a certain density while the metro area includes
-- all urban areas above a certain density; when the latter is greater, it's because of satellite cities in the
-- metro area separated by suburban/exurban or rural land.
-- At first I chose all prefecture/province-level cities with a total prefecture/province-level population of at
-- least 6,000,000 per the 2020 census with data taken from https://www.citypopulation.de/en/china/admin/ (a total
-- of 67, including the four direct-administered municipalities), and also chose all prefecture/province-level
-- cities whose "urban population" was at least 2,000,000 per the 2020 census with data taken from Wikipedia
-- [[w:List of cities in China by population#Cities and towns by population]] (a total of 61 cities; if we cut off
-- at 1.5 million we'd have 84 cities, and if we cut off at 1 million we'd have 105 cities). Merging them produces
-- 87 cities. Note that this leaves off a few well-known cities (Guilin, Qiqihar, Kashgar, Lhasa, ...) but includes
-- a lot of obscure cities.
--
-- At a later date I added all cities from citypopulation.de whose "urban" population per the 2020 China census was
-- >= 1 million, and then finally added all urban agglomerations from citypopulation.de whose 2025-01-01 estimate
-- was >= 1 million. These are sorted below by the urban agglomeration value (which is generally of the "adm-urb" =
-- "administrative area (urban population)" type) and sometimes groups nearby cities into a single agglomeration
-- (most notably in the case of the Pearl River Delta, grouped under Guangzhou with an agglomeration population of
-- 72,700,000 but including a large number of nearby large cities in the agglomeration (although for some reason not
-- Hong Kong, maybe due to the administrative issues involved). In addition, citypopulation.de includes divisions
-- under a prefecture-level city if they are city-like and have an agglomeration population of at least 1 million;
-- this includes several county-level cities, one county and one district (Wanzhou, a "district" of Chongqing
-- despite being 142 miles away). None of the county-level cities or counties have districts under them, only
-- subdistricts, towns and townships.
["Guangzhou"] = {container = "Guangdong"}, -- 18.7 prefectural, 18.8 urban; sub-provincial city; 16.097 urban (72.700 adm-urb including Dongguan, Foshan, Huizhou, Jiangmen, Shenzhen, Zhongshan) per citypopulation.de
["Dongguan"] = {container = "Guangdong"}, -- 10.5 prefectural, 10.5 urban; 9.645 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Foshan"] = {container = "Guangdong"}, -- 9.5 prefectural, 9.5 urban; 9.043 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Huizhou"] = {container = "Guangdong"}, -- 6.0 prefectural, 2.5 urban; 2.900 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Jiangmen"] = {container = "Guangdong"}, -- 4.798 prefectural, 2.7 urban; 1.795 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shenzhen"] = {container = "Guangdong"}, -- 17.5 prefectural, 14.7 urban; sub-provincial city; 17.445 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Zhongshan"] = {container = "Guangdong"}, -- 4.418 prefectural, 4.4 urban; 3.842 per citypopulation.de; included by citypopulation.de in Guangzhou agglomeration
["Shanghai"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 24.9 prefectural, 29.9 urban; 21.910 urban (41.600 adm-urb including Changshu, Changzhou, Suzhou, Wuxi) per citypopulation.de
["Changshu"] = {container = "Jiangsu"}, -- 1.231 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: Not to be confused with Cangzhou in Hebei
["Changzhou"] = {container = "Jiangsu"}, -- 5.278 prefectural, 3.6 urban; 3.187 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
-- NOTE: There is also a prefecture-level city Suzhou in Anhui with 5.3 million prefectural inhabitants
["Suzhou"] = {container = "Jiangsu"}, -- 12.8 prefectural, 4.3 urban; 5.893 urban per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Wuxi"] = {container = "Jiangsu"}, -- 7.5 prefectural, 3.3 urban; 3.957 per citypopulation.de; included by citypopulation.de in Shanghai agglomeration
["Beijing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 21.9 prefectural, 21.9 urban; 18.961 urban (21.500 adm-urb) per citypopulation.de
["Chengdu"] = {container = "Sichuan"}, -- 20.9 prefectural, 16.9 urban; sub-provincial city; 13.568 urban (18.100 adm-urb) per citypopulation.de
["Xiamen"] = {container = "Fujian"}, -- 5.163 prefectural, 5.2 urban; sub-provincial city; 4.617 urban (15.400 adm-urb including Jinjiang, Quanzhou, Putian) per citypopulation.de
["Jinjiang"] = {container = "Fujian"}, -- 1.416 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Quanzhou"] = {container = "Fujian"}, -- 8.8 prefectural, 1.7 urban (6.7 metro); 1.469 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Putian"] = {container = "Fujian"}, -- 3.210 prefectural, 2.0 urban; 1.539 urban per citypopulation.de; included by citypopulation.de in Xiamen agglomeration
["Hangzhou"] = {container = "Zhejiang"}, -- 11.9 prefectural, 10.7 urban; sub-provincial city; 9.236 urban (14.600 adm-urb including Shaoxing) per citypopulation.de
["Shaoxing"] = {container = "Zhejiang"}, -- 5.270 prefectural, 2.5 urban; 2.333 urban per citypopulation.de; included by citypopulation.de in Hangzhou agglomeration
["Xi'an"] = {container = "Shaanxi"}, -- 12.1 prefectural, 11.9 urban; sub-provincial city; 9.393 urban (13.400 adm-urb including Xianyang) per citypopulation.de
["Xianyang"] = {container = "Shaanxi"}, -- 1.193 urban per citypopulation.de; included by citypopulation.de in Xi'an agglomeration
["Chongqing"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 32.1 prefectural, 16.9 urban; 9.581 urban (12.900 adm-urb) per citypopulation.de
["Wuhan"] = {container = "Hubei"}, -- 12.4 prefectural, 12.3 urban; sub-provincial city; 10.495 urban (12.600 adm-urb) per citypopulation.de
["Tianjin"] = {placetype = {"direct-administered municipality", "municipality", "city"}}, -- 13.9 prefectural, 13.9 urban; 11.052 urban (11.700 adm-urb) per citypopulation.de
["Changsha"] = {container = "Hunan"}, -- 10.0 prefectural, 6.0 urban; 5.630 urban (11.500 adm-urb including Xiangtan, Zhuzhou) per citypopulation.de
-- Changsha County -- 1.024 urban per citypopulation.de
["Zhuzhou"] = {container = "Hunan"}, -- 1.510 urban per citypopulation.de; included by citypopulation.de in Changsha agglomeration
["Zhengzhou"] = {container = "Henan"}, -- 12.6 prefectural, 6.7 urban; 6.461 urban (10.300 adm-urb) per citypopulation.de
["Nanjing"] = {container = "Jiangsu"}, -- 9.3 prefectural, 9.3 urban; sub-provincial city; 7.520 urban (9.500 adm-urb including Ma'anshan) per citypopulation.de
["Shenyang"] = {container = "Liaoning"}, -- 9.1 prefectural, 7.9 urban; sub-provincial city; 7.026 urban (8.800 adm-urb including Fushun) per citypopulation.de
["Fushun"] = {container = "Liaoning"}, -- 1.229 urban per citypopulation.de; included by citypopulation.de in Shenyang agglomeration
["Hefei"] = {container = "Anhui"}, -- 9.4 prefectural, 4.2 urban; 5.056 urban (8.200 adm-urb) per citypopulation.de
["Shantou"] = {container = "Guangdong"}, -- 5.502 prefectural, 4.3 urban; 3.839 urban (8.050 adm-urb including Chaozhou, Jieyang, Puning) per citypopulation.de
["Chaozhou"] = {container = "Guangdong"}, -- 1.254 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Jieyang"] = {container = "Guangdong"}, -- 1.243 urban per citypopulation.de; included by citypopulation.de in Shantou agglomeration
["Qingdao"] = {container = "Shandong"}, -- 10.1 prefectural, 7.1 urban; sub-provincial city; 6.165 urban (7.700 adm-urb) per citypopulation.de
["Ningbo"] = {container = "Zhejiang"}, -- 9.4 prefectural, 5.1 urban; sub-provincial city; 3.731 urban (7.600 adm-urb including Cixi, Yuyao) per citypopulation.de
["Cixi"] = {container = "Zhejiang"}, -- 1.458 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
["Yuyao"] = {container = "Zhejiang"}, -- 1.014 urban per citypopulation.de; included by citypopulation.de in Ningbo agglomeration
-- Hong Kong 7.500 agglomeration per citypopulation.de 2025-01-01 estimate including Kowloon, Victoria
["Wenzhou"] = {container = "Zhejiang"}, -- 9.6 prefectural, 3.6 urban; 2.582 urban (7.000 adm-urb including Rui'an, Cangnan, Pingyang) per citypopulation.de
-- Rui'an is a "county-level city" of the "prefecture-level city" of Wenzhou but in fact is 19 miles away from Wenzhou city proper (urban core to urban core).
["Rui'an"] = {placetype = "county-level city", container = {key = "Wenzhou", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 1.013 urban per citypopulation.de; included by citypopulation.de in Wenzhou agglomeration
["Kunming"] = {container = "Yunnan"}, -- 8.5 prefectural, 6.0 urban; 5.273 urban (6.800 adm-urb) per citypopulation.de
-- includes Láiwú city
["Jinan"] = {container = "Shandong", wp = "%l, %c"}, -- 9.2 prefectural, 8.4 urban; sub-provincial city; 5.648 urban (6.750 adm-urb) per citypopulation.de
-- includes Xīnjí city
["Shijiazhuang"] = {container = "Hebei"}, -- 11.2 prefectural, 4.1 urban; 5.090 urban (6.450 adm-urb) per citypopulation.de
["Taiyuan"] = {container = "Shanxi"}, -- 5.304 prefectural, 4.5 urban; 4.304 urban (6.150 adm-urb) per citypopulation.de
["Harbin"] = {container = "Heilongjiang"}, -- 10.0 prefectural, 7.0 urban; sub-provincial city; 5.243 urban (5.550 adm-urb) per citypopulation.de
["Nanning"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 8.7 prefectural, 3.8 urban; 4.583 urban (5.550 adm-urb) per citypopulation.de
["Dalian"] = {container = "Liaoning"}, -- 7.5 prefectural, 5.7 urban; sub-provincial city; 4.914 urban (5.400 adm-urb) per citypopulation.de
["Guiyang"] = {container = "Guizhou"}, -- 5.987 prefectural, 3.5 urban; 4.021 urban (5.300 adm-urb) per citypopulation.de
["Changchun"] = {container = "Jilin"}, -- 9.1 prefectural, 5.7 urban; sub-provincial city; 4.557 urban (5.200 adm-urb) per citypopulation.de
["Nanchang"] = {container = "Jiangxi"}, -- 6.3 prefectural, 3.6 (3.9?) urban, 5.3 metro; 3.519 urban (5.150 adm-urb) per citypopulation.de
["Ürümqi"] = {container = {key = "Xinjiang, China", placetype = "autonomous region"}}, -- 4.054 prefectural, 4.3 urban; 3.843 urban (5.000 adm-urb) per citypopulation.de
["Urumqi"] = {alias_of = "Ürümqi", display = true},
["Fuzhou"] = {container = "Fujian"}, -- 8.3 prefectural, 4.1 urban; 3.723 urban (4.775 adm-urb) per citypopulation.de
["Linyi"] = {container = "Shandong"}, -- 11.0 prefectural, 2.3 urban; 2.744 urban (4.650 adm-urb) per citypopulation.de
["Zibo"] = {container = "Shandong"}, -- 4.704 prefectural, 2.6 urban; 2.750 urban (3.975 adm-urb) per citypopulation.de
["Luoyang"] = {container = "Henan"}, -- 7.1 prefectural, 2.4 urban; 2.231 urban (3.750 adm-urb) per citypopulation.de
["Lanzhou"] = {container = "Gansu"}, -- 4.359 prefectural, 3.1 urban; 3.013 urban (3.575 adm-urb) per citypopulation.de
["Nantong"] = {container = "Jiangsu"}, -- 7.7 prefectural, 2.3 urban; 2.988 urban (3.475 adm-urb) citypopulation.de
["Weifang"] = {container = "Shandong"}, -- 9.4 prefectural, 2.7 urban; 1.998 urban (3.325 adm-urb) per citypopulation.de
["Jiangyin"] = {container = "Jiangsu"}, -- 1.331 urban (3.200 adm-urb including Zhangjiagang) per citypopulation.de
["Zhangjiagang"] = {container = "Jiangsu"}, -- 1.056 urban per citypopulation.de; included in Jiangyin figures
["Xuzhou"] = {container = "Jiangsu"}, -- 9.1 prefectural, 2.6 urban; 2.846 urban (3.150 adm-urb) per citypopulation.de
["Handan"] = {container = "Hebei"}, -- 9.4 prefectural, 2.8 urban; 2.095 urban (2.925 adm-urb) per citypopulation.de
["Hohhot"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 3.446 prefectural, 2.7 urban; 2.373 urban (2.850 adm-urb) per citypopulation.de
["Haikou"] = {container = "Hainan"}, -- 2.873 prefectural, 2.3 urban; 2.349 urban (2.800 adm-urb) per citypopulation.de
["Tangshan"] = {container = "Hebei"}, -- 7.7 prefectural, 3.4 urban; 2.550 urban (2.750 adm-urb) per citypopulation.de
["Xinxiang"] = {container = "Henan"}, -- 6.3 prefectural, 1.2 urban, 2.7 metro; 1.271 urban (2.700 adm-urb) per citypopulation.de
["Yiwu"] = {container = "Zhejiang"}, -- 1.481 urban (2.700 adm-urb) per citypopulation.de
["Zhuhai"] = {container = "Guangdong"}, -- 2.439 prefectural, 2.4 urban; 2.207 urban (2.675 adm-urb) per citypopulation.de
["Taizhou, Zhejiang"] = {container = "Zhejiang"}, -- 6.6 prefectural, 1.6 urban; 1.486 urban (2.625 adm-urb) per citypopulation.de
["Taizhou"] = {alias_of = "Taizhou, Zhejiang"},
["Yantai"] = {container = "Shandong"}, -- 7.1 prefectural, 2.5 urban; 2.312 urban (2.550 adm-urb) per citypopulation.de
["Yinchuan"] = {container = {key = "Ningxia, China", placetype = "autonomous region"}}, -- 1.663 urban (2.525 adm-urb) per citypopulation.de
["Liuzhou"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 4.157 prefectural, 2.2 urban; 2.205 urban (2.500 adm-urb) per citypopulation.de
["Anshan"] = {container = "Liaoning"}, -- 1.480 urban (2.350 adm-urb including Liáoyáng) per citypopulation.de
["Yangzhou"] = {container = "Jiangsu"}, -- 2.067 urban (2.300 adm-urb) per citypopulation.de
["Jiaxing"] = {container = "Zhejiang"}, -- 1.188 urban (2.275 adm-urb) per citypopulation.de
["Xining"] = {container = "Qinghai"}, -- 1.677 urban (2.250 adm-urb) per citypopulation.de
-- includes Dìngzhōu city and Xióngān Xīnqū
["Baoding"] = {container = "Hebei"}, -- 11.5 prefectural, 2.0 urban; 1.940 urban (2.225 adm-urb) per citypopulation.de
["Baotou"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 2.709 prefectural, 2.2 urban; 2.104 urban (2.200 adm-urb) per citypopulation.de
["Ganzhou"] = {container = "Jiangxi"}, -- 9.0 prefectural, 1.6 urban; 1.778 urban (2.150 adm-urb) per citypopulation.de
["Pingdingshan"] = {container = "Henan"}, -- 1.046 urban (2.100 adm-urb) per citypopulation.de
["Zunyi"] = {container = "Guizhou"}, -- 6.6 prefectural, 2.4 urban/metro; 1.675 urban (2.025 adm-urb) per citypopulation.de
["Bengbu"] = {container = "Anhui"}, -- 1.078 urban (2.000 adm-urb) per citypopulation.de
["Datong"] = {container = "Shanxi"}, -- 3.105 prefectural, 2.0 urban; 1.810 urban (2.000 adm-urb) per citypopulation.de
["Anyang"] = {container = "Henan"}, -- 1.188 urban (1.960 adm-urb) per citypopulation.de
["Huai'an"] = {container = "Jiangsu"}, -- 4.556 prefectural, 2.6 urban; 1.805 urban (1.940 adm-urb) per citypopulation.de
["Zaozhuang"] = {container = "Shandong"}, -- 1.350 urban (1.900 adm-urb) per citypopulation.de
["Zhanjiang"] = {container = "Guangdong"}, -- 7.0 prefectural, 1.9 urban; 1.401 urban (1.890 adm-urb) per citypopulation.de
["Huainan"] = {container = "Anhui"}, -- 1.256 urban (1.880 adm-urb) per citypopulation.de
["Jining"] = {container = "Shandong"}, -- 8.4 prefectural, 1.5 urban; 1.700 urban (1.880 adm-urb) per citypopulation.de
["Daqing"] = {container = "Heilongjiang"}, -- 1.604 urban (1.860 adm-urb) per citypopulation.de
["Wuhu"] = {container = "Anhui"}, -- 1.598 urban (1.850 adm-urb) per citypopulation.de
["Guilin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 1.361 urban (1.830 adm-urb) per citypopulation.de
["Mianyang"] = {container = "Sichuan"}, -- 1.549 urban (1.800 adm-urb) per citypopulation.de
["Xiangyang"] = {container = "Hubei"}, -- 1.686 urban (1.800 adm-urb) per citypopulation.de
["Huzhou"] = {container = "Zhejiang"}, -- 1.084 urban (1.750 adm-urb) per citypopulation.de
["Puyang"] = {container = "Henan"}, -- 0.824 urban (1.750 adm-urb) per citypopulation.de
["Shangqiu"] = {container = "Henan"}, -- 7.8 prefectural, 1.9 urban (2.8 metro); 1.031 urban (1.750 adm-urb) per citypopulation.de
["Qinhuangdao"] = {container = "Hebei"}, -- 1.520 urban (1.740 adm-urb) per citypopulation.de
["Xingtai"] = {container = "Hebei"}, -- 7.1 prefectural, 971,000 urban; 1.5 urban (1.700 adm-urb) per citypopulation.de
["Nanyang"] = {container = "Henan", wp = "%l, %c"}, -- 9.7 prefectural, 2.1 urban/metro; 1.481 urban (1.680 adm-urb) per citypopulation.de
["Jiaozuo"] = {container = "Henan"}, -- 0.875 urban (1.640 adm-urb) per citypopulation.de
["Jilin City"] = {container = "Jilin"}, -- 1.509 urban (1.610 adm-urb) per citypopulation.de
["Jilin"] = {alias_of = "Jilin City"},
["Jinhua"] = {container = "Zhejiang"}, -- 7.1 prefectural, 1.5 urban; 1.041 urban (1.590 adm-urb) per citypopulation.de
["Shangrao"] = {container = "Jiangxi"}, -- 6.5 prefectural, 2.1 urban, 1.3 metro [sic]; 1.342 urban (1.580 adm-urb) per citypopulation.de
["Heze"] = {container = "Shandong"}, -- 8.8 prefectural, 1.3 urban; 1.294 urban (1.570 adm-urb) per citypopulation.de
["Yulin"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}, wp = "%l, %c"}, -- 0.878 urban (1.570 adm-urb) per citypopulation.de
["Tai'an"] = {container = "Shandong"}, -- 1.417 urban (1.560 adm-urb) per citypopulation.de
["Weihai"] = {container = "Shandong"}, -- 1.340 urban (1.510 adm-urb) per citypopulation.de
-- Taizhou, Jiangsu would be here (1.490 adm-urb) but moved to china_prefecture_level_cities_2 to avoid clash
["Yancheng"] = {container = "Jiangsu"}, -- 6.7 prefectural, 1.6 urban; 1.353 urban (1.460 adm-urb) per citypopulation.de
["Zhangjiakou"] = {container = "Hebei"}, -- 1.339 urban (1.450 adm-urb) per citypopulation.de
["Maoming"] = {container = "Guangdong"}, -- 6.2 prefectural, 2.5 urban; 1.308 urban (1.440 adm-urb) per citypopulation.de
["Nanchong"] = {container = "Sichuan"}, -- 1.254 urban (1.440 adm-urb) per citypopulation.de
["Fuyang"] = {container = "Anhui", wp = "%l, %c"}, -- 8.2 prefectural, 2.1 urban; 1.191 urban (1.410 adm-urb) per citypopulation.de
["Xuchang"] = {container = "Henan"}, -- 0.850 urban (1.390 adm-urb) per citypopulation.de
["Yichang"] = {container = "Hubei"}, -- 1.284 urban (1.390 adm-urb) per citypopulation.de
["Dazhou"] = {container = "Sichuan"}, -- 1.136 urban (1.380 adm-urb) per citypopulation.de
["Kaifeng"] = {container = "Henan"}, -- 1.194 urban (1.340 adm-urb) per citypopulation.de
["Luzhou"] = {container = "Sichuan"}, -- 1.128 urban (1.340 adm-urb) per citypopulation.de
["Qingyuan"] = {container = "Guangdong"}, -- 1.198 urban (1.340 adm-urb) per citypopulation.de
["Huaibei"] = {container = "Anhui"}, -- 0.831 urban (1.330 adm-urb) per citypopulation.de
["Yibin"] = {container = "Sichuan"}, -- 1.101 urban (1.310 adm-urb) per citypopulation.de
["Lu'an"] = {container = "Anhui"}, -- 1.070 urban (1.300 adm-urb) per citypopulation.de
["Dezhou"] = {container = "Shandong"}, -- 0.843 urban (1.290 adm-urb) per citypopulation.de
["Rizhao"] = {container = "Shandong"}, -- 1.147 urban (1.270 adm-urb) per citypopulation.de
["Changzhi"] = {container = "Shanxi"}, -- 1.047 urban (1.250 adm-urb) per citypopulation.de
["Hengyang"] = {container = "Hunan"}, -- 6.6 prefectural, 1.5 urban; 1.185 urban (1.250 adm-urb) per citypopulation.de
["Jinzhou"] = {container = "Liaoning"}, -- 1.021 urban (1.240 adm-urb) per citypopulation.de
["Liaocheng"] = {container = "Shandong"}, -- 1.020 urban (1.240 adm-urb) per citypopulation.de
["Changde"] = {container = "Hunan"}, -- 1.101 urban (1.230 adm-urb) per citypopulation.de
["Suqian"] = {container = "Jiangsu"}, -- 1.082 urban (1.230 adm-urb) per citypopulation.de
["Xinyang"] = {container = "Henan"}, -- 6.2 prefectural, 1.4 urban/metro; 1.015 urban (1.230 adm-urb) per citypopulation.de
["Baoji"] = {container = "Shaanxi"}, -- 1.108 urban (1.220 adm-urb) per citypopulation.de
["Yueyang"] = {container = "Hunan"}, -- 1.125 urban (1.220 adm-urb) per citypopulation.de
["Zhenjiang"] = {container = "Jiangsu"}, -- 1.124 urban (1.210 adm-urb) per citypopulation.de
-- Wanzhou is a "district" of the "direct-administered municipality" of Chongqing but in fact is 142 miles away from Chongqing city proper.
["Wanzhou"] = {placetype = "district", container = {key = "Chongqing", placetype = "direct-administered municipality"}, divs = {"subdistricts", "townships"}, wp = "%l, %c"}, -- 1.078 urban (1.190 adm-urb) per citypopulation.de
["Ulanhad"] = {container = {key = "Inner Mongolia, China", placetype = "autonomous region"}}, -- 1.093 urban (1.180 adm-urb) per citypopulation.de
["Chifeng"] = {alias_of = "Ulanhad"},
["Ulankhad"] = {alias_of = "Ulanhad", display = true},
["Ezhou"] = {container = "Hubei"}, -- < 0.750 urban (1.180 adm-urb) per citypopulation.de
["Zhaoqing"] = {container = "Guangdong"}, -- 1.036 urban (1.160 adm-urb) per citypopulation.de
["Lianyungang"] = {container = "Jiangsu"}, -- 4.599 prefectural, 2.0 urban; 1.071 urban (1.150 adm-urb) per citypopulation.de
["Qujing"] = {container = "Yunnan"}, -- 0.976 urban (1.150 adm-urb) per citypopulation.de
-- Shuyang is a "county" of the "prefecture-level city" of Suqian but in fact is 38 miles away from Suqian city proper (urban core to urban core).
-- The county itself is 37 miles by 34 miles.
["Shuyang"] = {placetype = "county", container = {key = "Suqian", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l County"}, -- 0.986 urban (1.120 adm-urb) per citypopulation.de
-- Yongkang is a "county-level city" of the "prefecture-level city" of Jinhua but in fact is 32 miles away from Jinhua city proper (urban core to urban core).
["Yongkang"] = {placetype = "county-level city", container = {key = "Jinhua", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}, wp = "%l, Zhejiang"}, -- < 0.750 urban (1.110 adm-urb) per citypopulation.de
["Zhoukou"] = {container = "Henan"}, -- 9.0 prefectural, 721,000 urban (1.6 metro); < 0.750 urban (1.100 adm-urb) per citypopulation.de
["Beihai"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- < 1 urban (1.090 adm-urb) per citypopulation.de
["Jiujiang"] = {container = "Jiangxi"}, -- < 0.750 urban (1.080 adm-urb) per citypopulation.de
["Shaoyang"] = {container = "Hunan"}, -- 6.6 prefectural, 802,000 urban, 1.4 metro; < 1 urban (1.080 adm-urb) per citypopulation.de
["Chuzhou"] = {container = "Anhui"}, -- < 0.750 urban (1.070 adm-urb) per citypopulation.de
["Hengshui"] = {container = "Hebei"}, -- 0.885 urban (1.070 adm-urb) per citypopulation.de
["Shiyan"] = {container = "Hubei"}, -- 0.955 urban (1.070 adm-urb) per citypopulation.de
["Huludao"] = {container = "Liaoning"}, -- 0.764 urban (1.060 adm-urb) per citypopulation.de
["Dongying"] = {container = "Shandong"}, -- 0.961 urban (1.050 adm-urb) per citypopulation.de
["Guigang"] = {container = {key = "Guangxi, China", placetype = "autonomous region"}}, -- 0.921 urban (1.050 adm-urb) per citypopulation.de
-- Liuyang is a "county-level city" of the "prefecture-level city" of Changsha but in fact is 47 miles away from Changsha city proper (urban core to urban core).
["Liuyang"] = {placetype = "county-level city", container = {key = "Changsha", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.886 urban (1.040 adm-urb) per citypopulation.de
-- NOTE: Not to be confused with Changzhou in Jiangsu
["Cangzhou"] = {container = "Hebei"}, -- 7.3 prefectural, 621,000 urban; 0.759 urban (1.030 adm-urb) per citypopulation.de
["Liupanshui"] = {container = "Guizhou"}, -- < 0.750 urban (1.030 adm-urb) per citypopulation.de
["Panjin"] = {container = "Liaoning"}, -- 0.980 urban (1.030 adm-urb) per citypopulation.de
["Qiqihar"] = {container = "Heilongjiang"}, -- 1.030 urban (1.030 adm-urb) per citypopulation.de
["Linfen"] = {container = "Shanxi"}, -- < 0.750 urban (1.010 adm-urb) per citypopulation.de
-- Tengzhou is a "county-level city" of the "prefecture-level city" of Zaozhuang but in fact is 30 miles away from Zaozhuang city proper (urban core to urban core).
["Tengzhou"] = {placetype = "county-level city", container = {key = "Zaozhuang", placetype = "prefecture-level city"}, divs = {"subdistricts", "townships"}}, -- 0.937 urban (1.010 adm-urb) per citypopulation.de
-- 3 extra that got added in earlier incarnations and aren't found in the "major agglomerations of the world" page https://citypopulation.de/en/world/agglomerations/ reference date 2025-01-01
["Kunshan"] = {container = "Jiangsu"}, -- 1.652 urban (2020 China census) per citypopulation.de
["Zhumadian"] = {container = "Henan"}, -- 7.0 prefectural, 722,000 urban per Wikipedia; 0.754 urban per citypopulation.de
["Bijie"] = {container = "Guizhou"}, -- 6.9 prefectural, ? urban, ? metro (not listed in Wikipedia); < 0.750 urban per citypopulation.de
}
export.china_prefecture_level_cities_group = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Zhejiang" or "Suzhou, Anhui".
key_to_placename = false,
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities,
}
-- Needed to avoid problems with two cities called Taizhou and Suzhou.
export.china_prefecture_level_cities_2 = {
-- NOTE: There is also a larger and better-known prefecture-level city Taizhou in Zhejiang.
["Taizhou, Jiangsu"] = {container = "Jiangsu"}, -- 1.3 urban (1.490 adm-urb) per citypopulation.de 2020 census
["Taizhou"] = {alias_of = "Taizhou, Jiangsu"},
-- NOTE: There is also a larger and better-known prefecture-level city Suzhou in Jiangsu.
["Suzhou, Anhui"] = {container = "Anhui"}, -- 5.3 prefectural, 1.766 metro and "urban"; < 1 urban (1.010 adm-urb) per citypopulation.de 2020 census
-- hopefully this will work because we also have Suzhou as a key by itself for the larger, more-well-known Suzhou in Jiangsu
["Suzhou"] = {alias_of = "Suzhou, Anhui"},
}
export.china_prefecture_level_cities_group_2 = {
-- don't do any transformations between key and placename; in particular, don't chop off anything from
-- "Taizhou, Jiangsu".
placename_to_key = false, -- don't add ", China" to make the key
default_container = "Trung Quốc",
canonicalize_key_container = make_canonicalize_key_container(", China", "province"),
-- Prefecture-level cities aren't really cities but allow them to be identified that way, as many people
-- don't understand how Chinese administrative divisions work.
default_placetype = {"prefecture-level city", "city"},
default_divs = {
-- "towns" (but not "townships") are automatically added as they are specified as generic_before_non_cities,
-- and prefecture-level cities (as well as county-level cities) are considered non-cities.
"districts", "subdistricts", "townships",
{type = "counties", cat_as = "counties and county-level cities"},
{type = "county-level cities", cat_as = "counties and county-level cities"},
},
data = export.china_prefecture_level_cities_2,
}
export.finland_regions = {
["Lapland, Finland"] = {wp = "%l (%c)"},
["North Ostrobothnia, Finland"] = {},
["Northern Ostrobothnia, Finland"] = {alias_of = "North Ostrobothnia, Finland", display = true},
["Kainuu, Finland"] = {},
["North Karelia, Finland"] = {},
["Northern Savonia, Finland"] = {},
["North Savo, Finland"] = {alias_of = "Northern Savonia, Finland", display = true},
["Southern Savonia, Finland"] = {},
["South Savo, Finland"] = {alias_of = "Southern Savonia, Finland", display = true},
["South Karelia, Finland"] = {},
["Central Finland, Finland"] = {},
["South Ostrobothnia, Finland"] = {},
["Southern Ostrobothnia, Finland"] = {alias_of = "South Ostrobothnia, Finland", display = true},
["Ostrobothnia, Finland"] = {wp = "%l (region)"},
["Central Ostrobothnia, Finland"] = {},
["Pirkanmaa, Finland"] = {},
["Satakunta, Finland"] = {},
["Päijänne Tavastia, Finland"] = {},
["Päijät-Häme, Finland"] = {alias_of = "Päijänne Tavastia, Finland", display = true},
["Tavastia Proper, Finland"] = {},
["Kanta-Häme, Finland"] = {alias_of = "Tavastia Proper, Finland", display = true},
["Kymenlaakso, Finland"] = {},
["Uusimaa, Finland"] = {},
["Southwest Finland, Finland"] = {},
["Åland Islands, Finland"] = {the = true, wp = "Åland"},
["Åland, Finland"] = {alias_of = "Åland Islands, Finland"}, -- differs in "the"
}
-- regions of Finland
export.finland_group = {
default_container = "Phần Lan",
default_placetype = "region",
default_divs = "municipalities",
data = export.finland_regions,
}
export.france_administrative_regions = {
["Auvergne-Rhône-Alpes, France"] = {},
["Bourgogne-Franche-Comté, France"] = {},
["Brittany, France"] = {wp = "%l (administrative region)"},
["Centre-Val de Loire, France"] = {},
["Corsica, France"] = {},
-- overseas departments are handled in `export.country_like_entities`
-- ["French Guiana"] = {},
["Grand Est, France"] = {},
-- ["Guadeloupe"] = {},
["Hauts-de-France, France"] = {},
["Île-de-France, France"] = {},
-- ["Martinique"] = {},
-- ["Mayotte"] = {},
["Normandy, France"] = {wp = "%l (administrative region)"},
["Nouvelle-Aquitaine, France"] = {},
["Occitania, France"] = {wp = "%l (administrative region)"},
["Occitanie, France"] = {alias_of = "Occitania, France", display = true},
["Pays de la Loire, France"] = {},
["Provence-Alpes-Côte d'Azur, France"] = {},
-- ["Réunion"] = {},
}
-- administrative regions of France
export.france_group = {
default_container = "Pháp",
-- Canonically these are 'administrative regions' but also treat as 'region' ('administrative region' falls back
-- to 'region').
default_placetype = "region",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
"departments",
{type = "prefectures", cat_as = {"prefectures", "departmental capitals"}},
{type = "French prefectures", cat_as = {"prefectures", "departmental capitals"}},
},
data = export.france_administrative_regions,
}
export.france_departments = {
["Ain, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 01
["Aisne, France"] = {container = "Hauts-de-France"}, -- 02
["Allier, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 03
["Alpes-de-Haute-Provence, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 04
["Hautes-Alpes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 05
["Alpes-Maritimes, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 06
["Ardèche, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 07
["Ardennes, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 08
["Ariège, France"] = {container = "Occitania", wp = "%l (department)"}, -- 09
["Aube, France"] = {container = "Grand Est"}, -- 10
["Aude, France"] = {container = "Occitania"}, -- 11
["Aveyron, France"] = {container = "Occitania"}, -- 12
["Bouches-du-Rhône, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 13
["Calvados, France"] = {container = "Normandy", wp = "%l (department)"}, -- 14
["Cantal, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 15
["Charente, France"] = {container = "Nouvelle-Aquitaine"}, -- 16
["Charente-Maritime, France"] = {container = "Nouvelle-Aquitaine"}, -- 17
["Cher, France"] = {container = "Centre-Val de Loire", wp = "%l (department)"}, -- 18
["Corrèze, France"] = {container = "Nouvelle-Aquitaine"}, -- 19
["Corse-du-Sud, France"] = {container = "Corsica"}, -- 2A
["Haute-Corse, France"] = {container = "Corsica"}, -- 2B
["Côte-d'Or, France"] = {container = "Bourgogne-Franche-Comté"}, -- 21
["Côte d'Or, France"] = {alias_of = "Côte-d'Or, France", display = true},
["Côtes-d'Armor, France"] = {container = "Brittany"}, -- 22
["Côtes d'Armor, France"] = {alias_of = "Côtes-d'Armor, France", display = true},
["Creuse, France"] = {container = "Nouvelle-Aquitaine"}, -- 23
["Dordogne, France"] = {container = "Nouvelle-Aquitaine"}, -- 24
["Doubs, France"] = {container = "Bourgogne-Franche-Comté"}, -- 25
["Drôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 26
["Eure, France"] = {container = "Normandy"}, -- 27
["Eure-et-Loir, France"] = {container = "Centre-Val de Loire"}, -- 28
["Finistère, France"] = {container = "Brittany"}, -- 29
["Gard, France"] = {container = "Occitania"}, -- 30
["Haute-Garonne, France"] = {container = "Occitania"}, -- 31
["Gers, France"] = {container = "Occitania"}, -- 32
["Gironde, France"] = {container = "Nouvelle-Aquitaine"}, -- 33
["Hérault, France"] = {container = "Occitania"}, -- 34
["Ille-et-Vilaine, France"] = {container = "Brittany"}, -- 35
["Indre, France"] = {container = "Centre-Val de Loire"}, -- 36
["Indre-et-Loire, France"] = {container = "Centre-Val de Loire"}, -- 37
["Isère, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 38
["Jura, France"] = {container = "Bourgogne-Franche-Comté", wp = "%l (department)"}, -- 39
["Landes, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 40
["Loir-et-Cher, France"] = {container = "Centre-Val de Loire"}, -- 41
["Loire, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 42
["Haute-Loire, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 43
["Loire-Atlantique, France"] = {container = "Pays de la Loire"}, -- 44
["Loiret, France"] = {container = "Centre-Val de Loire"}, -- 45
["Lot, France"] = {container = "Occitania", wp = "%l (department)"}, -- 46
["Lot-et-Garonne, France"] = {container = "Nouvelle-Aquitaine"}, -- 47
["Lozère, France"] = {container = "Occitania"}, -- 48
["Maine-et-Loire, France"] = {container = "Pays de la Loire"}, -- 49
["Manche, France"] = {container = "Normandy"}, -- 50
["Marne, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 51
["Haute-Marne, France"] = {container = "Grand Est"}, -- 52
["Mayenne, France"] = {container = "Pays de la Loire"}, -- 53
["Meurthe-et-Moselle, France"] = {container = "Grand Est"}, -- 54
["Meuse, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 55
["Morbihan, France"] = {container = "Brittany"}, -- 56
["Moselle, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 57
["Nièvre, France"] = {container = "Bourgogne-Franche-Comté"}, -- 58
["Nord, France"] = {container = "Hauts-de-France", wp = "%l (French department)"}, -- 59
["Oise, France"] = {container = "Hauts-de-France"}, -- 60
["Orne, France"] = {container = "Normandy"}, -- 61
["Pas-de-Calais, France"] = {container = "Hauts-de-France"}, -- 62
["Puy-de-Dôme, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 63
["Pyrénées-Atlantiques, France"] = {container = "Nouvelle-Aquitaine"}, -- 64
["Hautes-Pyrénées, France"] = {container = "Occitania"}, -- 65
["Pyrénées-Orientales, France"] = {container = "Occitania"}, -- 66
["Bas-Rhin, France"] = {container = "Grand Est"}, -- 67
["Haut-Rhin, France"] = {container = "Grand Est"}, -- 68
["Rhône, France"] = {container = "Auvergne-Rhône-Alpes", wp = "%l (department)"}, -- 69D
["Metropolis of Lyon, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 69M
["Lyon Metropolis, France"] = {alias_of = "Metropolis of Lyon, France"},
["Lyon, France"] = {alias_of = "Metropolis of Lyon, France"},
["Haute-Saône, France"] = {container = "Bourgogne-Franche-Comté"}, -- 70
["Saône-et-Loire, France"] = {container = "Bourgogne-Franche-Comté"}, -- 71
["Sarthe, France"] = {container = "Pays de la Loire"}, -- 72
["Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 73
["Haute-Savoie, France"] = {container = "Auvergne-Rhône-Alpes"}, -- 74
["Paris, France"] = {container = "Île-de-France"}, -- 75
["Seine-Maritime, France"] = {container = "Normandy"}, -- 76
["Seine-et-Marne, France"] = {container = "Île-de-France"}, -- 77
["Yvelines, France"] = {container = "Île-de-France"}, -- 78
["Deux-Sèvres, France"] = {container = "Nouvelle-Aquitaine"}, -- 79
["Somme, France"] = {container = "Hauts-de-France", wp = "%l (department)"}, -- 80
["Tarn, France"] = {container = "Occitania", wp = "%l (department)"}, -- 81
["Tarn-et-Garonne, France"] = {container = "Occitania"}, -- 82
["Var, France"] = {container = "Provence-Alpes-Côte d'Azur", wp = "%l (department)"}, -- 83
["Vaucluse, France"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 84
["Vendée, France"] = {container = "Pays de la Loire"}, -- 85
["Vienne, France"] = {container = "Nouvelle-Aquitaine", wp = "%l (department)"}, -- 86
["Haute-Vienne, France"] = {container = "Nouvelle-Aquitaine"}, -- 87
["Vosges, France"] = {container = "Grand Est", wp = "%l (department)"}, -- 88
["Yonne, France"] = {container = "Bourgogne-Franche-Comté"}, -- 89
["Territoire de Belfort, France"] = {container = "Bourgogne-Franche-Comté"}, -- 90
["Essonne, France"] = {container = "Île-de-France"}, -- 91
["Hauts-de-Seine, France"] = {container = "Île-de-France"}, -- 92
["Seine-Saint-Denis, France"] = {container = "Île-de-France"}, -- 93
["Val-de-Marne, France"] = {container = "Île-de-France"}, -- 94
["Val-d'Oise, France"] = {container = "Île-de-France"}, -- 95
--["Guadeloupe"] = {container = "Guadeloupe"}, -- 971
--["Martinique"] = {container = "Martinique"}, -- 972
--["Guyane"] = {container = "French Guiana", wp = "French Guiana"}, -- 973
--["La Réunion"] = {container = "Réunion", wp = "Réunion"}, -- 974
--["Mayotte"] = {container = "Mayotte"}, -- 976
}
export.france_departments_group = {
placename_to_key = make_placename_to_key(", France"),
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "department",
default_divs = {
"communes",
{type = "municipalities", cat_as = "communes"},
},
data = export.france_departments,
}
export.germany_states = {
["Baden-Württemberg, Germany"] = {},
["Bavaria, Germany"] = {},
-- Berlin, Bremen and Hamburg are effectively city-states and don't have districts ([[Kreise]]), so override
-- the default_divs setting. Better not to include them at all since they're included as cities down below.
-- ["Berlin"] = {divs = {}},
["Brandenburg, Germany"] = {},
-- ["Bremen"] = {divs = {}},
-- ["Hamburg"] = {divs = {}},
["Hesse, Germany"] = {},
["Lower Saxony, Germany"] = {},
["Mecklenburg-Vorpommern, Germany"] = {},
["Mecklenburg-Western Pomerania, Germany"] = {alias_of = "Mecklenburg-Vorpommern, Germany", display = true},
["North Rhine-Westphalia, Germany"] = {},
["Rhineland-Palatinate, Germany"] = {},
["Saarland, Germany"] = {},
["Saxony, Germany"] = {},
["Saxony-Anhalt, Germany"] = {},
["Schleswig-Holstein, Germany"] = {},
["Thuringia, Germany"] = {},
}
-- states of Germany
export.germany_group = {
default_container = "Đức",
default_placetype = "state",
default_divs = {"districts", "municipalities"},
data = export.germany_states,
}
export.greece_regions = {
["Attica, Greece"] = {wp = "%l (region)"},
["Central Greece, Greece"] = {wp = "%l (administrative region)"},
["Central Macedonia, Greece"] = {},
["Crete, Greece"] = {},
["Eastern Macedonia and Thrace, Greece"] = {},
["Epirus, Greece"] = {wp = "%l (region)"},
["Ionian Islands, Greece"] = {the = true, wp = "%l (region)"},
["North Aegean, Greece"] = {the = true},
-- I would expect 'the Peloponnese' but Wikipedia mostly has categories like [[w:Category:Geography of Peloponnese (region)]]
-- and [[w:Category:Buildings and structures in Peloponnese (region)]]; only [[w:Category:People from the Peloponnese (region)]]
-- has "the" in it.
["Peloponnese, Greece"] = {wp = "%l (region)"},
["South Aegean, Greece"] = {the = true},
["Thessaly, Greece"] = {},
["Western Greece, Greece"] = {},
["Western Macedonia, Greece"] = {},
["Mount Athos, Greece"] = {placetype = {"autonomous region", "region"}, wp = "Monastic community of Mount Athos"},
}
-- regions of Greece
export.greece_group = {
default_container = "Hy Lạp",
default_placetype = "region",
data = export.greece_regions,
}
local india_polity_with_divisions = {"divisions", "districts"}
local india_polity_without_divisions = {"districts"}
-- States and union territories of India. Only some of them are divided into divisions.
export.india_states_and_union_territories = {
["Andaman and Nicobar Islands, India"] =
{the = true, placetype = "union territory", divs = india_polity_without_divisions},
["Andhra Pradesh, India"] = {divs = india_polity_without_divisions},
["Arunachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Assam, India"] = {divs = india_polity_with_divisions},
["Bihar, India"] = {divs = india_polity_with_divisions},
["Chandigarh, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Chhattisgarh, India"] = {divs = india_polity_with_divisions},
["Dadra and Nagar Haveli and Daman and Diu, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Delhi, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Goa, India"] = {divs = india_polity_without_divisions},
["Gujarat, India"] = {divs = india_polity_without_divisions},
["Haryana, India"] = {divs = india_polity_with_divisions},
["Himachal Pradesh, India"] = {divs = india_polity_with_divisions},
["Jammu and Kashmir, India"] = {placetype = "union territory", divs = india_polity_with_divisions,
wp = "%l (union territory)"},
["Jharkhand, India"] = {divs = india_polity_with_divisions},
["Karnataka, India"] = {divs = india_polity_with_divisions},
["Kerala, India"] = {divs = india_polity_without_divisions},
["Ladakh, India"] = {placetype = "union territory", divs = india_polity_with_divisions},
["Lakshadweep, India"] = {placetype = "union territory", divs = india_polity_without_divisions},
["Madhya Pradesh, India"] = {divs = india_polity_with_divisions},
["Maharashtra, India"] = {divs = india_polity_with_divisions},
["Manipur, India"] = {divs = india_polity_without_divisions},
["Meghalaya, India"] = {divs = india_polity_with_divisions},
["Mizoram, India"] = {divs = india_polity_without_divisions},
["Nagaland, India"] = {divs = india_polity_with_divisions},
["Odisha, India"] = {divs = india_polity_with_divisions},
["Puducherry, India"] = {placetype = "union territory", divs = india_polity_without_divisions,
wp = "%l (union territory)"},
["Pondicherry, India"] = {alias_of = "Puducherry, India", display = true},
["Punjab, India"] = {divs = india_polity_with_divisions, wp = "%l, %c"},
["Rajasthan, India"] = {divs = india_polity_with_divisions},
["Sikkim, India"] = {divs = india_polity_without_divisions},
["Tamil Nadu, India"] = {divs = india_polity_without_divisions},
["Telangana, India"] = {divs = india_polity_without_divisions},
["Tripura, India"] = {divs = india_polity_without_divisions},
["Uttar Pradesh, India"] = {divs = india_polity_with_divisions},
["Uttarakhand, India"] = {divs = india_polity_with_divisions},
["West Bengal, India"] = {divs = india_polity_with_divisions},
}
-- states and union territories of India
export.india_group = {
default_container = "Ấn Độ",
default_placetype = "state",
data = export.india_states_and_union_territories,
}
export.indonesia_provinces = {
["Aceh, Indonesia"] = {},
["Bali, Indonesia"] = {},
["Bangka Belitung Islands, Indonesia"] = {the = true},
["Banten, Indonesia"] = {},
["Bengkulu, Indonesia"] = {},
["Central Java, Indonesia"] = {},
["Central Kalimantan, Indonesia"] = {},
["Central Papua, Indonesia"] = {},
["Central Sulawesi, Indonesia"] = {},
["East Java, Indonesia"] = {},
["East Kalimantan, Indonesia"] = {},
["East Nusa Tenggara, Indonesia"] = {},
["Gorontalo, Indonesia"] = {},
["Highland Papua, Indonesia"] = {wp = "%l"},
["Special Capital Region of Jakarta, Indonesia"] = {the = true, wp = "Jakarta"},
["Jakarta, Indonesia"] = {alias_of = "Special Capital Region of Jakarta, Indonesia"},
["Jambi, Indonesia"] = {},
["Lampung, Indonesia"] = {},
["Maluku, Indonesia"] = {},
["North Kalimantan, Indonesia"] = {},
["North Maluku, Indonesia"] = {},
["North Sulawesi, Indonesia"] = {},
["North Papua, Indonesia"] = {},
["North Sumatra, Indonesia"] = {},
["Papua, Indonesia"] = {wp = "%l (province)"},
["Riau, Indonesia"] = {},
["Riau Islands, Indonesia"] = {the = true},
["Southeast Sulawesi, Indonesia"] = {},
["South Kalimantan, Indonesia"] = {},
["South Papua, Indonesia"] = {},
["South Sulawesi, Indonesia"] = {},
["South Sumatra, Indonesia"] = {},
["Southwest Papua, Indonesia"] = {},
["West Java, Indonesia"] = {},
["West Kalimantan, Indonesia"] = {},
["West Nusa Tenggara, Indonesia"] = {},
["West Papua, Indonesia"] = {wp = "%l (province)"},
["West Sulawesi, Indonesia"] = {},
["West Sumatra, Indonesia"] = {},
["Special Region of Yogyakarta, Indonesia"] = {the = true},
["Yogyakarta, Indonesia"] = {alias_of = "Special Region of Yogyakarta, Indonesia"},
}
-- provinces of Indonesia
export.indonesia_group = {
default_container = "Indonesia",
default_placetype = "province",
-- per https://www.quora.com/Does-Indonesia-use-British-or-American-English, Indonesia tends to use American
-- spellings.
data = export.indonesia_provinces,
}
export.iran_provinces = {
["Alborz Province, Iran"] = {}, -- abbreviation AL, capital [[w:Karaj]]
["Ardabil Province, Iran"] = {}, -- abbreviation AR, capital [[w:Ardabil]]
["Bushehr Province, Iran"] = {}, -- abbreviation BU, capital [[w:Bushehr]]
["Chaharmahal and Bakhtiari Province, Iran"] = {}, -- abbreviation CB, capital [[w:Shahr-e Kord]]
["East Azerbaijan Province, Iran"] = {}, -- abbreviation EA, capital [[w:Tabriz]]
["Fars Province, Iran"] = {}, -- abbreviation FA, capital [[w:Shiraz]]
["Pars Province, Iran"] = {alias_of = "Fars Province, Iran", display = true},
["Gilan Province, Iran"] = {}, -- abbreviation GN, capital [[w:Rasht]]
["Golestan Province, Iran"] = {}, -- abbreviation GO, capital [[w:Gorgan]]
["Hamadan Province, Iran"] = {}, -- abbreviation HA, capital [[w:Hamadan]]
["Hormozgan Province, Iran"] = {}, -- abbreviation HO, capital [[w:Bandar Abbas]]
["Ilam Province, Iran"] = {}, -- abbreviation IL, capital [[w:Ilam, Iran|Ilam]]
["Isfahan Province, Iran"] = {}, -- abbreviation IS, capital [[w:Isfahan]]
["Kerman Province, Iran"] = {}, -- abbreviation KN, capital [[w:Kerman]]
["Kermanshah Province, Iran"] = {}, -- abbreviation KE, capital [[w:Kermanshah]]
["Khuzestan Province, Iran"] = {}, -- abbreviation KH, capital [[w:Ahvaz]]
["Kohgiluyeh and Boyer-Ahmad Province, Iran"] = {}, -- abbreviation KB, capital [[w:Yasuj]]
["Kurdistan Province, Iran"] = {}, -- abbreviation KU, capital [[w:Sanandaj]]
["Lorestan Province, Iran"] = {}, -- abbreviation LO, capital [[w:Khorramabad]]
["Markazi Province, Iran"] = {}, -- abbreviation MA, capital [[w:Arak, Iran|Arak]]
["Mazandaran Province, Iran"] = {}, -- abbreviation MN, capital [[w:Sari, Iran|Sari]]
["North Khorasan Province, Iran"] = {}, -- abbreviation NK, capital [[w:Bojnord]]
["Qazvin Province, Iran"] = {}, -- abbreviation QA, capital [[w:Qazvin]]
["Qom Province, Iran"] = {}, -- abbreviation QM, capital [[w:Qom]]
["Razavi Khorasan Province, Iran"] = {}, -- abbreviation RK, capital [[w:Mashhad]]
["Semnan Province, Iran"] = {}, -- abbreviation SE, capital [[w:Semnan, Iran|Semnan]]
["Sistan and Baluchestan Province, Iran"] = {}, -- abbreviation SB, capital [[w:Zahedan]]
["South Khorasan Province, Iran"] = {}, -- abbreviation SK, capital [[w:Birjand]]
["Tehran Province, Iran"] = {}, -- abbreviation TE, capital [[w:Tehran]]
["West Azerbaijan Province, Iran"] = {}, -- abbreviation WA, capital [[w:Urmia]]
["Yazd Province, Iran"] = {}, -- abbreviation YA, capital [[w:Yazd]]
["Zanjan Province, Iran"] = {}, -- abbreviation ZA, capital [[w:Zanjan, Iran|Zanjan]]
}
-- provinces of Iran
export.iran_group = {
key_to_placename = make_key_to_placename(", Iran", " Province$"),
placename_to_key = make_placename_to_key(", Iran", " Province"),
default_container = "Iran",
default_placetype = "province",
-- There aren't nearly enough counties of Iran currently entered in any language to allow for categorizing them
-- per-province. (As of 2025-05-09, there are only 6 counties in each of [[Category:en:Counties of Iran]],
-- [[Category:fa:Counties of Iran]] and [[Category:ar:Counties of Iran]].)
-- default_divs = "counties",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.iran_provinces,
}
export.ireland_counties = {
["County Carlow, Ireland"] = {},
["County Cavan, Ireland"] = {},
["County Clare, Ireland"] = {},
["County Cork, Ireland"] = {},
["County Donegal, Ireland"] = {},
["County Dublin, Ireland"] = {},
["County Galway, Ireland"] = {},
["County Kerry, Ireland"] = {},
["County Kildare, Ireland"] = {},
["County Kilkenny, Ireland"] = {},
["County Laois, Ireland"] = {},
["County Leitrim, Ireland"] = {},
["County Limerick, Ireland"] = {},
["County Longford, Ireland"] = {},
["County Louth, Ireland"] = {},
["County Mayo, Ireland"] = {},
["County Meath, Ireland"] = {},
["County Monaghan, Ireland"] = {},
["County Offaly, Ireland"] = {},
["County Roscommon, Ireland"] = {},
["County Sligo, Ireland"] = {},
["County Tipperary, Ireland"] = {},
["County Waterford, Ireland"] = {},
["County Westmeath, Ireland"] = {},
["County Wexford, Ireland"] = {},
["County Wicklow, Ireland"] = {},
}
local function make_irish_type_key_to_placename(container_pattern)
return function(key)
key = key:gsub(container_pattern, "")
local elliptical_key = key:gsub("^County ", "")
return key, elliptical_key
end
end
local function make_irish_type_placename_to_key(container_suffix)
return function(placename)
if not placename:find("^County ") and not placename:find("^City ") then
placename = "County " .. placename
end
return placename .. container_suffix
end
end
-- counties of Ireland
export.ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Ireland"),
default_container = "Ireland",
default_placetype = "county",
data = export.ireland_counties,
}
export.italy_administrative_regions = {
["Abruzzo, Italy"] = {},
["Aosta Valley, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Apulia, Italy"] = {},
["Basilicata, Italy"] = {},
["Calabria, Italy"] = {},
["Campania, Italy"] = {},
["Emilia-Romagna, Italy"] = {},
["Friuli-Venezia Giulia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Lazio, Italy"] = {},
["Liguria, Italy"] = {},
["Lombardy, Italy"] = {},
["Marche, Italy"] = {},
["Molise, Italy"] = {},
["Piedmont, Italy"] = {},
["Sardinia, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Sicily, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Trentino-Alto Adige, Italy"] = {placetype = {"autonomous region", "administrative region", "region"}},
["Tuscany, Italy"] = {},
["Umbria, Italy"] = {},
["Veneto, Italy"] = {},
}
-- administrative regions of Italy
export.italy_group = {
default_container = "Ý",
default_placetype = "region",
data = export.italy_administrative_regions,
}
-- table of Japanese prefectures; interpolated into the main 'places' table, but also needed separately
export.japan_prefectures = {
["Aichi Prefecture, Japan"] = {},
["Akita Prefecture, Japan"] = {},
["Aomori Prefecture, Japan"] = {},
["Chiba Prefecture, Japan"] = {},
["Ehime Prefecture, Japan"] = {},
["Fukui Prefecture, Japan"] = {},
["Fukuoka Prefecture, Japan"] = {},
["Fukushima Prefecture, Japan"] = {},
["Gifu Prefecture, Japan"] = {},
["Gunma Prefecture, Japan"] = {},
["Hiroshima Prefecture, Japan"] = {},
["Hokkaido Prefecture, Japan"] = {divs = "subprefectures", wp = "Hokkaido"},
["Hyōgo Prefecture, Japan"] = {},
["Hyogo Prefecture, Japan"] = {alias_of = "Hyōgo Prefecture, Japan", display = true},
["Ibaraki Prefecture, Japan"] = {},
["Ishikawa Prefecture, Japan"] = {},
["Iwate Prefecture, Japan"] = {},
["Kagawa Prefecture, Japan"] = {},
["Kagoshima Prefecture, Japan"] = {},
["Kanagawa Prefecture, Japan"] = {},
["Kōchi Prefecture, Japan"] = {},
["Kochi Prefecture, Japan"] = {alias_of = "Kōchi Prefecture, Japan", display = true},
["Kumamoto Prefecture, Japan"] = {},
["Kyoto Prefecture, Japan"] = {},
["Mie Prefecture, Japan"] = {},
["Miyagi Prefecture, Japan"] = {},
["Miyazaki Prefecture, Japan"] = {},
["Nagano Prefecture, Japan"] = {},
["Nagasaki Prefecture, Japan"] = {},
["Nara Prefecture, Japan"] = {},
["Niigata Prefecture, Japan"] = {},
["Ōita Prefecture, Japan"] = {},
["Oita Prefecture, Japan"] = {alias_of = "Ōita Prefecture, Japan", display = true},
["Okayama Prefecture, Japan"] = {},
["Okinawa Prefecture, Japan"] = {},
["Osaka Prefecture, Japan"] = {},
["Saga Prefecture, Japan"] = {},
["Saitama Prefecture, Japan"] = {},
["Shiga Prefecture, Japan"] = {},
["Shimane Prefecture, Japan"] = {},
["Shizuoka Prefecture, Japan"] = {},
["Tochigi Prefecture, Japan"] = {},
["Tokushima Prefecture, Japan"] = {},
["Tottori Prefecture, Japan"] = {},
["Toyama Prefecture, Japan"] = {},
["Wakayama Prefecture, Japan"] = {},
["Yamagata Prefecture, Japan"] = {},
["Yamaguchi Prefecture, Japan"] = {},
["Yamanashi Prefecture, Japan"] = {},
}
-- prefectures of Japan
export.japan_group = {
key_to_placename = make_key_to_placename(", Japan$", " Prefecture$"),
placename_to_key = make_placename_to_key(", Japan", " Prefecture"),
default_container = "Nhật Bản",
default_placetype = "prefecture",
data = export.japan_prefectures,
}
export.laos_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"] = {placetype = "prefecture", wp = "%l"},
["Sainyabuli Province, Laos"] = {},
["Sekong Province, Laos"] = {},
["Xaisomboun Province, Laos"] = {},
["Xiangkhouang Province, Laos"] = {},
}
local function laos_placename_to_key(placename)
if placename == "Vientiane Prefecture" then
return placename .. ", Laos"
end
if placename:find(" Province$") then
return placename .. ", Laos"
end
return placename .. " Province, Laos"
end
-- provinces of Laos
export.laos_group = {
key_to_placename = make_key_to_placename(", Laos$", {" Province$", " Prefecture$"}),
placename_to_key = laos_placename_to_key,
default_container = "Lào",
default_placetype = "province",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.laos_provinces,
}
export.lebanon_governorates = {
["Akkar Governorate, Lebanon"] = {},
["Baalbek-Hermel Governorate, Lebanon"] = {},
["Beirut Governorate, Lebanon"] = {},
["Beqaa Governorate, Lebanon"] = {},
["Keserwan-Jbeil Governorate, Lebanon"] = {},
["Mount Lebanon Governorate, Lebanon"] = {},
["Nabatieh Governorate, Lebanon"] = {},
-- These two are generic enough that we don't want to automatically augment a use of `gov/North Governorate` or
-- `gov/South Governorate` with `c/Lebanon`.
["North Governorate, Lebanon"] = {no_auto_augment_container = true},
["South Governorate, Lebanon"] = {no_auto_augment_container = true},
}
-- governorates of Lebanon
export.lebanon_group = {
key_to_placename = make_key_to_placename(", Lebanon$", " Governorate$"),
placename_to_key = make_placename_to_key(", Lebanon", " Governorate"),
default_container = "Lebanon",
default_placetype = "governorate",
data = export.lebanon_governorates,
}
export.malaysia_states = {
["Johor, Malaysia"] = {},
["Kedah, Malaysia"] = {},
["Kelantan, Malaysia"] = {},
["Malacca, Malaysia"] = {},
["Negeri Sembilan, Malaysia"] = {},
["Pahang, Malaysia"] = {},
["Penang, Malaysia"] = {},
["Perak, Malaysia"] = {},
["Perlis, Malaysia"] = {},
["Sabah, Malaysia"] = {},
["Sarawak, Malaysia"] = {},
["Selangor, Malaysia"] = {},
["Terengganu, Malaysia"] = {},
}
-- states of Malaysia
export.malaysia_group = {
default_container = "Malaysia",
default_placetype = "state",
default_wp = "%l, %c",
data = export.malaysia_states,
}
export.malta_regions = {
-- Some of the regions are generic enough that we don't want to automatically augment a use of e.g.
-- `r/Northern Region` with `c/Malta`. In particular;
-- * "Eastern Region" also occurs at least in Ghana, Uganda, Iceland, Nigeria, Venezuela, North Macedonia and
-- El Salvador;
-- * "Northern Region" also occurs at least in Ghana, Uganda, Malawi, Nigeria, Canada and South Africa;
-- * "Western Region" also occurs at least in Abu Dhabi, Bahrain, South Africa, Ghana, Iceland, Nepal, Nigeria,
-- Serbia and Uganda;
-- * "Southern Region" also occurs at least in Nigeria, Eritrea, Iceland, Ireland, Malawi and Serbia.
["Eastern Region, Malta"] = {no_auto_augment_container = true},
["Gozo Region, Malta"] = {wp = "%l"},
["Northern Region, Malta"] = {no_auto_augment_container = true},
["Port Region, Malta"] = {},
["Southern Region, Malta"] = {no_auto_augment_container = true},
["Western Region, Malta"] = {no_auto_augment_container = true},
}
-- regions of Malta
export.malta_group = {
key_to_placename = make_key_to_placename(", Malta$", " Region"),
placename_to_key = make_placename_to_key(", Malta", " Region"),
default_container = "Malta",
default_placetype = "region",
default_wp = "%l, %c",
default_the = true,
data = export.malta_regions,
}
export.mexico_states = {
["Aguascalientes, Mexico"] = {},
["Baja California, Mexico"] = {},
-- not display-canonicalizing because the "Norte" could be for emphasis
["Baja California Norte, Mexico"] = {alias_of = "Baja California, Mexico"},
["Baja California Sur, Mexico"] = {},
["Campeche, Mexico"] = {},
["Chiapas, Mexico"] = {},
["Chihuahua, Mexico"] = {wp = "%l (state)"},
["Coahuila, Mexico"] = {},
["Colima, Mexico"] = {},
["Durango, Mexico"] = {},
["Guanajuato, Mexico"] = {},
["Guerrero, Mexico"] = {},
["Hidalgo, Mexico"] = {wp = "%l (state)"},
["Jalisco, Mexico"] = {},
["State of Mexico, Mexico"] = {the = true},
["Mexico, Mexico"] = {alias_of = "State of Mexico, Mexico"}, -- differs in "the"
-- ["Mexico City, Mexico"] = {}, doesn't belong here because it's a city
["Michoacán, Mexico"] = {},
["Michoacan, Mexico"] = {alias_of = "Michoacán, Mexico", display = true},
["Morelos, Mexico"] = {},
["Nayarit, Mexico"] = {},
["Nuevo León, Mexico"] = {},
["Nuevo Leon, Mexico"] = {alias_of = "Nuevo León, Mexico", display = true},
["Oaxaca, Mexico"] = {},
["Puebla, Mexico"] = {},
["Querétaro, Mexico"] = {},
["Queretaro, Mexico"] = {alias_of = "Querétaro, Mexico", display = true},
["Quintana Roo, Mexico"] = {},
["San Luis Potosí, Mexico"] = {},
["San Luis Potosi, Mexico"] = {alias_of = "San Luis Potosí, Mexico", display = true},
["Sinaloa, Mexico"] = {},
["Sonora, Mexico"] = {},
["Tabasco, Mexico"] = {},
["Tamaulipas, Mexico"] = {},
["Tlaxcala, Mexico"] = {},
["Veracruz, Mexico"] = {},
["Yucatán, Mexico"] = {},
["Yucatan, Mexico"] = {alias_of = "Yucatán, Mexico", display = true},
["Zacatecas, Mexico"] = {},
}
-- Mexican states
export.mexico_group = {
default_container = "Mexico",
default_placetype = "state",
data = export.mexico_states,
}
export.moldova_districts_and_autonomous_territorial_units = {
["Anenii Noi District, Moldova"] = {}, -- capital [[Anenii Noi]]
["Basarabeasca District, Moldova"] = {}, -- capital [[Basarabeasca]]
["Briceni District, Moldova"] = {}, -- capital [[Briceni]]
["Cahul District, Moldova"] = {}, -- capital [[Cahul]]
["Cantemir District, Moldova"] = {}, -- capital [[Cantemir, Moldova|Cantemir]]
["Călărași District, Moldova"] = {}, -- capital [[Călărași, Moldova|Călărași]]
["Căușeni District, Moldova"] = {}, -- capital [[Căușeni]]
["Cimișlia District, Moldova"] = {}, -- capital [[Cimișlia]]
["Criuleni District, Moldova"] = {}, -- capital [[Criuleni]]
["Dondușeni District, Moldova"] = {}, -- capital [[Dondușeni]]
["Drochia District, Moldova"] = {}, -- capital [[Drochia]]
["Dubăsari District, Moldova"] = {}, -- capital [[Cocieri]]
["Edineț District, Moldova"] = {}, -- capital [[Edineț]]
["Fălești District, Moldova"] = {}, -- capital [[Fălești]]
["Florești District, Moldova"] = {}, -- capital [[Florești, Moldova|Florești]]
["Glodeni District, Moldova"] = {}, -- capital [[Glodeni]]
["Hîncești District, Moldova"] = {}, -- capital [[Hîncești]]
["Ialoveni District, Moldova"] = {}, -- capital [[Ialoveni]]
["Leova District, Moldova"] = {}, -- capital [[Leova]]
["Nisporeni District, Moldova"] = {}, -- capital [[Nisporeni]]
["Ocnița District, Moldova"] = {}, -- capital [[Ocnița]]
["Orhei District, Moldova"] = {}, -- capital [[Orhei]]
["Rezina District, Moldova"] = {}, -- capital [[Rezina]]
["Rîșcani District, Moldova"] = {}, -- capital [[Rîșcani]]
["Sîngerei District, Moldova"] = {}, -- capital [[Sîngerei]]
["Soroca District, Moldova"] = {}, -- capital [[Soroca]]
["Strășeni District, Moldova"] = {}, -- capital [[Strășeni]]
["Șoldănești District, Moldova"] = {}, -- capital [[Șoldănești]]
["Ștefan Vodă District, Moldova"] = {}, -- capital [[Ștefan Vodă]]
["Taraclia District, Moldova"] = {}, -- capital [[Taraclia]]
["Telenești District, Moldova"] = {}, -- capital [[Telenești]]
["Ungheni District, Moldova"] = {}, -- capital [[Ungheni]]
["Chișinău, Moldova"] = {placetype = "municipality"},
["Bălți, Moldova"] = {placetype = "municipality"},
["Gagauzia, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Comrat]]
-- the remainder are under the de-facto control of the unrecognized state of Transnistria
["Bender, Moldova"] = {placetype = "municipality"},
["Tighina, Moldova"] = {alias_of = "Bender, Moldova"},
["Transnistria, Moldova"] = {placetype = {"autonomous territorial unit", "autonomous region", "region"}}, -- capital [[Tiraspol]]
["Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova"},
["Administrative-Territorial Units of the Left Bank of the Dniester, Moldova"] = {alias_of = "Transnistria, Moldova"},
}
local function moldova_placename_to_key(placename)
local elliptical_key = placename .. ", Moldova"
if export.moldova_districts_and_autonomous_territorial_units[elliptical_key] then
return elliptical_key
end
if placename:find(" District$") then
return placename .. ", Moldova"
end
return placename .. " District, Moldova"
end
-- Moldovan districts (raions) and autonomous territorial units
export.moldova_group = {
key_to_placename = make_key_to_placename(", Moldova$", " District"),
placename_to_key = moldova_placename_to_key,
default_container = "Moldova",
default_placetype = {"district", "raion"},
default_divs = "communes",
data = export.moldova_districts_and_autonomous_territorial_units,
}
export.morocco_regions = {
["Tangier-Tetouan-Al Hoceima, Morocco"] = {},
["Oriental, Morocco"] = {wp = "%l (%c)"},
["L'Oriental, Morocco"] = {alias_of = "Oriental, Morocco", display = true},
["Fez-Meknes, Morocco"] = {},
["Rabat-Sale-Kenitra, Morocco"] = {wp = "Rabat-Salé-Kénitra"},
["Rabat-Salé-Kénitra, Morocco"] = {alias_of = "Rabat-Sale-Kenitra, Morocco", display = true},
["Beni Mellal-Khenifra, Morocco"] = {wp = "Béni Mellal-Khénifra"},
["Béni Mellal-Khénifra, Morocco"] = {alias_of = "Beni Mellal-Khenifra, Morocco", display = true},
["Casablanca-Settat, Morocco"] = {},
["Marrakesh-Safi, Morocco"] = {wp = "Marrakesh–Safi"}, -- WP title has en-dash
["Marrakech-Safi, Morocco"] = {alias_of = "Marrakesh-Safi, Morocco", display = true},
["Draa-Tafilalet, Morocco"] = {wp = "Drâa-Tafilalet"},
["Drâa-Tafilalet, Morocco"] = {alias_of = "Draa-Tafilalet, Morocco", display = true},
["Souss-Massa, Morocco"] = {},
["Guelmim-Oued Noun, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies partly within the disputed territory of [[Western Sahara]]"
},
["Laayoune-Sakia El Hamra, Morocco"] = {
wp = "Laâyoune-Sakia El Hamra",
keydesc = "+++. '''NOTE:''' This region lies almost completely within the disputed territory of [[Western Sahara]]",
},
["Laâyoune-Sakia El Hamra, Morocco"] = {alias_of = "Laayoune-Sakia El Hamra, Morocco", display = true},
["Dakhla-Oued Ed-Dahab, Morocco"] = {
keydesc = "+++. '''NOTE:''' This region lies completely within the disputed territory of [[Western Sahara]]",
},
}
-- regions of Morocco
export.morocco_group = {
default_container = "Maroc",
default_placetype = "region",
data = export.morocco_regions,
}
export.egypt_governorates = {
["Cairo Governorate, Egypt"] = {},
["Giza Governorate, Egypt"] = {},
["Sharqia Governorate, Egypt"] = {},
["Dakahlia Governorate, Egypt"] = {},
["Beheira Governorate, Egypt"] = {},
["Minya Governorate, Egypt"] = {},
["Qalyubia Governorate, Egypt"] = {},
["Sohag Governorate, Egypt"] = {},
["Alexandria Governorate, Egypt"] = {},
["Gharbia Governorate, Egypt"] = {},
["Asyut Governorate, Egypt"] = {},
["Monufia Governorate, Egypt"] = {},
["Faiyum Governorate, Egypt"] = {},
["Kafr El Sheikh Governorate, Egypt"] = {},
["Qena Governorate, Egypt"] = {},
["Beni Suef Governorate, Egypt"] = {},
["Damietta Governorate, Egypt"] = {},
["Aswan Governorate, Egypt"] = {},
["Ismailia Governorate, Egypt"] = {},
["Luxor Governorate, Egypt"] = {},
["Suez Governorate, Egypt"] = {},
["Port Said Governorate, Egypt"] = {},
["Matrouh Governorate, Egypt"] = {},
["North Sinai Governorate, Egypt"] = {},
["Red Sea Governorate, Egypt"] = {},
["New Valley Governorate, Egypt"] = {},
["South Sinai Governorate, Egypt"] = {},
}
-- governorates of Egypt
export.egypt_group = {
key_to_placename = make_key_to_placename(", Egypt$", " Governorate$"),
placename_to_key = make_placename_to_key(", Egypt", " Governorate"),
default_container = "Ai Cập",
default_placetype = "governorate",
data = export.egypt_governorates,
}
export.netherlands_provinces = {
["Drenthe, Netherlands"] = {},
["Flevoland, Netherlands"] = {},
["Friesland, Netherlands"] = {},
["Gelderland, Netherlands"] = {},
["Groningen, Netherlands"] = {wp = "%l (province)"},
["Limburg, Netherlands"] = {wp = "%l (%c)"},
["North Brabant, Netherlands"] = {},
-- Foreign forms get display-canonicalized.
["Noord-Brabant, Netherlands"] = {alias_of = "North Brabant, Netherlands", display = true},
["North Holland, Netherlands"] = {},
["Noord-Holland, Netherlands"] = {alias_of = "North Holland, Netherlands", display = true},
["Overijssel, Netherlands"] = {},
["South Holland, Netherlands"] = {},
["Zuid-Holland, Netherlands"] = {alias_of = "South Holland, Netherlands", display = true},
["Utrecht, Netherlands"] = {wp = "%l (province)"},
["Zeeland, Netherlands"] = {},
}
-- provinces of the Netherlands
export.netherlands_group = {
default_container = "Netherlands",
default_placetype = "province",
default_divs = "municipalities",
data = export.netherlands_provinces,
}
export.new_zealand_regions = {
-- North Island regions
["Northland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-NTL, number 1, capital [[Whangārei]]
["Auckland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-AUK, number 2, capital [[Auckland]]
["Waikato, New Zealand"] = {}, -- ISO 3166-2 code NZ-WKO, number 3, capital [[Hamilton, New Zealand|Hamilton]]
["Bay of Plenty, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-BOP, number 4, capital [[Whakatāne]]
["Gisborne, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-GIS, number 5, capital [[Gisborne, New Zealand|Gisborne]]
["Hawke's Bay, New Zealand"] = {}, -- ISO 3166-2 code NZ-HKB, number 6, capital [[Napier, New Zealand|Napier]]
["Taranaki, New Zealand"] = {}, -- ISO 3166-2 code NZ-TKI, number 7, capital [[Stratford, New Zealand|Stratford]]
["Manawatū-Whanganui, New Zealand"] = {}, -- ISO 3166-2 code NZ-MWT, number 8, capital [[Palmerston North]]
["Manawatu-Whanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Manawatu-Wanganui, New Zealand"] = {alias_of = "Manawatū-Whanganui, New Zealand", display = true},
["Wellington, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-WGN, number 9, capital [[Wellington]]
-- South Island regions
["Tasman, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-TAS, number 10, capital [[Richmond, New Zealand|Richmond]]
["Nelson, New Zealand"] = {placetype = {"region", "city"}, wp = "%l, %c", is_city = true}, -- ISO 3166-2 code NZ-NSN, number 11, capital [[Nelson, New Zealand|Nelson]]
["Marlborough, New Zealand"] = {placetype = {"region", "district"}, wp = "%l District"}, -- ISO 3166-2 code NZ-MBH, number 12, capital [[Blenheim, New Zealand|Blenheim]]
["West Coast, New Zealand"] = {the = true, wp = "%l Region"}, -- ISO 3166-2 code NZ-WTC, number 13, capital [[Greymouth]]
["Canterbury, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-CAN, number 14, capital [[Christchurch]]
["Otago, New Zealand"] = {}, -- ISO 3166-2 code NZ-OTA, number 15, capital [[Dunedin]]
["Southland, New Zealand"] = {wp = "%l Region"}, -- ISO 3166-2 code NZ-STL, number 16, capital [[Invercargill]]
}
-- regions of New Zealand
export.new_zealand_group = {
default_container = "New Zealand",
default_placetype = "region",
data = export.new_zealand_regions,
}
export.nigeria_states = {
["Abia State, Nigeria"] = {},
["Adamawa State, Nigeria"] = {},
["Akwa Ibom State, Nigeria"] = {},
["Anambra State, Nigeria"] = {},
["Bauchi State, Nigeria"] = {},
["Bayelsa State, Nigeria"] = {},
["Benue State, Nigeria"] = {},
["Borno State, Nigeria"] = {},
["Cross River State, Nigeria"] = {},
["Delta State, Nigeria"] = {},
["Ebonyi State, Nigeria"] = {},
["Edo State, Nigeria"] = {},
["Ekiti State, Nigeria"] = {},
["Enugu State, Nigeria"] = {},
["Federal Capital Territory, Nigeria"] = {
-- not a state but allow it to be referenced as one in holonyms
placetype = {"federal territory", "territory", "state"}, the = true, wp = "%l (%c)",
},
["Gombe State, Nigeria"] = {},
["Imo State, Nigeria"] = {},
["Jigawa State, Nigeria"] = {},
["Kaduna State, Nigeria"] = {},
["Kano State, Nigeria"] = {},
["Katsina State, Nigeria"] = {},
["Kebbi State, Nigeria"] = {},
["Kogi State, Nigeria"] = {},
["Kwara State, Nigeria"] = {},
["Lagos State, Nigeria"] = {},
["Nasarawa State, Nigeria"] = {},
["Niger State, Nigeria"] = {},
["Ogun State, Nigeria"] = {},
["Ondo State, Nigeria"] = {},
["Osun State, Nigeria"] = {},
["Oyo State, Nigeria"] = {},
["Plateau State, Nigeria"] = {},
["Rivers State, Nigeria"] = {},
["Sokoto State, Nigeria"] = {},
["Taraba State, Nigeria"] = {},
["Yobe State, Nigeria"] = {},
["Zamfara State, Nigeria"] = {},
}
-- states of Nigeria
export.nigeria_group = {
key_to_placename = make_key_to_placename(", Nigeria$", " State$"),
placename_to_key = make_placename_to_key(", Nigeria", " State"),
default_container = "Nigeria",
default_placetype = "state",
data = export.nigeria_states,
}
export.north_korea_provinces = {
["Chagang Province, North Korea"] = {},
["North Hamgyong Province, North Korea"] = {},
["South Hamgyong Province, North Korea"] = {},
["North Hwanghae Province, North Korea"] = {},
["South Hwanghae Province, North Korea"] = {},
["Kangwon Province, North Korea"] = {wp = "%l (%c)"},
["North Pyongan Province, North Korea"] = {},
["South Pyongan Province, North Korea"] = {},
["Ryanggang Province, North Korea"] = {},
}
-- provinces of North Korea
export.north_korea_group = {
key_to_placename = make_key_to_placename(", North Korea$", " Province$"),
placename_to_key = make_placename_to_key(", North Korea", " Province"),
default_container = "Cộng hòa Dân chủ Nhân dân Triều Tiên",
default_placetype = "province",
data = export.north_korea_provinces,
}
export.norwegian_counties = {
["Oslo, Norway"] = {},
["Rogaland, Norway"] = {},
["Møre og Romsdal, Norway"] = {},
["Nordland, Norway"] = {},
["Østfold, Norway"] = {},
["Akershus, Norway"] = {},
["Buskerud, Norway"] = {},
-- the following two were merged into Innlandet
-- ["Hedmark, Norway"] = {},
-- ["Oppland, Norway"] = {},
["Innlandet, Norway"] = {},
["Vestfold, Norway"] = {},
["Telemark, Norway"] = {},
-- the following two were merged into Agder
-- ["Aust-Agder, Norway"] = {},
-- ["Vest-Agder, Norway"] = {},
["Agder, Norway"] = {},
-- the following two were merged into Vestland
-- ["Hordaland, Norway"] = {},
-- ["Sogn og Fjordane, Norway"] = {},
["Vestland, Norway"] = {},
["Trøndelag, Norway"] = {},
["Troms, Norway"] = {},
["Finnmark, Norway"] = {},
}
-- counties of Norway
export.norway_group = {
default_container = "Na Uy",
default_placetype = "county",
data = export.norwegian_counties,
}
export.pakistan_provinces_and_territories = {
["Azad Kashmir, Pakistan"] = {
placetype = {"administrative territory", "autonomous territory", "territory"},
},
["Azad Jammu and Kashmir, Pakistan"] = {alias_of = "Azad Kashmir, Pakistan", display = true},
["Balochistan, Pakistan"] = {wp = "%l, %c"},
["Gilgit-Baltistan, Pakistan"] = {
placetype = {"administrative territory", "territory"},
},
["Islamabad Capital Territory, Pakistan"] = {
the = true,
divs = {}, -- no divisions
placetype = {"federal territory", "administrative territory", "territory"},
},
-- Islamabad is an accepted alias for Islamabad Capital Territory given the above placetypes
["Islamabad, Pakistan"] = {alias_of = "Islamabad Capital Territory, Pakistan"},
["Khyber Pakhtunkhwa, Pakistan"] = {},
["Punjab, Pakistan"] = {wp = "%l, %c"},
["Sindh, Pakistan"] = {},
}
-- provinces and territories of Pakistan
export.pakistan_group = {
default_container = "Pakistan",
default_placetype = "province",
default_divs = "divisions",
data = export.pakistan_provinces_and_territories,
}
export.philippines_provinces = {
["Abra, Philippines"] = {wp = "%l (province)"},
["Agusan del Norte, Philippines"] = {},
["Agusan del Sur, Philippines"] = {},
["Aklan, Philippines"] = {},
["Albay, Philippines"] = {},
["Antique, Philippines"] = {wp = "%l (province)"},
["Apayao, Philippines"] = {},
["Aurora, Philippines"] = {wp = "%l (province)"},
["Basilan, Philippines"] = {},
["Bataan, Philippines"] = {},
["Batanes, Philippines"] = {},
["Batangas, Philippines"] = {},
["Benguet, Philippines"] = {},
["Biliran, Philippines"] = {},
["Bohol, Philippines"] = {},
["Bukidnon, Philippines"] = {},
["Bulacan, Philippines"] = {},
["Cagayan, Philippines"] = {},
["Camarines Norte, Philippines"] = {},
["Camarines Sur, Philippines"] = {},
["Camiguin, Philippines"] = {},
["Capiz, Philippines"] = {},
["Catanduanes, Philippines"] = {},
["Cavite, Philippines"] = {},
["Cebu, Philippines"] = {},
["Cotabato, Philippines"] = {},
["Davao de Oro, Philippines"] = {},
["Davao del Norte, Philippines"] = {},
["Davao del Sur, Philippines"] = {},
["Davao Occidental, Philippines"] = {},
["Davao Oriental, Philippines"] = {},
["Dinagat Islands, Philippines"] = {the = true},
["Eastern Samar, Philippines"] = {},
["Guimaras, Philippines"] = {},
["Ifugao, Philippines"] = {},
["Ilocos Norte, Philippines"] = {},
["Ilocos Sur, Philippines"] = {},
["Iloilo, Philippines"] = {},
["Isabela, Philippines"] = {wp = "%l (province)"},
["Kalinga, Philippines"] = {wp = "%l (province)"},
["La Union, Philippines"] = {},
["Laguna, Philippines"] = {wp = "%l (province)"},
["Lanao del Norte, Philippines"] = {},
["Lanao del Sur, Philippines"] = {},
["Leyte, Philippines"] = {wp = "%l (province)"},
["Maguindanao del Norte, Philippines"] = {},
["Maguindanao del Sur, Philippines"] = {},
["Marinduque, Philippines"] = {},
["Masbate, Philippines"] = {},
["Misamis Occidental, Philippines"] = {},
["Misamis Oriental, Philippines"] = {},
["Mountain Province, Philippines"] = {},
["Negros Occidental, Philippines"] = {},
["Negros Oriental, Philippines"] = {},
["Northern Samar, Philippines"] = {},
["Nueva Ecija, Philippines"] = {},
["Nueva Vizcaya, Philippines"] = {},
["Occidental Mindoro, Philippines"] = {},
["Oriental Mindoro, Philippines"] = {},
["Palawan, Philippines"] = {},
["Pampanga, Philippines"] = {},
["Pangasinan, Philippines"] = {},
["Quezon, Philippines"] = {},
["Quirino, Philippines"] = {},
["Rizal, Philippines"] = {wp = "%l (province)"},
["Romblon, Philippines"] = {},
["Samar, Philippines"] = {wp = "%l (province)"},
["Sarangani, Philippines"] = {},
["Siquijor, Philippines"] = {},
["Sorsogon, Philippines"] = {},
["South Cotabato, Philippines"] = {},
["Southern Leyte, Philippines"] = {},
["Sultan Kudarat, Philippines"] = {},
["Sulu, Philippines"] = {},
["Surigao del Norte, Philippines"] = {},
["Surigao del Sur, Philippines"] = {},
["Tarlac, Philippines"] = {},
["Tawi-Tawi, Philippines"] = {},
["Zambales, Philippines"] = {},
["Zamboanga del Norte, Philippines"] = {},
["Zamboanga del Sur, Philippines"] = {},
["Zamboanga Sibugay, Philippines"] = {},
-- not a province but treated as one; allow it to be referred to as a province in holonyms
["Metro Manila, Philippines"] = {placetype = {"region", "province"}},
}
-- provinces of the Philippines
export.philippines_group = {
default_container = "Philippines",
default_placetype = "province",
default_divs = {"municipalities", "barangays"},
data = export.philippines_provinces,
}
export.poland_voivodeships = {
["Lower Silesian Voivodeship, Poland"] = {}, -- abbr DS, code 02, capital Wrocław
["Kuyavian-Pomeranian Voivodeship, Poland"] = {}, -- abbr KP, code 04, capital Bydgoszcz (seat of voivode), Toruń (seat of sejmik and marshal)
["Lublin Voivodeship, Poland"] = {}, -- abbr LU, code 06, capital Lublin
["Lubusz Voivodeship, Poland"] = {}, -- abbr LB, code 08, capital Gorzów Wielkopolski (seat of voivode), Zielona Góra (seat of sejmik and marshal)
["Lodz Voivodeship, Poland"] = {wp = "Łódź Voivodeship"}, -- abbr LD, code 10, capital Łódź
["Łódź Voivodeship, Poland"] = {alias_of = "Lodz Voivodeship, Poland", display = true, display_as_full = true},
["Lesser Poland Voivodeship, Poland"] = {}, -- abbr MA, code 12, capital Kraków
["Masovian Voivodeship, Poland"] = {}, -- abbr MZ, code 14, capital Warsaw
["Opole Voivodeship, Poland"] = {}, -- abbr OP, code 16, capital Opole
["Subcarpathian Voivodeship, Poland"] = {}, -- abbr PK, code 18, capital Rzeszów
["Podlaskie Voivodeship, Poland"] = {}, -- abbr PD, code 20, capital Białystok
["Pomeranian Voivodeship, Poland"] = {}, -- abbr PM, code 22, capital Gdańsk
["Silesian Voivodeship, Poland"] = {}, -- abbr SL, code 24, capital Katowice
["Holy Cross Voivodeship, Poland"] = {wp = "Świętokrzyskie Voivodeship"}, -- abbr SK, code 26, capital Kielce
["Świętokrzyskie Voivodeship, Poland"] = {alias_of = "Holy Cross Voivodeship, Poland", display = true, display_as_full = true},
["Warmian-Masurian Voivodeship, Poland"] = {}, -- abbr WN, code 28, capital Olsztyn
["Greater Poland Voivodeship, Poland"] = {}, -- abbr WP, code 30, capital Poznań
["West Pomeranian Voivodeship, Poland"] = {}, -- abbr ZP, code 32, capital Szczecin
}
-- voivodeships of Poland
export.poland_group = {
key_to_placename = make_key_to_placename(", Poland$", " Voivodeship$"),
placename_to_key = make_placename_to_key(", Poland", " Voivodeship"),
default_container = "Ba Lan",
default_placetype = "voivodeship",
default_divs = {
-- "counties", -- not enough of them currently
{type = "Polish colonies", cat_as = {{type = "villages", prep = "in"}}},
},
data = export.poland_voivodeships,
}
export.portugal_districts_and_autonomous_regions = {
["Azores, Portugal"] = {the = true, placetype = {"autonomous region", "region"}},
["Aveiro District, Portugal"] = {},
["Beja District, Portugal"] = {},
["Braga District, Portugal"] = {},
["Bragança District, Portugal"] = {},
["Castelo Branco District, Portugal"] = {},
["Coimbra District, Portugal"] = {},
["Évora District, Portugal"] = {},
["Faro District, Portugal"] = {},
["Guarda District, Portugal"] = {},
["Leiria District, Portugal"] = {},
["Lisbon District, Portugal"] = {},
["Lisboa District, Portugal"] = {alias_of = "Lisbon District, Portugal", display = true},
["Madeira, Portugal"] = {placetype = {"autonomous region", "region"}},
["Portalegre District, Portugal"] = {},
["Porto District, Portugal"] = {},
["Santarém District, Portugal"] = {},
["Setúbal District, Portugal"] = {},
["Viana do Castelo District, Portugal"] = {},
["Vila Real District, Portugal"] = {},
["Viseu District, Portugal"] = {},
}
local function portugal_placename_to_key(placename)
if placename == "Azores" or placename == "Madeira" then
return placename .. ", Portugal"
end
if placename:find(" District$") then
return placename .. ", Portugal"
end
return placename .. " District, Portugal"
end
-- districts and autonomous regions of Portugal
export.portugal_group = {
key_to_placename = make_key_to_placename(", Portugal$", " District$"),
placename_to_key = portugal_placename_to_key,
default_container = "Portugal",
default_placetype = "district",
default_divs = "municipalities",
data = export.portugal_districts_and_autonomous_regions,
}
export.romania_counties = {
["Alba County, Romania"] = {},
["Arad County, Romania"] = {},
["Argeș County, Romania"] = {},
["Bacău County, Romania"] = {},
["Bihor County, Romania"] = {},
["Bistrița-Năsăud County, Romania"] = {},
["Botoșani County, Romania"] = {},
["Brașov County, Romania"] = {},
["Brăila County, Romania"] = {},
-- Bucharest: not in a county
["Buzău County, Romania"] = {},
["Caraș-Severin County, Romania"] = {},
["Cluj County, Romania"] = {},
["Constanța County, Romania"] = {},
["Covasna County, Romania"] = {},
["Călărași County, Romania"] = {},
["Dolj County, Romania"] = {},
["Dâmbovița County, Romania"] = {},
["Galați County, Romania"] = {},
["Giurgiu County, Romania"] = {},
["Gorj County, Romania"] = {},
["Harghita County, Romania"] = {},
["Hunedoara County, Romania"] = {},
["Ialomița County, Romania"] = {},
["Iași County, Romania"] = {},
["Ilfov County, Romania"] = {},
["Maramureș County, Romania"] = {},
["Mehedinți County, Romania"] = {},
["Mureș County, Romania"] = {},
["Neamț County, Romania"] = {},
["Olt County, Romania"] = {},
["Prahova County, Romania"] = {},
["Satu Mare County, Romania"] = {},
["Sibiu County, Romania"] = {},
["Suceava County, Romania"] = {},
["Sălaj County, Romania"] = {},
["Teleorman County, Romania"] = {},
["Timiș County, Romania"] = {},
["Tulcea County, Romania"] = {},
["Vaslui County, Romania"] = {},
["Vrancea County, Romania"] = {},
["Vâlcea County, Romania"] = {},
}
-- counties of Romania
export.romania_group = {
key_to_placename = make_key_to_placename(", Romania$", " County$"),
placename_to_key = make_placename_to_key(", Romania", " County"),
default_container = "Romania",
default_placetype = "county",
default_divs = "communes",
data = export.romania_counties,
}
local function make_russia_federal_subject_spec(spectype, use_the, wp)
return {
placetype = spectype,
the = not not use_the,
bare_category_parent_type = {"federal subjects", spectype .. "s"},
wp = wp,
}
end
local russia_autonomous_okrug_no_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"}}
local russia_autonomous_okrug_the =
{placetype = {"autonomous okrug", "okrug"}, bare_category_parent_type = {"federal subjects", "autonomous okrugs"},
the = true}
local russia_krai = make_russia_federal_subject_spec("krai")
local russia_oblast = make_russia_federal_subject_spec("oblast")
local russia_republic_the = make_russia_federal_subject_spec("republic", "use the")
local russia_republic_no_the = make_russia_federal_subject_spec("republic")
export.russia_federal_subjects = {
-- autonomous oblasts
["Jewish Autonomous Oblast, Russia"] =
{the = true, placetype = {"autonomous oblast", "oblast"},
bare_category_parent_type = {"federal subjects", "autonomous oblasts"}},
-- autonomous okrugs
["Chukotka Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Chukotka, Russia"] = {alias_of = "Chukotka Autonomous Okrug, Russia"},
["Khanty-Mansi Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Khanty-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Khantia-Mansia, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Yugra, Russia"] = {alias_of = "Khanty-Mansi Autonomous Okrug, Russia"},
["Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Nenetsia, Russia"] = {alias_of = "Nenets Autonomous Okrug, Russia"},
["Yamalo-Nenets Autonomous Okrug, Russia"] = russia_autonomous_okrug_the,
["Yamalia, Russia"] = {alias_of = "Yamalo-Nenets Autonomous Okrug, Russia"},
-- krais
["Altai Krai, Russia"] = russia_krai,
["Kamchatka Krai, Russia"] = russia_krai,
["Khabarovsk Krai, Russia"] = russia_krai,
["Krasnodar Krai, Russia"] = russia_krai,
["Krasnoyarsk Krai, Russia"] = russia_krai,
["Perm Krai, Russia"] = russia_krai,
["Primorsky Krai, Russia"] = russia_krai,
["Stavropol Krai, Russia"] = russia_krai,
["Zabaykalsky Krai, Russia"] = russia_krai,
-- oblasts
["Amur Oblast, Russia"] = russia_oblast,
["Arkhangelsk Oblast, Russia"] = russia_oblast,
["Astrakhan Oblast, Russia"] = russia_oblast,
["Belgorod Oblast, Russia"] = russia_oblast,
["Bryansk Oblast, Russia"] = russia_oblast,
["Chelyabinsk Oblast, Russia"] = russia_oblast,
["Irkutsk Oblast, Russia"] = russia_oblast,
["Ivanovo Oblast, Russia"] = russia_oblast,
["Kaliningrad Oblast, Russia"] = russia_oblast,
["Kaluga Oblast, Russia"] = russia_oblast,
["Kemerovo Oblast, Russia"] = russia_oblast,
["Kirov Oblast, Russia"] = russia_oblast,
["Kostroma Oblast, Russia"] = russia_oblast,
["Kurgan Oblast, Russia"] = russia_oblast,
["Kursk Oblast, Russia"] = russia_oblast,
["Leningrad Oblast, Russia"] = russia_oblast,
["Lipetsk Oblast, Russia"] = russia_oblast,
["Magadan Oblast, Russia"] = russia_oblast,
["Moscow Oblast, Russia"] = russia_oblast,
["Murmansk Oblast, Russia"] = russia_oblast,
["Nizhny Novgorod Oblast, Russia"] = russia_oblast,
["Novgorod Oblast, Russia"] = russia_oblast,
["Novosibirsk Oblast, Russia"] = russia_oblast,
["Omsk Oblast, Russia"] = russia_oblast,
["Orenburg Oblast, Russia"] = russia_oblast,
["Oryol Oblast, Russia"] = russia_oblast,
["Penza Oblast, Russia"] = russia_oblast,
["Pskov Oblast, Russia"] = russia_oblast,
["Rostov Oblast, Russia"] = russia_oblast,
["Ryazan Oblast, Russia"] = russia_oblast,
["Sakhalin Oblast, Russia"] = russia_oblast,
["Samara Oblast, Russia"] = russia_oblast,
["Saratov Oblast, Russia"] = russia_oblast,
["Smolensk Oblast, Russia"] = russia_oblast,
["Sverdlovsk Oblast, Russia"] = russia_oblast,
["Tambov Oblast, Russia"] = russia_oblast,
["Tomsk Oblast, Russia"] = russia_oblast,
["Tula Oblast, Russia"] = russia_oblast,
["Tver Oblast, Russia"] = russia_oblast,
["Tyumen Oblast, Russia"] = russia_oblast,
["Ulyanovsk Oblast, Russia"] = russia_oblast,
["Vladimir Oblast, Russia"] = russia_oblast,
["Volgograd Oblast, Russia"] = russia_oblast,
["Vologda Oblast, Russia"] = russia_oblast,
["Voronezh Oblast, Russia"] = russia_oblast,
["Yaroslavl Oblast, Russia"] = russia_oblast,
-- republics
--
-- We only need to include cases that aren't just shortened versions of the full federal subject name (i.e. where
-- words like "Republic" and "Oblast" are omitted but the name is not otherwise modified; these are handled by
-- key_to_placename). Non-display-canonicalizing aliases are generally due to differences in the presence or absence
-- of "the".
["Adygea, Russia"] = russia_republic_no_the,
["Republic of Adygea, Russia"] = {alias_of = "Adygea, Russia"},
["Bashkortostan, Russia"] = russia_republic_no_the,
["Republic of Bashkortostan, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Bashkiria, Russia"] = {alias_of = "Bashkortostan, Russia"},
["Buryatia, Russia"] = russia_republic_no_the,
["Republic of Buryatia, Russia"] = {alias_of = "Buryatia, Russia"},
["Dagestan, Russia"] = russia_republic_no_the,
["Republic of Dagestan, Russia"] = {alias_of = "Dagestan, Russia"},
["Ingushetia, Russia"] = russia_republic_no_the,
["Republic of Ingushetia, Russia"] = {alias_of = "Ingushetia, Russia"},
["Kalmykia, Russia"] = russia_republic_no_the,
["Republic of Kalmykia, Russia"] = {alias_of = "Kalmykia, Russia"},
["Karelia, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Karelia"),
["Republic of Karelia, Russia"] = {alias_of = "Karelia, Russia"},
["Khakassia, Russia"] = russia_republic_no_the,
["Republic of Khakassia, Russia"] = {alias_of = "Khakassia, Russia"},
["Mordovia, Russia"] = russia_republic_no_the,
["Republic of Mordovia, Russia"] = {alias_of = "Mordovia, Russia"},
["North Ossetia-Alania, Russia"] = make_russia_federal_subject_spec("republic", nil, "North Ossetia–Alania"), -- with en-dash
["Republic of North Ossetia-Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia"},
["North Ossetia, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Alania, Russia"] = {alias_of = "North Ossetia-Alania, Russia", display = true},
["Tatarstan, Russia"] = russia_republic_no_the,
["Republic of Tatarstan, Russia"] = {alias_of = "Tatarstan, Russia"},
["Altai Republic, Russia"] = russia_republic_the,
["Chechnya, Russia"] = russia_republic_no_the,
["Chechen Republic, Russia"] = {alias_of = "Chechnya, Russia"},
["Chuvashia, Russia"] = russia_republic_no_the,
["Chuvash Republic, Russia"] = {alias_of = "Chuvashia, Russia"},
["Kabardino-Balkaria, Russia"] = russia_republic_no_the,
["Kabardino-Balkariya, Russia"] = {alias_of = "Kabardino-Balkaria, Russia", display = true},
["Kabardino-Balkarian Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia"},
["Kabardino-Balkar Republic, Russia"] = {alias_of = "Kabardino-Balkaria, Russia",
display = "Kabardino-Balkarian Republic, Russia"},
["Karachay-Cherkessia, Russia"] = russia_republic_no_the,
["Karachay-Cherkess Republic, Russia"] = {alias_of = "Karachay-Cherkessia, Russia"},
["Komi, Russia"] = make_russia_federal_subject_spec("republic", nil, "Komi Republic"),
["Komi Republic, Russia"] = {alias_of = "Komi, Russia"},
["Mari El, Russia"] = russia_republic_no_the,
["Mari El Republic, Russia"] = {alias_of = "Mari El, Russia"},
["Sakha, Russia"] = make_russia_federal_subject_spec("republic", nil, "Sakha Republic"),
["Sakha Republic, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutia, Russia"] = {alias_of = "Sakha, Russia"},
["Yakutiya, Russia"] = {alias_of = "Sakha, Russia", display = "Yakutia, Russia"},
["Republic of Yakutia (Sakha), Russia"] = {alias_of = "Sakha, Russia", display = "Sakha Republic, Russia",
the = true},
["Tuva, Russia"] = russia_republic_no_the,
["Tyva, Russia"] = {alias_of = "Tuva, Russia", display = true},
["Tuva Republic, Russia"] = {alias_of = "Tuva, Russia"},
["Tyva Republic, Russia"] = {alias_of = "Tuva, Russia", display= "Tuva Republic, Russia"},
["Udmurtia, Russia"] = russia_republic_no_the,
["Udmurt Republic, Russia"] = {alias_of = "Udmurtia, Russia"},
-- Not included due to being unrecognized and only partly controlled:
-- ["Crimea, Russia"] = make_russia_federal_subject_spec("republic", nil, "Republic of Crimea (Russia)")
-- ["Donetsk People's Republic, Russia"] = russia_republic_the,
-- ["Luhansk People's Republic, Russia"] = russia_republic_the,
-- ["Zaporozhye Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Zaporizhzhia Oblast"),
-- ["Kherson Oblast, Russia"] = make_russia_federal_subject_spec("oblast", nil, "Russian occupation of Kherson Oblast"),
-- There are also federal cities (not included because they're cities):
-- Moscow, Saint Petersburg; Sevastopol (unrecognized; same status as for "Crimea, Russia" above)
}
local function russia_key_to_placename(key)
key = key:gsub(",.*", "")
local full_placename = key
if key == "Jewish Autonomous Oblast" then
return full_placename, full_placename
end
local elliptical_placename
for _, suffix in ipairs({"Krai", "Oblast"}) do
elliptical_placename = key:match("^(.*) " .. suffix .. "$")
if elliptical_placename then
return full_placename, elliptical_placename
end
end
return full_placename, full_placename
end
local function russia_placename_to_key(placename)
local key = placename .. ", Russia"
if export.russia_federal_subjects[key] then
return key
end
-- We allow the user to say e.g. "obl/Samara" in place of "obl/Samara Oblast".
for _, suffix in ipairs({"Krai", "Oblast"}) do
local suffixed_key = placename .. " " .. suffix .. ", Russia"
if export.russia_federal_subjects[suffixed_key] then
return suffixed_key
end
end
return placename .. ", Russia"
end
local function construct_russia_federal_subject_keydesc(group, key, spec)
local placename = key:gsub(",.*", "")
local linked_placename = export.construct_linked_placename(spec, placename)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if placetype == "oblast" 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_placename = linked_placename:gsub(" Oblast%]%]", "%]%] Oblast")
end
return linked_placename .. ", a [[federal subject]] ([[" .. placetype .. "]]) of [[Russia]]"
end
-- federal subjects of Russia
export.russia_group = {
key_to_placename = russia_key_to_placename,
placename_to_key = russia_placename_to_key,
default_container = "Nga",
default_keydesc = construct_russia_federal_subject_keydesc,
default_overriding_bare_label_parents = {"federal subjects of Russia", "+++"},
data = export.russia_federal_subjects,
}
export.saudi_arabia_provinces = {
["Riyadh Province, Saudi Arabia"] = {},
["Mecca Province, Saudi Arabia"] = {},
-- Name is too generic to assume it's in Saudi Arabia if not specified.
["Eastern Province, Saudi Arabia"] = {no_auto_augment_container = true, wp = "%l, %c"},
["Medina Province, Saudi Arabia"] = {wp = "%l (%c)"},
["Aseer Province, Saudi Arabia"] = {wp = "Asir"},
["Asir Province, Saudi Arabia"] = {alias_of = "Aseer Province, Saudi Arabia", display = true},
["Jazan Province, Saudi Arabia"] = {},
["Qassim Province, Saudi Arabia"] = {wp = "Al-Qassim Province"},
["Al-Qassim Province, Saudi Arabia"] = {alias_of = "Qassim Province, Saudi Arabia", display = true},
["Tabuk Province, Saudi Arabia"] = {},
["Hail Province, Saudi Arabia"] = {wp = "Ḥa'il Province"},
["Ha'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Ḥa'il Province, Saudi Arabia"] = {alias_of = "Hail Province, Saudi Arabia", display = true},
["Al-Jouf Province, Saudi Arabia"] = {wp = "Al-Jawf Province"},
["Al-Jawf Province, Saudi Arabia"] = {alias_of = "Al-Jouf Province, Saudi Arabia", display = true},
["Najran Province, Saudi Arabia"] = {},
["Northern Borders Province, Saudi Arabia"] = {},
["Al-Bahah Province, Saudi Arabia"] = {},
}
-- provinces of Saudi Arabia
export.saudi_arabia_group = {
key_to_placename = make_key_to_placename(", Saudi Arabia$", " Province$"),
placename_to_key = make_placename_to_key(", Saudi Arabia", " Province"),
default_container = "Ả Rập Xê Út",
default_placetype = "province",
data = export.saudi_arabia_provinces,
}
export.south_africa_provinces = {
["Eastern Cape, South Africa"] = {the = true},
["Free State, South Africa"] = {the = true, wp = "%l (province)"},
["Gauteng, South Africa"] = {},
["KwaZulu-Natal, South Africa"] = {},
["Limpopo, South Africa"] = {},
["Mpumalanga, South Africa"] = {},
-- per Wikipedia and other sources, `North West` doesn't normally have `the` before it
["North West, South Africa"] = {wp = "%l (South African province)"},
["Northern Cape, South Africa"] = {the = true},
["Western Cape, South Africa"] = {the = true},
}
-- provinces of South Africa
export.south_africa_group = {
default_container = "South Africa",
default_placetype = "province",
default_divs = "municipalities",
data = export.south_africa_provinces,
}
export.south_korea_provinces = {
["North Chungcheong Province, South Korea"] = {},
["South Chungcheong Province, South Korea"] = {},
["Gangwon Province, South Korea"] = {wp = "%l, %c"},
["Gyeonggi Province, South Korea"] = {},
["North Gyeongsang Province, South Korea"] = {},
["South Gyeongsang Province, South Korea"] = {},
["North Jeolla Province, South Korea"] = {},
["South Jeolla Province, South Korea"] = {},
["Jeju Province, South Korea"] = {},
}
-- provinces of South Korea
export.south_korea_group = {
key_to_placename = make_key_to_placename(", South Korea$", " Province$"),
placename_to_key = make_placename_to_key(", South Korea", " Province"),
default_container = "Hàn Quốc",
default_placetype = "province",
data = export.south_korea_provinces,
}
export.spain_autonomous_communities = {
["Andalusia, Spain"] = {},
["Aragon, Spain"] = {},
["Asturias, Spain"] = {},
["Balearic Islands, Spain"] = {the = true},
["Basque Country, Spain"] = {the = true, wp = "%l (autonomous community)"},
["Canary Islands, Spain"] = {the = true},
["Cantabria, Spain"] = {},
["Castile and León, Spain"] = {},
["Castilla-La Mancha, Spain"] = {wp = "Castilla–La Mancha"}, -- with en-dash
["Catalonia, Spain"] = {},
["Community of Madrid, Spain"] = {the = true},
["Extremadura, Spain"] = {},
["Galicia, Spain"] = {wp = "%l (Spain)"},
["La Rioja, Spain"] = {},
["Murcia, Spain"] = {wp = "Region of %l"},
["Navarre, Spain"] = {},
["Valencia, Spain"] = {wp = "Valencian Community"},
["Valencian Community, Spain"] = {alias_of = "Valencia, Spain"},
}
-- autonomous communities of Spain
export.spain_group = {
default_container = "Tây Ban Nha",
default_placetype = "autonomous community",
default_divs = {"municipalities", "comarcas"},
data = export.spain_autonomous_communities,
}
export.taiwan_counties = {
["Changhua County, Taiwan"] = {},
["Chiayi County, Taiwan"] = {},
["Hsinchu County, Taiwan"] = {},
["Hualien County, Taiwan"] = {},
["Kinmen County, Taiwan"] = {wp = "Kinmen"},
["Lienchiang County, Taiwan"] = {wp = "Matsu Islands"},
["Miaoli County, Taiwan"] = {},
["Nantou County, Taiwan"] = {},
["Penghu County, Taiwan"] = {wp = "Penghu"},
["Pingtung County, Taiwan"] = {},
["Taitung County, Taiwan"] = {},
["Yilan County, Taiwan"] = {wp = "%l, %c"},
["Yunlin County, Taiwan"] = {},
}
-- counties of Taiwan
export.taiwan_group = {
key_to_placename = make_key_to_placename(", Taiwan$", " County$"),
placename_to_key = make_placename_to_key(", Taiwan", " County"),
default_container = "Đài Loan",
default_placetype = "county",
default_divs = {"districts", "townships"},
data = export.taiwan_counties,
}
export.thailand_provinces = {
-- Bangkok (special administrative area)
["Amnat Charoen Province, Thailand"] = {},
["Ang Thong Province, Thailand"] = {},
["Bueng Kan Province, Thailand"] = {},
["Buriram Province, Thailand"] = {},
["Chachoengsao Province, Thailand"] = {},
["Chai Nat Province, Thailand"] = {},
["Chaiyaphum Province, Thailand"] = {},
["Chanthaburi Province, Thailand"] = {},
["Chiang Mai Province, Thailand"] = {},
["Chiang Rai Province, Thailand"] = {},
["Chonburi Province, Thailand"] = {},
["Chumphon Province, Thailand"] = {},
["Kalasin Province, Thailand"] = {},
["Kamphaeng Phet Province, Thailand"] = {},
["Kanchanaburi Province, Thailand"] = {},
["Khon Kaen Province, Thailand"] = {},
["Krabi Province, Thailand"] = {},
["Lampang Province, Thailand"] = {},
["Lamphun Province, Thailand"] = {},
["Loei Province, Thailand"] = {},
["Lopburi Province, Thailand"] = {},
["Mae Hong Son Province, Thailand"] = {},
["Maha Sarakham Province, Thailand"] = {},
["Mukdahan Province, Thailand"] = {},
["Nakhon Nayok Province, Thailand"] = {},
["Nakhon Pathom Province, Thailand"] = {},
["Nakhon Phanom Province, Thailand"] = {},
["Nakhon Ratchasima Province, Thailand"] = {},
["Nakhon Sawon Province, Thailand"] = {},
["Nakhon Si Thammarat Province, Thailand"] = {},
["Nan Province, Thailand"] = {},
["Narathiwat Province, Thailand"] = {},
["Nong Bua Lamphu Province, Thailand"] = {},
["Nong Khai Province, Thailand"] = {},
["Nonthaburi Province, Thailand"] = {},
["Pathum Thani Province, Thailand"] = {},
["Pattani Province, Thailand"] = {},
["Phang Nga Province, Thailand"] = {},
["Phatthalung Province, Thailand"] = {},
["Phayao Province, Thailand"] = {},
["Phetchabun Province, Thailand"] = {},
["Phetchaburi Province, Thailand"] = {},
["Phichit Province, Thailand"] = {},
["Phitsanulok Province, Thailand"] = {},
["Phra Nakhon Si Ayutthaya Province, Thailand"] = {},
["Phrae Province, Thailand"] = {},
["Phuket Province, Thailand"] = {},
["Prachinburi Province, Thailand"] = {},
["Prachuap Khiri Khan Province, Thailand"] = {},
["Ranong Province, Thailand"] = {},
["Ratchaburi Province, Thailand"] = {},
["Rayong Province, Thailand"] = {},
["Roi Et Province, Thailand"] = {},
["Sa Kaeo Province, Thailand"] = {},
["Sakon Nakhon Province, Thailand"] = {},
["Samut Prakan Province, Thailand"] = {},
["Samut Sakhon Province, Thailand"] = {},
["Samut Songkhram Province, Thailand"] = {},
["Saraburi Province, Thailand"] = {},
["Satun Province, Thailand"] = {},
["Sing Buri Province, Thailand"] = {},
["Sisaket Province, Thailand"] = {},
["Songkhla Province, Thailand"] = {},
["Sukhothai Province, Thailand"] = {},
["Suphan Buri Province, Thailand"] = {},
["Surat Thani Province, Thailand"] = {},
["Surin Province, Thailand"] = {},
["Tak Province, Thailand"] = {},
["Trang Province, Thailand"] = {},
["Trat Province, Thailand"] = {},
["Ubon Ratchathani Province, Thailand"] = {},
["Udon Thani Province, Thailand"] = {},
["Uthai Thani Province, Thailand"] = {},
["Uttaradit Province, Thailand"] = {},
["Yala Province, Thailand"] = {},
["Yasothon Province, Thailand"] = {},
}
-- provinces of Thailand
export.thailand_group = {
key_to_placename = make_key_to_placename(", Thailand$", " Province$"),
placename_to_key = make_placename_to_key(", Thailand", " Province"),
default_container = "Thái Lan",
default_placetype = "province",
default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.thailand_provinces,
}
export.turkey_provinces = {
["Adana Province, Turkey"] = {}, -- code 01
["Adıyaman Province, Turkey"] = {}, -- code 02
["Afyonkarahisar Province, Turkey"] = {}, -- code 03
["Ağrı Province, Turkey"] = {}, -- code 04
["Amasya Province, Turkey"] = {}, -- code 05
["Ankara Province, Turkey"] = {}, -- code 06
["Antalya Province, Turkey"] = {}, -- code 07
["Artvin Province, Turkey"] = {}, -- code 08
["Aydın Province, Turkey"] = {}, -- code 09
["Balıkesir Province, Turkey"] = {}, -- code 10
["Bilecik Province, Turkey"] = {}, -- code 11
["Bingöl Province, Turkey"] = {}, -- code 12
["Bitlis Province, Turkey"] = {}, -- code 13
["Bolu Province, Turkey"] = {}, -- code 14
["Burdur Province, Turkey"] = {}, -- code 15
["Bursa Province, Turkey"] = {}, -- code 16
["Çanakkale Province, Turkey"] = {}, -- code 17
["Çankırı Province, Turkey"] = {}, -- code 18
["Çorum Province, Turkey"] = {}, -- code 19
["Denizli Province, Turkey"] = {}, -- code 20
["Diyarbakır Province, Turkey"] = {}, -- code 21
["Edirne Province, Turkey"] = {}, -- code 22
["Elazığ Province, Turkey"] = {}, -- code 23
["Elâzığ Province, Turkey"] = {alias_of = "Elazığ Province, Turkey", display = true},
["Erzincan Province, Turkey"] = {}, -- code 24
["Erzurum Province, Turkey"] = {}, -- code 25
["Eskişehir Province, Turkey"] = {}, -- code 26
["Gaziantep Province, Turkey"] = {}, -- code 27
["Giresun Province, Turkey"] = {}, -- code 28
["Gümüşhane Province, Turkey"] = {}, -- code 29
["Hakkâri Province, Turkey"] = {}, -- code 30
["Hakkari Province, Turkey"] = {alias_of = "Hakkâri Province, Turkey", display = true},
["Hatay Province, Turkey"] = {}, -- code 31
["Isparta Province, Turkey"] = {}, -- code 32
["Mersin Province, Turkey"] = {}, -- code 33
-- ["Istanbul Province, Turkey"] = {}, -- code 34; this is coextensive with the city itself
["İzmir Province, Turkey"] = {}, -- code 35
["Izmir Province, Turkey"] = {alias_of = "İzmir Province, Turkey", display = true},
["Kars Province, Turkey"] = {}, -- code 36
["Kastamonu Province, Turkey"] = {}, -- code 37
["Kayseri Province, Turkey"] = {}, -- code 38
["Kırklareli Province, Turkey"] = {}, -- code 39
["Kırşehir Province, Turkey"] = {}, -- code 40
["Kocaeli Province, Turkey"] = {}, -- code 41
["Konya Province, Turkey"] = {}, -- code 42
["Kütahya Province, Turkey"] = {}, -- code 43
["Malatya Province, Turkey"] = {}, -- code 44
["Manisa Province, Turkey"] = {}, -- code 45
["Kahramanmaraş Province, Turkey"] = {}, -- code 46
["Mardin Province, Turkey"] = {}, -- code 47
["Muğla Province, Turkey"] = {}, -- code 48
["Muş Province, Turkey"] = {}, -- code 49
["Nevşehir Province, Turkey"] = {}, -- code 50
["Niğde Province, Turkey"] = {}, -- code 51
["Ordu Province, Turkey"] = {}, -- code 52
["Rize Province, Turkey"] = {}, -- code 53
["Sakarya Province, Turkey"] = {}, -- code 54
["Samsun Province, Turkey"] = {}, -- code 55
["Siirt Province, Turkey"] = {}, -- code 56
["Sinop Province, Turkey"] = {}, -- code 57
["Sivas Province, Turkey"] = {}, -- code 58
["Tekirdağ Province, Turkey"] = {}, -- code 59
["Tokat Province, Turkey"] = {}, -- code 60
["Trabzon Province, Turkey"] = {}, -- code 61
["Tunceli Province, Turkey"] = {}, -- code 62
["Şanlıurfa Province, Turkey"] = {}, -- code 63
["Uşak Province, Turkey"] = {}, -- code 64
["Van Province, Turkey"] = {}, -- code 65
["Yozgat Province, Turkey"] = {}, -- code 66
["Zonguldak Province, Turkey"] = {}, -- code 67
["Aksaray Province, Turkey"] = {}, -- code 68
["Bayburt Province, Turkey"] = {}, -- code 69
["Karaman Province, Turkey"] = {}, -- code 70
["Kırıkkale Province, Turkey"] = {}, -- code 71
["Batman Province, Turkey"] = {}, -- code 72
["Şırnak Province, Turkey"] = {}, -- code 73
["Bartın Province, Turkey"] = {}, -- code 74
["Ardahan Province, Turkey"] = {}, -- code 75
["Iğdır Province, Turkey"] = {}, -- code 76
["Yalova Province, Turkey"] = {}, -- code 77
["Karabük Province, Turkey"] = {}, -- code 78
["Kilis Province, Turkey"] = {}, -- code 79
["Osmaniye Province, Turkey"] = {}, -- code 80
["Düzce Province, Turkey"] = {}, -- code 81
}
-- provinces of Turkey
export.turkey_group = {
key_to_placename = make_key_to_placename(", Turkey$", " Province$"),
placename_to_key = make_placename_to_key(", Turkey", " Province"),
default_container = "Thổ Nhĩ Kỳ",
default_placetype = "province",
default_divs = "districts",
data = export.turkey_provinces,
}
export.ukraine_oblasts = {
["Cherkasy Oblast, Ukraine"] = {}, -- capital [[Cherkasy]], license plate prefix CA, IA
["Chernihiv Oblast, Ukraine"] = {}, -- capital [[Chernihiv]], license plate prefix CB, IB
["Chernivtsi Oblast, Ukraine"] = {}, -- capital [[Chernivtsi]], license plate prefix CE, IE
-- apparently will be renamed to 'Dnipro Oblast'
["Dnipropetrovsk Oblast, Ukraine"] = {}, -- capital [[Dnipro]], license plate prefix AE, KE
["Donetsk Oblast, Ukraine"] = {}, -- capital ''[[Donetsk]] ([[Kramatorsk]])'', license plate prefix AH, KH
["Ivano-Frankivsk Oblast, Ukraine"] = {}, -- capital [[Ivano-Frankivsk]], license plate prefix AT, KT
["Kharkiv Oblast, Ukraine"] = {}, -- capital [[Kharkiv]], license plate prefix AX, KX
["Kherson Oblast, Ukraine"] = {}, -- capital ''[[Kherson]]'', license plate prefix ''BT, HT''
["Khmelnytskyi Oblast, Ukraine"] = {}, -- capital [[Khmelnytskyi]], license plate prefix BX, HX
-- apparently will be renamed to 'Kropyvnytskyi Oblast'
["Kirovohrad Oblast, Ukraine"] = {}, -- capital [[Kropyvnytskyi]], license plate prefix BA, HA
["Kyiv Oblast, Ukraine"] = {}, -- capital [[Kyiv]], license plate prefix AI, KI
["Kiev Oblast, Ukraine"] = {alias_of = "Kyiv Oblast, Ukraine", display = true},
["Luhansk Oblast, Ukraine"] = {}, -- capital ''[[Luhansk]] ([[Sievierodonetsk]])'', license plate prefix BB, HB
["Lviv Oblast, Ukraine"] = {}, -- capital [[Lviv]], license plate prefix BC, HC
["Mykolaiv Oblast, Ukraine"] = {}, -- capital [[Mykolaiv]], license plate prefix BE, HE
["Odesa Oblast, Ukraine"] = {}, -- capital [[Odesa]], license plate prefix BH, HH
["Odessa Oblast, Ukraine"] = {alias_of = "Odesa Oblast, Ukraine", display = true},
["Poltava Oblast, Ukraine"] = {}, -- capital [[Poltava]], license plate prefix BI, HI
["Rivne Oblast, Ukraine"] = {}, -- capital [[Rivne]], license plate prefix BK, HK
["Sumy Oblast, Ukraine"] = {}, -- capital [[Sumy]], license plate prefix BM, HM
["Ternopil Oblast, Ukraine"] = {}, -- capital [[Ternopil]], license plate prefix BO, HO
["Vinnytsia Oblast, Ukraine"] = {}, -- capital [[Vinnytsia]], license plate prefix AB, KB
["Volyn Oblast, Ukraine"] = {}, -- capital [[Lutsk]], license plate prefix AC, KC
["Zakarpattia Oblast, Ukraine"] = {}, -- capital [[Uzhhorod]], license plate prefix AO, KO
["Zaporizhzhia Oblast, Ukraine"] = {}, -- capital ''[[Zaporizhzhia]]'', license plate prefix AP, KP
["Zaporizhia Oblast, Ukraine"] = {alias_of = "Zaporizhzhia Oblast, Ukraine", display = true},
["Zhytomyr Oblast, Ukraine"] = {}, -- capital [[Zhytomyr]], license plate prefix AM, KM
}
-- oblasts of Ukraine
export.ukraine_group = {
key_to_placename = make_key_to_placename(", Ukraine$", " Oblast$"),
placename_to_key = make_placename_to_key(", Ukraine", " Oblast"),
default_container = "Ukraina",
default_placetype = "oblast",
default_divs = {"raions", "hromadas"},
data = export.ukraine_oblasts,
}
export.united_kingdom_constituent_countries = {
["England"] = {divs = {
"counties",
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
{type = "civil parishes", container_parent_type = false},
}},
["Northern Ireland"] = {
placetype = {"constituent country", "province", "quốc gia"},
divs = {"counties", "districts"},
},
["Scotland"] = {divs = {
{type = "council areas", container_parent_type = false},
"districts",
}},
["Wales"] = {divs = {
"counties",
{type = "county boroughs", container_parent_type = false},
{type = "communities", container_parent_type = false},
{type = "Welsh communities", cat_as = {{type = "communities", container_parent_type = false}}},
}},
}
-- constituent countries and provinces of the United Kingdom
export.united_kingdom_group = {
placename_to_key = false,
default_container = "United Kingdom",
default_placetype = {"constituent country", "quốc gia"},
addl_divs = {
"traditional counties",
{type = "historical counties", cat_as = "traditional counties"},
},
-- Don't create categories like 'Category:en:Towns in the United Kingdom'
-- or 'Category:en:Places in the United Kingdom'.
default_no_container_cat = true,
data = export.united_kingdom_constituent_countries,
}
export.england_counties = {
-- NOTE: We used to have various other "no longer" counties commented out, which seems to refer to counties that
-- existed officially at some point between 1889 and 1974, which I have removed. I have only kept the three
-- ceremonial counties that existed from 1974 (when ceremonial counties were created) to 1996, as well as those
-- still considered "historic counties" per [[w:Historic counties of England]].
-- ["Avon, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Bedfordshire, England"] = {},
["Berkshire, England"] = {},
-- ["Brighton and Hove, England"] = {}, -- city
-- ["Bristol, England"] = {}, -- city
["Buckinghamshire, England"] = {},
["Cambridgeshire, England"] = {},
["Cheshire, England"] = {},
-- ["Cleveland, England"] = {wp = "%l (county)"}, -- no longer (1974 to 1996)
["Cornwall, England"] = {},
-- ["Cumberland, England"] = {}, -- no longer (historic county)
["Cumbria, England"] = {},
["Derbyshire, England"] = {},
["Devon, England"] = {},
["Dorset, England"] = {},
["County Durham, England"] = {},
["East Sussex, England"] = {},
["Essex, England"] = {},
["Gloucestershire, England"] = {},
["Greater London, England"] = {},
["Greater Manchester, England"] = {},
["Hampshire, England"] = {},
["Herefordshire, England"] = {},
["Hertfordshire, England"] = {},
-- ["Humberside, England"] = {}, -- no longer (1974 to 1996)
-- ["Huntingdonshire, England"] = {}, -- no longer (historic county)
["Isle of Wight, England"] = {the = true},
["Kent, England"] = {},
["Lancashire, England"] = {},
["Leicestershire, England"] = {},
["Lincolnshire, England"] = {},
["Merseyside, England"] = {},
-- ["Middlesex, England"] = {}, -- no longer (historic county)
["Norfolk, England"] = {},
["Northamptonshire, England"] = {},
["Northumberland, England"] = {},
["North Yorkshire, England"] = {},
["Nottinghamshire, England"] = {},
["Oxfordshire, England"] = {},
["Rutland, England"] = {},
["Shropshire, England"] = {},
["Somerset, England"] = {},
["South Humberside, England"] = {},
["South Yorkshire, England"] = {},
["Staffordshire, England"] = {},
["Suffolk, England"] = {},
["Surrey, England"] = {},
-- ["Sussex, England"] = {}, -- no longer (historic county)
["Tyne and Wear, England"] = {},
["Warwickshire, England"] = {},
["West Midlands, England"] = {the = true, wp = "%l (county)"},
-- ["Westmorland, England"] = {}, -- no longer (historic county)
["West Sussex, England"] = {},
["West Yorkshire, England"] = {},
["Wiltshire, England"] = {},
["Worcestershire, England"] = {},
-- ["Yorkshire, England"] = {}, -- no longer (historic county)
["East Riding of Yorkshire, England"] = {the = true},
}
-- counties of England
export.england_group = {
default_container = {key = "England", placetype = "constituent country"},
default_placetype = "county",
default_divs = {
"districts",
{type = "local government districts", cat_as = "districts"},
{
type = "local government districts with borough status",
cat_as = {"districts", "boroughs"},
},
{type = "boroughs", cat_as = {"districts", "boroughs"}},
"civil parishes",
},
data = export.england_counties,
}
export.northern_ireland_counties = {
["County Antrim, Northern Ireland"] = {},
["County Armagh, Northern Ireland"] = {},
["City of Belfast, Northern Ireland"] = {the = true, is_city = true, wp = "Belfast"},
["County Down, Northern Ireland"] = {},
["County Fermanagh, Northern Ireland"] = {},
["County Londonderry, Northern Ireland"] = {},
["City of Derry, Northern Ireland"] = {the = true, is_city = true, wp = "Derry"},
["County Tyrone, Northern Ireland"] = {},
}
-- counties of Northern Ireland
export.northern_ireland_group = {
key_to_placename = make_irish_type_key_to_placename(", Northern Ireland$"),
placename_to_key = make_irish_type_placename_to_key(", Northern Ireland"),
default_container = {key = "Northern Ireland", placetype = "constituent country"},
default_placetype = "county",
data = export.northern_ireland_counties,
}
export.scotland_council_areas = {
["Aberdeenshire, Scotland"] = {},
["Angus, Scotland"] = {wp = "%l, %c"},
["Argyll and Bute, Scotland"] = {},
["City of Aberdeen, Scotland"] = {the = true, wp = "Aberdeen"},
["Aberdeen"] = {alias_of = "City of Aberdeen, Scotland"},
["Aberdeen City"] = {alias_of = "City of Aberdeen, Scotland"},
["City of Dundee, Scotland"] = {the = true, wp = "Dundee"},
["Dundee"] = {alias_of = "City of Dundee, Scotland"},
["Dundee City"] = {alias_of = "City of Dundee, Scotland"},
["City of Edinburgh, Scotland"] = {the = true, wp = "%l council area"},
["Edinburgh"] = {alias_of = "City of Edinburgh, Scotland"},
["City of Glasgow, Scotland"] = {the = true, wp = "Glasgow"},
["Glasgow"] = {alias_of = "City of Glasgow, Scotland"},
["Clackmannanshire, Scotland"] = {},
["Dumfries and Galloway, Scotland"] = {},
["East Ayrshire, Scotland"] = {},
["East Dunbartonshire, Scotland"] = {},
["East Lothian, Scotland"] = {},
["East Renfrewshire, Scotland"] = {},
["Falkirk, Scotland"] = {wp = "%l council area"},
["Fife, Scotland"] = {},
["Highland, Scotland"] = {wp = "%l council area"},
["Inverclyde, Scotland"] = {},
["Midlothian, Scotland"] = {},
["Moray, Scotland"] = {},
["North Ayrshire, Scotland"] = {},
["North Lanarkshire, Scotland"] = {},
["Orkney Islands, Scotland"] = {the = true},
["Perth and Kinross, Scotland"] = {},
["Renfrewshire, Scotland"] = {},
["Scottish Borders, Scotland"] = {the = true},
["Shetland Islands, Scotland"] = {the = true},
["South Ayrshire, Scotland"] = {},
["South Lanarkshire, Scotland"] = {},
["Stirling, Scotland"] = {wp = "%l council area"},
["West Dunbartonshire, Scotland"] = {},
["West Lothian, Scotland"] = {},
["Western Isles, Scotland"] = {the = true, wp = "Outer Hebrides"},
["Na h-Eileanan Siar, Scotland"] = {alias_of = "Western Isles, Scotland"},
}
-- council areas of Scotland
export.scotland_group = {
default_container = {key = "Scotland", placetype = "constituent country"},
default_placetype = "council area",
data = export.scotland_council_areas,
}
export.wales_principal_areas = {
["Blaenau Gwent, Wales"] = {},
["Bridgend, Wales"] = {wp = "%l County Borough"},
["Caerphilly, Wales"] = {wp = "%l County Borough"},
-- ["Cardiff, Wales"] = {placetype = "city"},
["Carmarthenshire, Wales"] = {placetype = "county"},
["Ceredigion, Wales"] = {placetype = "county"},
["Conwy, Wales"] = {wp = "%l County Borough"},
["Denbighshire, Wales"] = {placetype = "county"},
["Flintshire, Wales"] = {placetype = "county"},
["Gwynedd, Wales"] = {placetype = "county"},
["Isle of Anglesey, Wales"] = {the = true, placetype = "county"},
["Anglesey, Wales"] = {alias_of = "Isle of Anglesey, Wales"}, -- differs in "the"
["Merthyr Tydfil, Wales"] = {wp = "%l County Borough"},
["Monmouthshire, Wales"] = {placetype = "county"},
["Neath Port Talbot, Wales"] = {},
-- ["Newport, Wales"] = {placetype = "city", wp = "%l, %c"},
["Pembrokeshire, Wales"] = {placetype = "county"},
["Powys, Wales"] = {placetype = "county"},
["Rhondda Cynon Taf, Wales"] = {},
-- ["Swansea, Wales"] = {placetype = "city"},
["Torfaen, Wales"] = {},
["Vale of Glamorgan, Wales"] = {the = true},
["Wrexham, Wales"] = {wp = "%l County Borough"},
}
-- principal areas (cities, counties and county boroughs) of Wales
export.wales_group = {
default_container = {key = "Wales", placetype = "constituent country"},
default_placetype = "county borough",
data = export.wales_principal_areas,
}
export.united_states_states = {
["Alabama, USA"] = {},
["Alaska, USA"] = {divs = {
{type = "boroughs", container_parent_type = "counties"},
{type = "borough seats", container_parent_type = "county seats"},
}},
["Arizona, USA"] = {},
["Arkansas, USA"] = {},
["California, USA"] = {},
["Colorado, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Connecticut, USA"] = {divs = {"counties", "county seats", "municipalities"}},
["Delaware, USA"] = {},
["Florida, USA"] = {},
["Georgia, USA"] = {wp = "%l (U.S. state)"},
["Hawaii, USA"] = {addl_parents = {"Polynesia"}},
["Idaho, USA"] = {},
["Illinois, USA"] = {},
["Indiana, USA"] = {},
["Iowa, USA"] = {},
["Kansas, USA"] = {},
["Kentucky, USA"] = {},
["Louisiana, USA"] = {divs = {
{type = "parishes", container_parent_type = "counties"},
{type = "parish seats", container_parent_type = "county seats"},
}},
["Maine, USA"] = {},
["Maryland, USA"] = {},
["Massachusetts, USA"] = {},
["Michigan, USA"] = {},
["Minnesota, USA"] = {},
["Mississippi, USA"] = {},
["Missouri, USA"] = {},
["Montana, USA"] = {},
["Nebraska, USA"] = {},
["Nevada, USA"] = {},
["New Hampshire, USA"] = {},
["New Jersey, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["New Mexico, USA"] = {},
["New York, USA"] = {wp = "%l (state)"},
["North Carolina, USA"] = {},
["North Dakota, USA"] = {},
["Ohio, USA"] = {},
["Oklahoma, USA"] = {},
["Oregon, USA"] = {},
["Pennsylvania, USA"] = {divs = {
"counties", "county seats",
{type = "boroughs", prep = "in"},
}},
["Rhode Island, USA"] = {},
["South Carolina, USA"] = {},
["South Dakota, USA"] = {},
["Tennessee, USA"] = {},
["Texas, USA"] = {},
["Utah, USA"] = {},
["Vermont, USA"] = {},
["Virginia, USA"] = {},
["Washington, USA"] = {wp = "%l (state)"},
["West Virginia, USA"] = {},
["Wisconsin, USA"] = {},
["Wyoming, USA"] = {},
}
-- states of the United States
export.united_states_group = {
placename_to_key = make_placename_to_key(", USA"),
default_container = "Hoa Kỳ",
default_placetype = "state",
default_divs = {"counties", "county seats"},
addl_divs = {
{type = "census-designated places", prep = "in"},
{type = "unincorporated communities", prep = "in"},
},
data = export.united_states_states,
}
export.vietnam_provinces = {
-- [[Northeast (Vietnam)|Northeast]] region
["Bắc Giang Province, Vietnam"] = {}, -- capital [[Bắc Giang]]
["Bắc Kạn Province, Vietnam"] = {}, -- capital [[Bắc Kạn]]
["Cao Bằng Province, Vietnam"] = {}, -- capital [[Cao Bằng]]
["Hà Giang Province, Vietnam"] = {}, -- capital [[Hà Giang]]
["Lạng Sơn Province, Vietnam"] = {}, -- capital [[Lạng Sơn]]
["Phú Thọ Province, Vietnam"] = {}, -- capital [[Việt Trì]]
["Quảng Ninh Province, Vietnam"] = {}, -- capital [[Hạ Long]]
["Thái Nguyên Province, Vietnam"] = {}, -- capital [[Thái Nguyên]]
["Tuyên Quang Province, Vietnam"] = {}, -- capital [[Tuyên Quang]]
-- [[Northwest (Vietnam)|Northwest]] region
["Lào Cai Province, Vietnam"] = {}, -- capital [[Lào Cai]]
["Yên Bái Province, Vietnam"] = {}, -- capital [[Yên Bái]]
["Điện Biên Province, Vietnam"] = {}, -- capital [[Điện Biên Phủ]]
["Hoà Bình Province, Vietnam"] = {}, -- capital [[Hoà Bình City|Hoà Bình]]
["Hòa Bình Province, Vietnam"] = {alias_of = "Hoà Bình Province, Vietnam", display = true},
["Lai Châu Province, Vietnam"] = {}, -- capital [[Lai Châu]]
["Sơn La Province, Vietnam"] = {}, -- capital [[Sơn La]]
-- [[Red River Delta]] region
["Bắc Ninh Province, Vietnam"] = {}, -- capital [[Bắc Ninh]]
["Hà Nam Province, Vietnam"] = {}, -- capital [[Phủ Lý]]
["Hải Dương Province, Vietnam"] = {}, -- capital [[Hải Dương]]
["Hưng Yên Province, Vietnam"] = {}, -- capital [[Hưng Yên]]
["Nam Định Province, Vietnam"] = {}, -- capital [[Nam Định]]
["Ninh Bình Province, Vietnam"] = {}, -- capital [[Ninh Bình|Hoa Lư]]
["Thái Bình Province, Vietnam"] = {}, -- capital [[Thái Bình]]
["Vĩnh Phúc Province, Vietnam"] = {}, -- capital [[Vĩnh Yên]]
-- ["Hanoi"] = {placetype = {"municipality", "city"}}, -- capital [[Hoàn Kiếm district]]
-- ["Haiphong"] = {placetype = {"municipality", "city"}}, -- capital [[Hồng Bàng district]]
-- [[North Central Coast]] region
["Hà Tĩnh Province, Vietnam"] = {}, -- capital [[Hà Tĩnh]]
["Nghệ An Province, Vietnam"] = {}, -- capital [[Vinh]]
["Quảng Bình Province, Vietnam"] = {}, -- capital [[Đồng Hới]]
["Quảng Trị Province, Vietnam"] = {}, -- capital [[Đông Hà]]
["Thanh Hoá Province, Vietnam"] = {}, -- capital [[Thanh Hoá]]
["Thanh Hóa Province, Vietnam"] = {alias_of = "Thanh Hoá Province, Vietnam", display = true},
-- ["Hue"] = {placetype = {"municipality", "city"}, wp = "Huế"}, -- capital [[Thuận Hoá district]]
-- [[Central Highlands (Vietnam)|Central Highlands]] region
["Đắk Lắk Province, Vietnam"] = {}, -- capital [[Buôn Ma Thuột]]
["Đăk Nông Province, Vietnam"] = {}, -- capital [[Gia Nghĩa]]
["Gia Lai Province, Vietnam"] = {}, -- capital [[Pleiku]]
["Kon Tum Province, Vietnam"] = {}, -- capital [[Kon Tum]]
["Lâm Đồng Province, Vietnam"] = {}, -- capital [[Đà Lạt]]
-- [[South Central Coast]] region
["Bình Định Province, Vietnam"] = {}, -- capital [[Quy Nhon]]
["Bình Thuận Province, Vietnam"] = {}, -- capital [[Phan Thiết]]
["Khánh Hoà Province, Vietnam"] = {}, -- capital [[Nha Trang]]
["Khánh Hòa Province, Vietnam"] = {alias_of = "Khánh Hoà Province, Vietnam", display = true},
["Ninh Thuận Province, Vietnam"] = {}, -- capital [[Phan Rang–Tháp Chàm]]
["Phú Yên Province, Vietnam"] = {}, -- capital [[Tuy Hoà]]
["Quảng Nam Province, Vietnam"] = {}, -- capital [[Tam Kỳ]]
["Quảng Ngãi Province, Vietnam"] = {}, -- capital [[Quảng Ngãi]]
-- ["Da Nang"] = {placetype = {"municipality", "city"}}, -- capital [[Hải Châu district]]
-- [[Southeast (Vietnam)|Southeast]] region
["Bà Rịa–Vũng Tàu Province, Vietnam"] = {}, -- capital [[Bà Rịa]]
["Bình Dương Province, Vietnam"] = {}, -- capital [[Thủ Dầu Một]]
["Bình Phước Province, Vietnam"] = {}, -- capital [[Đồng Xoài]]
["Đồng Nai Province, Vietnam"] = {}, -- capital [[Biên Hoà]]
["Tây Ninh Province, Vietnam"] = {}, -- capital [[Tây Ninh]]
-- ["Ho Chi Minh City"] = {placetype = {"municipality", "city"}}, -- capital [[District 1, Ho Chi Minh City|'''District 1''']]
-- [[Mekong Delta]] region
["An Giang Province, Vietnam"] = {}, -- capital [[Long Xuyên]]
["Bạc Liêu Province, Vietnam"] = {}, -- capital [[Bạc Liêu]]
["Bến Tre Province, Vietnam"] = {}, -- capital [[Bến Tre]]
["Cà Mau Province, Vietnam"] = {}, -- capital [[Cà Mau]]
["Đồng Tháp Province, Vietnam"] = {}, -- capital [[Cao Lãnh City|Cao Lãnh]]
["Hậu Giang Province, Vietnam"] = {}, -- capital [[Vị Thanh]]
["Kiên Giang Province, Vietnam"] = {}, -- capital [[Rạch Giá]]
["Long An Province, Vietnam"] = {}, -- capital [[Tân An]]
["Sóc Trăng Province, Vietnam"] = {}, -- capital [[Sóc Trăng]]
["Tiền Giang Province, Vietnam"] = {}, -- capital [[Mỹ Tho]]
["Trà Vinh Province, Vietnam"] = {}, -- capital [[Trà Vinh]]
["Vĩnh Long Province, Vietnam"] = {}, -- capital [[Vĩnh Long]]
-- ["Can Tho"] = {placetype = {"municipality", "city"}, wp = "Cần Thơ"}, -- capital [[Ninh Kiều district]]
}
-- provinces of Vietnam
export.vietnam_group = {
key_to_placename = make_key_to_placename(", Vietnam$", " Province$"),
placename_to_key = make_placename_to_key(", Vietnam", " Province"),
default_container = "Việt Nam",
default_placetype = "province",
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
-- For obscure reasons, provinces of Iran, Laos, Thailand and Vietnam use lowercase 'province'
default_wp = "%e province",
data = export.vietnam_provinces,
}
-----------------------------------------------------------------------------------
-- City data --
-----------------------------------------------------------------------------------
export.australia_cities = {
["Adelaide"] = {container = "South Australia"}, -- 1,450,000 (Agglomeration)
["Brisbane"] = {container = "Queensland"}, -- 3,450,000 (Conglomeration; including the Gold Coast [750,997 2024 estiamte])
["Canberra"] = {container = {key = "Australian Capital Territory, Australia", placetype = "territory"}}, -- 510,641 (2024 estimate)
["Melbourne"] = {container = "Victoria"}, -- 5,200,000 (Agglomeration)
["Newcastle, New South Wales"] = {container = "New South Wales", wp = "%l, %c"}, -- 534,033 (2024 estimate)
["Newcastle"] = {alias_of = "Newcastle, New South Wales"},
["Perth"] = {container = "Western Australia"}, -- 2,350,000 (Agglomeration)
["Sydney"] = {container = "New South Wales"}, -- 5,100,000 (Agglomeration)
}
export.australia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Australia", "state"),
default_placetype = "city",
data = export.australia_cities,
}
export.brazil_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["São Paulo"] = {container = "São Paulo"}, -- 22,600,000 (Consolidated Urban Area; including Guarulhos)
["Sao Paulo"] = {alias_of = "São Paulo", display = true},
["Rio de Janeiro"] = {container = "Rio de Janeiro"}, -- 13,600,000 (Consolidated Urban Area)
["Belo Horizonte"] = {container = "Minas Gerais"}, -- 5,300,000
["Recife"] = {container = "Pernambuco"}, -- 4,100,000
["Porto Alegre"] = {container = "Rio Grande do Sul"}, -- 3,950,000 (Consolidated Urban Area)
["Brasília"] = {container = "Distrito Federal"}, -- 3,850,000
["Brasilia"] = {alias_of = "Brasília", display = true},
["Fortaleza"] = {container = "Ceará"}, -- 3,825,000
["Salvador"] = {container = "Bahia", wp = "%l, %c", commonscat = "%l (%c)"}, -- 3,400,000
["Curitiba"] = {container = "Paraná"}, -- 3,375,000
["Campinas"] = {container = "São Paulo"}, -- 3,250,000
["Goiânia"] = {container = "Goiás"}, -- 2,525,000
["Goiania"] = {alias_of = "Goiânia", display = true},
["Manaus"] = {container = "Amazonas"}, -- 2,275,000
["Belém"] = {container = "Pará"}, -- 2,200,000
["Belem"] = {alias_of = "Belém", display = true},
["Vitória"] = {container = "Espírito Santo", wp = "%l, %c"}, -- 1,870,000
["Vitoria"] = {alias_of = "Vitória", display = true},
["Santos"] = {container = "São Paulo", wp = "%l, %c"}, -- 1,760,000
["São Luís"] = {container = "Maranhão", wp = "%l, %c"}, -- 1,530,000
["Sao Luis"] = {alias_of = "São Luís", display = true},
["Natal"] = {container = "Rio Grande do Norte", wp = "%l, %c"}, -- 1,360,000
["Florianópolis"] = {container = "Santa Catarina"}, -- 1,260,000
["Florianopolis"] = {alias_of = "Florianópolis", display = true},
["Maceió"] = {container = "Alagoas"}, -- 1,220,000
["Maceio"] = {alias_of = "Maceió", display = true},
["João Pessoa"] = {container = "Paraíba", wp = "%l, %c"}, -- 1,210,000
["Joao Pessoa"] = {alias_of = "João Pessoa", display = true},
["São José dos Campos"] = {container = "São Paulo"}, -- 1,090,000
["Sao Jose dos Campos"] = {alias_of = "São José dos Campos", display = true},
["Londrina"] = {container = "Paraná"}, -- 1,050,000
["Teresina"] = {container = "Piauí"}, -- 1,040,000
}
export.brazil_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Brazil", "state"),
default_placetype = "city",
data = export.brazil_cities,
}
export.canada_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-27; reference date 2025-01-01.
["Toronto"] = {container = "Ontario"}, -- 7,850,000 (Consolidated Urban Area; including Hamilton)
["Montreal"] = {container = "Quebec"}, -- 4,500,000 (Consolidated Urban Area)
["Vancouver"] = {container = "British Columbia"}, -- 3,175,000 (Consolidated Urban Area)
["Calgary"] = {container = "Alberta"}, -- 1,510,000 (Consolidated Urban Area)
["Edmonton"] = {container = "Alberta"}, -- 1,460,000 (Consolidated Urban Area)
["Ottawa"] = {container = "Ontario"}, -- 1,390,000 (Consolidated Urban Area)
["Quebec City"] = {container = "Quebec"}, -- 839,311 metro per Wikipedia (2021 census)
["Winnipeg"] = {container = "Manitoba"}, -- 834,678 metro per Wikipedia (2021 census)
["Hamilton"] = {container = "Ontario", wp = "%l, %c"}, -- 785,184 metro per Wikipedia (2021 census)
["Kitchener"] = {container = "Ontario", wp = "%l, %c"}, -- 575,847 metro per Wikipedia (2021 census)
}
export.canada_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Canada", "province"),
default_placetype = "city",
data = export.canada_cities,
}
export.france_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Paris"] = {container = "Île-de-France"}, -- 11,500,000 (Conglomeration)
["Lyon"] = {container = "Auvergne-Rhône-Alpes"}, -- 2,050,000 (Conglomeration)
["Lyons"] = {alias_of = "Lyon", display = true},
["Marseille"] = {container = "Provence-Alpes-Côte d'Azur"}, -- 1,710,000 (Conglomeration)
["Marseilles"] = {alias_of = "Marseille", display = true},
["Lille"] = {container = "Hauts-de-France"}, -- 1,320,000 (Conglomeration)
["Bordeaux"] = {container = "Nouvelle-Aquitaine"}, -- 1,160,000 (Conglomeration)
["Toulouse"] = {container = "Occitania"}, -- 1,150,000 (Conglomeration)
["Nice"] = {container = "Provence-Alpes-Côte d'Azur"},
["Nantes"] = {container = "Pays de la Loire"},
["Strasbourg"] = {container = "Grand Est"},
["Rennes"] = {container = "Brittany"},
}
export.france_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", France", "region"),
default_placetype = "city",
data = export.france_cities,
}
export.germany_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
-- listed under Rhein-Ruhr Area, total population 10,900,000 (Consolidated Urban Area)
["Cologne"] = {container = "North Rhine-Westphalia"},
["Köln"] = {alias_of = "Cologne", display = true},
["Düsseldorf"] = {container = "North Rhine-Westphalia"},
["Dusseldorf"] = {alias_of = "Düsseldorf", display = true},
["Dortmund"] = {container = "North Rhine-Westphalia"},
["Essen"] = {container = "North Rhine-Westphalia"},
["Duisberg"] = {container = "North Rhine-Westphalia"},
["Berlin"] = {}, -- 4,700,000
["Frankfurt"] = {container = "Hesse"}, -- 3,225,000
["Frankfurt am Main"] = {alias_of = "Frankfurt"}, -- not a display alias as it's longer
["Hamburg"] = {}, -- 2,900,000
["Munich"] = {container = "Bavaria"}, -- 2,300,000
["Stuttgart"] = {container = "Baden-Württemberg"}, -- 2,300,000
["Mannheim"] = {container = "Baden-Württemberg"}, -- 1,550,000
["Nuremberg"] = {container = "Bavaria"}, -- 1,120,000
["Hanover"] = {"Lower Saxony"}, -- 1,090,000
["Bielefeld"] = {container = "North Rhine-Westphalia"}, -- 1,080,000
["Leipzig"] = {container = "Saxony"}, -- 1,080,000
["Aachen"] = {container = "North Rhine-Westphalia"}, -- 1,000,000
["Aix-la-Chapelle"] = {alias_of = "Aachen"}, -- historical; not a display alias
["Bremen"] = {},
}
export.germany_cities_group = {
default_container = "Đức",
canonicalize_key_container = make_canonicalize_key_container(", Germany", "state"),
default_placetype = "city",
data = export.germany_cities,
}
export.india_cities = {
-- This lists the 65 metro areas per Demographia's 2023 estimates, as found in
-- [[w:List_of_million-plus_urban_agglomerations_in_India]]. The last census in India (as of April 2025) was
-- conducted in 2011, and the results are not accurate any more.
["Delhi"] = {container = {key = "Delhi, India", placetype = "union territory"}}, -- 31,190,000
["Mumbai"] = {container = "Maharashtra"}, -- 25,189,000
["Kolkata"] = {container = "West Bengal"}, -- 21,747,000
["Bangalore"] = {container = "Karnataka", wp = "Bengaluru"}, -- 15,257,000
["Bengaluru"] = {alias_of = "Bangalore"},
["Chennai"] = {container = "Tamil Nadu"}, -- 11,570,000
["Hyderabad"] = {container = "Telangana"}, -- 9,797,000
["Ahmedabad"] = {container = "Gujarat"}, -- 8,006,000
["Pune"] = {container = "Maharashtra"}, -- 6,819,000
["Surat"] = {container = "Gujarat"}, -- 6,601,000
["Lucknow"] = {container = "Uttar Pradesh"}, -- 4,661,000
["Jaipur"] = {container = "Rajasthan"}, -- 4,360,000
["Kanpur"] = {container = "Uttar Pradesh"}, -- 4,350,000
["Indore"] = {container = "Madhya Pradesh"}, -- 3,765,000
["Nagpur"] = {container = "Maharashtra"}, -- 3,493,000
["Patna"] = {container = "Bihar"}, -- 3,331,000
["Varanasi"] = {container = "Uttar Pradesh"}, -- 3,229,000
["Kozhikode"] = {container = "Kerala"}, -- 3,049,000
["Thiruvananthapuram"] = {container = "Kerala"}, -- 2,851,000
["Agra"] = {container = "Uttar Pradesh"}, -- 2,737,000
["Bhopal"] = {container = "Madhya Pradesh"}, -- 2,562,000
["Coimbatore"] = {container = "Tamil Nadu"}, -- 2,551,000
["Allahabad"] = {container = "Uttar Pradesh", wp = "Prayagraj"}, -- 2,438,000
["Prayagraj"] = {alias_of = "Allahabad"},
["Kochi"] = {container = "Kerala"}, -- 2,381,000
["Ludhiana"] = {container = "Punjab"}, -- 2,205,000
["Vadodara"] = {container = "Gujarat"}, -- 2,182,000
["Chandigarh"] = {container = {key = "Chandigarh, India", placetype = "union territory"}}, -- 2,168,000
["Madurai"] = {container = "Tamil Nadu"}, -- 2,048,000
["Meerut"] = {container = "Uttar Pradesh"}, -- 2,011,000
["Visakhapatnam"] = {container = "Andhra Pradesh"}, -- 2,005,000
["Jamshedpur"] = {container = "Jharkhand"}, -- 1,925,000
["Malappuram"] = {container = "Kerala"}, -- 1,868,000
["Nashik"] = {container = "Maharashtra"}, -- 1,810,000
["Asansol"] = {container = "West Bengal"}, -- 1,720,000
["Aligarh"] = {container = "Uttar Pradesh"}, -- 1,660,000
["Ranchi"] = {container = "Jharkhand"}, -- 1,638,000
["Thrissur"] = {container = "Kerala"}, -- 1,578,000
["Kollam"] = {container = "Kerala"}, -- 1,576,000
["Jabalpur"] = {container = "Madhya Pradesh"}, -- 1,533,000
["Dhanbad"] = {container = "Jharkhand"}, -- 1,503,000
["Jodhpur"] = {container = "Rajasthan"}, -- 1,497,000
["Aurangabad"] = {container = "Maharashtra"}, -- 1,490,000
["Chhatrapati Sambhajinagar"] = {alias_of = "Aurangabad"},
["Rajkot"] = {container = "Gujarat"}, -- 1,487,000
["Gwalior"] = {container = "Madhya Pradesh"}, -- 1,477,000
["Raipur"] = {container = "Chhattisgarh"}, -- 1,429,000
["Gorakhpur"] = {container = "Uttar Pradesh"}, -- 1,410,000
["Kannur"] = {container = "Kerala"}, -- 1,360,000
["Bareilly"] = {container = "Uttar Pradesh"}, -- 1,355,000
["Guwahati"] = {container = "Assam"}, -- 1,355,000
["Moradabad"] = {container = "Uttar Pradesh"}, -- 1,345,000
["Amritsar"] = {container = "Punjab"}, -- 1,313,000
["Mysore"] = {container = "Karnataka"}, -- 1,296,000
["Bhilai"] = {container = "Chhattisgarh"}, -- 1,293,000
["Durg-Bhilainagar"] = {alias_of = "Bhilai"},
["Durg-Bhilai"] = {alias_of = "Bhilai"},
["Durg"] = {alias_of = "Bhilai"},
["Bhilainagar"] = {alias_of = "Bhilai"},
["Vijayawada"] = {container = "Andhra Pradesh"}, -- 1,232,000
["Srinagar"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,212,000
["Salem"] = {container = "Tamil Nadu", wp = "%l, %c"}, -- 1,189,000
["Kota"] = {container = "Rajasthan"}, -- 1,172,000
["Jalandhar"] = {container = "Punjab"}, -- 1,165,000
["Saharanpur"] = {container = "Uttar Pradesh"}, -- 1,152,000
["Dehradun"] = {container = "Uttarakhand"}, -- 1,136,000
["Tiruchirappalli"] = {container = "Tamil Nadu"}, -- 1,131,000
["Bhubaneswar"] = {container = "Odisha"}, -- 1,112,000
["Jammu"] = {container = {key = "Jammu and Kashmir, India", placetype = "union territory"}}, -- 1,103,000
["Solapur"] = {container = "Maharashtra"}, -- 1,082,000
["Hubli-Dharwad"] = {container = "Karnataka", wp = "Hubli–Dharwad"}, -- 1,062,000; wp with en dash
["Hubli"] = {alias_of = "Hubli-Dharwad"},
["Dharwad"] = {alias_of = "Hubli-Dharwad"},
["Puducherry"] = {container = {key = "Puducherry, India", placetype = "union territory"}}, -- 1,024,000
["Pondicherry"] = {alias_of = "Puducherry", display = true},
-- satellite/secondary cities of metro area (none in citypopulation.de)
["Ghaziabad"] = {container = "Uttar Pradesh"}, -- 1,729,000 city, 2,358,525 urban agglomeration per 2011 census; 3,406,061 2025 estimate from official website; part of Delhi metro area
["Faridabad"] = {container = "Haryana"}, -- 1,414,050 city per 2011 census; part of Delhi metro area
["Thane"] = {container = "Maharashtra"}, -- 1,841,488 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivli"] = {container = "Maharashtra"}, -- 1,246,381 city per 2011 census; part of Mumbai metro area
["Kalyan-Dombivali"] = {alias_of = "Kalyan-Dombivli", display = true},
["Kalyan"] = {alias_of = "Kalyan-Dombivli"},
["Dombivli"] = {alias_of = "Kalyan-Dombivli"},
["Dombivali"] = {alias_of = "Kalyan-Dombivli"},
["Vasai-Virar"] = {container = "Maharashtra"}, -- 1,221,233 city per 2011 census; part of Mumbai metro area
["Vasai"] = {alias_of = "Vasai-Virar"},
["Virar"] = {alias_of = "Vasai-Virar"},
["Navi Mumbai"] = {container = "Maharashtra"}, -- 1,120,547 city per 2011 census; part of Mumbai metro area
["Howrah"] = {container = "West Bengal"}, -- 1,077,075 city ("metropolis"), 2,811,344 "metro" per 2011 census; part of Kolkata metro area
["Pimpri-Chinchwad"] = {container = "Maharashtra"}, -- 1,727,692 per 2011 census; part of Pune metro area
["Pimpri Chinchwad"] = {alias_of = "Pimpri-Chinchwad", display = true},
}
export.india_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", India", "state"),
default_placetype = "city",
data = export.india_cities,
}
export.indonesia_cities = {
-- cities where the city proper has more than 1,000,000 people as of mid-2023 estimate
["Jakarta"] = {container = "Special Capital Region of Jakarta", divs = {
{type = "subdistricts", container_parent_type = false},
}},
["Surabaya"] = {container = "East Java"},
["Bekasi"] = {container = "West Java"}, -- part of Jakarta metro area
["Bandung"] = {container = "West Java"},
["Medan"] = {container = "North Sumatra"},
["Depok"] = {container = "West Java"}, -- part of Jakarta metro area
["Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Palembang"] = {container = "South Sumatra"},
["Semarang"] = {container = "Central Java"},
["Makassar"] = {container = "South Sulawesi"},
["South Tangerang"] = {container = "Banten"}, -- part of Jakarta metro area
["Batam"] = {container = "Riau Islands"},
["Bogor"] = {container = "West Java"}, -- part of Jakarta metro area
["Pekanbaru"] = {container = "Riau"},
["Bandar Lampung"] = {container = "Lampung"},
-- other metro areas over 1,000,000 people
["Padang"] = {container = "West Sumatra"},
["Samarinda"] = {container = "East Kalimantan"},
["Malang"] = {container = "East Java"},
["Yogyakarta"] = {container = "Special Region of Yogyakarta"},
["Denpasar"] = {container = "Bali"},
["Cirebon"] = {container = "West Java"},
["Surakarta"] = {container = "Central Java"},
["Banjarmasin"] = {container = "South Kalimantan"},
["Tasikmalaya"] = {container = "West Java"},
}
export.indonesia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Indonesia", "province"),
default_placetype = "city",
data = export.indonesia_cities,
}
export.italy_cities = {
-- Data per [[w:List_of_metropolitan_areas_of_Italy]]. There are several lists given; the most recent one, used
-- here, only gives estimates as of Jan 1, 2014.
["Milan"] = {container = "Lombardy"}, -- 6,623,798
["Naples"] = {container = "Campania"}, -- 5,294,546
["Rome"] = {container = "Lazio"}, -- 4,447,881
["Turin"] = {container = "Piedmont"}, -- 1,865,284
["Venice"] = {container = "Veneto"}, -- 1,645,900
["Florence"] = {container = "Tuscany"}, -- 1,485,030
["Bari"] = {container = "Apulia"}, -- 1,257,459
["Palermo"] = {container = "Sicily"}, -- 1,183,084
-- include a few just below 1,000,000 metro area that may be above it by now (depending on the definition).
["Catania"] = {container = "Sicily"}, -- 988,240
["Brescia"] = {container = "Lombardy"}, -- 924,090
["Genoa"] = {container = "Liguria"}, -- 861,318
}
export.italy_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Italy", "region"),
default_placetype = "city",
data = export.italy_cities,
}
export.japan_cities = {
-- Population figures from [[w:List of cities in Japan]]. Metro areas from
-- [[w:List of metropolitan areas in Japan]].
["Tokyo"] = {keydesc = "[[Tokyo]] Metropolis, the [[capital city]] and a [[prefecture]] of [[Japan]] (which is a country in [[Asia]])",
placetype = {"city", "prefecture"},
divs = {
{type = "special wards", container_parent_type = false},
{type = "cities", prep = "in"},
},
},
["Yokohama"] = {container = "Kanagawa"}, -- 3,697,894
["Osaka"] = {container = "Osaka"}, -- 2,668,586
["Nagoya"] = {container = "Aichi"}, -- 2,283,289
-- FIXME, Hokkaido is handled specially.
["Sapporo"] = {container = "Hokkaido"}, -- 1,918,096
["Fukuoka"] = {container = "Fukuoka"}, -- 1,581,527
["Kobe"] = {container = "Hyōgo"}, -- 1,530,847
["Kyoto"] = {container = "Kyoto"}, -- 1,474,570
["Kawasaki"] = {container = "Kanagawa", wp = "%l, Kanagawa"}, -- 1,373,630
["Saitama"] = {container = "Saitama", wp = "%l (city)", commonscat = "%l, %c"}, -- 1,192,418
["Hiroshima"] = {container = "Hiroshima"}, -- 1,163,806
["Sendai"] = {container = "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"] = {container = "Fukuoka"}, -- 986,998
["Chiba"] = {container = "Chiba", wp = "%l (city)", commonscat = "%l, %c"}, -- 938,695
["Sakai"] = {container = "Osaka"}, -- 835,333
["Niigata"] = {container = "Niigata", wp = "%l (city)", commonscat = "%l, %c"}, -- 813,053
["Hamamatsu"] = {container = "Shizuoka"}, -- 811,431
["Shizuoka"] = {container = "Shizuoka", wp = "%l (city)", commonscat = "%l, %c"}, -- 710,944
["Sagamihara"] = {container = "Kanagawa"}, -- 706,342
["Okayama"] = {container = "Okayama"}, -- 701,293
["Kumamoto"] = {container = "Kumamoto"}, -- 670,348
["Kagoshima"] = {container = "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"] = {container = "Tochigi"}, -- 507,833
}
export.japan_cities_group = {
default_container = "Nhật Bản",
canonicalize_key_container = make_canonicalize_key_container(" Prefecture, Japan", "prefecture"),
default_placetype = "city",
data = export.japan_cities,
}
export.mexico_cities = {
["Mexico City"] = {}, -- its own state
["Monterrey"] = {container = "Nuevo León"},
["Guadalajara"] = {container = "Jalisco"},
["Puebla"] = {container = "Puebla", wp = "%l (city)"},
["Toluca"] = {container = "State of Mexico"},
["Tijuana"] = {container = "Baja California"},
-- Include the state in the category for León due to possible confusion with León, Spain.
["León, Guanajuato"] = {container = "Guanajuato", wp = "%l, %c"},
["León"] = {alias_of = "León, Guanajuato"},
["Leon"] = {alias_of = "León, Guanajuato", display = true},
["Querétaro"] = {container = "Querétaro", wp = "%l (city)"},
["Queretaro"] = {alias_of = "Querétaro", display = true},
["Ciudad Juárez"] = {container = "Chihuahua"},
["Juárez"] = {alias_of = "Ciudad Juárez"},
["Juarez"] = {alias_of = "Ciudad Juárez", display = "Juárez"},
["Torreón"] = {container = "Coahuila"},
["Torreon"] = {alias_of = "Torreón", display = true},
-- Include the state in the category for Mérida due to possible confusion with Mérida, Spain or
-- Mérida, Venezuela.
["Mérida, Yucatán"] = {container = "Yucatán", wp = "%l, %c"},
["Mérida"] = {alias_of = "Mérida, Yucatán"},
["Merida"] = {alias_of = "Mérida, Yucatán", display = true},
["San Luis Potosí"] = {container = "San Luis Potosí", wp = "%l (city)"},
["San Luis Potosi"] = {alias_of = "San Luis Potosí", display = true},
["Aguascalientes"] = {container = "Aguascalientes", wp = "%l (city)"},
["Mexicali"] = {container = "Baja California"},
}
export.mexico_cities_group = {
default_container = "Mexico",
canonicalize_key_container = make_canonicalize_key_container(", Mexico", "state"),
default_placetype = "city",
data = export.mexico_cities,
}
export.nigeria_cities = {
-- Figures from citypopulation.de unless otherwise indicated; retrieved 2025-04-26; reference date 2025-01-01.
["Lagos"] = {container = "Lagos"}, -- 21,300,000 (unindicated; population of low reliability)
["Kano"] = {container = "Kano", wp = "%l (city)"}, -- 5,350,000 (unindicated; population of low reliability)
["Ibadan"] = {container = "Oyo"}, -- 3,400,000 (unindicated; population of low reliability)
["Abuja"] = {container = {key = "Federal Capital Territory, Nigeria", placetype = "federal territory"}}, -- 3,050,000 (unindicated; population of low reliability)
["Port Harcourt"] = {container = "Rivers"}, -- 2,250,000 (unindicated; population of low reliability)
["Kaduna"] = {container = "Kaduna"}, -- 1,980,000 (unindicated; population of low reliability)
["Benin City"] = {container = "Edo"}, -- 1,790,000 (unindicated; population of low reliability)
["Aba"] = {container = "Abia", wp = "%l, Nigeria"}, -- 1,280,000 (unindicated; population of low reliability)
["Onitsha"] = {container = "Anambra"}, -- 1,230,000 (unindicated; population of low reliability)
["Maiduguri"] = {container = "Borno"}, -- 1,190,000 (unindicated; population of low reliability)
["Ilorin"] = {container = "Kwara"}, -- 1,160,000 (unindicated; population of low reliability)
["Sokoto"] = {container = "Sokoto", wp = "%l (city)"}, -- 1,140,000 (unindicated; population of low reliability)
["Jos"] = {container = "Plateau"}, -- 1,110,000 (unindicated; population of low reliability)
["Zaria"] = {container = "Kaduna"}, -- 1,050,000 (unindicated; population of low reliability)
["Enugu"] = {container = "Enugu", wp = "%l (city)"}, -- 1,010,000 (unindicated; population of low reliability)
}
export.nigeria_cities_group = {
default_container = "Nigeria",
canonicalize_key_container = make_canonicalize_key_container(" State, Nigeria", "state"),
default_placetype = "city",
data = export.nigeria_cities,
}
export.pakistan_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Karachi"] = {container = "Sindh"}, -- 21,000,000 (Consolidated Urban Area)
["Lahore"] = {container = "Punjab"}, -- 14,600,000 (Consolidated Urban Area)
["Rawalpindi"] = {container = "Punjab"}, -- 5,600,000 (Consolidated Urban Area; including Islamabad)
["Islamabad"] = {container = {key = "Islamabad Capital Territory, Pakistan", placetype = "federal territory"}}, -- 5,600,000 (Consolidated Urban Area; including Rawalpindi)
["Faisalabad"] = {container = "Punjab"}, -- 4,125,000 (Consolidated Urban Area)
["Gujranwala"] = {container = "Punjab"}, -- 3,450,000 (Consolidated Urban Area)
-- there is also Hyderabad in India (very confusing)
["Hyderabad, Pakistan"] = {container = "Sindh", wp = "%l, %c"}, -- 2,475,000 (Consolidated Urban Area)
["Hyderabad"] = {alias_of = "Hyderabad, Pakistan"},
["Multan"] = {container = "Punjab"}, -- 2,425,000 (Consolidated Urban Area)
["Peshawar"] = {container = "Khyber Pakhtunkhwa"}, -- 2,150,000 (Consolidated Urban Area)
["Quetta"] = {container = "Balochistan"}, -- 1,720,000 (Urban Area)
["Sargodha"] = {container = "Punjab"}, -- 1,080,000 (Urban Area)
["Sialkot"] = {container = "Punjab"}, -- 1,050,000 (Consolidated Urban Area)
}
export.pakistan_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Pakistan", "province"),
default_placetype = "city",
data = export.pakistan_cities,
}
export.philippines_cities = {
-- Skipped some cities in Metro Manila (Taguig, Pasig) which don't have districts.
-- Other cities outside Metro Manila skipped as not central city in their urban area.
["Quezon City"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
-- Don't display-canonicalize Foo to Foo City as it may make the display weird.
["Quezon"] = {alias_of = "Quezon City"},
["Manila"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Davao City"] = {container = "Davao del Sur"},
["Davao"] = {alias_of = "Davao City"},
["Caloocan"] = {container = {key = "Metro Manila, Philippines", placetype = "region"}},
["Zamboanga City"] = {container = "Zamboanga del Sur"},
["Zamboanga"] = {alias_of = "Zamboanga City"},
["Cebu City"] = {container = "Cebu"},
["Cebu"] = {alias_of = "Cebu City"},
["Antipolo"] = {container = "Rizal"},
["Cagayan de Oro"] = {container = "Misamis Oriental"},
["Dasmariñas"] = {container = "Cavite"},
["Dasmarinas"] = {alias_of = "Dasmariñas", display = true},
["General Santos"] = {container = "South Cotabato"},
["San Jose del Monte"] = {container = "Bulacan"},
["Bacolod"] = {container = "Negros Occidental"},
["Calamba"] = {container = "Laguna", wp = "%l, %c"},
["Angeles"] = {container = "Pampanga", wp = "Angeles City"},
["Angeles City"] = {alias_of = "Angeles"},
["Iloilo City"] = {container = "Iloilo"},
["Iloilo"] = {alias_of = "Iloilo City"},
}
export.philippines_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Philippines", "province"),
default_placetype = "city",
data = export.philippines_cities,
}
export.russia_cities = {
-- Figures from citypopulation.de; retrieved 2025-04-26; reference date 2025-01-01.
["Moscow"] = {}, -- 18,800,000 (Agglomeration)
["Saint Petersburg"] = {}, -- 6,350,000 (Agglomeration)
["Novosibirsk"] = {container = "Novosibirsk Oblast"}, -- 1,820,000 (Agglomeration)
["Yekaterinburg"] = {container = "Sverdlovsk Oblast"}, -- 1,810,000 (Agglomeration)
["Nizhny Novgorod"] = {container = "Nizhny Novgorod Oblast"}, -- 1,620,000 (Agglomeration)
["Kazan"] = {container = {key = "Tatarstan, Russia", placetype = "republic"}}, -- 1,560,000 (Agglomeration)
["Chelyabinsk"] = {container = "Chelyabinsk Oblast"}, -- 1,430,000 (Agglomeration)
["Rostov-on-Don"] = {container = "Rostov Oblast"}, -- 1,390,000 (Agglomeration)
["Rostov-na-Donu"] = {alias_of = "Rostov-on-Don", display = true},
["Krasnodar"] = {container = {key = "Krasnodar Krai, Russia", placetype = "krai"}}, -- 1,370,000 (Agglomeration)
["Samara"] = {container = "Samara Oblast"}, -- 1,350,000 (Agglomeration)
["Krasnoyarsk"] = {container = {key = "Krasnoyarsk Krai, Russia", placetype = "krai"}}, -- 1,270,000 (Agglomeration)
["Ufa"] = {container = {key = "Bashkortostan, Russia", placetype = "republic"}}, -- 1,230,000 (Agglomeration)
["Saratov"] = {container = "Saratov Oblast"}, -- 1,170,000 (Agglomeration)
["Omsk"] = {container = "Omsk Oblast"}, -- 1,140,000 (Agglomeration)
["Voronezh"] = {container = "Voronezh Oblast"}, -- 1,130,000 (Agglomeration)
["Volgograd"] = {container = "Volgograd Oblast"}, -- 1,080,000 (Agglomeration)
["Perm"] = {container = {key = "Perm Krai, Russia", placetype = "krai"}, wp = "%l, Russia"}, -- 1,070,000 (Agglomeration)
}
export.russia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Russia", "oblast"),
default_container = "Nga",
default_placetype = "city",
data = export.russia_cities,
}
export.saudi_arabia_cities = {
-- Figures for the first five from [[w:List of cities and towns in Saudi Arabia]] as of 2022. Unclear if these are
-- metro, urban or city proper figures.
["Riyadh"] = {container = "Riyadh"}, -- 7,000,100; 7,700,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jeddah"] = {container = "Mecca"}, -- 3,751,917; 3,950,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Jedda"] = {alias_of = "Jeddah", display = true},
["Jiddah"] = {alias_of = "Jeddah", display = true},
["Jidda"] = {alias_of = "Jeddah", display = true},
["Dammam"] = {container = "Eastern"}, -- 2,638,166; 2,925,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Mecca"] = {container = "Mecca"}, -- 2,385,509; 2,675,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Makkah"] = {alias_of = "Mecca", display = true},
["Medina"] = {container = "Medina"}, -- 1,477,023; 1,530,000 per citypopulation.de 2025-01-01 (City)
["Hofuf"] = {container = "Eastern"}, -- 1,060,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushait"] = {container = "Aseer"}, -- 1,030,000 per citypopulation.de 2025-01-01 (Agglomeration)
["Khamis Mushayt"] = {alias_of = "Khamis Mushait", display = true},
}
export.saudi_arabia_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(" Province, Saudi Arabia", "province"),
default_placetype = "city",
data = export.saudi_arabia_cities,
}
export.south_korea_cities = {
-- All cities listed are not associated with any county.
["Seoul"] = {},
["Busan"] = {},
["Incheon"] = {},
["Daegu"] = {},
["Daejeon"] = {},
["Gwangju"] = {},
["Ulsan"] = {},
}
export.south_korea_cities_group = {
default_container = "Hàn Quốc",
canonicalize_key_container = make_canonicalize_key_container(" County, South Korea", "province"),
default_placetype = "city",
data = export.south_korea_cities,
}
export.spain_cities = {
["Madrid"] = {container = "Community of Madrid"},
["Barcelona"] = {container = "Catalonia"},
["Valencia"] = {container = "Valencia"},
["Seville"] = {container = "Andalusia"},
["Bilbao"] = {container = "Basque Country"},
}
export.spain_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", Spain", "autonomous community"),
default_placetype = "city",
data = export.spain_cities,
}
export.taiwan_cities = {
["New Taipei City"] = {},
["New Taipei"] = {alias_of = "New Taipei City", display = true},
["Taichung"] = {},
["Kaohsiung"] = {wp = "%l, Taiwan"},
["Taipei"] = {},
["Taoyuan"] = {},
["Tainan"] = {},
-- these last three are not special municipalities
["Chiayi"] = {placetype = "city"},
["Hsinchu"] = {placetype = "city"},
["Keelung"] = {placetype = "city"},
}
export.taiwan_cities_group = {
placename_to_key = false, -- don't add ", Taiwan" to make the key
canonicalize_key_container = make_canonicalize_key_container(", Taiwan", "county"),
default_container = "Đài Loan",
default_placetype = {"special municipality", "municipality", "city"},
default_is_city = true,
default_divs = {"districts"},
data = export.taiwan_cities,
}
-- NOTE: It's OK to mix cities from different constituent countries; as long as the immediate container is correct,
-- everything else will be figured out.
export.united_kingdom_cities = {
["London"] = {container = "Greater London"},
["Manchester"] = {container = "Greater Manchester"},
["Birmingham"] = {container = "West Midlands"},
["Liverpool"] = {container = "Merseyside"},
["Glasgow"] = {container = {key = "City of Glasgow, Scotland", placetype = "council area"}},
["Leeds"] = {container = "West Yorkshire"},
["Newcastle upon Tyne"] = {container = "Tyne and Wear"},
["Newcastle"] = {alias_of = "Newcastle upon Tyne"},
["Bristol"] = {container = {key = "England", placetype = "constituent country"}},
["Cardiff"] = {container = {key = "Wales", placetype = "constituent country"}},
["Portsmouth"] = {container = "Hampshire"},
["Edinburgh"] = {container = {key = "City of Edinburgh, Scotland", placetype = "council area"}},
-- under 1,000,000 people but principal areas of Wales; requested by [[User:Donnanz]]
["Swansea"] = {container = {key = "Wales", placetype = "constituent country"}},
["Newport"] = {container = {key = "Wales", placetype = "constituent country"}, wp = "Newport, Wales"},
}
export.united_kingdom_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(", England", "county"),
default_placetype = "city",
data = export.united_kingdom_cities,
}
export.united_states_cities = {
-- top 50 CSA's by population, with the top and sometimes 2nd or 3rd city listed
["New York City"] = {container = "New York", wp = "%l", divs = {
{type = "boroughs", container_parent_type = false},
}},
-- Don't display-canonicalize as it may make the display weird (e.g. in the context New York, New York).
["New York"] = {alias_of = "New York City"},
["Newark"] = {container = "New Jersey"},
["Los Angeles"] = {container = "California", wp = "%l"},
["Long Beach"] = {container = "California"},
["Riverside"] = {container = "California"},
["Chicago"] = {container = "Illinois", wp = "%l"},
["Washington, D.C."] = {wp = "%l"},
["Washington, DC"] = {alias_of = "Washington, D.C.", display = true},
["Washington D.C."] = {alias_of = "Washington, D.C.", display = true},
["Washington DC"] = {alias_of = "Washington, D.C.", display = true},
-- Don't display-canonicalize as it may make the display weird (e.g. if the holonym is followed by a District of
-- Columbia holonym).
["Washington"] = {alias_of = "Washington, D.C."},
["Baltimore"] = {container = "Maryland", wp = "%l"},
-- to avoid conflict with San Jose in Costa Rica
["San Jose, California"] = {container = "California"},
["San Jose"] = {alias_of = "San Jose, California"},
["San Francisco"] = {container = "California", wp = "%l"},
["Oakland"] = {container = "California"},
["Boston"] = {container = "Massachusetts", wp = "%l"},
["Providence"] = {container = "Rhode Island"},
["Dallas"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Fort Worth"] = {container = "Texas"},
["Philadelphia"] = {container = "Pennsylvania", wp = "%l"},
["Houston"] = {container = "Texas", wp = "%l"},
["Miami"] = {container = "Florida", wp = "%l", commonscat = "%l, %c"},
["Atlanta"] = {container = "Georgia", wp = "%l"},
["Detroit"] = {container = "Michigan", wp = "%l"},
["Phoenix"] = {container = "Arizona", wp = "%l", commonscat = "%l, %c"},
["Mesa"] = {container = "Arizona"},
["Seattle"] = {container = "Washington", wp = "%l"},
["Orlando"] = {container = "Florida"},
["Minneapolis"] = {container = "Minnesota", wp = "%l"},
["Cleveland"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Denver"] = {container = "Colorado", wp = "%l", commonscat = "%l, %c"},
["San Diego"] = {container = "California", wp = "%l", commonscat = "%l, %c"},
["Portland"] = {container = "Oregon"},
["Tampa"] = {container = "Florida"},
["St. Louis"] = {container = "Missouri", wp = "%l", commonscat = "%l, %c"},
["Saint Louis"] = {alias_of = "St. Louis", display = true},
["Charlotte"] = {container = "North Carolina"},
["Sacramento"] = {container = "California"},
["Pittsburgh"] = {container = "Pennsylvania", wp = "%l"},
["Salt Lake City"] = {container = "Utah", wp = "%l"},
["San Antonio"] = {container = "Texas", wp = "%l", commonscat = "%l, %c"},
["Columbus"] = {container = "Ohio"},
["Kansas City"] = {container = "Missouri", wp = "%l metropolitan area", commonscat = "%l, %c"},
["Indianapolis"] = {container = "Indiana", wp = "%l"},
["Las Vegas"] = {container = "Nevada", wp = "%l"},
["Cincinnati"] = {container = "Ohio", wp = "%l", commonscat = "%l, %c"},
["Austin"] = {container = "Texas"},
["Milwaukee"] = {container = "Wisconsin", wp = "%l", commonscat = "%l, %c"},
["Raleigh"] = {container = "North Carolina"},
["Nashville"] = {container = "Tennessee"},
["Virginia Beach"] = {container = "Virginia"},
["Norfolk"] = {container = "Virginia"},
["Greensboro"] = {container = "North Carolina"},
["Winston-Salem"] = {container = "North Carolina"},
["Jacksonville"] = {container = "Florida"},
["New Orleans"] = {container = "Louisiana", wp = "%l"},
["Louisville"] = {container = "Kentucky"},
["Greenville"] = {container = "South Carolina"},
["Hartford"] = {container = "Connecticut"},
["Oklahoma City"] = {container = "Oklahoma", wp = "%l"},
["Grand Rapids"] = {container = "Michigan"},
["Memphis"] = {container = "Tennessee"},
["Birmingham, Alabama"] = {container = "Alabama"},
["Birmingham"] = {alias_of = "Birmingham, Alabama"},
["Fresno"] = {container = "California"},
["Richmond"] = {container = "Virginia"},
["Harrisburg"] = {container = "Pennsylvania"},
-- any major city of top 50 MSA's that's missed by previous
["Buffalo"] = {container = "New York"},
-- any of the top 50 city by city population that's missed by previous
["El Paso"] = {container = "Texas"},
["Albuquerque"] = {container = "New Mexico"},
["Tucson"] = {container = "Arizona"},
["Colorado Springs"] = {container = "Colorado"},
["Omaha"] = {container = "Nebraska"},
["Tulsa"] = {container = "Oklahoma"},
-- skip Arlington, Texas; too obscure and likely to be interpreted as Arlington, Virginia
}
export.united_states_cities_group = {
default_container = "Hoa Kỳ",
canonicalize_key_container = make_canonicalize_key_container(", USA", "state"),
default_placetype = "city",
default_wp = "%l, %c",
data = export.united_states_cities,
}
export.new_york_boroughs = {
["Bronx"] = {the = true, wp = "The Bronx"},
["Brooklyn"] = {},
["Manhattan"] = {},
["Queens"] = {},
["Staten Island"] = {},
}
export.new_york_boroughs_group = {
default_container = {key = "New York City", placetype = "city"},
default_placetype = "borough",
default_is_city = true,
data = export.new_york_boroughs,
}
export.vietnam_cities = {
-- Figures from citypopulation.de (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Ho Chi Minh City"] = {}, -- 14,300,000 (Agglomeration; inclunding Bien Hoa)
["Saigon"] = {alias_of = "Ho Chi Minh City"},
["Hanoi"] = {}, -- 7,350,000 (Agglomeration)
["Da Nang"] = {}, -- 1,500,000 (Agglomeration)
["Danang"] = {alias_of = "Da Nang", display = true},
["Haiphong"] = {}, -- 1,450,000 (Agglomeration)
["Hai Phong"] = {alias_of = "Haiphong", display = true},
-- This is the one entry in this list that is not a province-level municipality; instead it's a "provincial city"
-- meaning it is directly under its province as opposed to being contained in a district.
["Bien Hoa"] = {placetype = "city", container = "Đồng Nai", wp = "Biên Hòa"}, -- 1,272,235 (2022 city population per Wikipedia)
["Biên Hòa"] = {alias_of = "Bien Hoa", display = true},
["Biên Hoà"] = {alias_of = "Bien Hoa", display = true},
-- These two not in citypopulation.de because the urban population may be slightly under 1,000,000, but they are
-- both province-level municipalities and close to the 1,000,000 mark.
["Can Tho"] = {wp = "Cần Thơ"}, -- 1,456,000 municipality (2019 census), 994,704 urban (2022 General Statistics Office of Vietnam estimate); capital [[Ninh Kiều district]]
["Cần Thơ"] = {alias_of = "Can Tho", display = true},
["Hue"] = {wp = "Huế"}, -- 1,257,000 municipality (2019 census), 840,000 urban (2022 General Statistics Office of Vietnam estimate); -- capital [[Thuận Hóa district]]
["Huế"] = {alias_of = "Hue", display = true},
}
export.vietnam_cities_group = {
placename_to_key = false, -- don't add ", Vietnam" to make the key
default_container = "Vietnam",
canonicalize_key_container = make_canonicalize_key_container(" Province, Vietnam", "province"),
-- Most of the cities listed are province-level municipalities in addition, which contain a certain amount of
-- rural territory surrounding the city, but not enough to separate the municipality from the city as distinct
-- known locations.
default_placetype = {"municipality", "city"},
default_is_city = true,
-- There may not be enough districts to subcategorize like this.
-- default_divs = "districts",
data = export.vietnam_cities,
}
export.misc_cities = {
------------------ Africa -------------------
-- Sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated; combined with data from
-- [[w:List of urban areas in Africa by population]].
["Algiers"] = {container = "Algeria"}, -- 4,325,000 (Consolidated Urban Area)
["Oran"] = {container = "Algeria"}, -- 1,640,000 (Consolidated Urban Area)
["Luanda"] = {container = "Angola"}, -- 9,650,000 (Urban Area)
["Benguela"] = {container = "Angola"}, -- 1,420,000 (Urban Area)
["Cotonou"] = {container = "Benin"}, -- 2,150,000 (Agglomeration)
["Ouagadougou"] = {container = "Burkina Faso"}, -- 3,425,000 (Agglomeration)
["Bobo-Dioulasso"] = {container = "Burkina Faso"}, -- 1,100,000 (Agglomeration)
["Bujumbura"] = {container = "Burundi"}, -- 1,143,202 (Urban Area 2023 per PopulationStat, cited in Wikipedia)
["Yaoundé"] = {container = "Cameroon"}, -- 3,975,000 (City)
["Yaounde"] = {alias_of = "Yaoundé", display = true},
["Douala"] = {container = "Cameroon"}, -- 3,900,000 (City)
["Bangui"] = {container = "Central African Republic"}, -- 1,680,000 (Agglomeration)
["N'Djamena"] = {container = "Chad"}, -- 1,950,000 (City)
["Ndjamena"] = {alias_of = "N'Djamena", display = true},
["Kinshasa"] = {container = "Democratic Republic of the Congo"}, -- 16,300,000 (City; population of low reliability)
["Lubumbashi"] = {container = "Democratic Republic of the Congo"}, -- 2,875,000 (City; population of low reliability)
["Mbuji-Mayi"] = {container = "Democratic Republic of the Congo"}, -- 2,500,000 (City; population of low reliability)
["Kananga"] = {container = "Democratic Republic of the Congo"}, -- 1,370,000 (City; population of low reliability)
["Kisangani"] = {container = "Democratic Republic of the Congo"}, -- 1,300,000 (City; population of low reliability)
["Bukavu"] = {container = "Democratic Republic of the Congo"}, -- 1,100,000 (City; population of low reliability)
["Goma"] = {container = "Democratic Republic of the Congo"}, -- 1,010,000 (City; population of low reliability)
["Tshikapa"] = {container = "Democratic Republic of the Congo"}, -- 1,020,468 (2023 Wikipedia [[w:List of cities with over one million inhabitants]] from populationstat.com; not in citypopulation.de)
["Cairo"] = {container = "Ai Cập"}, -- 22,800,000 (Agglomeration, including Giza and Subhra El Kheima)
["Alexandria"] = {container = "Ai Cập"}, -- 6,250,000 (Agglomeration)
["Giza"] = {container = "Ai Cập"}, -- 4,458,135 (2023 from citypopulation.de)
["Shubra El Kheima"] = {container = "Ai Cập"}, -- 1,240,239 (2021 from citypopulation.de)
["Asmara"] = {container = "Eritrea"}, -- 1,090,000 (City; population of low reliability)
["Asmera"] = {alias_of = "Asmara", display = true},
["Addis Ababa"] = {container = "Ethiopia"}, -- 4,825,000 (Agglomeration)
["Banjul"] = {container = "Gambia"}, -- 1,170,000 (Agglomeration)
["Accra"] = {container = "Ghana"}, -- 6,800,000 (Agglomeration)
["Kumasi"] = {container = "Ghana"}, -- 2,900,000 (Agglomeration)
["Conakry"] = {container = "Guinea"}, -- 2,975,000 (Consolidated Urban Area)
["Abidjan"] = {container = "Bờ Biển Ngà"}, -- 7,050,000 (Agglomeration)
["Nairobi"] = {container = "Kenya"}, -- 6,900,000 (unindicated)
["Mombasa"] = {container = "Kenya"}, -- 1,370,000 (City)
["Monrovia"] = {container = "Liberia"}, -- 1,940,000 (Urban Area)
["Tripoli"] = {container = "Libya", wp = "%l, %c"}, -- 1,870,000 (unindicated)
["Antananarivo"] = {container = "Madagascar"}, -- 3,150,000 (Agglomeration)
["Lilongwe"] = {container = "Malawi"}, -- 1,210,000 (City)
["Bamako"] = {container = "Mali"}, -- 5,700,000 (Agglomeration)
["Nouakchott"] = {container = "Mauritania"}, -- 1,500,000 (City)
["Casablanca"] = {container = {key = "Casablanca-Settat, Morocco", placetype = "region"}}, -- 4,450,000 (Municipality (urban population))
["Rabat"] = {container = {key = "Rabat-Sale-Kenitra, Morocco", placetype = "region"}}, -- 2,125,000 (Municipality (urban population))
["Tangier"] = {container = {key = "Tangier-Tetouan-Al Hoceima, Morocco", placetype = "region"}}, -- 1,410,000 (Municipality (urban population))
["Tanger"] = {alias_of = "Tangier", display = true},
["Tangiers"] = {alias_of = "Tangier", display = true},
["Fez"] = {container = {key = "Fez-Meknes, Morocco", placetype = "region"}, wp = "%l, Morocco"}, -- 1,310,000 (Municipality (urban population))
["Fes"] = {alias_of = "Fez", display = true},
["Fès"] = {alias_of = "Fez", display = true},
["Agadir"] = {container = {key = "Souss-Massa, Morocco", placetype = "region"}}, -- 1,270,000 (Municipality (urban population))
["Marrakesh"] = {container = {key = "Marrakesh-Safi, Morocco", placetype = "region"}}, -- 1,140,000 (Municipality (urban population))
["Marrakech"] = {alias_of = "Marrakesh", display = true},
["Maputo"] = {container = "Mozambique"}, -- 2,575,000 (Agglomeration)
["Niamey"] = {container = "Niger"}, -- 1,530,000 (City)
["Brazzaville"] = {container = "Republic of the Congo"}, -- 2,475,000 (Agglomeration)
["Pointe-Noire"] = {container = "Republic of the Congo"}, -- 1,480,000 (City)
["Kigali"] = {container = "Rwanda"}, -- 1,960,000 (Municipality (urban population))
["Dakar"] = {container = "Senegal"}, -- 4,225,000 (Agglomeration)
["Touba"] = {container = "Senegal"}, -- 1,320,000 (Agglomeration)
["Freetown"] = {container = "Sierra Leone"}, -- 1,420,000 (Agglomeration)
["Mogadishu"] = {container = "Somalia"}, -- 2,250,000 (unindicated; population of low reliability)
["Johannesburg"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 14,800,000 (Consolidated Urban Area; including Pretoria, Soweto, etc.)
["Cape Town"] = {container = {key = "Western Cape, South Africa", placetype = "province"}}, -- 5,100,000 (Consolidated Urban Area)
["Durban"] = {container = {key = "KwaZulu-Natal, South Africa", placetype = "province"}}, -- 3,900,000 (Consolidated Urban Area)
["Pretoria"] = {container = {key = "Gauteng, South Africa", placetype = "province"}}, -- 2,921,488 (2011 census)
["Port Elizabeth"] = {container = {key = "Eastern Cape, South Africa", placetype = "province"}, wp = "Gqeberha"}, -- 1,200,000 (Consolidated Urban Area)
["Gqeberha"] = {alias_of = "Port Elizabeth"}, -- official name; not a display alias
["Khartoum"] = {container = "Sudan"}, -- 7,200,000 (unindicated; population of low reliability)
["Dar es Salaam"] = {container = "Tanzania"}, -- 6,650,000 (Agglomeration)
["Mwanza"] = {container = "Tanzania"}, -- 1,340,000 (Agglomeration)
["Mwanza City"] = {alias_of = "Mwanza", display = true},
["Arusha"] = {container = "Tanzania"}, -- 1,190,000 (Agglomeration)
["Zanzibar"] = {container = "Tanzania"}, -- 1,030,000 (Agglomeration)
["Lomé"] = {container = "Togo"}, -- 2,625,000 (unindicated)
["Lome"] = {alias_of = "Lomé", display = true},
["Tunis"] = {container = "Tunisia"}, -- 2,725,000 (Municipality (urban population))
["Sousse"] = {container = "Tunisia"}, -- 1,180,000 (Municipality (urban population))
["Soussa"] = {alias_of = "Sousse", display = true},
["Kampala"] = {container = "Uganda"}, -- 4,300,000 (unindicated)
["Lusaka"] = {container = "Zambia"}, -- 3,000,000 (Consolidated Urban Area)
["Harare"] = {container = "Zimbabwe"}, -- 2,675,000 (Agglomeration)
------------------ Asia -------------------
-- sorted by country and then within the country, by decreasing population; figures from citypopulation.de
-- (retrieved 2025-04-26; reference date 2025-01-01) unless otherwise indicated.
["Kabul"] = {container = "Afghanistan"}, -- 5,250,000 (Agglomeration)
["Baku"] = {container = "Azerbaijan"}, -- 3,725,000 (Administrative Area (urban population))
["Manama"] = {container = "Bahrain"}, -- 1,560,000 (unindicated)
["Dhaka"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 23,100,000 (Agglomeration)
["Dacca"] = {alias_of = "Dhaka", display = true},
["Chittagong"] = {container = {key = "Chittagong Division, Bangladesh", placetype = "division"}}, -- 5,050,000 (Agglomeration)
["Gazipur"] = {container = {key = "Dhaka Division, Bangladesh", placetype = "division"}}, -- 2,674,697 (City per 2022; countied in citypopulation.de as part of Dhaka metro area)
["Khulna"] = {container = {key = "Khulna Division, Bangladesh", placetype = "division"}}, -- 1,210,000 (Agglomeration)
["Phnom Penh"] = {container = "Campuchia"}, -- 2,925,000 (Agglomeration)
["Tehran"] = {container = {key = "Tehran Province, Iran", placetype = "province"}}, -- 16,800,000 (Agglomeration)
["Teheran"] = {alias_of = "Tehran", display = true},
["Mashhad"] = {container = {key = "Razavi Khorasan Province, Iran", placetype = "province"}}, -- 3,475,000 (Agglomeration)
["Mashad"] = {alias_of = "Mashhad", display = true},
["Meshhed"] = {alias_of = "Mashhad", display = true},
["Meshed"] = {alias_of = "Mashhad", display = true},
["Isfahan"] = {container = {key = "Isfahan Province, Iran", placetype = "province"}}, -- 3,425,000 (Agglomeration)
["Esfahan"] = {alias_of = "Isfahan", display = true},
["Tabriz"] = {container = {key = "East Azerbaijan Province, Iran", placetype = "province"}}, -- 1,970,000 (Agglomeration)
["Shiraz"] = {container = {key = "Fars Province, Iran", placetype = "province"}}, -- 1,950,000 (Agglomeration)
["Ahvaz"] = {container = {key = "Khuzestan Province, Iran", placetype = "province"}}, -- 1,550,000 (Agglomeration)
["Qom"] = {container = {key = "Qom Province, Iran", placetype = "province"}}, -- 1,450,000 (City)
["Kermanshah"] = {container = {key = "Kermanshah Province, Iran", placetype = "province"}}, -- 1,130,000 (City)
["Baghdad"] = {container = "Iraq"}, -- 7,800,000 (Administrative Area (urban population))
["Basra"] = {container = "Iraq"}, -- 1,710,000 (Administrative Area (urban population))
["Mosul"] = {container = "Iraq"}, -- 1,550,000 (Administrative Area (urban population))
["Erbil"] = {container = "Iraq"}, -- 1,220,000 (Administrative Area (urban population))
["Kirkuk"] = {container = "Iraq"}, -- 1,160,000 (Administrative Area (urban population))
["Najaf"] = {container = "Iraq"}, -- 1,050,000 (Administrative Area (urban population))
["Tel Aviv"] = {container = "Israel"}, -- 3,000,000 (Agglomeration)
-- Jerusalem is not recognized internationally as part of either Israel or Palestine, but as a
-- [[w:corpus separatum]], so put the container as "châu Á" and list Israel and Palestine as additional parents for
-- categorization purposes.
["Jerusalem"] = {container = {key = "châu Á", placetype = "continent"},
addl_parents = {"Israel", "Palestine"}}, -- 1,080,000 (Agglomeration)
["Amman"] = {container = "Jordan"}, -- 6,150,000 (unindicated)
["Irbid"] = {container = "Jordan"}, -- 1,070,000 (unindicated)
["Almaty"] = {container = "Kazakhstan"}, -- 2,700,000 (Agglomeration)
["Alma-Ata"] = {alias_of = "Almaty"}, -- former name, sometimes still used; don't display-canonicalize
["Astana"] = {container = "Kazakhstan"}, -- 1,600,000 (Agglomeration)
["Shymkent"] = {container = "Kazakhstan"}, -- 1,370,000 (Agglomeration)
["Kuwait City"] = {container = "Kuwait"}, -- 5,050,000 (Agglomeration)
["Bishkek"] = {container = "Kyrgyzstan"}, -- 1,540,000 (Agglomeration)
["Beirut"] = {container = "Lebanon"}, -- 1,930,000 (unindicated; population of low reliability)
-- Kuala Lumpur is a federal capital city, not in any state
["Kuala Lumpur"] = {container = "Malaysia"}, -- 9,550,000 (Agglomeration)
-- there are various George Towns and Georgetowns
["George Town, Malaysia"] = {container = {key = "Penang, Malaysia", placetype = "state"}, wp = "%l, %c"}, -- 2,075,000 (Agglomeration)
["George Town"] = {alias_of = "George Town, Malaysia"},
["Ulaanbaatar"] = {container = "Mông Cổ"}, -- 1,610,000 (City)
["Ulan Bator"] = {alias_of = "Ulaanbaatar", display = true},
["Yangon"] = {container = "Myanmar"}, -- 5,650,000 (Municipality (urban population))
["Rangoon"] = {alias_of = "Yangon", display = true},
["Mandalay"] = {container = "Myanmar"}, -- 1,600,000 (Municipality (urban population))
["Kathmandu"] = {container = "Nepal"}, -- 3,175,000 (Agglomeration)
-- Pyongyang is a directly governed city, not in any province
["Pyongyang"] = {container = "Cộng hòa Dân chủ Nhân dân Triều Tiên"}, -- 3,025,000 (Administrative Area (urban population))
["Muscat"] = {container = "Oman"}, -- 1,620,000 (Agglomeration)
["Gaza"] = {container = "Palestine", wp = "Gaza City"}, -- 2,275,000 (unindicated)
["Gaza City"] = {alias_of = "Gaza"},
["Doha"] = {container = "Qatar"}, -- 2,650,000 (Agglomeration)
["Colombo"] = {container = "Sri Lanka"}, -- 4,975,000 (unindicated)
["Damascus"] = {container = "Syria"}, -- 3,975,000 (unindicated; population of low reliability)
["Aleppo"] = {container = "Syria"}, -- 1,980,000 (unindicated; population of low reliability)
["Dushanbe"] = {container = "Tajikistan"}, -- 1,270,000 (City)
["Bangkok"] = {container = "Thái Lan"}, -- 21,800,000 (Agglomeration)
-- Chiang Mai not in citypopulation.de, but 1,198,000 urban population in 2021 per Wikipedia
-- [[w:List_of_municipalities_in_Thailand#Largest_cities_by_urban_population]]
["Chiang Mai"] = {container = {key = "Chiang Mai Province, Thailand", placetype = "province"}},
["Chonburi"] = {container = {key = "Chonburi Province, Thailand", placetype = "province"}}, -- 1,570,000 (Agglomeration; including Pattaya)
-- metro area population stats from https://www.statista.com/statistics/255483/biggest-cities-in-turkey/ as of 2021;
-- second source is citypopulation.de reference date 2025-01-01.
["Istanbul"] = {placetype = {"city", "province"}, divs = {"districts"}, container = "Thổ Nhĩ Kỳ"}, -- 15.2 million; 16,000,000 (Agglomeration)
["İstanbul"] = {alias_of = "Istanbul", display = true},
["Ankara"] = {container = {key = "Ankara Province, Turkey", placetype = "province"}}, -- 5.15 million; 5,200,000 (Agglomeration)
["Izmir"] = {container = {key = "İzmir Province, Turkey", placetype = "province"}, wp = "İzmir"}, -- 2.95 million; 3,025,000 (Agglomeration)
["İzmir"] = {alias_of = "Izmir", display = true},
["Bursa"] = {container = {key = "Bursa Province, Turkey", placetype = "province"}}, -- 2.02 million; 2,200,000 (Agglomeration)
["Adana"] = {container = {key = "Adana Province, Turkey", placetype = "province"}}, -- 1.77 million; 1,780,000 (Agglomeration)
["Gaziantep"] = {container = {key = "Gaziantep Province, Turkey", placetype = "province"}}, -- 1.71 million; 1,750,000 (Agglomeration)
["Antalya"] = {container = {key = "Antalya Province, Turkey", placetype = "province"}}, -- 1.3 million; 1,400,000 (Agglomeration)
["Konya"] = {container = {key = "Konya Province, Turkey", placetype = "province"}}, -- 1.35 million; 1,390,000 (Agglomeration)
["Diyarbakır"] = {container = {key = "Diyarbakır Province, Turkey", placetype = "province"}}, -- 1.07 million; 1,100,000 (Agglomeration)
-- Diyarbakır is more common per Ngrams and Google Scholar, but Diyarbakir is the Kurdish form, so we should not
-- display-canonicalize to the Turkish form Diyarbakır.
["Diyarbakir"] = {alias_of = "Diyarbakır"},
["Mersin"] = {container = {key = "Mersin Province, Turkey", placetype = "province"}}, -- 1.03 million; 1,060,000 (Agglomeration)
["Ashgabat"] = {container = "Turkmenistan"}, -- 1,150,000 (Agglomeration)
["Dubai"] = {container = "United Arab Emirates"}, -- 6,050,000 (Agglomeration; including Sharjah)
["Abu Dhabi"] = {container = "United Arab Emirates"}, -- 1,850,000 (City)
["Sharjah"] = {container = "United Arab Emirates"}, -- 1,800,000 (Metro area 2022-2023 per Wikipedia; separate from Dubai)
["Tashkent"] = {container = "Uzbekistan"}, -- 3,850,000 (unindicated)
["Sanaa"] = {container = "Yemen"}, -- 3,275,000 (City; population of low reliability)
["Sana'a"] = {alias_of = "Sanaa", display = true},
["Aden"] = {container = "Yemen"}, -- 1,079,060 (?; 2023 estimate from World Population Review per Wikipedia)
------------------ Europe or Europe-like (Caucasus etc.) ---------------------
["Yerevan"] = {container = "Armenia"}, -- 1,520,000 (Agglomeration)
["Vienna"] = {container = "Áo"}, -- 2,375,000 (Agglomeration)
["Minsk"] = {container = "Belarus"}, -- 2,100,000 (unindicated)
["Brussels"] = {container = "Bỉ"}, -- 2,800,000 (Consolidated Urban Area)
["Antwerp"] = {container = "Bỉ"}, -- 1,270,000 (Consolidated Urban Area)
["Sofia"] = {container = "Bulgaria"}, -- 1,260,000 (Agglomeration)
["Zagreb"] = {container = "Croatia"},
["Prague"] = {container = "Czech Republic"}, -- 1,470,000 (Agglomeration)
["Brno"] = {container = "Czech Republic"}, -- 729,405 (metro area per Wikipedia as of 2024-01-01 Czech Statistical Office)
["Olomouc"] = {container = "Czech Republic"}, -- 102,293 (city; included only because someone went crazy creating Olomouc-related terms)
["Copenhagen"] = {container = "Đan Mạch"}, -- 1,800,000 (Consolidated Urban Area)
["Helsinki"] = {container = {key = "Uusimaa, Finland", placetype = "region"}}, -- 1,560,000 (Consolidated Urban Area)
["Tbilisi"] = {container = "Georgia"}, -- 1,430,000 (Agglomeration)
["Athens"] = {container = "Hy Lạp"},
["Thessaloniki"] = {container = "Hy Lạp"},
["Budapest"] = {container = "Hungary"},
-- FIXME, per Wikipedia "County Dublin" is now the "Dublin Region"
["Dublin"] = {container = {key = "County Dublin, Ireland", placetype = "county"}},
["Riga"] = {container = "Latvia"},
["Amsterdam"] = {container = {key = "North Holland, Netherlands", placetype = "province"}},
["Rotterdam"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
["The Hague"] = {container = {key = "South Holland, Netherlands", placetype = "province"}},
-- Christchurch (metro 546,600) and Wellington (metro 439,800) are too small to make it.
["Auckland"] = {container = {key = "Auckland, New Zealand", placetype = "region"}},
["Oslo"] = {container = {key = "Oslo, Norway", placetype = "county"}},
["Warsaw"] = {container = {key = "Masovian Voivodeship, Poland", placetype = "voivodeship"}},
["Katowice"] = {container = {key = "Silesian Voivodeship, Poland", placetype = "voivodeship"}},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Krakow" without accent.
["Krakow"] = {container = {key = "Lesser Poland Voivodeship, Poland", placetype = "voivodeship"}, wp = "Kraków"},
["Kraków"] = {alias_of = "Krakow", display = true},
["Cracow"] = {alias_of = "Krakow", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirm "Gdańsk" and "Poznań" with accent.
["Gdańsk"] = {container = {key = "Pomeranian Voivodeship, Poland", placetype = "voivodeship"}},
["Gdansk"] = {alias_of = "Gdańsk", display = true},
["Poznań"] = {container = {key = "Greater Poland Voivodeship, Poland", placetype = "voivodeship"}},
["Poznan"] = {alias_of = "Poznań", display = true},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Lodz" without accents.
["Lodz"] = {container = {key = "Lodz Voivodeship, Poland", placetype = "voivodeship"}, wp = "Łódź"},
["Łódź"] = {alias_of = "Lodz", display = true},
["Lisbon"] = {container = {key = "Lisbon District, Portugal", placetype = "district"}},
["Porto"] = {container = {key = "Porto District, Portugal", placetype = "district"}},
["Oporto"] = {alias_of = "Porto", display = true},
["Bucharest"] = {container = "Romania"},
["Belgrade"] = {container = "Serbia"},
["Stockholm"] = {container = "Thụy Điển"},
["Zurich"] = {container = "Switzerland"},
--- Ngrams (up through 2022) and Google Scholar (>= 2024) confirms the common form "Zurich" without umlaut.
--- Even Wikipedia uses the form without umlaut.
["Zürich"] = {alias_of = "Zurich", display = true},
["Kyiv"] = {container = "Ukraina"}, -- not in Kyiv Oblast
-- Don't display-canonicalize Kiev -> Kyiv because in ancient contexts, Kiev is still more common.
["Kiev"] = {alias_of = "Kyiv"},
["Kharkiv"] = {container = {key = "Kharkiv Oblast, Ukraine", placetype = "oblast"}},
["Odessa"] = {container = {key = "Odesa Oblast, Ukraine", placetype = "oblast"}, wp = "Odesa"},
-- Don't display-canonicalize Odesa -> Odessa because it may be interpreted as a political statement.
["Odesa"] = {alias_of = "Odessa"},
------------------ North America, South America ---------------------
-- Primary figures from citypopulation.de retrieved on 2025-04-26 (reference date 2025-01-01);
-- Wikipedia metropolitan figures from [[w:List of metropolitan areas in the Americas]] based on per-country data;
-- Wikipedia city limits figures from [[w:List of largest cities in the Americas]].
["Buenos Aires"] = {container = "Argentina"}, -- 16,800,000 (Consolidated Urban Area; 13,985,794 metropolitan area per Wikipedia)
["Córdoba, Argentina"] = {container = "Argentina", wp = "%l, %c"}, -- 1,810,000 (Consolidated Urban Area; 1,505,25 city limits per Wikipedia)
-- to avoid confusion with Córdoba in Spain
["Córdoba"] = {alias_of = "Córdoba, Argentina"},
["Cordoba"] = {alias_of = "Córdoba, Argentina", display = "Córdoba"},
["Rosario"] = {container = "Argentina", wp = "%l, Santa Fe"}, -- 1,510,000 (Consolidated Urban Area; 1,348,725 metropolitan area per Wikipedia)
["Mendoza"] = {container = "Argentina", wp = "%l, %c"}, -- 1,180,000 (Consolidated Urban Area)
["San Miguel de Tucumán"] = {container = "Argentina"}, -- 1,110,000 (Consolidated Urban Area)
["Tucumán"] = {alias_of = "San Miguel de Tucumán"},
["Tucuman"] = {alias_of = "San Miguel de Tucumán", display = "Tucumán"},
["Santa Cruz de la Sierra"] = {container = "Bolivia"}, -- 1,960,000 (Consolidated Urban Area); 1,606,671 (city limits per Wikipedia)
["Santa Cruz"] = {alias_of = "Santa Cruz de la Sierra"},
["La Paz"] = {container = "Bolivia"}, -- 1,870,000 (Consolidated Urban Area; composed of El Alto, now slightly larger, and La Paz)
["El Alto"] = {container = "Bolivia"},
["Cochabamba"] = {container = "Bolivia"}, -- 1,280,000 (Consolidated Urban Area)
["Santiago"] = {container = "Chile"}, -- 8,400,000 (Consolidated Urban Area; 6,903,479 city limits? per Wikipedia)
["Valparaíso"] = {container = "Chile"}, -- 1,060,000 (Consolidated Urban Area)
["Valparaiso"] = {alias_of = "Valparaíso"}, -- 1,060,000 (Consolidated Urban Area)
["Bogotá"] = {container = "Colombia"}, -- 10,600,000 (Agglomeration; 12,772,828 metropolitan area per Wikipedia)
["Bogota"] = {alias_of = "Bogotá", display = true},
["Medellín"] = {container = "Colombia"}, -- 4,350,000 (Agglomeration; 4,068,000 metropolitan area per Wikipedia)
["Medellin"] = {alias_of = "Medellín", display = true},
["Cali"] = {container = "Colombia"}, -- 2,975,000 (Agglomeration; 2,837,000 metropolitan area per Wikipedia)
["Barranquilla"] = {container = "Colombia"}, -- 2,375,000 (Agglomeration; 1,341,160 city limits per Wikipedia)
["Bucaramanga"] = {container = "Colombia"}, -- 1,380,000 (Agglomeration)
["Cartagena, Colombia"] = {container = "Colombia", wp = "%l, %c"}, -- 1,250,000 (Agglomeration)
-- to avoid confusion with Cartagena, Spain
["Cartagena"] = {alias_of = "Cartagena, Colombia"},
["Cúcuta"] = {container = "Colombia"}, -- 1,130,000 (Agglomeration)
["Cucuta"] = {alias_of = "Cúcuta", display = true},
-- to avoid conflict with San Jose, California
["San José, Costa Rica"] = {container = "Costa Rica", wp = "%l, %c"}, -- 2,450,000 (Municipality (urban population); 3,160,000 metropolitan area per Wikipedia)
["San José"] = {alias_of = "San José, Costa Rica"},
["San Jose"] = {alias_of = "San José, Costa Rica"}, -- display = "San José"; causes error due to San Jose alias for California city; FIXME
["Havana"] = {container = "Cuba"}, -- 2,150,000 (City; 2,137,847 city limits? per Wikipedia)
["Santo Domingo"] = {container = "Dominican Republic"}, -- 3,900,000 (Municipality (urban population); 4,274,651 ??? per Wikipedia)
["Guayaquil"] = {container = "Ecuador"}, -- 3,350,000 (Agglomeration; 3,092,000 metro area? per Wikipedia)
["Quito"] = {container = "Ecuador"}, -- 2,875,000 (Agglomeration; 2,889,703 metro area? per Wikipedia)
["San Salvador"] = {container = "El Salvador"}, -- 1,580,000 (Municipality (urban population))
["Guatemala City"] = {container = "Guatemala"}, -- 3,375,000 (Municipality (urban population); 3,160,000 metro area? per Wikipedia)
["Port-au-Prince"] = {container = "Haiti"}, -- 3,050,000 (Agglomeration; population of low reliability; 2,915,000 metro area? per Wikipedia)
["San Pedro Sula"] = {container = "Honduras"}, -- 1,330,000 (Consolidated Urban Area)
["Tegucigalpa"] = {container = "Honduras"}, -- 1,220,000 (Urban Area)
["Managua"] = {container = "Nicaragua"}, -- 1,400,000 (Consolidated Urban Area)
["Panama City"] = {container = "Panama"}, -- 1,430,000 (Urban Area)
["Asunción"] = {container = "Paraguay"}, -- 2,350,000 (Municipality (urban population))
["Lima"] = {container = "Peru"}, -- 12,000,000 (Agglomeration; 11,283,787 ??? per Wikipedia)
["Arequipa"] = {container = "Peru"}, -- 1,210,000 (Agglomeration)
["San Juan"] = {container = {key = "Puerto Rico", placetype = "commonwealth"}, wp = "%l, %c"}, -- 1,910,000 (Consolidated Urban Area)
["Montevideo"] = {container = "Uruguay"}, -- 1,810,000 (Agglomeration; 1,302,954 ??? per Wikipedia)
["Caracas"] = {container = "Venezuela"}, -- 3,850,000 (Consolidated Urban Area; 5,243,301 ??? per Wikipedia)
["Maracaibo"] = {container = "Venezuela"}, -- 2,825,000 (Consolidated Urban Area; 5,278,448 ??? per Wikipedia)
-- to avoid confusion with Valencia (city and autonomous community of Spain)
["Valencia, Venezuela"] = {container = "Venezuela", wp = "%l, %c"}, -- 2,100,000 (Consolidated Urban Area)
["Valencia"] = {alias_of = "Valencia, Venezuela"},
["Maracay"] = {container = "Venezuela"}, -- 1,480,000 (Consolidated Urban Area)
["Barquisimeto"] = {container = "Venezuela"}, -- 1,360,000 (Consolidated Urban Area)
}
export.misc_cities_group = {
canonicalize_key_container = make_canonicalize_key_container(nil, "quốc gia"),
default_placetype = "city",
data = export.misc_cities,
}
--[==[ var:
List of all known locations, in groups. The first group lists continents and continental regions, followed by three
groups listing top-level locations: countries, "country-like entities" (de-facto/unrecognized/etc. countries and
dependent territories) and former polities (countries, empires, etc.). After that come first-level subpolities
(administrative divisions) of several, mostly large, countries, followed by groups of cities. China and the United
Kingdom include second-level subpolities (in the case of China, only the largest ones as the full list runs in the
hundreds).
]==]
export.locations = {
export.continents_group,
export.countries_group,
export.country_like_entities_group,
export.former_countries_group,
export.australia_group,
export.austria_group,
export.bangladesh_group,
export.brazil_group,
export.bulgaria_group,
export.canada_group,
export.china_group,
export.china_prefecture_level_cities_group,
export.china_prefecture_level_cities_group_2,
export.egypt_group,
export.finland_group,
export.france_group,
export.france_departments_group,
export.germany_group,
export.greece_group,
export.india_group,
export.indonesia_group,
export.iran_group,
export.ireland_group,
export.italy_group,
export.japan_group,
export.laos_group,
export.lebanon_group,
export.malaysia_group,
export.malta_group,
export.mexico_group,
export.moldova_group,
export.morocco_group,
export.netherlands_group,
export.new_zealand_group,
export.nigeria_group,
export.north_korea_group,
export.norway_group,
export.pakistan_group,
export.philippines_group,
export.poland_group,
export.portugal_group,
export.romania_group,
export.russia_group,
export.saudi_arabia_group,
export.south_africa_group,
export.south_korea_group,
export.spain_group,
export.taiwan_group,
export.thailand_group,
export.turkey_group,
export.ukraine_group,
export.united_kingdom_group,
export.united_states_group,
export.england_group,
export.northern_ireland_group,
export.scotland_group,
export.wales_group,
export.vietnam_group,
export.australia_cities_group,
export.brazil_cities_group,
export.canada_cities_group,
export.france_cities_group,
export.germany_cities_group,
export.india_cities_group,
export.indonesia_cities_group,
export.italy_cities_group,
export.japan_cities_group,
export.mexico_cities_group,
export.nigeria_cities_group,
export.pakistan_cities_group,
export.philippines_cities_group,
export.russia_cities_group,
export.saudi_arabia_cities_group,
export.south_korea_cities_group,
export.spain_cities_group,
export.taiwan_cities_group,
export.united_kingdom_cities_group,
export.united_states_cities_group,
export.new_york_boroughs_group,
export.vietnam_cities_group,
export.misc_cities_group,
}
return export
9wsiigvqas7w3wkrf8j8wqd77p4o4h1
Bản mẫu:vi-numeral
10
282706
2350161
2103607
2026-05-04T16:12:39Z
EmausBot
33069
Giải quyết đổi hướng kép đến [[Bản mẫu:vi-num]]
2350161
wikitext
text/x-wiki
#đổi [[Bản mẫu:vi-num]]
03t7z2u5a6ez6sf9xj6kelad62b5s0s
Bản mẫu:vie-numeral
10
282708
2350162
2103609
2026-05-04T16:12:49Z
EmausBot
33069
Giải quyết đổi hướng kép đến [[Bản mẫu:vi-num]]
2350162
wikitext
text/x-wiki
#đổi [[Bản mẫu:vi-num]]
03t7z2u5a6ez6sf9xj6kelad62b5s0s
Thảo luận Thành viên:P. ĐĂNG
3
286760
2350184
2350131
2026-05-05T02:52:00Z
PANG450o
61183
Đã lùi lại sửa đổi [[Special:Diff/2350131|2350131]] của [[Special:Contributions/Hiyuune|Hiyuune]] ([[User talk:Hiyuune|thảo luận]])
2350184
wikitext
text/x-wiki
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào P. ĐĂNG! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 07:34, ngày 24 tháng 6 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV ở Wiktionary này không? Nếu có hứng thú, mời bạn ra ứng cử ở [[Thảo luận Wiktionary:Bảo quản viên]]. Tôi muốn tuyển thêm BQV cho Wiktionary vì Wiktionary hiện tại không có BQV thường trực. Đây là môi trường thực tập tốt trước khi làm ĐPV bên Wikipedia. Hồi xưa, tôi cũng đóng góp cho cả hai dự án cùng một lúc (Wikipedia + Wiktionary). [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:32, ngày 2 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tôi hay hoạt động bên đây thật nhưng bên đây tôi có ít sửa đổi. Chỉ vài tuần trước tôi xin quyền lùi sửa để chống phá hoại nhưng không đủ yêu cầu thì BQV làm sao tôi ứng cử được. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:33, ngày 2 tháng 8 năm 2023 (UTC)
::Bên Wiktionary không có yêu cầu tối thiểu để làm BQV. Bạn có đóng góp bên Wikipedia thì ra ứng cử là ok rồi. Quan trọng là bạn có muốn vác tù và hàng tổng không thôi? [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:23, ngày 2 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tất nhiên, nếu có cơ hội được công đồng giao phó thì tôi sẽ làm. Nhưng chắc tôi cần tích cực cày sửa đổi một thời gian vì hiện tại tôi có dưới 300 sửa đổi. Có thể, tôi nghĩ tôi sẽ tích cực bên dự án này vài tuần cái đã. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:27, ngày 2 tháng 8 năm 2023 (UTC)
::::Bạn tính vậy cũng được. Cày sửa đổi là dễ mà. 2 tuần sau, mời bạn tự ra ứng cử. Tôi sẽ ủng hộ. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:57, ngày 2 tháng 8 năm 2023 (UTC)
== Mệt nhỉ? ==
Tụi này lì như trâu thật, mới chập sáng đòi vặt lông bẻ cổ tổ tông nhà tôi này. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:43, ngày 3 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Tôi qua đây thì gặp TTS. Haha MTRIRod với bạn Phú nói đúng, tên này ám tôi như ma ám rồi. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:44, ngày 3 tháng 8 năm 2023 (UTC)
::Mà hình như bên vi chưa cấm tên [https://vi.wikipedia.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:%C4%90%C3%B3ng_g%C3%B3p/%C4%90%E1%BB%ABng_b%C6%A1_S%C6%A1n_n%E1%BB%AFa,_S%C6%A1n_c%C3%B4_%C4%91%C6%A1n_l%E1%BA%AFm! này] thì phải? – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:48, ngày 3 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Chắc cấm sót, mà TTS chắc không dùng lại tk đó đâu. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:50, ngày 3 tháng 8 năm 2023 (UTC)
::::Đâu, vừa nhắc xong thì hình như mới chửi Nguyenmy kìa. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:52, ngày 3 tháng 8 năm 2023 (UTC)
:::::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] @[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] @[[Thành viên:Tryvix1509|Tryvix1509]] @[[Thành viên:NguoiDungKhongDinhDanh|NguoiDungKhongDinhDanh]] Mà không biết tôi có nên đệ đơn cấm chỉ tên TTS này đến Nhóm Tin cậy & An toàn của tổ chức Wikimedia không nhỉ? – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 09:58, ngày 3 tháng 8 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tổ chức này hoạt động như thế nào?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:03, ngày 3 tháng 8 năm 2023 (UTC)
:::::::Tôi cũng chỉ [[m:WMF Global Ban Policy/vi|đọc thoáng qua sơ sơ về quy định cấm chỉ toàn hệ thống tổ chức này]], và thấy tổ chức hoạt động qua email ca@wikimedia.org – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:07, ngày 3 tháng 8 năm 2023 (UTC)
::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Là cấm chỉ một tk toàn cầu bên meta đúng không?. Chắc không cần rồi và cũng không hiệu quả. Tôi nhớ không lầm TTS bị cấm toàn cục từ tk đầu tiên rồi. Hiện giờ dùng proxy thì cấm toàn cục gì nữa. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:10, ngày 3 tháng 8 năm 2023 (UTC)
:::::::::Các tk rối của TTS như bạn nói chỉ bị khóa toàn cục = TTS vẫn chưa bị cấm chỉ trên toàn hệ thống. Tôi nghĩ biện pháp này là cách hay nhất để răn đe tên này, chắc tôi nghĩ để lúc khác làm sau vậy. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:17, ngày 3 tháng 8 năm 2023 (UTC)
::::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chẳng phải khóa toàn cầu là trên toàn hệ thống Wikipedia? TTS không dùng một tk cố định và dùng proxy. Cấm tk này thì sẽ nhảy qua tk khác bằng một IP khác. Đề xuất của bạn không rõ ràng, tôi chưa hiểu lắm. Nếu được thì làm ngay bây giờ luôn đi. Tôi mới báo cái tk của TTS lên meta cho tiếp viên cấm toàn cầu đấy, hai tk nãy giờ phá hoại hiện đang bị cấm. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:25, ngày 3 tháng 8 năm 2023 (UTC)
== Bản mẫu cảnh báo mới ==
Cảm ơn bạn đã tạo bản mẫu cánh báo về việc sử dụng Wiktionary để quảng cáo. Nhưng tôi thấy bên Wikipedia tiếng Việt [[:w:vi:Bản mẫu:Spam|trang Bản mẫu:Spam]] là dùng để báo cáo liên kết rác, vì vậy xin phép tôi được đổi tên bản mẫu [[Đặc biệt:So sánh di động/2119930|từ "spam-1" thành "Cb1-spam"]]. Tôi không biết việc làm của tôi có đúng không do bên Wikipedia tiếng Việt cũng có [[:w:vi:Bản mẫu:Cb1-spam|bản mẫu tên như thế này]] chắc dùng để cảnh báo thành viên về việc thêm liên kết quảng cáo trong bài. Và nếu bạn thấy tôi sai mong bạn hãy lùi lại. Cảm ơn bạn. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:54, ngày 14 tháng 8 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07]]: Cảm ơn Tiến Minh. Nhưng lần sau bạn hãy đọc kỹ nội dung bản mẫu, bản mẫu này không phải cảnh báo thêm link spam mà là thông tin quảng cáo, tức là khi tv tạo bài PR (trang mới, PR trong trang thảo luận, hoặc chèn thông tin PR) thì dùng bản mẫu này. Mỗi wiktionary hoạt động độc lập, cộng đồng bên ta vốn nhỏ bé và ít người nên đặt tên bản mẫu đừng thêm vài chữ làm rườm rà khó nhớ, hầu hết thành viên không dùng Twinkle và đặt biển thủ công nên tôi chọn tên ngắn để các bạn dễ dùng. Nhưng nếu bạn đã đổi thì để vậy cũng được vì tôi đang cần làm thêm vài thứ, nâng cấp một vài thứ thiết yếu và để tên tạm như thế cũng được nếu tương lai có phát sinh thêm tôi sẽ thay đổi một vài bản mẫu cho phù hợp và nhất quán. Sẵn đây tôi hỏi bạn có dùng Twinkle không? Nếu có cho tôi xin một vài ý kiến có được không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 16 tháng 8 năm 2023 (UTC)
::Do dự án đang trong phát triển về mảng tin học nên tôi nghĩ trang global.js trên Meta sẽ là giải pháp hay để cài công cụ. Các công cụ hữu ích tôi vừa tìm được cho dự án: Restorer của BrandonXLF, TwinkleGlobal của Xiplus và WarningDialog.js của Tryvix1509 và nhiều người khác. Tôi chưa hiểu câu hỏi bạn đặt ra cho lắm, nếu bạn đang hỏi về công cụ TwinkleMobile của Plantaest trên dự án này thì tôi nghĩ bạn nên hỏi Plantaest do công cụ vẫn chưa được Plantaest kích hoạt trên đây. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 18:07, ngày 17 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Ý tôi là việc dùng Twinkle của bạn trên đây có giống bên Wikipedia không? Nó có chức năng gắn biển, cảnh báo hay chỉ dừng lại ở chức năng lùi sửa. Tôi không dùng Twinkle trên đây, nên tôi mới hỏi bạn để biết thêm thông tin do tôi cần nâng cấp một vài bản mẫu và muốn kích hoạt nó vô Twinkle, tôi muốn Twinkle bên đây được cấu hình lại cho tiện và đầy đủ chức năng giống bên các dự án khác cho các bạn dùng. Tôi sẽ làm trong phạm vi có thể, nhưng chắc sẽ cần thời gian. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:38, ngày 18 tháng 8 năm 2023 (UTC)
::::Việc dùng Twinkle trên đây của tôi chỉ là để phục vụ mục đích tuần tra TĐGĐ trong việc lùi tất cả sửa đổi không thiện chí do tôi chưa có quyền lùi sửa. Nếu bạn muốn công cụ có thể cảnh báo thành viên thì công cụ WarningDialog.js của Tryvix có thể giúp bạn trong trường hợp này. Bạn nên hỏi Tryvix xem sao (tôi đã ping @[[Thành viên:Tryvix1509|Tryvix1509]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:14, ngày 21 tháng 8 năm 2023 (UTC)
::Quay lại chủ đề bản mẫu cảnh báo vừa tạo không biết có nên dùng bản mẫu '''khi mà trường hợp tài khoản đó bị chặn bởi bộ lọc sai phạm''' không chứ tôi ngày nào mà chả thấy mấy tài khoản spambot dùng Wiktionary để quảng cáo có chèn đường link không à dẫn tới việc bị chặn và bị ghi lại trong bộ lọc sai phạm mà không ai phát hiện ra. (bạn có thể xem đầy đủ tại [[Đặc biệt:Nhật trình sai phạm]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:23, ngày 21 tháng 8 năm 2023 (UTC)
:::[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Thế thì dùng vậy cũng được, để tôi chỉnh lại bản mẫu cho ý tựu chung hơn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 22 tháng 8 năm 2023 (UTC)
== BQV ==
Rất vui vì bạn đã dũng cảm ra vác tù và hàng tổng. Tôi sẽ ủng hộ. Tuy nhiên, bạn cần gửi thư mời tham gia BQ BQV đến các thành viên trên Wiktionary (tv tích cực lẫn tv thỉnh thoảng xuất hiện). Chúc bạn đắc cử! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 05:55, ngày 24 tháng 8 năm 2023 (UTC)
:Tôi mới cấp quyền cho bạn. Chúc bạn tiếp tục hoạt động tích cực ở cả hai dự án, trao dồi thêm kinh nghiệm bảo quản và vài tháng nữa tự ra ứng cử làm ĐPV ở Wikipedia. Tôi sẽ ủng hộ nếu như không có gì thay đổi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 20:52, ngày 2 tháng 9 năm 2023 (UTC)
== Thư mời tham gia biểu quyết ==
<div style="padding: 0.5em; background: #f8f8ff; margin-top: 1em; font-size: 1em">
{| class="table" style="width: 80%; background-color: #ACE1AF; border: 1px solid #fceb92; margin: auto; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[Tập tin:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | '''Mời bạn cho ý kiến về việc cấp quyền Bảo quản viên cho thành viên [[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] tại trang [[Thảo luận Wiktionary:Bảo quản viên#DefenderTienMinh07|Thảo luận Wiktionary:Bảo quản viên]]. Xin cảm ơn.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!
|}
</div> [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:25, ngày 24 tháng 8 năm 2023 (UTC)
== Bất ngờ chưa! ==
Tôi tới đây là để thông báo một tin vui cho bạn. {{ý kiến|1=Tin vui là:}} Hiện tại bạn '''đã là BQV trên dự án Wiktionary tiếng Việt'''. Bạn lúc này cảm thấy thể nào? Mong bạn sẽ làm tốt công việc của mình như tôi đã nói lúc bỏ phiếu. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 21:02, ngày 2 tháng 9 năm 2023 (UTC)
:Tôi cũng không biết nói thế nào, nhưng cảm ơn bạn và Phú cũng như các thành viên khác đã hỗ trợ tôi từ dự án này qua dự án khác. Từ nay, tôi đảm nhận thêm nhiều nhiệm vụ hơn trên Wiktionary nên sẽ cố gắng chọn cách làm hiệu quả tốt nhất cho dự án. Tôi ít nói quá, vài dòng trên là tất cả, tôi không nghĩ thêm được gì để diễn tả hết. Cảm ơn vì thông báo này. Chúc bạn một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:50, ngày 3 tháng 9 năm 2023 (UTC)
== Một số sửa đổi của bạn gần đây ==
Chào bạn!
Về một số sửa đổi của bạn gần đây, như tại [[khả năng]], [[chứng minh]], ... Nếu phần định nghĩa có các từ kiểu như "nước ta", "nhân dân ta", ... thì ta nên thay bằng các từ khác hoặc xóa đi. Còn nếu nó có ở phần vd thì không cần xóa do phần này chấp nhận chứa các từ như vậy--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 12:48, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Đúng vậy, tôi đã xoá chúng đi vì Wiktionary:Thái độ trung lập. Wiktionary có quy định về phần vd được phép ngoại lệ này không?. Tôi đã có nói chuyện với HCV Mxn về điều này. Tôi khẳng định nó không trung lập và xoá đi là cần thiết, và sẽ bổ sung phần ví dụ mới vào. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:19, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Hiện tại trên dự án không có trang nào tên là [[Wiktionary:Thái độ trung lập]]. Chả là bạn muốn tìm trang quy định liên quan tới vấn đề chăng? – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:29, ngày 16 tháng 9 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chưa có chứ không phải không. Các dự án Wikipedia đều hoạt động hướng đến chung là thái độ trung lập. Wiktionary tiếng Việt không phải Wiktionary Việt Nam. HCV Mxn cũng đi xoá những thứ này. Khi dùng từ như "dân ta, nhân dân ta", khi người nước ngoài đọc, bạn nghĩ sao về điều này? Chúng ta hướng đến một dự án phục vụ mọi người, mọi chủng tộc và quốc gia, không phải riêng một đất nước nào. Vì vậy, mỗi dòng viết ra phải dựa trên thái độ trung lập. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:36, ngày 16 tháng 9 năm 2023 (UTC)
::::Bạn nói cũng đúng vì theo quy định bên Wiktionary tiếng Anh "all entries must be written from a '''neutral point of view''', representing views fairly and without bias" (tạm dịch: Mọi nội dung được đưa vào đều phải được viết từ một cái nhìn trung lập, thể hiện cái nhìn công bằng và không thiên kiến). Nhưng tôi nghĩ cũng không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV vì nội dung không trung lập thường nó cũng không ảnh hưởng gì nhiều đến dự án lắm. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:46, ngày 16 tháng 9 năm 2023 (UTC)
:::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Đây là điều đương nhiên. Chúng ta đang hoạt động trên đâu? Wiktionary là dự án bách khoa, nó ưu tiên thái độ trung lập, nơi mà một người Mỹ có thể qua đọc bài viết của một Wikimedia tiếng Đức, tiếng Việt hay tiếng Trung. Khi không trung lập, bạn nói không nhất thiết sửa lại là sao?. Đến nay tôi mới phát hiện Wiktionary tiếng Việt đang có văn phong không trung lập rất nhiều, trích câu Hồ Chí Minh, dùng thơ... Tôi cần BQV TheHighFighter2 phản hồi điều này, lẽ ra phải thảo luận với tôi trước khi lùi sửa, thứ mang tính chất mâu thuẫn. Nếu có quy định nào nói phần ví dụ ta được ngoại lệ thì tôi sẽ xem lại sửa đổi của mình. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:53, ngày 16 tháng 9 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi dám chắc là không có quy định nào về ngoại lệ này cả. Không trung lập mới là đi ngược với quy định của bách khoa. Nội dung trên đây vốn đa phần được sao chép từ FVDP một dự án không có quy định tính trung lập, khi dùng nó đưa vô thì phải xem xét ở một vài khía cạnh chứ không copy là xong được. Wiktionary không phải từ điển của Việt Nam, nó cũng không phải sách giáo khoa, không dùng văn phong thiên vị một phía, thêm thơ lại không trung lập. Bạn sang các Wiktionary tiếng khác xem, có nền tảng wiki nào dùng những câu ví dụ như "nhân dân ta chiến đấu bảo vệ tổ quốc" "chiến tranh chống đế quốc Mỹ", có xuất hiện không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:58, ngày 16 tháng 9 năm 2023 (UTC)
1. Bên en có rất nhiều mục có vd chứa các từ "[https://en.wiktionary.org/w/index.php?search=%22our+country%22&title=Special:Search&profile=advanced&fulltext=1&ns0=1 our country]", "[https://en.wiktionary.org/w/index.php?search=%22n%C6%B0%E1%BB%9Bc+ta%22&title=Special:Search&ns0=1&searchToken=12thcn782xmsjc7aixwau68ok nước ta]; bên fr có "[https://fr.wiktionary.org/w/index.php?search=%22notre+pays%22&title=Sp%C3%A9cial:Recherche&profile=advanced&fulltext=1&searchengineselect=mediawiki&ns0=1&ns100=1&ns106=1&ns110=1&searchToken=vol8t2pu9urr4hv60l40oom8 notre pays]" (đất nước chúng tôi)
2. Khi lấy vd cho mục "[[Đảng ta]]", "[[Mĩ nguỵ]]", "[[ba que]]" thì ta nên lấy vd như nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 15:57, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin gửi bạn một phần tin nhắn của tôi với HCB Mxn: "tất cả các câu thí dụ này được nhập từ Dự án Từ điển tiếng Việt miễn phí (FVDP), dự án này sao chép nguyên cả lời định nghĩa từ một số từ điển khác, có lẽ bao gồm những cuốn từ điển trong nước. (FVDP cũng có nhiều danh ngôn của Hồ Chí Minh.) Mấy năm nay tôi cũng muốn gạt đi những câu thí dụ không trung lập hoặc sửa lại theo thuật ngữ trung lập hơn. Đây chỉ là một trong rất nhiều điều thiếu sót của việc nhập FVDP. Nếu bạn có thể giúp dọn dẹp các câu thí dụ và danh ngôn thì tốt quá". Những từ tiếng Việt được xây dựng bên en cũng đa phần dùng bot và người mở rộng có cả những tv người Việt (từ ngoại quốc có thể không bị kiểm duyệt gắt gao khi người kiểm duyệt không am hiểu thứ tiếng, giống như có tv nào tạo bài tiếng phạn hay chữ Hán bên đây chúng ta thì có thể tỷ lệ phần trăm sai phạm bị bỏ qua sẽ nhiều hơn các từ hệ chữ chúng ta dùng). Còn bên fr, bạn xem ví dụ của họ có liên quan đến chủ thể cỡ nào? Nó đáng bao nhiêu phần trăm? Rõ ràng như Wiktionary vi không?. Về trường hợp lấy ví dụ của các từ như "Đảng ta" "Mĩ ngụy" thì đây là một từ, trích quy định "Tất cả các bài viết và các nội dung bách khoa khác tại Wikipedia phải được viết trên một quan điểm trung lập (QDTL), thể hiện một cách công bằng và không thiên vị" tôi nghĩ bạn đủ khả năng tự suy ra hướng tôi đang muốn nói. Khi bạn dùng từ này vô trường hợp như "Mĩ ngụy xâm chiếm nước ta" --> ám chỉ rõ ràng đây là dự án tiếng Việt và nước ta là Việt Nam. Bản chất từ tôi không nói nó vi phạm thái độ trung lập, nhưng tùy ngữ cảnh mà bạn đưa vào là một vấn đề đấy. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:18, ngày 16 tháng 9 năm 2023 (UTC)
:Thì thế tôi mới nói "không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV" đó. Nội dung không trung lập không có nghĩa là nội dung đó không hữu ích. Nói chung là tùy trường hợp, hợp lý là được miễn sao nội dung đó không quá khích. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:12, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Bạn có biết đang nói cái gì không vậy? Không trung lập = vi phạm quy định. Sửa đổi sai đang cần sửa nhưng bạn lại nói không cần thiết?. WP:Thái độ trung lập là một trong những trụ cột của Wikimedia, cho dù đó là sửa đổi thiện chí nhưng vi phạm thì cũng không cần. Dự án chúng ta các tv đã không còn khả năng sửa điều này? Nếu không, tại sao chấp nhận nó?. Sao có thể nhưng không thay bằng một nội dung vừa hữu ích vừa phù hợp với chính sách của ta hơn. Tôi không hiểu bạn Tiến Minh nói không nhất thiết giải quyết những điều này là gì? Bên Wikipedia có nhiều tk bị cấm vì thái độ trung lập đấy và thành viên không kiểm soát được điều này nên mấy tk này quay lại và thành rối nằm vùng. Phần nội dung hiện rõ lên vậy, bạn lại nói là không quá khích. Thế nào là quá khích, đủ để các tv bắt tay vào làm? Tôi xin nhắc lại, Wiktionary tiếng Việt không phải Wiktionary Việt Nam. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:26, ngày 16 tháng 9 năm 2023 (UTC)
Hướng giải quyết:
Nếu 1 mục từ bình thường có vd chứa các từ như trên: thay thế vd khác.
Còn các từ liên quan đến chính trị, trường hợp đặc biệt khác, thì có thể lấy vd chứa những từ như trên.
Bạn thấy thế nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 16:53, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin phiền bạn đưa phần tin nhắn này ra trang thảo luận vì Tiến Minh đã gửi thư nên tôi đã di chuyển nó ra thảo để mọi người có thể cùng nhau giải quyết. Cảm ơn bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:00, ngày 16 tháng 9 năm 2023 (UTC)
:''Đã di chuyển đến [[Wiktionary:Thảo luận#Tính trung lập]].'' – [[Thành viên:Mxn|Nguyễn Xuân Minh]] <sup>[[Thảo luận Thành viên:Mxn|<span style="display: inline-block;">💬</span>]]</sup> 01:56, ngày 17 tháng 9 năm 2023 (UTC)
== [[Cửu đoạn tuyến]] ==
Phiền bạn check và gỡ một số nội dung không trung lập trong mục từ này (nếu có), tôi thấy có nội dung không trung lập nhưng chưa thể gỡ do liên quan đến mục từ, xin cảm ơn. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 11:34, ngày 10 tháng 10 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi không thấy có thông tin nào là không trung lập, bài viết có nội dung rất ít, đây là bài do bạn khởi tạo. Nếu vẫn còn tin phần nào là không trung lập, bạn cứ thoải mái dẫn vào đây tôi xem. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:42, ngày 10 tháng 10 năm 2023 (UTC)
== Kay ==
Kay đang diễn tuồng và giả làm Ti2008. Ti2008 và tôi thật là bạn thân trên Wikipedia và đã biết nhau từ năm 2008 rồi. Cách nói chuyện đó chỉ có thể là Kay. Mai mốt, nếu Kay tái xuất ở đây thì bạn cứ việc cấm vô hạn. Nếu là Ti2008 thật thì bạn ấy sẽ log vào acc Ti2008 để nói chuyện với tôi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 23:34, ngày 14 tháng 12 năm 2023 (UTC)
== [[Thành viên:WhoAlone]] ==
Bạn nên đề cử tv này luôn để dự án chúng ta có thêm 2 BQV mới rất tích cực! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 02:58, ngày 31 tháng 12 năm 2023 (UTC)
== Hellu bạn ==
Nay có nhã hứng ghé qua đây chút, tui đang tính đóng góp dự án này và duy trì bên Wikiquote (bên đó sau vụ thi viết bài là lại vắng). Nên là bạn có thể giới thiệu sơ sơ về cách hoạt động bên này không? [[Thành viên:Pminh141|Pminh141]] ([[Thảo luận Thành viên:Pminh141|thảo luận]]) 18:22, ngày 23 tháng 7 năm 2024 (UTC)
:[[Thành viên:Pminh141|Pminh141]] Chỉ cần xem [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion# Wiktionary:Độ nổi bật] và [https://en.wiktionary.org/wiki/Wiktionary:Neutral_point_of_view Thái độ trung lập] là có thể đóng góp (có thể tham khảo từ điển để viết). Dự án còn rất sơ khai về mảng quy định, tương lai tôi sẽ dự tính soạn thảo tập trung vô mảng này. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 02:24, ngày 24 tháng 7 năm 2024 (UTC)
== Đổi thay ==
Phiền bạn giúp cấp lại quyền lùi sửa và gỡ quyền tại acc chính với ạ, Bạn có thể xem [[w:en:Wikipedia:Administrators' noticeboard#Unmerge my account from global|tại thảo luận này]], xin cảm ơn. – [[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]] ([[Thảo luận Thành viên:TienMinh-mun6xnChing|thảo luận]]) 12:01, ngày 29 tháng 10 năm 2024 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:54, ngày 29 tháng 10 năm 2024 (UTC)
== Các công cụ (tập lệnh) ở Wiktionary ==
Phiên bản sắp tới của Zinnia sẽ mở rộng cho phép sử dụng ở Wiktionary. Tôi muốn hỏi trong quy trình làm việc ở đây, bạn và mọi người có sử dụng công cụ hay tập lệnh (script) gì không, để bổ sung vào Zinnia. Cảm ơn. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
: Tag thêm @[[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]]. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
::[[Thành viên:Plantaest|Plantaest]] Các công cụ hay script để chống phá hoại thông thường các tv sẽ tự cài đặt ở Meta. Vì Wiktionary chỉ có mỗi BQV mới có bộ công cụ đầy đủ chức năng (gồm cả thao tác đánh dấu tuần tra), trừ "lùi sửa" vì có quyền riêng cho tác này. Do khác Wikipedia vấn đề này, tôi nghĩ giao diện cần nghiên cứu thêm nếu áp dụng. P/s Tôi dùng Restorer thay cho Twinkle (khi hồi sửa). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:02, ngày 2 tháng 11 năm 2024 (UTC)
== Cần hỗ trợ về quyết định xóa bài ==
Em đang chỉnh sửa bài đăng và không biết là add vào gây spam, phiền anh hỗ trợ em với ạ – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 11:34, ngày 17 tháng 12 năm 2024 (UTC)
:Theo [https://vi.wiktionary.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:Nh%E1%BA%ADt_tr%C3%ACnh/Nntrinh76 nhật trình], bài viết bạn tạo mang nội dung vượt ngoài dự án (Wiktionary chỉ bao gồm các mục từ). Bài viết này cũng có nội dung PR cá nhân. Đó là lý do cho việc nhắc nhở. Mời bạn tham khảo [[Wiktionary:Quy định và hướng dẫn]] để rút kinh nghiệm cho các lần sửa đổi sau. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 13:16, ngày 17 tháng 12 năm 2024 (UTC)
::anh có thể mở để em chỉnh sửa được không ạ? do cũng là lần đầu em viết và em đã dùng 2 ngày tổng hợp.. – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 15:35, ngày 17 tháng 12 năm 2024 (UTC)
:::Trang bạn đã tạo không liên quan gì đến Wiktionary cả, tại vì đây là trang từ điển, không phải là nơi để tạo hoặc chỉnh sửa bài viết. Cho nên tôi, Đăng hoặc bqv khác không thể mở khóa cái trang đó được. – [[Thành viên:Nguyên Hưng Trần|<span style="color:#74a12e;font-family:Georgia, serif;">'''NHT'''</span>]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|💬]]) 16:15, ngày 17 tháng 12 năm 2024 (UTC)
== lời cảm ơn ==
Cảm ơn vì đã trả lời trên [[Thảo_luận:bồ_các]], vì đó là không gian công cộng nên không tiện. Không biết nhấn nút cảm ơn thì kết quả sẽ được chuyển đến người đó hay kq sẽ như thế nào nhỉ, vì nhấn nhiều lần rồi nhưng không biết sẽ như thế nào? Mình có ai cảm ơn đâu, còn IP thì không cảm ơn được. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:05, ngày 13 tháng 2 năm 2025 (UTC)
:Từ người thực hiện, chuyển đến người được nhận. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:02, ngày 13 tháng 2 năm 2025 (UTC)
== Xin chào ==
Nếu có thể tôi cần giúp đỡ – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:32, ngày 14 tháng 3 năm 2025 (UTC)
:[[Thành viên:Henrydat|Henrydat]] Bạn có thể nêu vấn đề cụ thể. Nếu là các việc liên quan dự án, tôi sẽ giúp trong khả năng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:42, ngày 14 tháng 3 năm 2025 (UTC)
::Ô trời, tim tôi đang đập đây, tôi thấy chữ rối ở đây bạn biết tôi là ai còn hỏi? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:50, ngày 14 tháng 3 năm 2025 (UTC)
:::Này tôi không có thời gian, tới giờ này thì việc này rất gấp? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:55, ngày 14 tháng 3 năm 2025 (UTC)
::::tất nhiên tôi không có ý nói tôi là rối, tôi chỉ xem lịch sử đóng góp nói vậy thôi, nếu bạn biết trước tôi là ai thì mới giúp được – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:58, ngày 14 tháng 3 năm 2025 (UTC)
:::::Rồi xong tôi đã đến lộn chỗ, quyết định không hoạt đông tại dự án này là quyết định đúng đắn – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 18:02, ngày 14 tháng 3 năm 2025 (UTC)
::::::Cần lưu ý cơ chế cấm người dùng hoạt động độc lập trên mỗi dự án, tức là ngoại trừ việc lạm dụng xuyên wiki hoặc bị cấm chỉ, thành viên vẫn có thể hoạt động và xem như một tài khoản bình thường khi qua dự án khác. Bạn vẫn có thể hoạt động tại đây và tuân theo quy định tại dự án này; ngược lại, bạn có tùy quyền quyết định không tham gia đóng góp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 07:44, ngày 15 tháng 3 năm 2025 (UTC)
:::::::Này chúng ta có thể tiếp tục cuộc trò chuyện sau 7 tháng không, bây giờ có thể là lúc thích hợp hoặc có thể sớm hơn hoặc trễ hơn? Nói như bạn vậy thì dễ quá rồi, tôi hy vọng mình không mắc sai lầm. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:45, ngày 9 tháng 11 năm 2025 (UTC)
== [[Special:Tags]] ==
Tôi đang test script, nhờ bạn tạo một thẻ với tên thẻ là “twinkle” và tên hiển thị là “Twinkle” để script chạy. Cảm ơn bạn. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 00:30, ngày 1 tháng 4 năm 2025 (UTC)
:[[Thành viên:Hide on Rosé|Hide on Rosé]] {{Tick}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 1 tháng 4 năm 2025 (UTC)
:: Nào bạn rảnh thì bạn sửa lại phần tên hiển thị: Liên kết tới [[Wiktionary:Twinkle]] nhé. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 09:51, ngày 1 tháng 4 năm 2025 (UTC)
[[Tập tin:Wiktionary Deletion Tools 2025.png|nhỏ|250px|phải]]
:::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi upload màn hình chụp công cụ xóa quản trị viên Wiktionary. Bạn tham khảo. Twinkle hiện tại có vẻ chủ yếu phù hợp bài viết Wikipedia. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:34, ngày 2 tháng 4 năm 2025 (UTC)
:::: @[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Danh sách xoá mà bạn chụp thì tôi xem được ở đây: [[MediaWiki:Deletereason-dropdown]]. Mô đun này tôi đã sửa theo bộ tiêu chí xoá của dự án này, bạn có thể thử. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 03:40, ngày 2 tháng 4 năm 2025 (UTC)
:::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Công cụ xóa hiện như trang [[MediaWiki:Deletereason-dropdown]] chỉ xuất hiện khi bài viết có tựa đề "Wikitionary" hoặc "MediaWiki"; đối với các mục từ thì như hình chụp. Có vẻ phải chỉnh làm sao khi các thành viên ấn Twinkle gắn bản mẫu xóa trang mục từ thì nó hiện lên các lý do liên quan cho mục từ. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:48, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Đúng là như vậy. Trang trong không gian chính là mục từ (trừ Trang Chính) và cả Twinkle lẫn MediaWiki đều hiện lý do tương ứn, theo không gian tên,. code trong trang MediaWiki hiện theo không gian tên, bạn có thể xem mã nguồn của nó. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:41, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Xem [[Special:Diff/prev/2225367]]. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:44, ngày 2 tháng 4 năm 2025 (UTC)
:::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Ok, đã test. PS Thiếu tiêu chí độ nổi bật. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:52, ngày 2 tháng 4 năm 2025 (UTC)
:::::::: Tiêu chí đó được quy định ở đâu? Tôi không thấy trong [[Wiktionary:XN]]? [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 10:53, ngày 2 tháng 4 năm 2025 (UTC)
:::::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi xem qua có vẻ đúng thật chưa có trong [[Wiktionary:Quy định xóa trang]], có lẽ trang này đã lâu không cập nhật khi dự án tiến triển. Độ nổi bật các mục từ nằm trong quy định [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion này]. Tiêu chí độ nổi bật cũng có trong công cụ xóa của quản trị viên (hình). Ngoài ra, tham khảo thử quy định [https://simple.wiktionary.org/wiki/Wiktionary:Deletion#Articles này] (quy định độ nổi bật của dự án Simple English về một số mục từ). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:19, ngày 2 tháng 4 năm 2025 (UTC)
: @[[Thành viên:Hide on Rosé|Hide on Rosé]] Khi tôi gắn biển chất lượng kém bằng Twinkle cho bài [[freeter]] thì xuất hiện vần đề ([[Đặc biệt:Khác/2225470|xem]]). Tôi nghĩ bản mẫu <code><nowiki>{{chất lượng kém}}</nowiki></code> và <code><nowiki>{{Chất lượng kém (nguồn)}}</nowiki></code> có vấn đề rồi. [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] 14:01, ngày 2 tháng 4 năm 2025 (UTC)
== github.com ==
Khi dọn bớt trang thảo luận [[Thảo luận Wiktionary:Thảo luận]] để lưu trữ thì có liên kết này bị vào blacklist. Phiền bạn xem xét có thể gỡ liên kết này ra khỏi blacklist được không? [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] ([[User talk:Ayane Fumihiro|<span style="color:#008080;">But we got it yeah</span>]]) 16:06, ngày 22 tháng 5 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:17, ngày 22 tháng 5 năm 2025 (UTC)
== "ủ ôi" ==
Từ này hay xuất hiện trong văn nói, đôi khi đọc truyện tranh tôi có bắt gặp, nhưng không biết nên định nghĩa thế nào? Nhờ bạn hỗ trợ tạo trang nếu được. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 15:37, ngày 23 tháng 7 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Đã tạo trang. Từ này nó giống "trời ơi", "trời đất" miền Nam hay gọi thôi. P.S Bạn có câu ví dụ nào hay thì thêm vô nếu muốn (2 đến 3 câu ví dụ đều được, nhưng trung lập và không yếu tố bình luận chính trị). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 05:38, ngày 24 tháng 7 năm 2025 (UTC)
== "clause" ==
Từ "clause" trong tiếng Anh nên được dịch là "mệnh đề" hay "cú" / "tiểu cú" vậy? Mình thấy các trang web dạy tiếng Anh ở Việt Nam ngày nay đều dịch là mệnh đề, nhưng khi mình tra từ điển ''Thuật ngữ ngôn ngữ học Anh – Việt Việt – Anh'', tr. 44 của Cao Xuân Hạo, Hoàng Dũng thì lại dịch là "tiểu cú". Bên ''Từ điển Khái niệm Ngôn ngữ học'', tr. 136 của Nguyễn Thiện Giáp cũng dịch tương tự. Phiền bạn trợ giúp. --[[Thành viên:I can see my baby swimming|I can see my baby swimming]] ([[Thảo luận Thành viên:I can see my baby swimming|thảo luận]]) 12:30, ngày 31 tháng 7 năm 2025 (UTC)
:[[Thành viên:I can see my baby swimming|I can see my baby swimming]] Theo nguồn [https://vjol.info.vn/index.php/sphcm/article/view/27696] (trang 14) và [https://js.vnu.edu.vn/FS/article/view/380] (trang 29), cho thấy đều là cách dịch đúng của "clause". Dịch "mệnh đề" đồng nghĩa "cú/tiểu cú" nhưng cách dịch sau mang tính học thuật chuyên môn. Tôi nghĩ có thể xem xét bối cảnh chọn cách dịch phù hợp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:55, ngày 1 tháng 8 năm 2025 (UTC)
== [[Thành viên:Yuki Shiromita/Snowfall.css]] ==
Nhờ bạn xóa trang này, tôi không cần css để trang trí nữa do rất lag <span style="font-family:Segoe UI Light">[[User:Yuki Shiromita|<b style="color:#FF69B4">nettai</b>]] [[Special:Contributions/Yuki Shiromita|<b style="color:#FF964F">no</b>]] [[User talk:Yuki Shiromita|<b style="color:#93E7FB">shirayukihime</b>]]</span> 06:48, ngày 30 tháng 8 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:05, ngày 30 tháng 8 năm 2025 (UTC)
==Happy Holidays==
<div style="border-style:solid; border-color:violet; background-color:#fff; border-width:2px; text-align:left; padding:8px;" class="plainlinks">
{| style="border: 5px dotted #H1790; background-color: #DDDDDD; padding:4px"
| rowspan="2" valign="left" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Christmas Tree 2011-12-24.jpg|left|300px|link=]]<span style="display:block;padding-top:10px;clear:both">
| <span style="font-family: Georgia; font-size: 98%; color: #190a89;">Chúc bạn P. ĐĂNG có một mùa '''Giáng sinh''' an lành, ấm áp và tràn ngập yêu thương bên gia đình!<br/> Bước sang '''năm mới''' 2026, chúc bạn gặp nhiều may mắn,<br/> gặt hái được nhiều thành công trong công việc và học tập.<br/> Một lần nữa chúc bạn sẽ có một năm mới thật an khang, hạnh phúc và vạn sự như ý!!</span> <br />
<span style="font-family: Georgia; font-size: 92%;">
| rowspan="2" valign="right" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Atlantic Firework Festival 2016 (53368638571).jpg|left|360px|link=]]<span style="display:block;padding-top:10px;clear:both">
|}</div>
Lời chúc chân thành từ: <span style="background:#978FF;border:solid 1px;border-radius:8px;box-shadow:darkblue 2px 2px 2px"> [[User:Kelly zhrm|<span style="font-family:Old English Text MT;color:#C90">Yellow</span>]]|[[User talk:Kelly zhrm|ø]] </span> 05:54, ngày 24 tháng 12 năm 2025 (UTC)
:[[Thành viên:Kelly zhrm|Kelly zhrm]] Cảm ơn cực muộn :D. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:11, ngày 9 tháng 1 năm 2026 (UTC)
== a đuồi ==
Đôi khi tôi thấy từ này, nhưng không chắc định nghĩa nó thế nào? [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 08:01, ngày 30 tháng 12 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Dùng khi người nói biểu thị hàm ý nhưng không muốn diễn đạt rõ sự việc ám chỉ bằng cách nói thông thường và người nghe nhiều khả năng "sẽ" hiểu. Sau kết quả [https://www.google.com/search?q=a+%C4%91u%E1%BB%93i&sca_esv=fdc603a36385362d&rlz=1C1GCEA_enVN1050VN1050&biw=1536&bih=730&aic=0&sxsrf=ANbL-n6bNxATTi-Ja0wA8rmwvQPrO6MF7Q%3A1767953043675&ei=k9Jgae77KLCp4-EP1-n-6AI&ved=0ahUKEwiukZepmv6RAxWw1DgGHde0Hy0Q4dUDCBE tra cứu], tôi tham khảo một số trang web có nhắc đến cụm từ này và hiểu được như trên. Ngoài ra, một số ngữ cảnh được hiểu theo cách [https://www.hieuchua.com/define/A%20%C4%90u%E1%BB%93i này]. Các trang này chưa đủ uy tín để dùng "giải nghĩa" nhưng nó là tất cả trong khả năng có thể dùng tìm hiểu hiện tại. Hy vọng hữu ích đến bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:07, ngày 9 tháng 1 năm 2026 (UTC)
== PANG450a, b, c, d, e, f, g, h, i, j, k, l, m, n ==
Yummie giả dạng rối PANG450v của PVR từ lúc hắn tạo tài khoản PANG450a sao?? Tôi tưởng PVR tạo rối sửa đổi ở đây chứ! Mà khoan, Yummie hắn thường spam đường link tới các wiki Fandom, Miraheze và trang đóng góp của tài khoản hắn giả dạng (PANG450v) hả? – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 16:20, ngày 21 tháng 1 năm 2026 (UTC)
: Cái trò [[mượn gió bẻ măng]] của Yummie quá cũ rồi. Thật không còn gì đáng bàn. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 17:01, ngày 21 tháng 1 năm 2026 (UTC)
:[[Thành viên:Higashizakura|Higashizakura]] Phạm Văn Rạng là rối sửa bài viết chính trị (khá nghiêm túc và có khả năng biên tập; chỉ hoạt động tại các dự án Wikipedia vì mục đích chính sửa bài viết chính trị); Yummie là rối spam phá hoại. Có thể dựa vào nhật trình sửa đổi của tk nhận dạng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:48, ngày 22 tháng 1 năm 2026 (UTC)
::[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]].[[Thành viên:PANG450n|PANG450n]] ([[Thảo luận Thành viên:PANG450n|thảo luận]]) 09:10, ngày 4 tháng 5 năm 2026 (UTC)
== [[porfolio]] và [[portfolio]] ==
Từ đầu có vẻ là sai chính tả, qua enwikt thì đó là tiếng Tây Ban Nha. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 04:19, ngày 24 tháng 2 năm 2026 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Tra theo cú pháp "'Porfolio' (Conjunto de fotografías o grabados de diferentes clases que forman un tomo o volumen encuadernable)", thấy ghi nhận cơ bản là mục từ tiếng Tây Ban Nha phỏng theo tiếng Anh và Pháp đã bỏ âm "t" sau khi nước này đưa vào từ điển sử dụng. [[Thành viên:Hiyuune|Hiyuune]] đã giúp sửa. P.S Có vẻ cách dịch nghĩa hiện tại trong bài sai so với nguồn (nguồn [https://www.scribd.com/document/378489759/SUSTANTIVOS-COLECTIVOS#content=query:porfolio,pageNum:1,indexOnPage:0,bestMatch:false này] cũng không thấy theo nghĩa dịch vậy). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:23, ngày 25 tháng 2 năm 2026 (UTC)
ihhnzpkc9q42lefqipdaiizxljwgrir
2350185
2350184
2026-05-05T02:52:28Z
PANG450o
61183
/* PANG450a, b, c, d, e, f, g, h, i, j, k, l, m, n */
2350185
wikitext
text/x-wiki
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào P. ĐĂNG! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 07:34, ngày 24 tháng 6 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV ở Wiktionary này không? Nếu có hứng thú, mời bạn ra ứng cử ở [[Thảo luận Wiktionary:Bảo quản viên]]. Tôi muốn tuyển thêm BQV cho Wiktionary vì Wiktionary hiện tại không có BQV thường trực. Đây là môi trường thực tập tốt trước khi làm ĐPV bên Wikipedia. Hồi xưa, tôi cũng đóng góp cho cả hai dự án cùng một lúc (Wikipedia + Wiktionary). [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:32, ngày 2 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tôi hay hoạt động bên đây thật nhưng bên đây tôi có ít sửa đổi. Chỉ vài tuần trước tôi xin quyền lùi sửa để chống phá hoại nhưng không đủ yêu cầu thì BQV làm sao tôi ứng cử được. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:33, ngày 2 tháng 8 năm 2023 (UTC)
::Bên Wiktionary không có yêu cầu tối thiểu để làm BQV. Bạn có đóng góp bên Wikipedia thì ra ứng cử là ok rồi. Quan trọng là bạn có muốn vác tù và hàng tổng không thôi? [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:23, ngày 2 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tất nhiên, nếu có cơ hội được công đồng giao phó thì tôi sẽ làm. Nhưng chắc tôi cần tích cực cày sửa đổi một thời gian vì hiện tại tôi có dưới 300 sửa đổi. Có thể, tôi nghĩ tôi sẽ tích cực bên dự án này vài tuần cái đã. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:27, ngày 2 tháng 8 năm 2023 (UTC)
::::Bạn tính vậy cũng được. Cày sửa đổi là dễ mà. 2 tuần sau, mời bạn tự ra ứng cử. Tôi sẽ ủng hộ. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:57, ngày 2 tháng 8 năm 2023 (UTC)
== Mệt nhỉ? ==
Tụi này lì như trâu thật, mới chập sáng đòi vặt lông bẻ cổ tổ tông nhà tôi này. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:43, ngày 3 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Tôi qua đây thì gặp TTS. Haha MTRIRod với bạn Phú nói đúng, tên này ám tôi như ma ám rồi. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:44, ngày 3 tháng 8 năm 2023 (UTC)
::Mà hình như bên vi chưa cấm tên [https://vi.wikipedia.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:%C4%90%C3%B3ng_g%C3%B3p/%C4%90%E1%BB%ABng_b%C6%A1_S%C6%A1n_n%E1%BB%AFa,_S%C6%A1n_c%C3%B4_%C4%91%C6%A1n_l%E1%BA%AFm! này] thì phải? – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:48, ngày 3 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Chắc cấm sót, mà TTS chắc không dùng lại tk đó đâu. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:50, ngày 3 tháng 8 năm 2023 (UTC)
::::Đâu, vừa nhắc xong thì hình như mới chửi Nguyenmy kìa. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:52, ngày 3 tháng 8 năm 2023 (UTC)
:::::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] @[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] @[[Thành viên:Tryvix1509|Tryvix1509]] @[[Thành viên:NguoiDungKhongDinhDanh|NguoiDungKhongDinhDanh]] Mà không biết tôi có nên đệ đơn cấm chỉ tên TTS này đến Nhóm Tin cậy & An toàn của tổ chức Wikimedia không nhỉ? – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 09:58, ngày 3 tháng 8 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tổ chức này hoạt động như thế nào?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:03, ngày 3 tháng 8 năm 2023 (UTC)
:::::::Tôi cũng chỉ [[m:WMF Global Ban Policy/vi|đọc thoáng qua sơ sơ về quy định cấm chỉ toàn hệ thống tổ chức này]], và thấy tổ chức hoạt động qua email ca@wikimedia.org – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:07, ngày 3 tháng 8 năm 2023 (UTC)
::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Là cấm chỉ một tk toàn cầu bên meta đúng không?. Chắc không cần rồi và cũng không hiệu quả. Tôi nhớ không lầm TTS bị cấm toàn cục từ tk đầu tiên rồi. Hiện giờ dùng proxy thì cấm toàn cục gì nữa. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:10, ngày 3 tháng 8 năm 2023 (UTC)
:::::::::Các tk rối của TTS như bạn nói chỉ bị khóa toàn cục = TTS vẫn chưa bị cấm chỉ trên toàn hệ thống. Tôi nghĩ biện pháp này là cách hay nhất để răn đe tên này, chắc tôi nghĩ để lúc khác làm sau vậy. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:17, ngày 3 tháng 8 năm 2023 (UTC)
::::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chẳng phải khóa toàn cầu là trên toàn hệ thống Wikipedia? TTS không dùng một tk cố định và dùng proxy. Cấm tk này thì sẽ nhảy qua tk khác bằng một IP khác. Đề xuất của bạn không rõ ràng, tôi chưa hiểu lắm. Nếu được thì làm ngay bây giờ luôn đi. Tôi mới báo cái tk của TTS lên meta cho tiếp viên cấm toàn cầu đấy, hai tk nãy giờ phá hoại hiện đang bị cấm. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:25, ngày 3 tháng 8 năm 2023 (UTC)
== Bản mẫu cảnh báo mới ==
Cảm ơn bạn đã tạo bản mẫu cánh báo về việc sử dụng Wiktionary để quảng cáo. Nhưng tôi thấy bên Wikipedia tiếng Việt [[:w:vi:Bản mẫu:Spam|trang Bản mẫu:Spam]] là dùng để báo cáo liên kết rác, vì vậy xin phép tôi được đổi tên bản mẫu [[Đặc biệt:So sánh di động/2119930|từ "spam-1" thành "Cb1-spam"]]. Tôi không biết việc làm của tôi có đúng không do bên Wikipedia tiếng Việt cũng có [[:w:vi:Bản mẫu:Cb1-spam|bản mẫu tên như thế này]] chắc dùng để cảnh báo thành viên về việc thêm liên kết quảng cáo trong bài. Và nếu bạn thấy tôi sai mong bạn hãy lùi lại. Cảm ơn bạn. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:54, ngày 14 tháng 8 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07]]: Cảm ơn Tiến Minh. Nhưng lần sau bạn hãy đọc kỹ nội dung bản mẫu, bản mẫu này không phải cảnh báo thêm link spam mà là thông tin quảng cáo, tức là khi tv tạo bài PR (trang mới, PR trong trang thảo luận, hoặc chèn thông tin PR) thì dùng bản mẫu này. Mỗi wiktionary hoạt động độc lập, cộng đồng bên ta vốn nhỏ bé và ít người nên đặt tên bản mẫu đừng thêm vài chữ làm rườm rà khó nhớ, hầu hết thành viên không dùng Twinkle và đặt biển thủ công nên tôi chọn tên ngắn để các bạn dễ dùng. Nhưng nếu bạn đã đổi thì để vậy cũng được vì tôi đang cần làm thêm vài thứ, nâng cấp một vài thứ thiết yếu và để tên tạm như thế cũng được nếu tương lai có phát sinh thêm tôi sẽ thay đổi một vài bản mẫu cho phù hợp và nhất quán. Sẵn đây tôi hỏi bạn có dùng Twinkle không? Nếu có cho tôi xin một vài ý kiến có được không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 16 tháng 8 năm 2023 (UTC)
::Do dự án đang trong phát triển về mảng tin học nên tôi nghĩ trang global.js trên Meta sẽ là giải pháp hay để cài công cụ. Các công cụ hữu ích tôi vừa tìm được cho dự án: Restorer của BrandonXLF, TwinkleGlobal của Xiplus và WarningDialog.js của Tryvix1509 và nhiều người khác. Tôi chưa hiểu câu hỏi bạn đặt ra cho lắm, nếu bạn đang hỏi về công cụ TwinkleMobile của Plantaest trên dự án này thì tôi nghĩ bạn nên hỏi Plantaest do công cụ vẫn chưa được Plantaest kích hoạt trên đây. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 18:07, ngày 17 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Ý tôi là việc dùng Twinkle của bạn trên đây có giống bên Wikipedia không? Nó có chức năng gắn biển, cảnh báo hay chỉ dừng lại ở chức năng lùi sửa. Tôi không dùng Twinkle trên đây, nên tôi mới hỏi bạn để biết thêm thông tin do tôi cần nâng cấp một vài bản mẫu và muốn kích hoạt nó vô Twinkle, tôi muốn Twinkle bên đây được cấu hình lại cho tiện và đầy đủ chức năng giống bên các dự án khác cho các bạn dùng. Tôi sẽ làm trong phạm vi có thể, nhưng chắc sẽ cần thời gian. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:38, ngày 18 tháng 8 năm 2023 (UTC)
::::Việc dùng Twinkle trên đây của tôi chỉ là để phục vụ mục đích tuần tra TĐGĐ trong việc lùi tất cả sửa đổi không thiện chí do tôi chưa có quyền lùi sửa. Nếu bạn muốn công cụ có thể cảnh báo thành viên thì công cụ WarningDialog.js của Tryvix có thể giúp bạn trong trường hợp này. Bạn nên hỏi Tryvix xem sao (tôi đã ping @[[Thành viên:Tryvix1509|Tryvix1509]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:14, ngày 21 tháng 8 năm 2023 (UTC)
::Quay lại chủ đề bản mẫu cảnh báo vừa tạo không biết có nên dùng bản mẫu '''khi mà trường hợp tài khoản đó bị chặn bởi bộ lọc sai phạm''' không chứ tôi ngày nào mà chả thấy mấy tài khoản spambot dùng Wiktionary để quảng cáo có chèn đường link không à dẫn tới việc bị chặn và bị ghi lại trong bộ lọc sai phạm mà không ai phát hiện ra. (bạn có thể xem đầy đủ tại [[Đặc biệt:Nhật trình sai phạm]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:23, ngày 21 tháng 8 năm 2023 (UTC)
:::[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Thế thì dùng vậy cũng được, để tôi chỉnh lại bản mẫu cho ý tựu chung hơn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 22 tháng 8 năm 2023 (UTC)
== BQV ==
Rất vui vì bạn đã dũng cảm ra vác tù và hàng tổng. Tôi sẽ ủng hộ. Tuy nhiên, bạn cần gửi thư mời tham gia BQ BQV đến các thành viên trên Wiktionary (tv tích cực lẫn tv thỉnh thoảng xuất hiện). Chúc bạn đắc cử! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 05:55, ngày 24 tháng 8 năm 2023 (UTC)
:Tôi mới cấp quyền cho bạn. Chúc bạn tiếp tục hoạt động tích cực ở cả hai dự án, trao dồi thêm kinh nghiệm bảo quản và vài tháng nữa tự ra ứng cử làm ĐPV ở Wikipedia. Tôi sẽ ủng hộ nếu như không có gì thay đổi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 20:52, ngày 2 tháng 9 năm 2023 (UTC)
== Thư mời tham gia biểu quyết ==
<div style="padding: 0.5em; background: #f8f8ff; margin-top: 1em; font-size: 1em">
{| class="table" style="width: 80%; background-color: #ACE1AF; border: 1px solid #fceb92; margin: auto; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[Tập tin:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | '''Mời bạn cho ý kiến về việc cấp quyền Bảo quản viên cho thành viên [[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] tại trang [[Thảo luận Wiktionary:Bảo quản viên#DefenderTienMinh07|Thảo luận Wiktionary:Bảo quản viên]]. Xin cảm ơn.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!
|}
</div> [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:25, ngày 24 tháng 8 năm 2023 (UTC)
== Bất ngờ chưa! ==
Tôi tới đây là để thông báo một tin vui cho bạn. {{ý kiến|1=Tin vui là:}} Hiện tại bạn '''đã là BQV trên dự án Wiktionary tiếng Việt'''. Bạn lúc này cảm thấy thể nào? Mong bạn sẽ làm tốt công việc của mình như tôi đã nói lúc bỏ phiếu. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 21:02, ngày 2 tháng 9 năm 2023 (UTC)
:Tôi cũng không biết nói thế nào, nhưng cảm ơn bạn và Phú cũng như các thành viên khác đã hỗ trợ tôi từ dự án này qua dự án khác. Từ nay, tôi đảm nhận thêm nhiều nhiệm vụ hơn trên Wiktionary nên sẽ cố gắng chọn cách làm hiệu quả tốt nhất cho dự án. Tôi ít nói quá, vài dòng trên là tất cả, tôi không nghĩ thêm được gì để diễn tả hết. Cảm ơn vì thông báo này. Chúc bạn một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:50, ngày 3 tháng 9 năm 2023 (UTC)
== Một số sửa đổi của bạn gần đây ==
Chào bạn!
Về một số sửa đổi của bạn gần đây, như tại [[khả năng]], [[chứng minh]], ... Nếu phần định nghĩa có các từ kiểu như "nước ta", "nhân dân ta", ... thì ta nên thay bằng các từ khác hoặc xóa đi. Còn nếu nó có ở phần vd thì không cần xóa do phần này chấp nhận chứa các từ như vậy--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 12:48, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Đúng vậy, tôi đã xoá chúng đi vì Wiktionary:Thái độ trung lập. Wiktionary có quy định về phần vd được phép ngoại lệ này không?. Tôi đã có nói chuyện với HCV Mxn về điều này. Tôi khẳng định nó không trung lập và xoá đi là cần thiết, và sẽ bổ sung phần ví dụ mới vào. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:19, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Hiện tại trên dự án không có trang nào tên là [[Wiktionary:Thái độ trung lập]]. Chả là bạn muốn tìm trang quy định liên quan tới vấn đề chăng? – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:29, ngày 16 tháng 9 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chưa có chứ không phải không. Các dự án Wikipedia đều hoạt động hướng đến chung là thái độ trung lập. Wiktionary tiếng Việt không phải Wiktionary Việt Nam. HCV Mxn cũng đi xoá những thứ này. Khi dùng từ như "dân ta, nhân dân ta", khi người nước ngoài đọc, bạn nghĩ sao về điều này? Chúng ta hướng đến một dự án phục vụ mọi người, mọi chủng tộc và quốc gia, không phải riêng một đất nước nào. Vì vậy, mỗi dòng viết ra phải dựa trên thái độ trung lập. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:36, ngày 16 tháng 9 năm 2023 (UTC)
::::Bạn nói cũng đúng vì theo quy định bên Wiktionary tiếng Anh "all entries must be written from a '''neutral point of view''', representing views fairly and without bias" (tạm dịch: Mọi nội dung được đưa vào đều phải được viết từ một cái nhìn trung lập, thể hiện cái nhìn công bằng và không thiên kiến). Nhưng tôi nghĩ cũng không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV vì nội dung không trung lập thường nó cũng không ảnh hưởng gì nhiều đến dự án lắm. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:46, ngày 16 tháng 9 năm 2023 (UTC)
:::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Đây là điều đương nhiên. Chúng ta đang hoạt động trên đâu? Wiktionary là dự án bách khoa, nó ưu tiên thái độ trung lập, nơi mà một người Mỹ có thể qua đọc bài viết của một Wikimedia tiếng Đức, tiếng Việt hay tiếng Trung. Khi không trung lập, bạn nói không nhất thiết sửa lại là sao?. Đến nay tôi mới phát hiện Wiktionary tiếng Việt đang có văn phong không trung lập rất nhiều, trích câu Hồ Chí Minh, dùng thơ... Tôi cần BQV TheHighFighter2 phản hồi điều này, lẽ ra phải thảo luận với tôi trước khi lùi sửa, thứ mang tính chất mâu thuẫn. Nếu có quy định nào nói phần ví dụ ta được ngoại lệ thì tôi sẽ xem lại sửa đổi của mình. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:53, ngày 16 tháng 9 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi dám chắc là không có quy định nào về ngoại lệ này cả. Không trung lập mới là đi ngược với quy định của bách khoa. Nội dung trên đây vốn đa phần được sao chép từ FVDP một dự án không có quy định tính trung lập, khi dùng nó đưa vô thì phải xem xét ở một vài khía cạnh chứ không copy là xong được. Wiktionary không phải từ điển của Việt Nam, nó cũng không phải sách giáo khoa, không dùng văn phong thiên vị một phía, thêm thơ lại không trung lập. Bạn sang các Wiktionary tiếng khác xem, có nền tảng wiki nào dùng những câu ví dụ như "nhân dân ta chiến đấu bảo vệ tổ quốc" "chiến tranh chống đế quốc Mỹ", có xuất hiện không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:58, ngày 16 tháng 9 năm 2023 (UTC)
1. Bên en có rất nhiều mục có vd chứa các từ "[https://en.wiktionary.org/w/index.php?search=%22our+country%22&title=Special:Search&profile=advanced&fulltext=1&ns0=1 our country]", "[https://en.wiktionary.org/w/index.php?search=%22n%C6%B0%E1%BB%9Bc+ta%22&title=Special:Search&ns0=1&searchToken=12thcn782xmsjc7aixwau68ok nước ta]; bên fr có "[https://fr.wiktionary.org/w/index.php?search=%22notre+pays%22&title=Sp%C3%A9cial:Recherche&profile=advanced&fulltext=1&searchengineselect=mediawiki&ns0=1&ns100=1&ns106=1&ns110=1&searchToken=vol8t2pu9urr4hv60l40oom8 notre pays]" (đất nước chúng tôi)
2. Khi lấy vd cho mục "[[Đảng ta]]", "[[Mĩ nguỵ]]", "[[ba que]]" thì ta nên lấy vd như nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 15:57, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin gửi bạn một phần tin nhắn của tôi với HCB Mxn: "tất cả các câu thí dụ này được nhập từ Dự án Từ điển tiếng Việt miễn phí (FVDP), dự án này sao chép nguyên cả lời định nghĩa từ một số từ điển khác, có lẽ bao gồm những cuốn từ điển trong nước. (FVDP cũng có nhiều danh ngôn của Hồ Chí Minh.) Mấy năm nay tôi cũng muốn gạt đi những câu thí dụ không trung lập hoặc sửa lại theo thuật ngữ trung lập hơn. Đây chỉ là một trong rất nhiều điều thiếu sót của việc nhập FVDP. Nếu bạn có thể giúp dọn dẹp các câu thí dụ và danh ngôn thì tốt quá". Những từ tiếng Việt được xây dựng bên en cũng đa phần dùng bot và người mở rộng có cả những tv người Việt (từ ngoại quốc có thể không bị kiểm duyệt gắt gao khi người kiểm duyệt không am hiểu thứ tiếng, giống như có tv nào tạo bài tiếng phạn hay chữ Hán bên đây chúng ta thì có thể tỷ lệ phần trăm sai phạm bị bỏ qua sẽ nhiều hơn các từ hệ chữ chúng ta dùng). Còn bên fr, bạn xem ví dụ của họ có liên quan đến chủ thể cỡ nào? Nó đáng bao nhiêu phần trăm? Rõ ràng như Wiktionary vi không?. Về trường hợp lấy ví dụ của các từ như "Đảng ta" "Mĩ ngụy" thì đây là một từ, trích quy định "Tất cả các bài viết và các nội dung bách khoa khác tại Wikipedia phải được viết trên một quan điểm trung lập (QDTL), thể hiện một cách công bằng và không thiên vị" tôi nghĩ bạn đủ khả năng tự suy ra hướng tôi đang muốn nói. Khi bạn dùng từ này vô trường hợp như "Mĩ ngụy xâm chiếm nước ta" --> ám chỉ rõ ràng đây là dự án tiếng Việt và nước ta là Việt Nam. Bản chất từ tôi không nói nó vi phạm thái độ trung lập, nhưng tùy ngữ cảnh mà bạn đưa vào là một vấn đề đấy. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:18, ngày 16 tháng 9 năm 2023 (UTC)
:Thì thế tôi mới nói "không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV" đó. Nội dung không trung lập không có nghĩa là nội dung đó không hữu ích. Nói chung là tùy trường hợp, hợp lý là được miễn sao nội dung đó không quá khích. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:12, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Bạn có biết đang nói cái gì không vậy? Không trung lập = vi phạm quy định. Sửa đổi sai đang cần sửa nhưng bạn lại nói không cần thiết?. WP:Thái độ trung lập là một trong những trụ cột của Wikimedia, cho dù đó là sửa đổi thiện chí nhưng vi phạm thì cũng không cần. Dự án chúng ta các tv đã không còn khả năng sửa điều này? Nếu không, tại sao chấp nhận nó?. Sao có thể nhưng không thay bằng một nội dung vừa hữu ích vừa phù hợp với chính sách của ta hơn. Tôi không hiểu bạn Tiến Minh nói không nhất thiết giải quyết những điều này là gì? Bên Wikipedia có nhiều tk bị cấm vì thái độ trung lập đấy và thành viên không kiểm soát được điều này nên mấy tk này quay lại và thành rối nằm vùng. Phần nội dung hiện rõ lên vậy, bạn lại nói là không quá khích. Thế nào là quá khích, đủ để các tv bắt tay vào làm? Tôi xin nhắc lại, Wiktionary tiếng Việt không phải Wiktionary Việt Nam. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:26, ngày 16 tháng 9 năm 2023 (UTC)
Hướng giải quyết:
Nếu 1 mục từ bình thường có vd chứa các từ như trên: thay thế vd khác.
Còn các từ liên quan đến chính trị, trường hợp đặc biệt khác, thì có thể lấy vd chứa những từ như trên.
Bạn thấy thế nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 16:53, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin phiền bạn đưa phần tin nhắn này ra trang thảo luận vì Tiến Minh đã gửi thư nên tôi đã di chuyển nó ra thảo để mọi người có thể cùng nhau giải quyết. Cảm ơn bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:00, ngày 16 tháng 9 năm 2023 (UTC)
:''Đã di chuyển đến [[Wiktionary:Thảo luận#Tính trung lập]].'' – [[Thành viên:Mxn|Nguyễn Xuân Minh]] <sup>[[Thảo luận Thành viên:Mxn|<span style="display: inline-block;">💬</span>]]</sup> 01:56, ngày 17 tháng 9 năm 2023 (UTC)
== [[Cửu đoạn tuyến]] ==
Phiền bạn check và gỡ một số nội dung không trung lập trong mục từ này (nếu có), tôi thấy có nội dung không trung lập nhưng chưa thể gỡ do liên quan đến mục từ, xin cảm ơn. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 11:34, ngày 10 tháng 10 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi không thấy có thông tin nào là không trung lập, bài viết có nội dung rất ít, đây là bài do bạn khởi tạo. Nếu vẫn còn tin phần nào là không trung lập, bạn cứ thoải mái dẫn vào đây tôi xem. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:42, ngày 10 tháng 10 năm 2023 (UTC)
== Kay ==
Kay đang diễn tuồng và giả làm Ti2008. Ti2008 và tôi thật là bạn thân trên Wikipedia và đã biết nhau từ năm 2008 rồi. Cách nói chuyện đó chỉ có thể là Kay. Mai mốt, nếu Kay tái xuất ở đây thì bạn cứ việc cấm vô hạn. Nếu là Ti2008 thật thì bạn ấy sẽ log vào acc Ti2008 để nói chuyện với tôi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 23:34, ngày 14 tháng 12 năm 2023 (UTC)
== [[Thành viên:WhoAlone]] ==
Bạn nên đề cử tv này luôn để dự án chúng ta có thêm 2 BQV mới rất tích cực! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 02:58, ngày 31 tháng 12 năm 2023 (UTC)
== Hellu bạn ==
Nay có nhã hứng ghé qua đây chút, tui đang tính đóng góp dự án này và duy trì bên Wikiquote (bên đó sau vụ thi viết bài là lại vắng). Nên là bạn có thể giới thiệu sơ sơ về cách hoạt động bên này không? [[Thành viên:Pminh141|Pminh141]] ([[Thảo luận Thành viên:Pminh141|thảo luận]]) 18:22, ngày 23 tháng 7 năm 2024 (UTC)
:[[Thành viên:Pminh141|Pminh141]] Chỉ cần xem [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion# Wiktionary:Độ nổi bật] và [https://en.wiktionary.org/wiki/Wiktionary:Neutral_point_of_view Thái độ trung lập] là có thể đóng góp (có thể tham khảo từ điển để viết). Dự án còn rất sơ khai về mảng quy định, tương lai tôi sẽ dự tính soạn thảo tập trung vô mảng này. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 02:24, ngày 24 tháng 7 năm 2024 (UTC)
== Đổi thay ==
Phiền bạn giúp cấp lại quyền lùi sửa và gỡ quyền tại acc chính với ạ, Bạn có thể xem [[w:en:Wikipedia:Administrators' noticeboard#Unmerge my account from global|tại thảo luận này]], xin cảm ơn. – [[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]] ([[Thảo luận Thành viên:TienMinh-mun6xnChing|thảo luận]]) 12:01, ngày 29 tháng 10 năm 2024 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:54, ngày 29 tháng 10 năm 2024 (UTC)
== Các công cụ (tập lệnh) ở Wiktionary ==
Phiên bản sắp tới của Zinnia sẽ mở rộng cho phép sử dụng ở Wiktionary. Tôi muốn hỏi trong quy trình làm việc ở đây, bạn và mọi người có sử dụng công cụ hay tập lệnh (script) gì không, để bổ sung vào Zinnia. Cảm ơn. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
: Tag thêm @[[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]]. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
::[[Thành viên:Plantaest|Plantaest]] Các công cụ hay script để chống phá hoại thông thường các tv sẽ tự cài đặt ở Meta. Vì Wiktionary chỉ có mỗi BQV mới có bộ công cụ đầy đủ chức năng (gồm cả thao tác đánh dấu tuần tra), trừ "lùi sửa" vì có quyền riêng cho tác này. Do khác Wikipedia vấn đề này, tôi nghĩ giao diện cần nghiên cứu thêm nếu áp dụng. P/s Tôi dùng Restorer thay cho Twinkle (khi hồi sửa). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:02, ngày 2 tháng 11 năm 2024 (UTC)
== Cần hỗ trợ về quyết định xóa bài ==
Em đang chỉnh sửa bài đăng và không biết là add vào gây spam, phiền anh hỗ trợ em với ạ – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 11:34, ngày 17 tháng 12 năm 2024 (UTC)
:Theo [https://vi.wiktionary.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:Nh%E1%BA%ADt_tr%C3%ACnh/Nntrinh76 nhật trình], bài viết bạn tạo mang nội dung vượt ngoài dự án (Wiktionary chỉ bao gồm các mục từ). Bài viết này cũng có nội dung PR cá nhân. Đó là lý do cho việc nhắc nhở. Mời bạn tham khảo [[Wiktionary:Quy định và hướng dẫn]] để rút kinh nghiệm cho các lần sửa đổi sau. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 13:16, ngày 17 tháng 12 năm 2024 (UTC)
::anh có thể mở để em chỉnh sửa được không ạ? do cũng là lần đầu em viết và em đã dùng 2 ngày tổng hợp.. – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 15:35, ngày 17 tháng 12 năm 2024 (UTC)
:::Trang bạn đã tạo không liên quan gì đến Wiktionary cả, tại vì đây là trang từ điển, không phải là nơi để tạo hoặc chỉnh sửa bài viết. Cho nên tôi, Đăng hoặc bqv khác không thể mở khóa cái trang đó được. – [[Thành viên:Nguyên Hưng Trần|<span style="color:#74a12e;font-family:Georgia, serif;">'''NHT'''</span>]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|💬]]) 16:15, ngày 17 tháng 12 năm 2024 (UTC)
== lời cảm ơn ==
Cảm ơn vì đã trả lời trên [[Thảo_luận:bồ_các]], vì đó là không gian công cộng nên không tiện. Không biết nhấn nút cảm ơn thì kết quả sẽ được chuyển đến người đó hay kq sẽ như thế nào nhỉ, vì nhấn nhiều lần rồi nhưng không biết sẽ như thế nào? Mình có ai cảm ơn đâu, còn IP thì không cảm ơn được. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:05, ngày 13 tháng 2 năm 2025 (UTC)
:Từ người thực hiện, chuyển đến người được nhận. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:02, ngày 13 tháng 2 năm 2025 (UTC)
== Xin chào ==
Nếu có thể tôi cần giúp đỡ – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:32, ngày 14 tháng 3 năm 2025 (UTC)
:[[Thành viên:Henrydat|Henrydat]] Bạn có thể nêu vấn đề cụ thể. Nếu là các việc liên quan dự án, tôi sẽ giúp trong khả năng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:42, ngày 14 tháng 3 năm 2025 (UTC)
::Ô trời, tim tôi đang đập đây, tôi thấy chữ rối ở đây bạn biết tôi là ai còn hỏi? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:50, ngày 14 tháng 3 năm 2025 (UTC)
:::Này tôi không có thời gian, tới giờ này thì việc này rất gấp? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:55, ngày 14 tháng 3 năm 2025 (UTC)
::::tất nhiên tôi không có ý nói tôi là rối, tôi chỉ xem lịch sử đóng góp nói vậy thôi, nếu bạn biết trước tôi là ai thì mới giúp được – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:58, ngày 14 tháng 3 năm 2025 (UTC)
:::::Rồi xong tôi đã đến lộn chỗ, quyết định không hoạt đông tại dự án này là quyết định đúng đắn – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 18:02, ngày 14 tháng 3 năm 2025 (UTC)
::::::Cần lưu ý cơ chế cấm người dùng hoạt động độc lập trên mỗi dự án, tức là ngoại trừ việc lạm dụng xuyên wiki hoặc bị cấm chỉ, thành viên vẫn có thể hoạt động và xem như một tài khoản bình thường khi qua dự án khác. Bạn vẫn có thể hoạt động tại đây và tuân theo quy định tại dự án này; ngược lại, bạn có tùy quyền quyết định không tham gia đóng góp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 07:44, ngày 15 tháng 3 năm 2025 (UTC)
:::::::Này chúng ta có thể tiếp tục cuộc trò chuyện sau 7 tháng không, bây giờ có thể là lúc thích hợp hoặc có thể sớm hơn hoặc trễ hơn? Nói như bạn vậy thì dễ quá rồi, tôi hy vọng mình không mắc sai lầm. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:45, ngày 9 tháng 11 năm 2025 (UTC)
== [[Special:Tags]] ==
Tôi đang test script, nhờ bạn tạo một thẻ với tên thẻ là “twinkle” và tên hiển thị là “Twinkle” để script chạy. Cảm ơn bạn. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 00:30, ngày 1 tháng 4 năm 2025 (UTC)
:[[Thành viên:Hide on Rosé|Hide on Rosé]] {{Tick}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 1 tháng 4 năm 2025 (UTC)
:: Nào bạn rảnh thì bạn sửa lại phần tên hiển thị: Liên kết tới [[Wiktionary:Twinkle]] nhé. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 09:51, ngày 1 tháng 4 năm 2025 (UTC)
[[Tập tin:Wiktionary Deletion Tools 2025.png|nhỏ|250px|phải]]
:::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi upload màn hình chụp công cụ xóa quản trị viên Wiktionary. Bạn tham khảo. Twinkle hiện tại có vẻ chủ yếu phù hợp bài viết Wikipedia. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:34, ngày 2 tháng 4 năm 2025 (UTC)
:::: @[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Danh sách xoá mà bạn chụp thì tôi xem được ở đây: [[MediaWiki:Deletereason-dropdown]]. Mô đun này tôi đã sửa theo bộ tiêu chí xoá của dự án này, bạn có thể thử. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 03:40, ngày 2 tháng 4 năm 2025 (UTC)
:::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Công cụ xóa hiện như trang [[MediaWiki:Deletereason-dropdown]] chỉ xuất hiện khi bài viết có tựa đề "Wikitionary" hoặc "MediaWiki"; đối với các mục từ thì như hình chụp. Có vẻ phải chỉnh làm sao khi các thành viên ấn Twinkle gắn bản mẫu xóa trang mục từ thì nó hiện lên các lý do liên quan cho mục từ. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:48, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Đúng là như vậy. Trang trong không gian chính là mục từ (trừ Trang Chính) và cả Twinkle lẫn MediaWiki đều hiện lý do tương ứn, theo không gian tên,. code trong trang MediaWiki hiện theo không gian tên, bạn có thể xem mã nguồn của nó. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:41, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Xem [[Special:Diff/prev/2225367]]. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:44, ngày 2 tháng 4 năm 2025 (UTC)
:::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Ok, đã test. PS Thiếu tiêu chí độ nổi bật. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:52, ngày 2 tháng 4 năm 2025 (UTC)
:::::::: Tiêu chí đó được quy định ở đâu? Tôi không thấy trong [[Wiktionary:XN]]? [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 10:53, ngày 2 tháng 4 năm 2025 (UTC)
:::::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi xem qua có vẻ đúng thật chưa có trong [[Wiktionary:Quy định xóa trang]], có lẽ trang này đã lâu không cập nhật khi dự án tiến triển. Độ nổi bật các mục từ nằm trong quy định [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion này]. Tiêu chí độ nổi bật cũng có trong công cụ xóa của quản trị viên (hình). Ngoài ra, tham khảo thử quy định [https://simple.wiktionary.org/wiki/Wiktionary:Deletion#Articles này] (quy định độ nổi bật của dự án Simple English về một số mục từ). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:19, ngày 2 tháng 4 năm 2025 (UTC)
: @[[Thành viên:Hide on Rosé|Hide on Rosé]] Khi tôi gắn biển chất lượng kém bằng Twinkle cho bài [[freeter]] thì xuất hiện vần đề ([[Đặc biệt:Khác/2225470|xem]]). Tôi nghĩ bản mẫu <code><nowiki>{{chất lượng kém}}</nowiki></code> và <code><nowiki>{{Chất lượng kém (nguồn)}}</nowiki></code> có vấn đề rồi. [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] 14:01, ngày 2 tháng 4 năm 2025 (UTC)
== github.com ==
Khi dọn bớt trang thảo luận [[Thảo luận Wiktionary:Thảo luận]] để lưu trữ thì có liên kết này bị vào blacklist. Phiền bạn xem xét có thể gỡ liên kết này ra khỏi blacklist được không? [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] ([[User talk:Ayane Fumihiro|<span style="color:#008080;">But we got it yeah</span>]]) 16:06, ngày 22 tháng 5 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:17, ngày 22 tháng 5 năm 2025 (UTC)
== "ủ ôi" ==
Từ này hay xuất hiện trong văn nói, đôi khi đọc truyện tranh tôi có bắt gặp, nhưng không biết nên định nghĩa thế nào? Nhờ bạn hỗ trợ tạo trang nếu được. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 15:37, ngày 23 tháng 7 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Đã tạo trang. Từ này nó giống "trời ơi", "trời đất" miền Nam hay gọi thôi. P.S Bạn có câu ví dụ nào hay thì thêm vô nếu muốn (2 đến 3 câu ví dụ đều được, nhưng trung lập và không yếu tố bình luận chính trị). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 05:38, ngày 24 tháng 7 năm 2025 (UTC)
== "clause" ==
Từ "clause" trong tiếng Anh nên được dịch là "mệnh đề" hay "cú" / "tiểu cú" vậy? Mình thấy các trang web dạy tiếng Anh ở Việt Nam ngày nay đều dịch là mệnh đề, nhưng khi mình tra từ điển ''Thuật ngữ ngôn ngữ học Anh – Việt Việt – Anh'', tr. 44 của Cao Xuân Hạo, Hoàng Dũng thì lại dịch là "tiểu cú". Bên ''Từ điển Khái niệm Ngôn ngữ học'', tr. 136 của Nguyễn Thiện Giáp cũng dịch tương tự. Phiền bạn trợ giúp. --[[Thành viên:I can see my baby swimming|I can see my baby swimming]] ([[Thảo luận Thành viên:I can see my baby swimming|thảo luận]]) 12:30, ngày 31 tháng 7 năm 2025 (UTC)
:[[Thành viên:I can see my baby swimming|I can see my baby swimming]] Theo nguồn [https://vjol.info.vn/index.php/sphcm/article/view/27696] (trang 14) và [https://js.vnu.edu.vn/FS/article/view/380] (trang 29), cho thấy đều là cách dịch đúng của "clause". Dịch "mệnh đề" đồng nghĩa "cú/tiểu cú" nhưng cách dịch sau mang tính học thuật chuyên môn. Tôi nghĩ có thể xem xét bối cảnh chọn cách dịch phù hợp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:55, ngày 1 tháng 8 năm 2025 (UTC)
== [[Thành viên:Yuki Shiromita/Snowfall.css]] ==
Nhờ bạn xóa trang này, tôi không cần css để trang trí nữa do rất lag <span style="font-family:Segoe UI Light">[[User:Yuki Shiromita|<b style="color:#FF69B4">nettai</b>]] [[Special:Contributions/Yuki Shiromita|<b style="color:#FF964F">no</b>]] [[User talk:Yuki Shiromita|<b style="color:#93E7FB">shirayukihime</b>]]</span> 06:48, ngày 30 tháng 8 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:05, ngày 30 tháng 8 năm 2025 (UTC)
==Happy Holidays==
<div style="border-style:solid; border-color:violet; background-color:#fff; border-width:2px; text-align:left; padding:8px;" class="plainlinks">
{| style="border: 5px dotted #H1790; background-color: #DDDDDD; padding:4px"
| rowspan="2" valign="left" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Christmas Tree 2011-12-24.jpg|left|300px|link=]]<span style="display:block;padding-top:10px;clear:both">
| <span style="font-family: Georgia; font-size: 98%; color: #190a89;">Chúc bạn P. ĐĂNG có một mùa '''Giáng sinh''' an lành, ấm áp và tràn ngập yêu thương bên gia đình!<br/> Bước sang '''năm mới''' 2026, chúc bạn gặp nhiều may mắn,<br/> gặt hái được nhiều thành công trong công việc và học tập.<br/> Một lần nữa chúc bạn sẽ có một năm mới thật an khang, hạnh phúc và vạn sự như ý!!</span> <br />
<span style="font-family: Georgia; font-size: 92%;">
| rowspan="2" valign="right" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Atlantic Firework Festival 2016 (53368638571).jpg|left|360px|link=]]<span style="display:block;padding-top:10px;clear:both">
|}</div>
Lời chúc chân thành từ: <span style="background:#978FF;border:solid 1px;border-radius:8px;box-shadow:darkblue 2px 2px 2px"> [[User:Kelly zhrm|<span style="font-family:Old English Text MT;color:#C90">Yellow</span>]]|[[User talk:Kelly zhrm|ø]] </span> 05:54, ngày 24 tháng 12 năm 2025 (UTC)
:[[Thành viên:Kelly zhrm|Kelly zhrm]] Cảm ơn cực muộn :D. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:11, ngày 9 tháng 1 năm 2026 (UTC)
== a đuồi ==
Đôi khi tôi thấy từ này, nhưng không chắc định nghĩa nó thế nào? [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 08:01, ngày 30 tháng 12 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Dùng khi người nói biểu thị hàm ý nhưng không muốn diễn đạt rõ sự việc ám chỉ bằng cách nói thông thường và người nghe nhiều khả năng "sẽ" hiểu. Sau kết quả [https://www.google.com/search?q=a+%C4%91u%E1%BB%93i&sca_esv=fdc603a36385362d&rlz=1C1GCEA_enVN1050VN1050&biw=1536&bih=730&aic=0&sxsrf=ANbL-n6bNxATTi-Ja0wA8rmwvQPrO6MF7Q%3A1767953043675&ei=k9Jgae77KLCp4-EP1-n-6AI&ved=0ahUKEwiukZepmv6RAxWw1DgGHde0Hy0Q4dUDCBE tra cứu], tôi tham khảo một số trang web có nhắc đến cụm từ này và hiểu được như trên. Ngoài ra, một số ngữ cảnh được hiểu theo cách [https://www.hieuchua.com/define/A%20%C4%90u%E1%BB%93i này]. Các trang này chưa đủ uy tín để dùng "giải nghĩa" nhưng nó là tất cả trong khả năng có thể dùng tìm hiểu hiện tại. Hy vọng hữu ích đến bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:07, ngày 9 tháng 1 năm 2026 (UTC)
== PANG450a, b, c, d, e, f, g, h, i, j, k, l, m, n, o ==
Yummie giả dạng rối PANG450v của PVR từ lúc hắn tạo tài khoản PANG450a sao?? Tôi tưởng PVR tạo rối sửa đổi ở đây chứ! Mà khoan, Yummie hắn thường spam đường link tới các wiki Fandom, Miraheze và trang đóng góp của tài khoản hắn giả dạng (PANG450v) hả? – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 16:20, ngày 21 tháng 1 năm 2026 (UTC)
: Cái trò [[mượn gió bẻ măng]] của Yummie quá cũ rồi. Thật không còn gì đáng bàn. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 17:01, ngày 21 tháng 1 năm 2026 (UTC)
:[[Thành viên:Higashizakura|Higashizakura]] Phạm Văn Rạng là rối sửa bài viết chính trị (khá nghiêm túc và có khả năng biên tập; chỉ hoạt động tại các dự án Wikipedia vì mục đích chính sửa bài viết chính trị); Yummie là rối spam phá hoại. Có thể dựa vào nhật trình sửa đổi của tk nhận dạng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:48, ngày 22 tháng 1 năm 2026 (UTC)
::[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]].[[Thành viên:PANG450o|PANG450o]] ([[Thảo luận Thành viên:PANG450o|thảo luận]]) 02:52, ngày 5 tháng 5 năm 2026 (UTC)
== [[porfolio]] và [[portfolio]] ==
Từ đầu có vẻ là sai chính tả, qua enwikt thì đó là tiếng Tây Ban Nha. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 04:19, ngày 24 tháng 2 năm 2026 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Tra theo cú pháp "'Porfolio' (Conjunto de fotografías o grabados de diferentes clases que forman un tomo o volumen encuadernable)", thấy ghi nhận cơ bản là mục từ tiếng Tây Ban Nha phỏng theo tiếng Anh và Pháp đã bỏ âm "t" sau khi nước này đưa vào từ điển sử dụng. [[Thành viên:Hiyuune|Hiyuune]] đã giúp sửa. P.S Có vẻ cách dịch nghĩa hiện tại trong bài sai so với nguồn (nguồn [https://www.scribd.com/document/378489759/SUSTANTIVOS-COLECTIVOS#content=query:porfolio,pageNum:1,indexOnPage:0,bestMatch:false này] cũng không thấy theo nghĩa dịch vậy). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:23, ngày 25 tháng 2 năm 2026 (UTC)
79ru8d6isod8kwnfn9lhzcdk30oxt6s
2350189
2350185
2026-05-05T03:49:17Z
Hiyuune
50834
Đã lùi lại sửa đổi của [[Special:Contributions/PANG450o|PANG450o]] ([[User talk:PANG450o|thảo luận]]) quay về phiên bản cuối của [[User:Hiyuune|Hiyuune]]
2350124
wikitext
text/x-wiki
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào P. ĐĂNG! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 07:34, ngày 24 tháng 6 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV ở Wiktionary này không? Nếu có hứng thú, mời bạn ra ứng cử ở [[Thảo luận Wiktionary:Bảo quản viên]]. Tôi muốn tuyển thêm BQV cho Wiktionary vì Wiktionary hiện tại không có BQV thường trực. Đây là môi trường thực tập tốt trước khi làm ĐPV bên Wikipedia. Hồi xưa, tôi cũng đóng góp cho cả hai dự án cùng một lúc (Wikipedia + Wiktionary). [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:32, ngày 2 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tôi hay hoạt động bên đây thật nhưng bên đây tôi có ít sửa đổi. Chỉ vài tuần trước tôi xin quyền lùi sửa để chống phá hoại nhưng không đủ yêu cầu thì BQV làm sao tôi ứng cử được. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:33, ngày 2 tháng 8 năm 2023 (UTC)
::Bên Wiktionary không có yêu cầu tối thiểu để làm BQV. Bạn có đóng góp bên Wikipedia thì ra ứng cử là ok rồi. Quan trọng là bạn có muốn vác tù và hàng tổng không thôi? [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:23, ngày 2 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tất nhiên, nếu có cơ hội được công đồng giao phó thì tôi sẽ làm. Nhưng chắc tôi cần tích cực cày sửa đổi một thời gian vì hiện tại tôi có dưới 300 sửa đổi. Có thể, tôi nghĩ tôi sẽ tích cực bên dự án này vài tuần cái đã. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:27, ngày 2 tháng 8 năm 2023 (UTC)
::::Bạn tính vậy cũng được. Cày sửa đổi là dễ mà. 2 tuần sau, mời bạn tự ra ứng cử. Tôi sẽ ủng hộ. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:57, ngày 2 tháng 8 năm 2023 (UTC)
== Mệt nhỉ? ==
Tụi này lì như trâu thật, mới chập sáng đòi vặt lông bẻ cổ tổ tông nhà tôi này. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:43, ngày 3 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Tôi qua đây thì gặp TTS. Haha MTRIRod với bạn Phú nói đúng, tên này ám tôi như ma ám rồi. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:44, ngày 3 tháng 8 năm 2023 (UTC)
::Mà hình như bên vi chưa cấm tên [https://vi.wikipedia.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:%C4%90%C3%B3ng_g%C3%B3p/%C4%90%E1%BB%ABng_b%C6%A1_S%C6%A1n_n%E1%BB%AFa,_S%C6%A1n_c%C3%B4_%C4%91%C6%A1n_l%E1%BA%AFm! này] thì phải? – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:48, ngày 3 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Chắc cấm sót, mà TTS chắc không dùng lại tk đó đâu. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:50, ngày 3 tháng 8 năm 2023 (UTC)
::::Đâu, vừa nhắc xong thì hình như mới chửi Nguyenmy kìa. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:52, ngày 3 tháng 8 năm 2023 (UTC)
:::::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] @[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] @[[Thành viên:Tryvix1509|Tryvix1509]] @[[Thành viên:NguoiDungKhongDinhDanh|NguoiDungKhongDinhDanh]] Mà không biết tôi có nên đệ đơn cấm chỉ tên TTS này đến Nhóm Tin cậy & An toàn của tổ chức Wikimedia không nhỉ? – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 09:58, ngày 3 tháng 8 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tổ chức này hoạt động như thế nào?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:03, ngày 3 tháng 8 năm 2023 (UTC)
:::::::Tôi cũng chỉ [[m:WMF Global Ban Policy/vi|đọc thoáng qua sơ sơ về quy định cấm chỉ toàn hệ thống tổ chức này]], và thấy tổ chức hoạt động qua email ca@wikimedia.org – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:07, ngày 3 tháng 8 năm 2023 (UTC)
::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Là cấm chỉ một tk toàn cầu bên meta đúng không?. Chắc không cần rồi và cũng không hiệu quả. Tôi nhớ không lầm TTS bị cấm toàn cục từ tk đầu tiên rồi. Hiện giờ dùng proxy thì cấm toàn cục gì nữa. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:10, ngày 3 tháng 8 năm 2023 (UTC)
:::::::::Các tk rối của TTS như bạn nói chỉ bị khóa toàn cục = TTS vẫn chưa bị cấm chỉ trên toàn hệ thống. Tôi nghĩ biện pháp này là cách hay nhất để răn đe tên này, chắc tôi nghĩ để lúc khác làm sau vậy. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:17, ngày 3 tháng 8 năm 2023 (UTC)
::::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chẳng phải khóa toàn cầu là trên toàn hệ thống Wikipedia? TTS không dùng một tk cố định và dùng proxy. Cấm tk này thì sẽ nhảy qua tk khác bằng một IP khác. Đề xuất của bạn không rõ ràng, tôi chưa hiểu lắm. Nếu được thì làm ngay bây giờ luôn đi. Tôi mới báo cái tk của TTS lên meta cho tiếp viên cấm toàn cầu đấy, hai tk nãy giờ phá hoại hiện đang bị cấm. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:25, ngày 3 tháng 8 năm 2023 (UTC)
== Bản mẫu cảnh báo mới ==
Cảm ơn bạn đã tạo bản mẫu cánh báo về việc sử dụng Wiktionary để quảng cáo. Nhưng tôi thấy bên Wikipedia tiếng Việt [[:w:vi:Bản mẫu:Spam|trang Bản mẫu:Spam]] là dùng để báo cáo liên kết rác, vì vậy xin phép tôi được đổi tên bản mẫu [[Đặc biệt:So sánh di động/2119930|từ "spam-1" thành "Cb1-spam"]]. Tôi không biết việc làm của tôi có đúng không do bên Wikipedia tiếng Việt cũng có [[:w:vi:Bản mẫu:Cb1-spam|bản mẫu tên như thế này]] chắc dùng để cảnh báo thành viên về việc thêm liên kết quảng cáo trong bài. Và nếu bạn thấy tôi sai mong bạn hãy lùi lại. Cảm ơn bạn. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:54, ngày 14 tháng 8 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07]]: Cảm ơn Tiến Minh. Nhưng lần sau bạn hãy đọc kỹ nội dung bản mẫu, bản mẫu này không phải cảnh báo thêm link spam mà là thông tin quảng cáo, tức là khi tv tạo bài PR (trang mới, PR trong trang thảo luận, hoặc chèn thông tin PR) thì dùng bản mẫu này. Mỗi wiktionary hoạt động độc lập, cộng đồng bên ta vốn nhỏ bé và ít người nên đặt tên bản mẫu đừng thêm vài chữ làm rườm rà khó nhớ, hầu hết thành viên không dùng Twinkle và đặt biển thủ công nên tôi chọn tên ngắn để các bạn dễ dùng. Nhưng nếu bạn đã đổi thì để vậy cũng được vì tôi đang cần làm thêm vài thứ, nâng cấp một vài thứ thiết yếu và để tên tạm như thế cũng được nếu tương lai có phát sinh thêm tôi sẽ thay đổi một vài bản mẫu cho phù hợp và nhất quán. Sẵn đây tôi hỏi bạn có dùng Twinkle không? Nếu có cho tôi xin một vài ý kiến có được không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 16 tháng 8 năm 2023 (UTC)
::Do dự án đang trong phát triển về mảng tin học nên tôi nghĩ trang global.js trên Meta sẽ là giải pháp hay để cài công cụ. Các công cụ hữu ích tôi vừa tìm được cho dự án: Restorer của BrandonXLF, TwinkleGlobal của Xiplus và WarningDialog.js của Tryvix1509 và nhiều người khác. Tôi chưa hiểu câu hỏi bạn đặt ra cho lắm, nếu bạn đang hỏi về công cụ TwinkleMobile của Plantaest trên dự án này thì tôi nghĩ bạn nên hỏi Plantaest do công cụ vẫn chưa được Plantaest kích hoạt trên đây. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 18:07, ngày 17 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Ý tôi là việc dùng Twinkle của bạn trên đây có giống bên Wikipedia không? Nó có chức năng gắn biển, cảnh báo hay chỉ dừng lại ở chức năng lùi sửa. Tôi không dùng Twinkle trên đây, nên tôi mới hỏi bạn để biết thêm thông tin do tôi cần nâng cấp một vài bản mẫu và muốn kích hoạt nó vô Twinkle, tôi muốn Twinkle bên đây được cấu hình lại cho tiện và đầy đủ chức năng giống bên các dự án khác cho các bạn dùng. Tôi sẽ làm trong phạm vi có thể, nhưng chắc sẽ cần thời gian. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:38, ngày 18 tháng 8 năm 2023 (UTC)
::::Việc dùng Twinkle trên đây của tôi chỉ là để phục vụ mục đích tuần tra TĐGĐ trong việc lùi tất cả sửa đổi không thiện chí do tôi chưa có quyền lùi sửa. Nếu bạn muốn công cụ có thể cảnh báo thành viên thì công cụ WarningDialog.js của Tryvix có thể giúp bạn trong trường hợp này. Bạn nên hỏi Tryvix xem sao (tôi đã ping @[[Thành viên:Tryvix1509|Tryvix1509]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:14, ngày 21 tháng 8 năm 2023 (UTC)
::Quay lại chủ đề bản mẫu cảnh báo vừa tạo không biết có nên dùng bản mẫu '''khi mà trường hợp tài khoản đó bị chặn bởi bộ lọc sai phạm''' không chứ tôi ngày nào mà chả thấy mấy tài khoản spambot dùng Wiktionary để quảng cáo có chèn đường link không à dẫn tới việc bị chặn và bị ghi lại trong bộ lọc sai phạm mà không ai phát hiện ra. (bạn có thể xem đầy đủ tại [[Đặc biệt:Nhật trình sai phạm]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:23, ngày 21 tháng 8 năm 2023 (UTC)
:::[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Thế thì dùng vậy cũng được, để tôi chỉnh lại bản mẫu cho ý tựu chung hơn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 22 tháng 8 năm 2023 (UTC)
== BQV ==
Rất vui vì bạn đã dũng cảm ra vác tù và hàng tổng. Tôi sẽ ủng hộ. Tuy nhiên, bạn cần gửi thư mời tham gia BQ BQV đến các thành viên trên Wiktionary (tv tích cực lẫn tv thỉnh thoảng xuất hiện). Chúc bạn đắc cử! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 05:55, ngày 24 tháng 8 năm 2023 (UTC)
:Tôi mới cấp quyền cho bạn. Chúc bạn tiếp tục hoạt động tích cực ở cả hai dự án, trao dồi thêm kinh nghiệm bảo quản và vài tháng nữa tự ra ứng cử làm ĐPV ở Wikipedia. Tôi sẽ ủng hộ nếu như không có gì thay đổi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 20:52, ngày 2 tháng 9 năm 2023 (UTC)
== Thư mời tham gia biểu quyết ==
<div style="padding: 0.5em; background: #f8f8ff; margin-top: 1em; font-size: 1em">
{| class="table" style="width: 80%; background-color: #ACE1AF; border: 1px solid #fceb92; margin: auto; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[Tập tin:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | '''Mời bạn cho ý kiến về việc cấp quyền Bảo quản viên cho thành viên [[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] tại trang [[Thảo luận Wiktionary:Bảo quản viên#DefenderTienMinh07|Thảo luận Wiktionary:Bảo quản viên]]. Xin cảm ơn.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!
|}
</div> [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:25, ngày 24 tháng 8 năm 2023 (UTC)
== Bất ngờ chưa! ==
Tôi tới đây là để thông báo một tin vui cho bạn. {{ý kiến|1=Tin vui là:}} Hiện tại bạn '''đã là BQV trên dự án Wiktionary tiếng Việt'''. Bạn lúc này cảm thấy thể nào? Mong bạn sẽ làm tốt công việc của mình như tôi đã nói lúc bỏ phiếu. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 21:02, ngày 2 tháng 9 năm 2023 (UTC)
:Tôi cũng không biết nói thế nào, nhưng cảm ơn bạn và Phú cũng như các thành viên khác đã hỗ trợ tôi từ dự án này qua dự án khác. Từ nay, tôi đảm nhận thêm nhiều nhiệm vụ hơn trên Wiktionary nên sẽ cố gắng chọn cách làm hiệu quả tốt nhất cho dự án. Tôi ít nói quá, vài dòng trên là tất cả, tôi không nghĩ thêm được gì để diễn tả hết. Cảm ơn vì thông báo này. Chúc bạn một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:50, ngày 3 tháng 9 năm 2023 (UTC)
== Một số sửa đổi của bạn gần đây ==
Chào bạn!
Về một số sửa đổi của bạn gần đây, như tại [[khả năng]], [[chứng minh]], ... Nếu phần định nghĩa có các từ kiểu như "nước ta", "nhân dân ta", ... thì ta nên thay bằng các từ khác hoặc xóa đi. Còn nếu nó có ở phần vd thì không cần xóa do phần này chấp nhận chứa các từ như vậy--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 12:48, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Đúng vậy, tôi đã xoá chúng đi vì Wiktionary:Thái độ trung lập. Wiktionary có quy định về phần vd được phép ngoại lệ này không?. Tôi đã có nói chuyện với HCV Mxn về điều này. Tôi khẳng định nó không trung lập và xoá đi là cần thiết, và sẽ bổ sung phần ví dụ mới vào. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:19, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Hiện tại trên dự án không có trang nào tên là [[Wiktionary:Thái độ trung lập]]. Chả là bạn muốn tìm trang quy định liên quan tới vấn đề chăng? – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:29, ngày 16 tháng 9 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chưa có chứ không phải không. Các dự án Wikipedia đều hoạt động hướng đến chung là thái độ trung lập. Wiktionary tiếng Việt không phải Wiktionary Việt Nam. HCV Mxn cũng đi xoá những thứ này. Khi dùng từ như "dân ta, nhân dân ta", khi người nước ngoài đọc, bạn nghĩ sao về điều này? Chúng ta hướng đến một dự án phục vụ mọi người, mọi chủng tộc và quốc gia, không phải riêng một đất nước nào. Vì vậy, mỗi dòng viết ra phải dựa trên thái độ trung lập. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:36, ngày 16 tháng 9 năm 2023 (UTC)
::::Bạn nói cũng đúng vì theo quy định bên Wiktionary tiếng Anh "all entries must be written from a '''neutral point of view''', representing views fairly and without bias" (tạm dịch: Mọi nội dung được đưa vào đều phải được viết từ một cái nhìn trung lập, thể hiện cái nhìn công bằng và không thiên kiến). Nhưng tôi nghĩ cũng không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV vì nội dung không trung lập thường nó cũng không ảnh hưởng gì nhiều đến dự án lắm. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:46, ngày 16 tháng 9 năm 2023 (UTC)
:::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Đây là điều đương nhiên. Chúng ta đang hoạt động trên đâu? Wiktionary là dự án bách khoa, nó ưu tiên thái độ trung lập, nơi mà một người Mỹ có thể qua đọc bài viết của một Wikimedia tiếng Đức, tiếng Việt hay tiếng Trung. Khi không trung lập, bạn nói không nhất thiết sửa lại là sao?. Đến nay tôi mới phát hiện Wiktionary tiếng Việt đang có văn phong không trung lập rất nhiều, trích câu Hồ Chí Minh, dùng thơ... Tôi cần BQV TheHighFighter2 phản hồi điều này, lẽ ra phải thảo luận với tôi trước khi lùi sửa, thứ mang tính chất mâu thuẫn. Nếu có quy định nào nói phần ví dụ ta được ngoại lệ thì tôi sẽ xem lại sửa đổi của mình. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:53, ngày 16 tháng 9 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi dám chắc là không có quy định nào về ngoại lệ này cả. Không trung lập mới là đi ngược với quy định của bách khoa. Nội dung trên đây vốn đa phần được sao chép từ FVDP một dự án không có quy định tính trung lập, khi dùng nó đưa vô thì phải xem xét ở một vài khía cạnh chứ không copy là xong được. Wiktionary không phải từ điển của Việt Nam, nó cũng không phải sách giáo khoa, không dùng văn phong thiên vị một phía, thêm thơ lại không trung lập. Bạn sang các Wiktionary tiếng khác xem, có nền tảng wiki nào dùng những câu ví dụ như "nhân dân ta chiến đấu bảo vệ tổ quốc" "chiến tranh chống đế quốc Mỹ", có xuất hiện không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:58, ngày 16 tháng 9 năm 2023 (UTC)
1. Bên en có rất nhiều mục có vd chứa các từ "[https://en.wiktionary.org/w/index.php?search=%22our+country%22&title=Special:Search&profile=advanced&fulltext=1&ns0=1 our country]", "[https://en.wiktionary.org/w/index.php?search=%22n%C6%B0%E1%BB%9Bc+ta%22&title=Special:Search&ns0=1&searchToken=12thcn782xmsjc7aixwau68ok nước ta]; bên fr có "[https://fr.wiktionary.org/w/index.php?search=%22notre+pays%22&title=Sp%C3%A9cial:Recherche&profile=advanced&fulltext=1&searchengineselect=mediawiki&ns0=1&ns100=1&ns106=1&ns110=1&searchToken=vol8t2pu9urr4hv60l40oom8 notre pays]" (đất nước chúng tôi)
2. Khi lấy vd cho mục "[[Đảng ta]]", "[[Mĩ nguỵ]]", "[[ba que]]" thì ta nên lấy vd như nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 15:57, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin gửi bạn một phần tin nhắn của tôi với HCB Mxn: "tất cả các câu thí dụ này được nhập từ Dự án Từ điển tiếng Việt miễn phí (FVDP), dự án này sao chép nguyên cả lời định nghĩa từ một số từ điển khác, có lẽ bao gồm những cuốn từ điển trong nước. (FVDP cũng có nhiều danh ngôn của Hồ Chí Minh.) Mấy năm nay tôi cũng muốn gạt đi những câu thí dụ không trung lập hoặc sửa lại theo thuật ngữ trung lập hơn. Đây chỉ là một trong rất nhiều điều thiếu sót của việc nhập FVDP. Nếu bạn có thể giúp dọn dẹp các câu thí dụ và danh ngôn thì tốt quá". Những từ tiếng Việt được xây dựng bên en cũng đa phần dùng bot và người mở rộng có cả những tv người Việt (từ ngoại quốc có thể không bị kiểm duyệt gắt gao khi người kiểm duyệt không am hiểu thứ tiếng, giống như có tv nào tạo bài tiếng phạn hay chữ Hán bên đây chúng ta thì có thể tỷ lệ phần trăm sai phạm bị bỏ qua sẽ nhiều hơn các từ hệ chữ chúng ta dùng). Còn bên fr, bạn xem ví dụ của họ có liên quan đến chủ thể cỡ nào? Nó đáng bao nhiêu phần trăm? Rõ ràng như Wiktionary vi không?. Về trường hợp lấy ví dụ của các từ như "Đảng ta" "Mĩ ngụy" thì đây là một từ, trích quy định "Tất cả các bài viết và các nội dung bách khoa khác tại Wikipedia phải được viết trên một quan điểm trung lập (QDTL), thể hiện một cách công bằng và không thiên vị" tôi nghĩ bạn đủ khả năng tự suy ra hướng tôi đang muốn nói. Khi bạn dùng từ này vô trường hợp như "Mĩ ngụy xâm chiếm nước ta" --> ám chỉ rõ ràng đây là dự án tiếng Việt và nước ta là Việt Nam. Bản chất từ tôi không nói nó vi phạm thái độ trung lập, nhưng tùy ngữ cảnh mà bạn đưa vào là một vấn đề đấy. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:18, ngày 16 tháng 9 năm 2023 (UTC)
:Thì thế tôi mới nói "không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV" đó. Nội dung không trung lập không có nghĩa là nội dung đó không hữu ích. Nói chung là tùy trường hợp, hợp lý là được miễn sao nội dung đó không quá khích. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:12, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Bạn có biết đang nói cái gì không vậy? Không trung lập = vi phạm quy định. Sửa đổi sai đang cần sửa nhưng bạn lại nói không cần thiết?. WP:Thái độ trung lập là một trong những trụ cột của Wikimedia, cho dù đó là sửa đổi thiện chí nhưng vi phạm thì cũng không cần. Dự án chúng ta các tv đã không còn khả năng sửa điều này? Nếu không, tại sao chấp nhận nó?. Sao có thể nhưng không thay bằng một nội dung vừa hữu ích vừa phù hợp với chính sách của ta hơn. Tôi không hiểu bạn Tiến Minh nói không nhất thiết giải quyết những điều này là gì? Bên Wikipedia có nhiều tk bị cấm vì thái độ trung lập đấy và thành viên không kiểm soát được điều này nên mấy tk này quay lại và thành rối nằm vùng. Phần nội dung hiện rõ lên vậy, bạn lại nói là không quá khích. Thế nào là quá khích, đủ để các tv bắt tay vào làm? Tôi xin nhắc lại, Wiktionary tiếng Việt không phải Wiktionary Việt Nam. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:26, ngày 16 tháng 9 năm 2023 (UTC)
Hướng giải quyết:
Nếu 1 mục từ bình thường có vd chứa các từ như trên: thay thế vd khác.
Còn các từ liên quan đến chính trị, trường hợp đặc biệt khác, thì có thể lấy vd chứa những từ như trên.
Bạn thấy thế nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 16:53, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin phiền bạn đưa phần tin nhắn này ra trang thảo luận vì Tiến Minh đã gửi thư nên tôi đã di chuyển nó ra thảo để mọi người có thể cùng nhau giải quyết. Cảm ơn bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:00, ngày 16 tháng 9 năm 2023 (UTC)
:''Đã di chuyển đến [[Wiktionary:Thảo luận#Tính trung lập]].'' – [[Thành viên:Mxn|Nguyễn Xuân Minh]] <sup>[[Thảo luận Thành viên:Mxn|<span style="display: inline-block;">💬</span>]]</sup> 01:56, ngày 17 tháng 9 năm 2023 (UTC)
== [[Cửu đoạn tuyến]] ==
Phiền bạn check và gỡ một số nội dung không trung lập trong mục từ này (nếu có), tôi thấy có nội dung không trung lập nhưng chưa thể gỡ do liên quan đến mục từ, xin cảm ơn. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 11:34, ngày 10 tháng 10 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi không thấy có thông tin nào là không trung lập, bài viết có nội dung rất ít, đây là bài do bạn khởi tạo. Nếu vẫn còn tin phần nào là không trung lập, bạn cứ thoải mái dẫn vào đây tôi xem. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:42, ngày 10 tháng 10 năm 2023 (UTC)
== Kay ==
Kay đang diễn tuồng và giả làm Ti2008. Ti2008 và tôi thật là bạn thân trên Wikipedia và đã biết nhau từ năm 2008 rồi. Cách nói chuyện đó chỉ có thể là Kay. Mai mốt, nếu Kay tái xuất ở đây thì bạn cứ việc cấm vô hạn. Nếu là Ti2008 thật thì bạn ấy sẽ log vào acc Ti2008 để nói chuyện với tôi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 23:34, ngày 14 tháng 12 năm 2023 (UTC)
== [[Thành viên:WhoAlone]] ==
Bạn nên đề cử tv này luôn để dự án chúng ta có thêm 2 BQV mới rất tích cực! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 02:58, ngày 31 tháng 12 năm 2023 (UTC)
== Hellu bạn ==
Nay có nhã hứng ghé qua đây chút, tui đang tính đóng góp dự án này và duy trì bên Wikiquote (bên đó sau vụ thi viết bài là lại vắng). Nên là bạn có thể giới thiệu sơ sơ về cách hoạt động bên này không? [[Thành viên:Pminh141|Pminh141]] ([[Thảo luận Thành viên:Pminh141|thảo luận]]) 18:22, ngày 23 tháng 7 năm 2024 (UTC)
:[[Thành viên:Pminh141|Pminh141]] Chỉ cần xem [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion# Wiktionary:Độ nổi bật] và [https://en.wiktionary.org/wiki/Wiktionary:Neutral_point_of_view Thái độ trung lập] là có thể đóng góp (có thể tham khảo từ điển để viết). Dự án còn rất sơ khai về mảng quy định, tương lai tôi sẽ dự tính soạn thảo tập trung vô mảng này. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 02:24, ngày 24 tháng 7 năm 2024 (UTC)
== Đổi thay ==
Phiền bạn giúp cấp lại quyền lùi sửa và gỡ quyền tại acc chính với ạ, Bạn có thể xem [[w:en:Wikipedia:Administrators' noticeboard#Unmerge my account from global|tại thảo luận này]], xin cảm ơn. – [[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]] ([[Thảo luận Thành viên:TienMinh-mun6xnChing|thảo luận]]) 12:01, ngày 29 tháng 10 năm 2024 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:54, ngày 29 tháng 10 năm 2024 (UTC)
== Các công cụ (tập lệnh) ở Wiktionary ==
Phiên bản sắp tới của Zinnia sẽ mở rộng cho phép sử dụng ở Wiktionary. Tôi muốn hỏi trong quy trình làm việc ở đây, bạn và mọi người có sử dụng công cụ hay tập lệnh (script) gì không, để bổ sung vào Zinnia. Cảm ơn. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
: Tag thêm @[[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]]. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
::[[Thành viên:Plantaest|Plantaest]] Các công cụ hay script để chống phá hoại thông thường các tv sẽ tự cài đặt ở Meta. Vì Wiktionary chỉ có mỗi BQV mới có bộ công cụ đầy đủ chức năng (gồm cả thao tác đánh dấu tuần tra), trừ "lùi sửa" vì có quyền riêng cho tác này. Do khác Wikipedia vấn đề này, tôi nghĩ giao diện cần nghiên cứu thêm nếu áp dụng. P/s Tôi dùng Restorer thay cho Twinkle (khi hồi sửa). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:02, ngày 2 tháng 11 năm 2024 (UTC)
== Cần hỗ trợ về quyết định xóa bài ==
Em đang chỉnh sửa bài đăng và không biết là add vào gây spam, phiền anh hỗ trợ em với ạ – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 11:34, ngày 17 tháng 12 năm 2024 (UTC)
:Theo [https://vi.wiktionary.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:Nh%E1%BA%ADt_tr%C3%ACnh/Nntrinh76 nhật trình], bài viết bạn tạo mang nội dung vượt ngoài dự án (Wiktionary chỉ bao gồm các mục từ). Bài viết này cũng có nội dung PR cá nhân. Đó là lý do cho việc nhắc nhở. Mời bạn tham khảo [[Wiktionary:Quy định và hướng dẫn]] để rút kinh nghiệm cho các lần sửa đổi sau. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 13:16, ngày 17 tháng 12 năm 2024 (UTC)
::anh có thể mở để em chỉnh sửa được không ạ? do cũng là lần đầu em viết và em đã dùng 2 ngày tổng hợp.. – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 15:35, ngày 17 tháng 12 năm 2024 (UTC)
:::Trang bạn đã tạo không liên quan gì đến Wiktionary cả, tại vì đây là trang từ điển, không phải là nơi để tạo hoặc chỉnh sửa bài viết. Cho nên tôi, Đăng hoặc bqv khác không thể mở khóa cái trang đó được. – [[Thành viên:Nguyên Hưng Trần|<span style="color:#74a12e;font-family:Georgia, serif;">'''NHT'''</span>]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|💬]]) 16:15, ngày 17 tháng 12 năm 2024 (UTC)
== lời cảm ơn ==
Cảm ơn vì đã trả lời trên [[Thảo_luận:bồ_các]], vì đó là không gian công cộng nên không tiện. Không biết nhấn nút cảm ơn thì kết quả sẽ được chuyển đến người đó hay kq sẽ như thế nào nhỉ, vì nhấn nhiều lần rồi nhưng không biết sẽ như thế nào? Mình có ai cảm ơn đâu, còn IP thì không cảm ơn được. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:05, ngày 13 tháng 2 năm 2025 (UTC)
:Từ người thực hiện, chuyển đến người được nhận. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:02, ngày 13 tháng 2 năm 2025 (UTC)
== Xin chào ==
Nếu có thể tôi cần giúp đỡ – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:32, ngày 14 tháng 3 năm 2025 (UTC)
:[[Thành viên:Henrydat|Henrydat]] Bạn có thể nêu vấn đề cụ thể. Nếu là các việc liên quan dự án, tôi sẽ giúp trong khả năng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:42, ngày 14 tháng 3 năm 2025 (UTC)
::Ô trời, tim tôi đang đập đây, tôi thấy chữ rối ở đây bạn biết tôi là ai còn hỏi? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:50, ngày 14 tháng 3 năm 2025 (UTC)
:::Này tôi không có thời gian, tới giờ này thì việc này rất gấp? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:55, ngày 14 tháng 3 năm 2025 (UTC)
::::tất nhiên tôi không có ý nói tôi là rối, tôi chỉ xem lịch sử đóng góp nói vậy thôi, nếu bạn biết trước tôi là ai thì mới giúp được – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:58, ngày 14 tháng 3 năm 2025 (UTC)
:::::Rồi xong tôi đã đến lộn chỗ, quyết định không hoạt đông tại dự án này là quyết định đúng đắn – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 18:02, ngày 14 tháng 3 năm 2025 (UTC)
::::::Cần lưu ý cơ chế cấm người dùng hoạt động độc lập trên mỗi dự án, tức là ngoại trừ việc lạm dụng xuyên wiki hoặc bị cấm chỉ, thành viên vẫn có thể hoạt động và xem như một tài khoản bình thường khi qua dự án khác. Bạn vẫn có thể hoạt động tại đây và tuân theo quy định tại dự án này; ngược lại, bạn có tùy quyền quyết định không tham gia đóng góp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 07:44, ngày 15 tháng 3 năm 2025 (UTC)
:::::::Này chúng ta có thể tiếp tục cuộc trò chuyện sau 7 tháng không, bây giờ có thể là lúc thích hợp hoặc có thể sớm hơn hoặc trễ hơn? Nói như bạn vậy thì dễ quá rồi, tôi hy vọng mình không mắc sai lầm. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:45, ngày 9 tháng 11 năm 2025 (UTC)
== [[Special:Tags]] ==
Tôi đang test script, nhờ bạn tạo một thẻ với tên thẻ là “twinkle” và tên hiển thị là “Twinkle” để script chạy. Cảm ơn bạn. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 00:30, ngày 1 tháng 4 năm 2025 (UTC)
:[[Thành viên:Hide on Rosé|Hide on Rosé]] {{Tick}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 1 tháng 4 năm 2025 (UTC)
:: Nào bạn rảnh thì bạn sửa lại phần tên hiển thị: Liên kết tới [[Wiktionary:Twinkle]] nhé. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 09:51, ngày 1 tháng 4 năm 2025 (UTC)
[[Tập tin:Wiktionary Deletion Tools 2025.png|nhỏ|250px|phải]]
:::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi upload màn hình chụp công cụ xóa quản trị viên Wiktionary. Bạn tham khảo. Twinkle hiện tại có vẻ chủ yếu phù hợp bài viết Wikipedia. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:34, ngày 2 tháng 4 năm 2025 (UTC)
:::: @[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Danh sách xoá mà bạn chụp thì tôi xem được ở đây: [[MediaWiki:Deletereason-dropdown]]. Mô đun này tôi đã sửa theo bộ tiêu chí xoá của dự án này, bạn có thể thử. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 03:40, ngày 2 tháng 4 năm 2025 (UTC)
:::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Công cụ xóa hiện như trang [[MediaWiki:Deletereason-dropdown]] chỉ xuất hiện khi bài viết có tựa đề "Wikitionary" hoặc "MediaWiki"; đối với các mục từ thì như hình chụp. Có vẻ phải chỉnh làm sao khi các thành viên ấn Twinkle gắn bản mẫu xóa trang mục từ thì nó hiện lên các lý do liên quan cho mục từ. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:48, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Đúng là như vậy. Trang trong không gian chính là mục từ (trừ Trang Chính) và cả Twinkle lẫn MediaWiki đều hiện lý do tương ứn, theo không gian tên,. code trong trang MediaWiki hiện theo không gian tên, bạn có thể xem mã nguồn của nó. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:41, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Xem [[Special:Diff/prev/2225367]]. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:44, ngày 2 tháng 4 năm 2025 (UTC)
:::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Ok, đã test. PS Thiếu tiêu chí độ nổi bật. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:52, ngày 2 tháng 4 năm 2025 (UTC)
:::::::: Tiêu chí đó được quy định ở đâu? Tôi không thấy trong [[Wiktionary:XN]]? [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 10:53, ngày 2 tháng 4 năm 2025 (UTC)
:::::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi xem qua có vẻ đúng thật chưa có trong [[Wiktionary:Quy định xóa trang]], có lẽ trang này đã lâu không cập nhật khi dự án tiến triển. Độ nổi bật các mục từ nằm trong quy định [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion này]. Tiêu chí độ nổi bật cũng có trong công cụ xóa của quản trị viên (hình). Ngoài ra, tham khảo thử quy định [https://simple.wiktionary.org/wiki/Wiktionary:Deletion#Articles này] (quy định độ nổi bật của dự án Simple English về một số mục từ). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:19, ngày 2 tháng 4 năm 2025 (UTC)
: @[[Thành viên:Hide on Rosé|Hide on Rosé]] Khi tôi gắn biển chất lượng kém bằng Twinkle cho bài [[freeter]] thì xuất hiện vần đề ([[Đặc biệt:Khác/2225470|xem]]). Tôi nghĩ bản mẫu <code><nowiki>{{chất lượng kém}}</nowiki></code> và <code><nowiki>{{Chất lượng kém (nguồn)}}</nowiki></code> có vấn đề rồi. [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] 14:01, ngày 2 tháng 4 năm 2025 (UTC)
== github.com ==
Khi dọn bớt trang thảo luận [[Thảo luận Wiktionary:Thảo luận]] để lưu trữ thì có liên kết này bị vào blacklist. Phiền bạn xem xét có thể gỡ liên kết này ra khỏi blacklist được không? [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] ([[User talk:Ayane Fumihiro|<span style="color:#008080;">But we got it yeah</span>]]) 16:06, ngày 22 tháng 5 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:17, ngày 22 tháng 5 năm 2025 (UTC)
== "ủ ôi" ==
Từ này hay xuất hiện trong văn nói, đôi khi đọc truyện tranh tôi có bắt gặp, nhưng không biết nên định nghĩa thế nào? Nhờ bạn hỗ trợ tạo trang nếu được. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 15:37, ngày 23 tháng 7 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Đã tạo trang. Từ này nó giống "trời ơi", "trời đất" miền Nam hay gọi thôi. P.S Bạn có câu ví dụ nào hay thì thêm vô nếu muốn (2 đến 3 câu ví dụ đều được, nhưng trung lập và không yếu tố bình luận chính trị). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 05:38, ngày 24 tháng 7 năm 2025 (UTC)
== "clause" ==
Từ "clause" trong tiếng Anh nên được dịch là "mệnh đề" hay "cú" / "tiểu cú" vậy? Mình thấy các trang web dạy tiếng Anh ở Việt Nam ngày nay đều dịch là mệnh đề, nhưng khi mình tra từ điển ''Thuật ngữ ngôn ngữ học Anh – Việt Việt – Anh'', tr. 44 của Cao Xuân Hạo, Hoàng Dũng thì lại dịch là "tiểu cú". Bên ''Từ điển Khái niệm Ngôn ngữ học'', tr. 136 của Nguyễn Thiện Giáp cũng dịch tương tự. Phiền bạn trợ giúp. --[[Thành viên:I can see my baby swimming|I can see my baby swimming]] ([[Thảo luận Thành viên:I can see my baby swimming|thảo luận]]) 12:30, ngày 31 tháng 7 năm 2025 (UTC)
:[[Thành viên:I can see my baby swimming|I can see my baby swimming]] Theo nguồn [https://vjol.info.vn/index.php/sphcm/article/view/27696] (trang 14) và [https://js.vnu.edu.vn/FS/article/view/380] (trang 29), cho thấy đều là cách dịch đúng của "clause". Dịch "mệnh đề" đồng nghĩa "cú/tiểu cú" nhưng cách dịch sau mang tính học thuật chuyên môn. Tôi nghĩ có thể xem xét bối cảnh chọn cách dịch phù hợp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:55, ngày 1 tháng 8 năm 2025 (UTC)
== [[Thành viên:Yuki Shiromita/Snowfall.css]] ==
Nhờ bạn xóa trang này, tôi không cần css để trang trí nữa do rất lag <span style="font-family:Segoe UI Light">[[User:Yuki Shiromita|<b style="color:#FF69B4">nettai</b>]] [[Special:Contributions/Yuki Shiromita|<b style="color:#FF964F">no</b>]] [[User talk:Yuki Shiromita|<b style="color:#93E7FB">shirayukihime</b>]]</span> 06:48, ngày 30 tháng 8 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:05, ngày 30 tháng 8 năm 2025 (UTC)
==Happy Holidays==
<div style="border-style:solid; border-color:violet; background-color:#fff; border-width:2px; text-align:left; padding:8px;" class="plainlinks">
{| style="border: 5px dotted #H1790; background-color: #DDDDDD; padding:4px"
| rowspan="2" valign="left" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Christmas Tree 2011-12-24.jpg|left|300px|link=]]<span style="display:block;padding-top:10px;clear:both">
| <span style="font-family: Georgia; font-size: 98%; color: #190a89;">Chúc bạn P. ĐĂNG có một mùa '''Giáng sinh''' an lành, ấm áp và tràn ngập yêu thương bên gia đình!<br/> Bước sang '''năm mới''' 2026, chúc bạn gặp nhiều may mắn,<br/> gặt hái được nhiều thành công trong công việc và học tập.<br/> Một lần nữa chúc bạn sẽ có một năm mới thật an khang, hạnh phúc và vạn sự như ý!!</span> <br />
<span style="font-family: Georgia; font-size: 92%;">
| rowspan="2" valign="right" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Atlantic Firework Festival 2016 (53368638571).jpg|left|360px|link=]]<span style="display:block;padding-top:10px;clear:both">
|}</div>
Lời chúc chân thành từ: <span style="background:#978FF;border:solid 1px;border-radius:8px;box-shadow:darkblue 2px 2px 2px"> [[User:Kelly zhrm|<span style="font-family:Old English Text MT;color:#C90">Yellow</span>]]|[[User talk:Kelly zhrm|ø]] </span> 05:54, ngày 24 tháng 12 năm 2025 (UTC)
:[[Thành viên:Kelly zhrm|Kelly zhrm]] Cảm ơn cực muộn :D. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:11, ngày 9 tháng 1 năm 2026 (UTC)
== a đuồi ==
Đôi khi tôi thấy từ này, nhưng không chắc định nghĩa nó thế nào? [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 08:01, ngày 30 tháng 12 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Dùng khi người nói biểu thị hàm ý nhưng không muốn diễn đạt rõ sự việc ám chỉ bằng cách nói thông thường và người nghe nhiều khả năng "sẽ" hiểu. Sau kết quả [https://www.google.com/search?q=a+%C4%91u%E1%BB%93i&sca_esv=fdc603a36385362d&rlz=1C1GCEA_enVN1050VN1050&biw=1536&bih=730&aic=0&sxsrf=ANbL-n6bNxATTi-Ja0wA8rmwvQPrO6MF7Q%3A1767953043675&ei=k9Jgae77KLCp4-EP1-n-6AI&ved=0ahUKEwiukZepmv6RAxWw1DgGHde0Hy0Q4dUDCBE tra cứu], tôi tham khảo một số trang web có nhắc đến cụm từ này và hiểu được như trên. Ngoài ra, một số ngữ cảnh được hiểu theo cách [https://www.hieuchua.com/define/A%20%C4%90u%E1%BB%93i này]. Các trang này chưa đủ uy tín để dùng "giải nghĩa" nhưng nó là tất cả trong khả năng có thể dùng tìm hiểu hiện tại. Hy vọng hữu ích đến bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:07, ngày 9 tháng 1 năm 2026 (UTC)
== PANG450a, b, c, d, e ==
Yummie giả dạng rối PANG450v của PVR từ lúc hắn tạo tài khoản PANG450a sao?? Tôi tưởng PVR tạo rối sửa đổi ở đây chứ! Mà khoan, Yummie hắn thường spam đường link tới các wiki Fandom, Miraheze và trang đóng góp của tài khoản hắn giả dạng (PANG450v) hả? – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 16:20, ngày 21 tháng 1 năm 2026 (UTC)
: Cái trò [[mượn gió bẻ măng]] của Yummie quá cũ rồi. Thật không còn gì đáng bàn. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 17:01, ngày 21 tháng 1 năm 2026 (UTC)
:[[Thành viên:Higashizakura|Higashizakura]] Phạm Văn Rạng là rối sửa bài viết chính trị (khá nghiêm túc và có khả năng biên tập; chỉ hoạt động tại các dự án Wikipedia vì mục đích chính sửa bài viết chính trị); Yummie là rối spam phá hoại. Có thể dựa vào nhật trình sửa đổi của tk nhận dạng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:48, ngày 22 tháng 1 năm 2026 (UTC)
== [[porfolio]] và [[portfolio]] ==
Từ đầu có vẻ là sai chính tả, qua enwikt thì đó là tiếng Tây Ban Nha. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 04:19, ngày 24 tháng 2 năm 2026 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Tra theo cú pháp "'Porfolio' (Conjunto de fotografías o grabados de diferentes clases que forman un tomo o volumen encuadernable)", thấy ghi nhận cơ bản là mục từ tiếng Tây Ban Nha phỏng theo tiếng Anh và Pháp đã bỏ âm "t" sau khi nước này đưa vào từ điển sử dụng. [[Thành viên:Hiyuune|Hiyuune]] đã giúp sửa. P.S Có vẻ cách dịch nghĩa hiện tại trong bài sai so với nguồn (nguồn [https://www.scribd.com/document/378489759/SUSTANTIVOS-COLECTIVOS#content=query:porfolio,pageNum:1,indexOnPage:0,bestMatch:false này] cũng không thấy theo nghĩa dịch vậy). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:23, ngày 25 tháng 2 năm 2026 (UTC)
hj1e3ei98lwb8em7b8vcc468cquwam2
2350199
2350189
2026-05-05T03:55:38Z
WhoAlone
40420
Đã khóa “[[Thảo luận Thành viên:P. ĐĂNG]]”: Bị [[Wiktionary:Phá hoại|phá hoại]] quá mức ([Sửa đổi=Chỉ cho phép thành viên tự xác nhận] (hết hạn 03:55, ngày 5 tháng 8 năm 2026) [Di chuyển=Chỉ cho phép thành viên tự xác nhận] (hết hạn 03:55, ngày 5 tháng 8 năm 2026))
2350124
wikitext
text/x-wiki
<div style="border:1px solid #FDA; vertical-align:top; padding: 0.5em; background: #FFFFE5;">
<div style="margin-left:0.5em; margin-right: 0.5em; margin-bottom:1em; margin-top: 0.1em;">
<span style="font-size: 1.3rem;">'''Xin chào P. ĐĂNG! Chào mừng bạn đến với Wiktionary tiếng Việt!'''</span>
<div class="plainlinks"><p style="margin-top:0.1em; margin-bottom: 1em;">Wiktionary là từ điển mở mà ai cũng đều có thể chỉnh sửa. Cách sử dụng và quy định có thể gây khó khăn cho bạn, nhưng hãy dần học hỏi và '''[[Wiktionary:Táo bạo|mạnh dạn đóng góp]]'''. Các thông tin dưới đây sẽ có thể giúp bạn sử dụng và chỉnh sửa Wiktionary.</p></div>
</div>
<!-- Quan trọng -->
<div style="clear: both; margin-left: 1.5em; margin-right 1.5em; font-size: 100%;">
{| class="plainlinks" width="100%" style="margin:auto;"
| style="text-align:center; padding:4px" | [[File:OOjs UI icon search-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Tìm kiếm|Tìm kiếm Wiktionary]]''' <br />Tìm hiểu cách tìm và tra cứu mục từ trên Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon lightbulb.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Yêu cầu mục từ|Yêu cầu mục từ]]'''<br />Nơi để bạn thêm những từ cần viết nhưng chưa có tại Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon userAvatar.svg|30px|link=|]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Cộng đồng|Cổng Cộng đồng Wiktionary tiếng Việt]]'''<br />Nơi tìm hiểu mọi thông tin về của Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon articleCheck-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Quy định và hướng dẫn|Quy định và hướng dẫn]]''' <br />Chính sách của Wiktionary là gì? Xin vui lòng đọc nó trước khi thực hiện chỉnh sửa!
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon edit-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Viết trang mới|Viết trang mới]]'''<br />Tham khảo cách viết trang hay mục từ mới tại Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon tray.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Chỗ thử|Chỗ thử]]'''<br />Nơi để bạn viết nháp và thử nghiệm.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon wikiText.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Sửa đổi|Thực hiện sửa đổi]]'''<br />Tham khảo hướng dẫn sửa đổi và cùng bắt đầu sửa đổi Wiktionary.
| style="text-align:center; padding:4px" | [[File:OOjs UI icon helpNotice-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Bàn giúp đỡ|Bàn giúp đỡ]]'''<br />Nơi hỏi đáp khi gặp khó khăn trên Wiktionary.
|-
| style="text-align:center; padding:4px" | [[File:OOjs UI icon book-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Trợ giúp:Mục lục|Mục lục trợ giúp]]''' <br />Mục lục giúp bạn thông tin và hướng dẫn khác khi gặp khó khăn trong những lúc đóng góp!
| style="text-align:center; padding:4px" | [[File:OOjs UI icon speechBubbles-ltr.svg|30px|link=]]
| style="width:50%; padding:4px;" | '''[[Wiktionary:Thảo luận|Thảo luận chung]]'''<br />Nơi trao đổi ý kiến giữa bạn và các thành viên khác!
|}</div>
<div style="padding: 0.5em; background: #FEC; border: 1px solid #FDA; margin-top: 1em; font-size: 1em">
[[File:Vector sig vi.png|250px|right]]
'''Hãy luôn nhớ rằng, sau khi viết thảo luận xong thì đừng quên bước quan trọng đó là ký tên ở phía sau thảo luận'''. Phương thức ký tên được sử dụng trong Wiktionary không phải là viết tên trực tiếp, nhưng xin hãy ký tên bằng cách sử dụng 4 dấu ngã (<code><nowiki>--~~~~</nowiki></code>) hoặc bằng cách nhấp vào nút chữ ký ([[File:OOUI JS signature icon LTR.svg|20px|border]]) trong cửa sổ chỉnh sửa của phiên bản trình soạn thảo mã nguồn thông thường.<br/>
[[Wiktionary:Guestbook_for_non-Vietnamese_speakers|Welcome! If you are not good at Vietnamese or do not speak it, click here.]]
</div>
</div> --.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 07:34, ngày 24 tháng 6 năm 2023 (UTC)
== BQV ==
Bạn có muốn làm BQV ở Wiktionary này không? Nếu có hứng thú, mời bạn ra ứng cử ở [[Thảo luận Wiktionary:Bảo quản viên]]. Tôi muốn tuyển thêm BQV cho Wiktionary vì Wiktionary hiện tại không có BQV thường trực. Đây là môi trường thực tập tốt trước khi làm ĐPV bên Wikipedia. Hồi xưa, tôi cũng đóng góp cho cả hai dự án cùng một lúc (Wikipedia + Wiktionary). [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 13:32, ngày 2 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tôi hay hoạt động bên đây thật nhưng bên đây tôi có ít sửa đổi. Chỉ vài tuần trước tôi xin quyền lùi sửa để chống phá hoại nhưng không đủ yêu cầu thì BQV làm sao tôi ứng cử được. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:33, ngày 2 tháng 8 năm 2023 (UTC)
::Bên Wiktionary không có yêu cầu tối thiểu để làm BQV. Bạn có đóng góp bên Wikipedia thì ra ứng cử là ok rồi. Quan trọng là bạn có muốn vác tù và hàng tổng không thôi? [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:23, ngày 2 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Nguyentrongphu|Nguyentrongphu]] Tất nhiên, nếu có cơ hội được công đồng giao phó thì tôi sẽ làm. Nhưng chắc tôi cần tích cực cày sửa đổi một thời gian vì hiện tại tôi có dưới 300 sửa đổi. Có thể, tôi nghĩ tôi sẽ tích cực bên dự án này vài tuần cái đã. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:27, ngày 2 tháng 8 năm 2023 (UTC)
::::Bạn tính vậy cũng được. Cày sửa đổi là dễ mà. 2 tuần sau, mời bạn tự ra ứng cử. Tôi sẽ ủng hộ. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 15:57, ngày 2 tháng 8 năm 2023 (UTC)
== Mệt nhỉ? ==
Tụi này lì như trâu thật, mới chập sáng đòi vặt lông bẻ cổ tổ tông nhà tôi này. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:43, ngày 3 tháng 8 năm 2023 (UTC)
:@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Tôi qua đây thì gặp TTS. Haha MTRIRod với bạn Phú nói đúng, tên này ám tôi như ma ám rồi. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:44, ngày 3 tháng 8 năm 2023 (UTC)
::Mà hình như bên vi chưa cấm tên [https://vi.wikipedia.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:%C4%90%C3%B3ng_g%C3%B3p/%C4%90%E1%BB%ABng_b%C6%A1_S%C6%A1n_n%E1%BB%AFa,_S%C6%A1n_c%C3%B4_%C4%91%C6%A1n_l%E1%BA%AFm! này] thì phải? – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:48, ngày 3 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] Chắc cấm sót, mà TTS chắc không dùng lại tk đó đâu. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:50, ngày 3 tháng 8 năm 2023 (UTC)
::::Đâu, vừa nhắc xong thì hình như mới chửi Nguyenmy kìa. – [[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] ([[Thảo luận Thành viên:Quangkhanhhuynh|thảo luận]]) 08:52, ngày 3 tháng 8 năm 2023 (UTC)
:::::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] @[[Thành viên:Quangkhanhhuynh|Quangkhanhhuynh]] @[[Thành viên:Tryvix1509|Tryvix1509]] @[[Thành viên:NguoiDungKhongDinhDanh|NguoiDungKhongDinhDanh]] Mà không biết tôi có nên đệ đơn cấm chỉ tên TTS này đến Nhóm Tin cậy & An toàn của tổ chức Wikimedia không nhỉ? – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 09:58, ngày 3 tháng 8 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tổ chức này hoạt động như thế nào?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:03, ngày 3 tháng 8 năm 2023 (UTC)
:::::::Tôi cũng chỉ [[m:WMF Global Ban Policy/vi|đọc thoáng qua sơ sơ về quy định cấm chỉ toàn hệ thống tổ chức này]], và thấy tổ chức hoạt động qua email ca@wikimedia.org – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:07, ngày 3 tháng 8 năm 2023 (UTC)
::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Là cấm chỉ một tk toàn cầu bên meta đúng không?. Chắc không cần rồi và cũng không hiệu quả. Tôi nhớ không lầm TTS bị cấm toàn cục từ tk đầu tiên rồi. Hiện giờ dùng proxy thì cấm toàn cục gì nữa. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:10, ngày 3 tháng 8 năm 2023 (UTC)
:::::::::Các tk rối của TTS như bạn nói chỉ bị khóa toàn cục = TTS vẫn chưa bị cấm chỉ trên toàn hệ thống. Tôi nghĩ biện pháp này là cách hay nhất để răn đe tên này, chắc tôi nghĩ để lúc khác làm sau vậy. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:17, ngày 3 tháng 8 năm 2023 (UTC)
::::::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chẳng phải khóa toàn cầu là trên toàn hệ thống Wikipedia? TTS không dùng một tk cố định và dùng proxy. Cấm tk này thì sẽ nhảy qua tk khác bằng một IP khác. Đề xuất của bạn không rõ ràng, tôi chưa hiểu lắm. Nếu được thì làm ngay bây giờ luôn đi. Tôi mới báo cái tk của TTS lên meta cho tiếp viên cấm toàn cầu đấy, hai tk nãy giờ phá hoại hiện đang bị cấm. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:25, ngày 3 tháng 8 năm 2023 (UTC)
== Bản mẫu cảnh báo mới ==
Cảm ơn bạn đã tạo bản mẫu cánh báo về việc sử dụng Wiktionary để quảng cáo. Nhưng tôi thấy bên Wikipedia tiếng Việt [[:w:vi:Bản mẫu:Spam|trang Bản mẫu:Spam]] là dùng để báo cáo liên kết rác, vì vậy xin phép tôi được đổi tên bản mẫu [[Đặc biệt:So sánh di động/2119930|từ "spam-1" thành "Cb1-spam"]]. Tôi không biết việc làm của tôi có đúng không do bên Wikipedia tiếng Việt cũng có [[:w:vi:Bản mẫu:Cb1-spam|bản mẫu tên như thế này]] chắc dùng để cảnh báo thành viên về việc thêm liên kết quảng cáo trong bài. Và nếu bạn thấy tôi sai mong bạn hãy lùi lại. Cảm ơn bạn. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:54, ngày 14 tháng 8 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07]]: Cảm ơn Tiến Minh. Nhưng lần sau bạn hãy đọc kỹ nội dung bản mẫu, bản mẫu này không phải cảnh báo thêm link spam mà là thông tin quảng cáo, tức là khi tv tạo bài PR (trang mới, PR trong trang thảo luận, hoặc chèn thông tin PR) thì dùng bản mẫu này. Mỗi wiktionary hoạt động độc lập, cộng đồng bên ta vốn nhỏ bé và ít người nên đặt tên bản mẫu đừng thêm vài chữ làm rườm rà khó nhớ, hầu hết thành viên không dùng Twinkle và đặt biển thủ công nên tôi chọn tên ngắn để các bạn dễ dùng. Nhưng nếu bạn đã đổi thì để vậy cũng được vì tôi đang cần làm thêm vài thứ, nâng cấp một vài thứ thiết yếu và để tên tạm như thế cũng được nếu tương lai có phát sinh thêm tôi sẽ thay đổi một vài bản mẫu cho phù hợp và nhất quán. Sẵn đây tôi hỏi bạn có dùng Twinkle không? Nếu có cho tôi xin một vài ý kiến có được không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:25, ngày 16 tháng 8 năm 2023 (UTC)
::Do dự án đang trong phát triển về mảng tin học nên tôi nghĩ trang global.js trên Meta sẽ là giải pháp hay để cài công cụ. Các công cụ hữu ích tôi vừa tìm được cho dự án: Restorer của BrandonXLF, TwinkleGlobal của Xiplus và WarningDialog.js của Tryvix1509 và nhiều người khác. Tôi chưa hiểu câu hỏi bạn đặt ra cho lắm, nếu bạn đang hỏi về công cụ TwinkleMobile của Plantaest trên dự án này thì tôi nghĩ bạn nên hỏi Plantaest do công cụ vẫn chưa được Plantaest kích hoạt trên đây. – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 18:07, ngày 17 tháng 8 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Ý tôi là việc dùng Twinkle của bạn trên đây có giống bên Wikipedia không? Nó có chức năng gắn biển, cảnh báo hay chỉ dừng lại ở chức năng lùi sửa. Tôi không dùng Twinkle trên đây, nên tôi mới hỏi bạn để biết thêm thông tin do tôi cần nâng cấp một vài bản mẫu và muốn kích hoạt nó vô Twinkle, tôi muốn Twinkle bên đây được cấu hình lại cho tiện và đầy đủ chức năng giống bên các dự án khác cho các bạn dùng. Tôi sẽ làm trong phạm vi có thể, nhưng chắc sẽ cần thời gian. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:38, ngày 18 tháng 8 năm 2023 (UTC)
::::Việc dùng Twinkle trên đây của tôi chỉ là để phục vụ mục đích tuần tra TĐGĐ trong việc lùi tất cả sửa đổi không thiện chí do tôi chưa có quyền lùi sửa. Nếu bạn muốn công cụ có thể cảnh báo thành viên thì công cụ WarningDialog.js của Tryvix có thể giúp bạn trong trường hợp này. Bạn nên hỏi Tryvix xem sao (tôi đã ping @[[Thành viên:Tryvix1509|Tryvix1509]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:14, ngày 21 tháng 8 năm 2023 (UTC)
::Quay lại chủ đề bản mẫu cảnh báo vừa tạo không biết có nên dùng bản mẫu '''khi mà trường hợp tài khoản đó bị chặn bởi bộ lọc sai phạm''' không chứ tôi ngày nào mà chả thấy mấy tài khoản spambot dùng Wiktionary để quảng cáo có chèn đường link không à dẫn tới việc bị chặn và bị ghi lại trong bộ lọc sai phạm mà không ai phát hiện ra. (bạn có thể xem đầy đủ tại [[Đặc biệt:Nhật trình sai phạm]]) – [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 17:23, ngày 21 tháng 8 năm 2023 (UTC)
:::[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Thế thì dùng vậy cũng được, để tôi chỉnh lại bản mẫu cho ý tựu chung hơn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 22 tháng 8 năm 2023 (UTC)
== BQV ==
Rất vui vì bạn đã dũng cảm ra vác tù và hàng tổng. Tôi sẽ ủng hộ. Tuy nhiên, bạn cần gửi thư mời tham gia BQ BQV đến các thành viên trên Wiktionary (tv tích cực lẫn tv thỉnh thoảng xuất hiện). Chúc bạn đắc cử! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 05:55, ngày 24 tháng 8 năm 2023 (UTC)
:Tôi mới cấp quyền cho bạn. Chúc bạn tiếp tục hoạt động tích cực ở cả hai dự án, trao dồi thêm kinh nghiệm bảo quản và vài tháng nữa tự ra ứng cử làm ĐPV ở Wikipedia. Tôi sẽ ủng hộ nếu như không có gì thay đổi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 20:52, ngày 2 tháng 9 năm 2023 (UTC)
== Thư mời tham gia biểu quyết ==
<div style="padding: 0.5em; background: #f8f8ff; margin-top: 1em; font-size: 1em">
{| class="table" style="width: 80%; background-color: #ACE1AF; border: 1px solid #fceb92; margin: auto; margin-bottom: 10px"
| style="vertical-align: middle; padding: 10px;" | [[Tập tin:Logo vote.svg|80px|link=]]
| style="vertical-align: middle; padding: 15px 10px 10px 0;" | '''Mời bạn cho ý kiến về việc cấp quyền Bảo quản viên cho thành viên [[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] tại trang [[Thảo luận Wiktionary:Bảo quản viên#DefenderTienMinh07|Thảo luận Wiktionary:Bảo quản viên]]. Xin cảm ơn.
<small>Hãy cùng tích cực tham gia các biểu quyết và thảo luận về chúng. Mỗi hành động của bạn sẽ góp phần không nhỏ để xây dựng các mục từ trên Wiktionary - tài sản chung của cộng đồng chúng ta, giúp wiki ta ngày càng phát triển vững mạnh! Thân ái!
|}
</div> [[User:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[User talk:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 10:25, ngày 24 tháng 8 năm 2023 (UTC)
== Bất ngờ chưa! ==
Tôi tới đây là để thông báo một tin vui cho bạn. {{ý kiến|1=Tin vui là:}} Hiện tại bạn '''đã là BQV trên dự án Wiktionary tiếng Việt'''. Bạn lúc này cảm thấy thể nào? Mong bạn sẽ làm tốt công việc của mình như tôi đã nói lúc bỏ phiếu. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 21:02, ngày 2 tháng 9 năm 2023 (UTC)
:Tôi cũng không biết nói thế nào, nhưng cảm ơn bạn và Phú cũng như các thành viên khác đã hỗ trợ tôi từ dự án này qua dự án khác. Từ nay, tôi đảm nhận thêm nhiều nhiệm vụ hơn trên Wiktionary nên sẽ cố gắng chọn cách làm hiệu quả tốt nhất cho dự án. Tôi ít nói quá, vài dòng trên là tất cả, tôi không nghĩ thêm được gì để diễn tả hết. Cảm ơn vì thông báo này. Chúc bạn một ngày tốt lành. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:50, ngày 3 tháng 9 năm 2023 (UTC)
== Một số sửa đổi của bạn gần đây ==
Chào bạn!
Về một số sửa đổi của bạn gần đây, như tại [[khả năng]], [[chứng minh]], ... Nếu phần định nghĩa có các từ kiểu như "nước ta", "nhân dân ta", ... thì ta nên thay bằng các từ khác hoặc xóa đi. Còn nếu nó có ở phần vd thì không cần xóa do phần này chấp nhận chứa các từ như vậy--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 12:48, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Đúng vậy, tôi đã xoá chúng đi vì Wiktionary:Thái độ trung lập. Wiktionary có quy định về phần vd được phép ngoại lệ này không?. Tôi đã có nói chuyện với HCV Mxn về điều này. Tôi khẳng định nó không trung lập và xoá đi là cần thiết, và sẽ bổ sung phần ví dụ mới vào. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:19, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Hiện tại trên dự án không có trang nào tên là [[Wiktionary:Thái độ trung lập]]. Chả là bạn muốn tìm trang quy định liên quan tới vấn đề chăng? – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:29, ngày 16 tháng 9 năm 2023 (UTC)
:::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Chưa có chứ không phải không. Các dự án Wikipedia đều hoạt động hướng đến chung là thái độ trung lập. Wiktionary tiếng Việt không phải Wiktionary Việt Nam. HCV Mxn cũng đi xoá những thứ này. Khi dùng từ như "dân ta, nhân dân ta", khi người nước ngoài đọc, bạn nghĩ sao về điều này? Chúng ta hướng đến một dự án phục vụ mọi người, mọi chủng tộc và quốc gia, không phải riêng một đất nước nào. Vì vậy, mỗi dòng viết ra phải dựa trên thái độ trung lập. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:36, ngày 16 tháng 9 năm 2023 (UTC)
::::Bạn nói cũng đúng vì theo quy định bên Wiktionary tiếng Anh "all entries must be written from a '''neutral point of view''', representing views fairly and without bias" (tạm dịch: Mọi nội dung được đưa vào đều phải được viết từ một cái nhìn trung lập, thể hiện cái nhìn công bằng và không thiên kiến). Nhưng tôi nghĩ cũng không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV vì nội dung không trung lập thường nó cũng không ảnh hưởng gì nhiều đến dự án lắm. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 14:46, ngày 16 tháng 9 năm 2023 (UTC)
:::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Đây là điều đương nhiên. Chúng ta đang hoạt động trên đâu? Wiktionary là dự án bách khoa, nó ưu tiên thái độ trung lập, nơi mà một người Mỹ có thể qua đọc bài viết của một Wikimedia tiếng Đức, tiếng Việt hay tiếng Trung. Khi không trung lập, bạn nói không nhất thiết sửa lại là sao?. Đến nay tôi mới phát hiện Wiktionary tiếng Việt đang có văn phong không trung lập rất nhiều, trích câu Hồ Chí Minh, dùng thơ... Tôi cần BQV TheHighFighter2 phản hồi điều này, lẽ ra phải thảo luận với tôi trước khi lùi sửa, thứ mang tính chất mâu thuẫn. Nếu có quy định nào nói phần ví dụ ta được ngoại lệ thì tôi sẽ xem lại sửa đổi của mình. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:53, ngày 16 tháng 9 năm 2023 (UTC)
::::::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi dám chắc là không có quy định nào về ngoại lệ này cả. Không trung lập mới là đi ngược với quy định của bách khoa. Nội dung trên đây vốn đa phần được sao chép từ FVDP một dự án không có quy định tính trung lập, khi dùng nó đưa vô thì phải xem xét ở một vài khía cạnh chứ không copy là xong được. Wiktionary không phải từ điển của Việt Nam, nó cũng không phải sách giáo khoa, không dùng văn phong thiên vị một phía, thêm thơ lại không trung lập. Bạn sang các Wiktionary tiếng khác xem, có nền tảng wiki nào dùng những câu ví dụ như "nhân dân ta chiến đấu bảo vệ tổ quốc" "chiến tranh chống đế quốc Mỹ", có xuất hiện không?. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:58, ngày 16 tháng 9 năm 2023 (UTC)
1. Bên en có rất nhiều mục có vd chứa các từ "[https://en.wiktionary.org/w/index.php?search=%22our+country%22&title=Special:Search&profile=advanced&fulltext=1&ns0=1 our country]", "[https://en.wiktionary.org/w/index.php?search=%22n%C6%B0%E1%BB%9Bc+ta%22&title=Special:Search&ns0=1&searchToken=12thcn782xmsjc7aixwau68ok nước ta]; bên fr có "[https://fr.wiktionary.org/w/index.php?search=%22notre+pays%22&title=Sp%C3%A9cial:Recherche&profile=advanced&fulltext=1&searchengineselect=mediawiki&ns0=1&ns100=1&ns106=1&ns110=1&searchToken=vol8t2pu9urr4hv60l40oom8 notre pays]" (đất nước chúng tôi)
2. Khi lấy vd cho mục "[[Đảng ta]]", "[[Mĩ nguỵ]]", "[[ba que]]" thì ta nên lấy vd như nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 15:57, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin gửi bạn một phần tin nhắn của tôi với HCB Mxn: "tất cả các câu thí dụ này được nhập từ Dự án Từ điển tiếng Việt miễn phí (FVDP), dự án này sao chép nguyên cả lời định nghĩa từ một số từ điển khác, có lẽ bao gồm những cuốn từ điển trong nước. (FVDP cũng có nhiều danh ngôn của Hồ Chí Minh.) Mấy năm nay tôi cũng muốn gạt đi những câu thí dụ không trung lập hoặc sửa lại theo thuật ngữ trung lập hơn. Đây chỉ là một trong rất nhiều điều thiếu sót của việc nhập FVDP. Nếu bạn có thể giúp dọn dẹp các câu thí dụ và danh ngôn thì tốt quá". Những từ tiếng Việt được xây dựng bên en cũng đa phần dùng bot và người mở rộng có cả những tv người Việt (từ ngoại quốc có thể không bị kiểm duyệt gắt gao khi người kiểm duyệt không am hiểu thứ tiếng, giống như có tv nào tạo bài tiếng phạn hay chữ Hán bên đây chúng ta thì có thể tỷ lệ phần trăm sai phạm bị bỏ qua sẽ nhiều hơn các từ hệ chữ chúng ta dùng). Còn bên fr, bạn xem ví dụ của họ có liên quan đến chủ thể cỡ nào? Nó đáng bao nhiêu phần trăm? Rõ ràng như Wiktionary vi không?. Về trường hợp lấy ví dụ của các từ như "Đảng ta" "Mĩ ngụy" thì đây là một từ, trích quy định "Tất cả các bài viết và các nội dung bách khoa khác tại Wikipedia phải được viết trên một quan điểm trung lập (QDTL), thể hiện một cách công bằng và không thiên vị" tôi nghĩ bạn đủ khả năng tự suy ra hướng tôi đang muốn nói. Khi bạn dùng từ này vô trường hợp như "Mĩ ngụy xâm chiếm nước ta" --> ám chỉ rõ ràng đây là dự án tiếng Việt và nước ta là Việt Nam. Bản chất từ tôi không nói nó vi phạm thái độ trung lập, nhưng tùy ngữ cảnh mà bạn đưa vào là một vấn đề đấy. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:18, ngày 16 tháng 9 năm 2023 (UTC)
:Thì thế tôi mới nói "không nhất thiết lắm phải kiểm tra và sửa lại những nội dung POV" đó. Nội dung không trung lập không có nghĩa là nội dung đó không hữu ích. Nói chung là tùy trường hợp, hợp lý là được miễn sao nội dung đó không quá khích. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 16:12, ngày 16 tháng 9 năm 2023 (UTC)
::@[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Bạn có biết đang nói cái gì không vậy? Không trung lập = vi phạm quy định. Sửa đổi sai đang cần sửa nhưng bạn lại nói không cần thiết?. WP:Thái độ trung lập là một trong những trụ cột của Wikimedia, cho dù đó là sửa đổi thiện chí nhưng vi phạm thì cũng không cần. Dự án chúng ta các tv đã không còn khả năng sửa điều này? Nếu không, tại sao chấp nhận nó?. Sao có thể nhưng không thay bằng một nội dung vừa hữu ích vừa phù hợp với chính sách của ta hơn. Tôi không hiểu bạn Tiến Minh nói không nhất thiết giải quyết những điều này là gì? Bên Wikipedia có nhiều tk bị cấm vì thái độ trung lập đấy và thành viên không kiểm soát được điều này nên mấy tk này quay lại và thành rối nằm vùng. Phần nội dung hiện rõ lên vậy, bạn lại nói là không quá khích. Thế nào là quá khích, đủ để các tv bắt tay vào làm? Tôi xin nhắc lại, Wiktionary tiếng Việt không phải Wiktionary Việt Nam. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:26, ngày 16 tháng 9 năm 2023 (UTC)
Hướng giải quyết:
Nếu 1 mục từ bình thường có vd chứa các từ như trên: thay thế vd khác.
Còn các từ liên quan đến chính trị, trường hợp đặc biệt khác, thì có thể lấy vd chứa những từ như trên.
Bạn thấy thế nào?
--.--[[Thành viên:TheHighFighter2|TheHighFighter2]] ([[Thảo luận Thành viên:TheHighFighter2|thảo luận]]) 16:53, ngày 16 tháng 9 năm 2023 (UTC)
:@[[Thành viên:TheHighFighter2|TheHighFighter2]] Xin phiền bạn đưa phần tin nhắn này ra trang thảo luận vì Tiến Minh đã gửi thư nên tôi đã di chuyển nó ra thảo để mọi người có thể cùng nhau giải quyết. Cảm ơn bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:00, ngày 16 tháng 9 năm 2023 (UTC)
:''Đã di chuyển đến [[Wiktionary:Thảo luận#Tính trung lập]].'' – [[Thành viên:Mxn|Nguyễn Xuân Minh]] <sup>[[Thảo luận Thành viên:Mxn|<span style="display: inline-block;">💬</span>]]</sup> 01:56, ngày 17 tháng 9 năm 2023 (UTC)
== [[Cửu đoạn tuyến]] ==
Phiền bạn check và gỡ một số nội dung không trung lập trong mục từ này (nếu có), tôi thấy có nội dung không trung lập nhưng chưa thể gỡ do liên quan đến mục từ, xin cảm ơn. – [[Thành viên:DefenderTienMinh07|<span style="background:#808080;color:#FFFF00;border-radius:3px;"> '''☀DefenderTienMinh⛤☯☽'''</span>]] ([[Thảo luận Thành viên:DefenderTienMinh07|<span style="font-family:Simhei;color:#808080;">talk</span>]]) 11:34, ngày 10 tháng 10 năm 2023 (UTC)
:[[Thành viên:DefenderTienMinh07|DefenderTienMinh07]] Tôi không thấy có thông tin nào là không trung lập, bài viết có nội dung rất ít, đây là bài do bạn khởi tạo. Nếu vẫn còn tin phần nào là không trung lập, bạn cứ thoải mái dẫn vào đây tôi xem. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 15:42, ngày 10 tháng 10 năm 2023 (UTC)
== Kay ==
Kay đang diễn tuồng và giả làm Ti2008. Ti2008 và tôi thật là bạn thân trên Wikipedia và đã biết nhau từ năm 2008 rồi. Cách nói chuyện đó chỉ có thể là Kay. Mai mốt, nếu Kay tái xuất ở đây thì bạn cứ việc cấm vô hạn. Nếu là Ti2008 thật thì bạn ấy sẽ log vào acc Ti2008 để nói chuyện với tôi. [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 23:34, ngày 14 tháng 12 năm 2023 (UTC)
== [[Thành viên:WhoAlone]] ==
Bạn nên đề cử tv này luôn để dự án chúng ta có thêm 2 BQV mới rất tích cực! [[Thành viên:Nguyentrongphu|Nguyentrongphu]] ([[Thảo luận Thành viên:Nguyentrongphu|thảo luận]]) 02:58, ngày 31 tháng 12 năm 2023 (UTC)
== Hellu bạn ==
Nay có nhã hứng ghé qua đây chút, tui đang tính đóng góp dự án này và duy trì bên Wikiquote (bên đó sau vụ thi viết bài là lại vắng). Nên là bạn có thể giới thiệu sơ sơ về cách hoạt động bên này không? [[Thành viên:Pminh141|Pminh141]] ([[Thảo luận Thành viên:Pminh141|thảo luận]]) 18:22, ngày 23 tháng 7 năm 2024 (UTC)
:[[Thành viên:Pminh141|Pminh141]] Chỉ cần xem [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion# Wiktionary:Độ nổi bật] và [https://en.wiktionary.org/wiki/Wiktionary:Neutral_point_of_view Thái độ trung lập] là có thể đóng góp (có thể tham khảo từ điển để viết). Dự án còn rất sơ khai về mảng quy định, tương lai tôi sẽ dự tính soạn thảo tập trung vô mảng này. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 02:24, ngày 24 tháng 7 năm 2024 (UTC)
== Đổi thay ==
Phiền bạn giúp cấp lại quyền lùi sửa và gỡ quyền tại acc chính với ạ, Bạn có thể xem [[w:en:Wikipedia:Administrators' noticeboard#Unmerge my account from global|tại thảo luận này]], xin cảm ơn. – [[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]] ([[Thảo luận Thành viên:TienMinh-mun6xnChing|thảo luận]]) 12:01, ngày 29 tháng 10 năm 2024 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:54, ngày 29 tháng 10 năm 2024 (UTC)
== Các công cụ (tập lệnh) ở Wiktionary ==
Phiên bản sắp tới của Zinnia sẽ mở rộng cho phép sử dụng ở Wiktionary. Tôi muốn hỏi trong quy trình làm việc ở đây, bạn và mọi người có sử dụng công cụ hay tập lệnh (script) gì không, để bổ sung vào Zinnia. Cảm ơn. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
: Tag thêm @[[Thành viên:TienMinh-mun6xnChing|TienMinh-mun6xnChing]]. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 13:11, ngày 2 tháng 11 năm 2024 (UTC)
::[[Thành viên:Plantaest|Plantaest]] Các công cụ hay script để chống phá hoại thông thường các tv sẽ tự cài đặt ở Meta. Vì Wiktionary chỉ có mỗi BQV mới có bộ công cụ đầy đủ chức năng (gồm cả thao tác đánh dấu tuần tra), trừ "lùi sửa" vì có quyền riêng cho tác này. Do khác Wikipedia vấn đề này, tôi nghĩ giao diện cần nghiên cứu thêm nếu áp dụng. P/s Tôi dùng Restorer thay cho Twinkle (khi hồi sửa). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 14:02, ngày 2 tháng 11 năm 2024 (UTC)
== Cần hỗ trợ về quyết định xóa bài ==
Em đang chỉnh sửa bài đăng và không biết là add vào gây spam, phiền anh hỗ trợ em với ạ – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 11:34, ngày 17 tháng 12 năm 2024 (UTC)
:Theo [https://vi.wiktionary.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:Nh%E1%BA%ADt_tr%C3%ACnh/Nntrinh76 nhật trình], bài viết bạn tạo mang nội dung vượt ngoài dự án (Wiktionary chỉ bao gồm các mục từ). Bài viết này cũng có nội dung PR cá nhân. Đó là lý do cho việc nhắc nhở. Mời bạn tham khảo [[Wiktionary:Quy định và hướng dẫn]] để rút kinh nghiệm cho các lần sửa đổi sau. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 13:16, ngày 17 tháng 12 năm 2024 (UTC)
::anh có thể mở để em chỉnh sửa được không ạ? do cũng là lần đầu em viết và em đã dùng 2 ngày tổng hợp.. – [[Thành viên:Nntrinh76|Nntrinh76]] ([[Thảo luận Thành viên:Nntrinh76|thảo luận]]) 15:35, ngày 17 tháng 12 năm 2024 (UTC)
:::Trang bạn đã tạo không liên quan gì đến Wiktionary cả, tại vì đây là trang từ điển, không phải là nơi để tạo hoặc chỉnh sửa bài viết. Cho nên tôi, Đăng hoặc bqv khác không thể mở khóa cái trang đó được. – [[Thành viên:Nguyên Hưng Trần|<span style="color:#74a12e;font-family:Georgia, serif;">'''NHT'''</span>]] ([[Thảo luận Thành viên:Nguyên Hưng Trần|💬]]) 16:15, ngày 17 tháng 12 năm 2024 (UTC)
== lời cảm ơn ==
Cảm ơn vì đã trả lời trên [[Thảo_luận:bồ_các]], vì đó là không gian công cộng nên không tiện. Không biết nhấn nút cảm ơn thì kết quả sẽ được chuyển đến người đó hay kq sẽ như thế nào nhỉ, vì nhấn nhiều lần rồi nhưng không biết sẽ như thế nào? Mình có ai cảm ơn đâu, còn IP thì không cảm ơn được. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:05, ngày 13 tháng 2 năm 2025 (UTC)
:Từ người thực hiện, chuyển đến người được nhận. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:02, ngày 13 tháng 2 năm 2025 (UTC)
== Xin chào ==
Nếu có thể tôi cần giúp đỡ – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:32, ngày 14 tháng 3 năm 2025 (UTC)
:[[Thành viên:Henrydat|Henrydat]] Bạn có thể nêu vấn đề cụ thể. Nếu là các việc liên quan dự án, tôi sẽ giúp trong khả năng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 17:42, ngày 14 tháng 3 năm 2025 (UTC)
::Ô trời, tim tôi đang đập đây, tôi thấy chữ rối ở đây bạn biết tôi là ai còn hỏi? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:50, ngày 14 tháng 3 năm 2025 (UTC)
:::Này tôi không có thời gian, tới giờ này thì việc này rất gấp? – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:55, ngày 14 tháng 3 năm 2025 (UTC)
::::tất nhiên tôi không có ý nói tôi là rối, tôi chỉ xem lịch sử đóng góp nói vậy thôi, nếu bạn biết trước tôi là ai thì mới giúp được – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 17:58, ngày 14 tháng 3 năm 2025 (UTC)
:::::Rồi xong tôi đã đến lộn chỗ, quyết định không hoạt đông tại dự án này là quyết định đúng đắn – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 18:02, ngày 14 tháng 3 năm 2025 (UTC)
::::::Cần lưu ý cơ chế cấm người dùng hoạt động độc lập trên mỗi dự án, tức là ngoại trừ việc lạm dụng xuyên wiki hoặc bị cấm chỉ, thành viên vẫn có thể hoạt động và xem như một tài khoản bình thường khi qua dự án khác. Bạn vẫn có thể hoạt động tại đây và tuân theo quy định tại dự án này; ngược lại, bạn có tùy quyền quyết định không tham gia đóng góp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 07:44, ngày 15 tháng 3 năm 2025 (UTC)
:::::::Này chúng ta có thể tiếp tục cuộc trò chuyện sau 7 tháng không, bây giờ có thể là lúc thích hợp hoặc có thể sớm hơn hoặc trễ hơn? Nói như bạn vậy thì dễ quá rồi, tôi hy vọng mình không mắc sai lầm. – [[Thành viên:Henrydat|Henrydat]] ([[Thảo luận Thành viên:Henrydat|thảo luận]]) 15:45, ngày 9 tháng 11 năm 2025 (UTC)
== [[Special:Tags]] ==
Tôi đang test script, nhờ bạn tạo một thẻ với tên thẻ là “twinkle” và tên hiển thị là “Twinkle” để script chạy. Cảm ơn bạn. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 00:30, ngày 1 tháng 4 năm 2025 (UTC)
:[[Thành viên:Hide on Rosé|Hide on Rosé]] {{Tick}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:08, ngày 1 tháng 4 năm 2025 (UTC)
:: Nào bạn rảnh thì bạn sửa lại phần tên hiển thị: Liên kết tới [[Wiktionary:Twinkle]] nhé. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 09:51, ngày 1 tháng 4 năm 2025 (UTC)
[[Tập tin:Wiktionary Deletion Tools 2025.png|nhỏ|250px|phải]]
:::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi upload màn hình chụp công cụ xóa quản trị viên Wiktionary. Bạn tham khảo. Twinkle hiện tại có vẻ chủ yếu phù hợp bài viết Wikipedia. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:34, ngày 2 tháng 4 năm 2025 (UTC)
:::: @[[Thành viên:P. ĐĂNG|P. ĐĂNG]] Danh sách xoá mà bạn chụp thì tôi xem được ở đây: [[MediaWiki:Deletereason-dropdown]]. Mô đun này tôi đã sửa theo bộ tiêu chí xoá của dự án này, bạn có thể thử. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 03:40, ngày 2 tháng 4 năm 2025 (UTC)
:::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Công cụ xóa hiện như trang [[MediaWiki:Deletereason-dropdown]] chỉ xuất hiện khi bài viết có tựa đề "Wikitionary" hoặc "MediaWiki"; đối với các mục từ thì như hình chụp. Có vẻ phải chỉnh làm sao khi các thành viên ấn Twinkle gắn bản mẫu xóa trang mục từ thì nó hiện lên các lý do liên quan cho mục từ. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 03:48, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Đúng là như vậy. Trang trong không gian chính là mục từ (trừ Trang Chính) và cả Twinkle lẫn MediaWiki đều hiện lý do tương ứn, theo không gian tên,. code trong trang MediaWiki hiện theo không gian tên, bạn có thể xem mã nguồn của nó. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:41, ngày 2 tháng 4 năm 2025 (UTC)
:::::: Xem [[Special:Diff/prev/2225367]]. [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 05:44, ngày 2 tháng 4 năm 2025 (UTC)
:::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Ok, đã test. PS Thiếu tiêu chí độ nổi bật. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:52, ngày 2 tháng 4 năm 2025 (UTC)
:::::::: Tiêu chí đó được quy định ở đâu? Tôi không thấy trong [[Wiktionary:XN]]? [[Thành viên:Hide on Rosé|Hide on Rosé]] ([[Thảo luận Thành viên:Hide on Rosé|thảo luận]]) 10:53, ngày 2 tháng 4 năm 2025 (UTC)
:::::::::[[Thành viên:Hide on Rosé|Hide on Rosé]] Tôi xem qua có vẻ đúng thật chưa có trong [[Wiktionary:Quy định xóa trang]], có lẽ trang này đã lâu không cập nhật khi dự án tiến triển. Độ nổi bật các mục từ nằm trong quy định [https://en.wiktionary.org/wiki/Wiktionary:Criteria_for_inclusion này]. Tiêu chí độ nổi bật cũng có trong công cụ xóa của quản trị viên (hình). Ngoài ra, tham khảo thử quy định [https://simple.wiktionary.org/wiki/Wiktionary:Deletion#Articles này] (quy định độ nổi bật của dự án Simple English về một số mục từ). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:19, ngày 2 tháng 4 năm 2025 (UTC)
: @[[Thành viên:Hide on Rosé|Hide on Rosé]] Khi tôi gắn biển chất lượng kém bằng Twinkle cho bài [[freeter]] thì xuất hiện vần đề ([[Đặc biệt:Khác/2225470|xem]]). Tôi nghĩ bản mẫu <code><nowiki>{{chất lượng kém}}</nowiki></code> và <code><nowiki>{{Chất lượng kém (nguồn)}}</nowiki></code> có vấn đề rồi. [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] 14:01, ngày 2 tháng 4 năm 2025 (UTC)
== github.com ==
Khi dọn bớt trang thảo luận [[Thảo luận Wiktionary:Thảo luận]] để lưu trữ thì có liên kết này bị vào blacklist. Phiền bạn xem xét có thể gỡ liên kết này ra khỏi blacklist được không? [[User:Ayane Fumihiro|<b style="font-family:Segoe UI Light;color:#FF69B4;letter-spacing:">femboy_clen</b>]] ([[User talk:Ayane Fumihiro|<span style="color:#008080;">But we got it yeah</span>]]) 16:06, ngày 22 tháng 5 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:17, ngày 22 tháng 5 năm 2025 (UTC)
== "ủ ôi" ==
Từ này hay xuất hiện trong văn nói, đôi khi đọc truyện tranh tôi có bắt gặp, nhưng không biết nên định nghĩa thế nào? Nhờ bạn hỗ trợ tạo trang nếu được. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 15:37, ngày 23 tháng 7 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Đã tạo trang. Từ này nó giống "trời ơi", "trời đất" miền Nam hay gọi thôi. P.S Bạn có câu ví dụ nào hay thì thêm vô nếu muốn (2 đến 3 câu ví dụ đều được, nhưng trung lập và không yếu tố bình luận chính trị). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 05:38, ngày 24 tháng 7 năm 2025 (UTC)
== "clause" ==
Từ "clause" trong tiếng Anh nên được dịch là "mệnh đề" hay "cú" / "tiểu cú" vậy? Mình thấy các trang web dạy tiếng Anh ở Việt Nam ngày nay đều dịch là mệnh đề, nhưng khi mình tra từ điển ''Thuật ngữ ngôn ngữ học Anh – Việt Việt – Anh'', tr. 44 của Cao Xuân Hạo, Hoàng Dũng thì lại dịch là "tiểu cú". Bên ''Từ điển Khái niệm Ngôn ngữ học'', tr. 136 của Nguyễn Thiện Giáp cũng dịch tương tự. Phiền bạn trợ giúp. --[[Thành viên:I can see my baby swimming|I can see my baby swimming]] ([[Thảo luận Thành viên:I can see my baby swimming|thảo luận]]) 12:30, ngày 31 tháng 7 năm 2025 (UTC)
:[[Thành viên:I can see my baby swimming|I can see my baby swimming]] Theo nguồn [https://vjol.info.vn/index.php/sphcm/article/view/27696] (trang 14) và [https://js.vnu.edu.vn/FS/article/view/380] (trang 29), cho thấy đều là cách dịch đúng của "clause". Dịch "mệnh đề" đồng nghĩa "cú/tiểu cú" nhưng cách dịch sau mang tính học thuật chuyên môn. Tôi nghĩ có thể xem xét bối cảnh chọn cách dịch phù hợp. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 08:55, ngày 1 tháng 8 năm 2025 (UTC)
== [[Thành viên:Yuki Shiromita/Snowfall.css]] ==
Nhờ bạn xóa trang này, tôi không cần css để trang trí nữa do rất lag <span style="font-family:Segoe UI Light">[[User:Yuki Shiromita|<b style="color:#FF69B4">nettai</b>]] [[Special:Contributions/Yuki Shiromita|<b style="color:#FF964F">no</b>]] [[User talk:Yuki Shiromita|<b style="color:#93E7FB">shirayukihime</b>]]</span> 06:48, ngày 30 tháng 8 năm 2025 (UTC)
:{{Done}} [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 16:05, ngày 30 tháng 8 năm 2025 (UTC)
==Happy Holidays==
<div style="border-style:solid; border-color:violet; background-color:#fff; border-width:2px; text-align:left; padding:8px;" class="plainlinks">
{| style="border: 5px dotted #H1790; background-color: #DDDDDD; padding:4px"
| rowspan="2" valign="left" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Christmas Tree 2011-12-24.jpg|left|300px|link=]]<span style="display:block;padding-top:10px;clear:both">
| <span style="font-family: Georgia; font-size: 98%; color: #190a89;">Chúc bạn P. ĐĂNG có một mùa '''Giáng sinh''' an lành, ấm áp và tràn ngập yêu thương bên gia đình!<br/> Bước sang '''năm mới''' 2026, chúc bạn gặp nhiều may mắn,<br/> gặt hái được nhiều thành công trong công việc và học tập.<br/> Một lần nữa chúc bạn sẽ có một năm mới thật an khang, hạnh phúc và vạn sự như ý!!</span> <br />
<span style="font-family: Georgia; font-size: 92%;">
| rowspan="2" valign="right" |<span style="margin:0px 10px 10px 0px;box-shadow:0px 3px 4px rgba(0, 0, 0, 0.45);display:inline-block;">[[File:Atlantic Firework Festival 2016 (53368638571).jpg|left|360px|link=]]<span style="display:block;padding-top:10px;clear:both">
|}</div>
Lời chúc chân thành từ: <span style="background:#978FF;border:solid 1px;border-radius:8px;box-shadow:darkblue 2px 2px 2px"> [[User:Kelly zhrm|<span style="font-family:Old English Text MT;color:#C90">Yellow</span>]]|[[User talk:Kelly zhrm|ø]] </span> 05:54, ngày 24 tháng 12 năm 2025 (UTC)
:[[Thành viên:Kelly zhrm|Kelly zhrm]] Cảm ơn cực muộn :D. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 10:11, ngày 9 tháng 1 năm 2026 (UTC)
== a đuồi ==
Đôi khi tôi thấy từ này, nhưng không chắc định nghĩa nó thế nào? [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 08:01, ngày 30 tháng 12 năm 2025 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Dùng khi người nói biểu thị hàm ý nhưng không muốn diễn đạt rõ sự việc ám chỉ bằng cách nói thông thường và người nghe nhiều khả năng "sẽ" hiểu. Sau kết quả [https://www.google.com/search?q=a+%C4%91u%E1%BB%93i&sca_esv=fdc603a36385362d&rlz=1C1GCEA_enVN1050VN1050&biw=1536&bih=730&aic=0&sxsrf=ANbL-n6bNxATTi-Ja0wA8rmwvQPrO6MF7Q%3A1767953043675&ei=k9Jgae77KLCp4-EP1-n-6AI&ved=0ahUKEwiukZepmv6RAxWw1DgGHde0Hy0Q4dUDCBE tra cứu], tôi tham khảo một số trang web có nhắc đến cụm từ này và hiểu được như trên. Ngoài ra, một số ngữ cảnh được hiểu theo cách [https://www.hieuchua.com/define/A%20%C4%90u%E1%BB%93i này]. Các trang này chưa đủ uy tín để dùng "giải nghĩa" nhưng nó là tất cả trong khả năng có thể dùng tìm hiểu hiện tại. Hy vọng hữu ích đến bạn. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 11:07, ngày 9 tháng 1 năm 2026 (UTC)
== PANG450a, b, c, d, e ==
Yummie giả dạng rối PANG450v của PVR từ lúc hắn tạo tài khoản PANG450a sao?? Tôi tưởng PVR tạo rối sửa đổi ở đây chứ! Mà khoan, Yummie hắn thường spam đường link tới các wiki Fandom, Miraheze và trang đóng góp của tài khoản hắn giả dạng (PANG450v) hả? – [[Thành viên:Higashizakura|<span style="color:pink; font-family:Noto Serif JP, serif;">'''Anh Đào Phương Đông'''</span>]] ([[Thảo luận Thành viên:Higashizakura|🌸]]) 16:20, ngày 21 tháng 1 năm 2026 (UTC)
: Cái trò [[mượn gió bẻ măng]] của Yummie quá cũ rồi. Thật không còn gì đáng bàn. [[User:Hiyuune|<b style="font-family:Segoe UI Light;color:#FFB3AE;letter-spacing:">Hiyuune</b>]] [[User talk: Hiyuune|<b style="font-family:Segoe UI Light;color:#FFF7AD;letter-spacing:">(angustifolia)</b>]] 17:01, ngày 21 tháng 1 năm 2026 (UTC)
:[[Thành viên:Higashizakura|Higashizakura]] Phạm Văn Rạng là rối sửa bài viết chính trị (khá nghiêm túc và có khả năng biên tập; chỉ hoạt động tại các dự án Wikipedia vì mục đích chính sửa bài viết chính trị); Yummie là rối spam phá hoại. Có thể dựa vào nhật trình sửa đổi của tk nhận dạng. [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 06:48, ngày 22 tháng 1 năm 2026 (UTC)
== [[porfolio]] và [[portfolio]] ==
Từ đầu có vẻ là sai chính tả, qua enwikt thì đó là tiếng Tây Ban Nha. [[Thành viên:Plantaest|Plantaest]] ([[Thảo luận Thành viên:Plantaest|thảo luận]]) 04:19, ngày 24 tháng 2 năm 2026 (UTC)
:[[Thành viên:Plantaest|Plantaest]] Tra theo cú pháp "'Porfolio' (Conjunto de fotografías o grabados de diferentes clases que forman un tomo o volumen encuadernable)", thấy ghi nhận cơ bản là mục từ tiếng Tây Ban Nha phỏng theo tiếng Anh và Pháp đã bỏ âm "t" sau khi nước này đưa vào từ điển sử dụng. [[Thành viên:Hiyuune|Hiyuune]] đã giúp sửa. P.S Có vẻ cách dịch nghĩa hiện tại trong bài sai so với nguồn (nguồn [https://www.scribd.com/document/378489759/SUSTANTIVOS-COLECTIVOS#content=query:porfolio,pageNum:1,indexOnPage:0,bestMatch:false này] cũng không thấy theo nghĩa dịch vậy). [[Thành viên:P. ĐĂNG|Phong Đăng]] ([[Thảo luận Thành viên:P. ĐĂNG|thảo luận]]) 04:23, ngày 25 tháng 2 năm 2026 (UTC)
hj1e3ei98lwb8em7b8vcc468cquwam2
Bản mẫu:hin-proper noun
10
291444
2350160
2127445
2026-05-04T16:12:29Z
EmausBot
33069
Giải quyết đổi hướng kép đến [[Bản mẫu:hi-proper noun]]
2350160
wikitext
text/x-wiki
#đổi [[Bản mẫu:hi-proper noun]]
ijmk6bt5dcjgg2lcl9tvkl0eeybruq5
Bản mẫu:hi-pr-noun
10
291445
2350159
2127446
2026-05-04T16:12:19Z
EmausBot
33069
Giải quyết đổi hướng kép đến [[Bản mẫu:hi-proper noun]]
2350159
wikitext
text/x-wiki
#đổi [[Bản mẫu:hi-proper noun]]
ijmk6bt5dcjgg2lcl9tvkl0eeybruq5
𠄩親
0
291724
2350211
2128323
2026-05-05T04:06:33Z
Kelly zhrm
58416
2350211
wikitext
text/x-wiki
=={{langname|vi}}==
{{vi-hantutab}}
==={{ĐM|n}}===
{{vi-noun|sc=Hani}}
# {{vi-Nom form of|hai thân|[[parents]]}}
#* {{RQ:Nguyen Du TK 1870|line=430|passage={{vi-ruby|𠄩親群𢷣席花渚衛|hai thân còn dở tiệc hoa chưa về}}}}
n45qdddg4dj6le5986h9tpt1d6e5jxx
2350212
2350211
2026-05-05T04:06:46Z
Kelly zhrm
58416
2350212
wikitext
text/x-wiki
=={{langname|vi}}==
{{vi-hantutab}}
==={{ĐM|n}}===
{{vi-noun|sc=Hani}}
# {{vi-Nom form of|hai thân}}
#* {{RQ:Nguyen Du TK 1870|line=430|passage={{vi-ruby|𠄩親群𢷣席花渚衛|hai thân còn dở tiệc hoa chưa về}}}}
5exq467492d8qkia3qglm0pxrvxbe9z
veearts
0
298416
2350230
2144306
2026-05-05T06:14:46Z
Hiyuune
50834
2350230
wikitext
text/x-wiki
=={{langname|nl}}==
==={{section|etym}}===
{{compound+|nl|vee|t1=gia súc|arts|t2=bác sĩ}}.
==={{section|pron}}===
* {{IPA4|nl|/ˈveː.ɑrts/}}
* {{audio|nl|Nl-veearts.ogg}}
* {{hyph|nl|vee|arts}}
==={{section|n}}===
{{nl-noun|m|-en|+}}
# [[bác sĩ|Bác sĩ]] [[thú y]], chủ yếu điều trị cho động vật [[trang trại]].
===={{section|coord}}====
* {{l|nl|dierenarts}}
===={{section|drv}}====
* {{l|nl|veeartsenij}}
==={{section|ana}}===
* {{l|nl|veraste}}
5b5emtpnpnz21h1o5z4dd57iq8ig2g1
Amon
0
320845
2350156
2248943
2026-05-04T15:17:26Z
TheHighFighter2
42988
/* Tiếng Ba Lan */
2350156
wikitext
text/x-wiki
{{also|Phụ lục:Biến thể của "amon"}}
=={{langname|en}}==
==={{ĐM|pr-noun}}===
{{en-prop}}
# {{altform|en|Amun}}
==={{ĐM|ana}}===
* {{anagrams|en|a=amno|Noam|Mona|mona|Mano|Oman|NOMA|noma|Onam|maon|MONA|mano|moan}}
=={{langname|pl}}==
{{wp|pl:[[+ (bóg egipski)|+]]}}
[[File:Amun post Amarna (azure skin color).svg|thumb|Amon]]
==={{ĐM|etym}}===
{{dercat|pl|grc|egy}}
{{lbor|pl|NL.|Āmōn}}.
==={{ĐM|pron}}===
{{pl-pr|a=Pl-Amon.ogg|hh=amon}}
==={{ĐM|pr-noun}}===
{{pl-prop}}
# {{nhãn|pl|Egyptian god}} [[Amun]]
===={{ĐM|decl}}====
{{pl-decl-noun-m-pr|tantum=s}}
==={{ĐM|further}}===
* {{R:pl:PWN}}
* {{R:pl:PWN Encyclopedia}}
=={{langname|pt}}==
==={{ĐM|pron}}===
{{pt-IPA|amôn}}
==={{ĐM|pr-noun}}===
{{pt-proper noun|m}}
# {{alternative form of|pt|Ámon}}
=={{langname|la}}==
==={{ĐM|etym}}===
{{bor+|la|grc|Ἀμών}}. {{der+|la|hbo|אָמוֹן|tr=’Āmōn}}.
==={{ĐM|pron}}===
* {{la-IPA|Āmōn}}
==={{ĐM|pr-noun}}===
{{la-proper noun|Āmōn<3>|g=m}}
# {{nhãn|la|biblical character}} {{l|en|Amon}}
===={{ĐM|decl}}====
{{la-ndecl|Āmōn<3>}}
==={{ĐM|ref}}===
* {{R:L&S}}
* {{R:Gaffiot}}
=={{langname|ja}}==
==={{ĐM|rom}}===
{{ja-romaji}}
# {{ja-romanization of|あもん}}
=={{langname|sl}}==
==={{ĐM|pron}}===
* {{sl-IPA|Ámon}}
==={{ĐM|pr-noun}}===
{{sl-proper noun|Ámon|m-an}}
# {{surname|sl}}
==={{ĐM|ref}}===
*{{R:sl:Keber:2021|page=38}}
lpdj84ujxjy3vsmyjdggyp5mdb6ott6
Mô đun:category tree/topic/Places
828
324859
2350214
2350129
2026-05-05T04:09:47Z
Hiyuune
50834
2350214
Scribunto
text/plain
local labels = {}
local handlers = {}
local m_table = require("Module:table")
local en_utilities_module = "Module:en-utilities"
local string_utilities_module = "Module:string utilities"
local m_locations = require("Module:place/locations")
local m_placetypes = require("Module:place/placetypes")
local placetype_data = m_placetypes.placetype_data
local internal_error = m_locations.internal_error
local dump = mw.dumpObject
local insert = table.insert
local concat = table.concat
local is_callable = require("Module:fun").is_callable
--[==[ intro:
This module is part of the category tree code and contains code to generate the descriptions of place-related categories
such as [[Category:de:Hokkaido Prefecture, Japan]], [[Category:es:Cities in France]],
[[Category:pt:Municipalities of Tocantins, Brazil]], etc.). Note that this module doesn't actually create the
categories; that must be done separately, with the text "{{tl|auto cat}}" as the definition of the category. (This
process should automatically happen periodically for non-empty categories, because they will appear in
[[Special:WantedCategories]] and a bot will periodically examine that list and create any needed category.)
There are two ways that category descriptions are specified: (1) by manually adding an entry to the `labels` table,
keyed by the label (the category minus the language code) with a value consisting of a Lua table specifying the
description text and the category's parents; (2) through handlers (pieces of Lua code) added to the `handlers` list,
which recognize labels of a specific type (e.g. `Cities in France`) and generate the appropriate specification for that
label on-the-fly.
See [[Module:place]] for an introduction to the terminology associated with places along with a list of all the relevant
modules, along with for more specific information on types of toponyms and placetypes and how their categorization
works.
]==]
local function lcfirst(label)
return mw.getContentLanguage():lcfirst(label)
end
local function gsub_literally(str, from, to)
local m_strutils = require(string_utilities_module)
return (str:gsub(m_strutils.pattern_escape(from), m_strutils.replacement_escape(to)))
end
local class_to_bare_category_parent = {
["polity"] = "tổ chức chính trị",
["subpolity"] = "political divisions",
["settlement"] = "settlements",
["non-admin settlement"] = "settlements",
["capital"] = "capital cities",
["natural feature"] = "đặc điểm tự nhiên",
["man-made structure"] = "man-made structures",
["geographic region"] = "geographic and cultural areas",
}
local class_is_political_division = {
["polity"] = true, -- strictly false but there are placetypes ambiguous between polity and subpolity
["subpolity"] = true,
["settlement"] = true,
["non-admin settlement"] = false,
["capital"] = true,
["natural feature"] = false,
["man-made structure"] = false,
["geographic region"] = false,
["generic place"] = false,
}
local capital_cat_to_placetype = {}
for placetype, capital_cat in pairs(m_placetypes.placetype_to_capital_cat) do
capital_cat_to_placetype[capital_cat] = placetype
end
-- Handler for bare categories for all types of capitals. This needs to precede the handler for bare placetype
-- categories as some of the types of capitals exist as placetypes as well.
insert(handlers, function(label)
label = lcfirst(label)
local capital_placetype = capital_cat_to_placetype[label]
if capital_placetype then
local pl_placetype = m_placetypes.pluralize_placetype(capital_placetype)
local linkdesc = m_placetypes.get_placetype_display_form(pl_placetype, "top-level")
if linkdesc == nil then
internal_error("Unrecognized placetype %s when processing label %s", capital_placetype, label)
end
if linkdesc == false then
mw.log(("Display form for pl_placetype %s is false, can't categorize"):format(dump(pl_placetype)))
return nil
end
return {
type = "chủ đề thuộc nhóm tên gọi",
topic = label,
description = "{{{langname}}} names of [[capital]]s of " .. linkdesc .. ".",
parents = {"capital cities"},
}
end
end)
-- Handler for bare placetype categories. FIXME: Add wpcat= and commonscat= info. Previously we had it for various
-- so-called "generic" placetypes, but sometimes the categories were wrong.
insert(handlers, function(label)
for _, canon_label in ipairs { lcfirst(label), label } do
local ptdesc, ptdata = m_placetypes.get_placetype_display_form(canon_label, "top-level", "return full")
if ptdesc then
local from_category_props = {
from_category = true,
no_split_qualifiers = true,
}
local bare_category_parent = m_placetypes.get_equiv_placetype_prop(canon_label, function(pt)
local bare_category_parent = m_placetypes.get_placetype_prop(pt, "bare_category_parent")
if bare_category_parent then
return bare_category_parent
end
local class = m_placetypes.get_placetype_prop(pt, "class")
if class then
if class_to_bare_category_parent[class] == nil then
internal_error("Saw unknown category class %s derived from placetype %s",
class, canon_label)
end
return class_to_bare_category_parent[class]
end
end, from_category_props)
if not bare_category_parent then
internal_error("Saw placetype %s without a `class` or `bare_category_parent` setting, either " ..
"directly or through a fallback", canon_label)
end
local addl_bare_category_parents = m_placetypes.get_equiv_placetype_prop(canon_label, function(pt)
return m_placetypes.get_placetype_prop(pt, "addl_bare_category_parents")
end, from_category_props)
local bare_category_breadcrumb = m_placetypes.get_equiv_placetype_prop(canon_label, function(pt)
return m_placetypes.get_placetype_prop(pt, "bare_category_breadcrumb")
end, from_category_props)
if type(bare_category_parent) == "string" and bare_category_breadcrumb then
bare_category_parent = {name = bare_category_parent, sort = bare_category_breadcrumb}
end
local parents = {bare_category_parent}
if addl_bare_category_parents then
m_table.extend(parents, addl_bare_category_parents)
end
return {
type = "chủ đề thuộc nhóm tên gọi",
topic = canon_label,
description = "{{{langname}}} " .. ptdesc .. ".",
breadcrumb = bare_category_breadcrumb,
parents = parents,
}
elseif ptdesc == false then
mw.log(("Display form for canon_label %s is false, can't categorize"):format(dump(canon_label)))
end
end
end)
local function fetch_primary_placetype(key, spec)
local placetype = spec.placetype
if type(placetype) == "table" then
placetype = placetype[1]
end
if not placetype then
internal_error("No placetype specified or defaulted for key %s, spec %s", key, spec)
end
return placetype
end
--[==[
Construct an appropriately linked location based on the full or elliptical placename, preceded by `"the "`` if
appropriate. Specifically:
Fetch the full and elliptical_placenames. If they are the same, just link to the placename directly. Otherwise, check if
the full placename exists; if so link to it. Otherwise, if the elliptical placename exists, link to it but display it as
the full placename. Finally, if neither full placename nor elliptical placename exists, fall back to linking to the full
placename. That way, we prefer full placenames to elliptical placenames if both or neither exist as Wiktionary entries,
but if only one exists, we link to that one rather than have a red link.
]==]
local function construct_linked_location(group, key, spec)
local full_placename, elliptical_placename = m_locations.key_to_placename(group, key)
local linked_placename
if elliptical_placename ~= full_placename then
local full_placename_title = mw.title.new(full_placename)
if full_placename_title and full_placename_title.exists then
linked_placename = m_locations.construct_linked_placename(spec, full_placename)
else
local elliptical_placename_title = mw.title.new(elliptical_placename)
if elliptical_placename_title and elliptical_placename_title.exists then
linked_placename = m_locations.construct_linked_placename(spec, elliptical_placename, full_placename)
end
end
end
return linked_placename or m_locations.construct_linked_placename(spec, full_placename)
end
--[==[
Construct the description of a location, including its container trail either to the end or until we encounter a
`no_include_container_in_desc` setting. For example, for the city of [[Birmingham]], the description will read
`"[[Birmingham]], a [[city]] in the [[West Midlands]] (which is a [[county]] of [[England]], which is a
[[constituent country]] of the [[United Kingdom]], which is a [[country]] in [[Europe]])"`. FIXME: Possibly we should
adopt the way city descriptions used to read, which was similar to `"the city of [[Birmingham]], in the county of the
[[West Midlands]], in the [[constituent country]] of [[England]], in the [[country]] of the [[United Kingdom]], in
[[Europe]]"`.
]==]
local function construct_location_desc(group, key, spec)
local parts = {}
local function ins(txt)
insert(parts, txt)
end
ins(construct_linked_location(group, key, spec))
local iteration = 0
local need_closing_paren = false
local containers = {{group = group, key = key, spec = spec}}
local container_iterator = m_locations.iterate_containers(group, key, spec)
while true do
iteration = iteration + 1
local include_container_in_desc = false
for _, container in ipairs(containers) do
if not container.spec.no_include_container_in_desc then
include_container_in_desc = true
break
end
end
if not include_container_in_desc then
break
end
local next_containers = container_iterator()
if not next_containers then
break
end
local is_former = nil
for _, container in ipairs(containers) do
local this_is_former = container.spec.is_former_place
if is_former == nil then
is_former = this_is_former
elseif is_former ~= this_is_former then
internal_error("When processing container trail of key %s, found a mixture of former and non-former " ..
"containers: %s", key, containers)
end
end
if #containers > 1 then
local placetypes = {}
local prepositions = {}
for _, container in ipairs(containers) do
local container_type = fetch_primary_placetype(container.key, container.spec)
m_table.insertIfNot(placetypes, m_placetypes.pluralize_placetype(container_type))
m_table.insertIfNot(prepositions, m_placetypes.get_placetype_entry_preposition(container_type))
end
if iteration == 1 then
ins(", ")
elseif iteration == 2 then
ins(" (which are ")
need_closing_paren = true
else
ins(", which are ")
end
if is_former then
ins("former ")
end
ins(m_table.serialCommaJoin(placetypes))
ins(" ")
ins(concat(prepositions, "/"))
else
if iteration == 1 then
ins(", ")
elseif iteration == 2 then
ins(" (which is ")
need_closing_paren = true
else
ins(", which is ")
end
local container_type = fetch_primary_placetype(containers[1].key, containers[1].spec)
if is_former then
ins("a former ")
else
ins(m_placetypes.get_placetype_article(container_type))
ins(" ")
end
ins(container_type)
ins(" ")
ins(m_placetypes.get_placetype_entry_preposition(container_type))
end
ins(" ")
first_container = false
containers = next_containers
local container_locations = {}
for _, container in ipairs(containers) do
insert(container_locations, construct_linked_location(container.group, container.key,
container.spec))
end
ins(m_table.serialCommaJoin(container_locations))
end
if need_closing_paren then
ins(")")
end
return concat(parts)
end
-- Fetch or construct the description of the location specified by `key`. If the `keydesc` property is specified,
-- use it directly but substitute any occurrence of `+++` with the auto-constructed location description, which
-- mentions the placename corresponding to the key, its placetype and container, and repeats the description up
-- the container trail until either there are no more containers or (more usually) the `no_include_container_in_desc`
-- setting is found (which is set on all continents and continent-level regions).
local function fetch_or_construct_location_desc(group, key, spec)
local val = spec.keydesc
if is_callable(val) then
val = val(group, key, spec)
spec.keydesc = val
end
val = val or "+++"
if val:find("%+%+%+") then
val = gsub_literally(val, "+++", construct_location_desc(group, key, spec))
end
return val
end
local function normalize_cat_as(cat_as, div)
if type(cat_as) ~= "table" or cat_as.type then
cat_as = {cat_as}
end
local ret_cat_as = {}
for _, pt_cat_as in ipairs(cat_as) do
if type(pt_cat_as) == "string" then
pt_cat_as = {type = pt_cat_as}
end
insert(ret_cat_as, {type = pt_cat_as.type, prep = pt_cat_as.prep or div.prep or "của"})
end
return ret_cat_as
end
-- Find the specified plural placetype among the divs for a given known location. Return a list of cat_as specs, where
-- each spec is of the form {type = "PLURAL_PLACETYPE", prep = "PREP"} indicating the plural placetype to use when
-- categorizing and the preposition to follow.
local function find_placetype_cat_as(divs, pl_placetype)
if divs then
if type(divs) ~= "table" then
divs = {divs}
end
for _, div in ipairs(divs) do
if type(div) == "string" then
div = {type = div}
end
if div.type == pl_placetype then
local cat_as = div.cat_as or div.type
return normalize_cat_as(cat_as, div)
end
end
end
return nil
end
-- Handler for bare placename categories for known locations in `locations` in [[Module:place/locations]].
insert(handlers, function(label)
for _, canon_label in ipairs { label, lcfirst(label) } do
local group, spec = m_locations.find_canonical_key(canon_label)
if group then
-- wp= defaults to true (Wikipedia article matches location's full placename)
local wp = spec.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 = spec.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 = spec.commonscat
if commonscat == nil then
commonscat = wpcat
end
local parents = {}
local bare_label_parents = spec.overriding_bare_label_parents
local container_iterator = m_locations.iterate_containers(group, canon_label, spec)
local containers = container_iterator()
if not bare_label_parents then
bare_label_parents = {"+++"}
end
local full_location_placename, elliptical_location_placename = m_locations.key_to_placename(group, canon_label)
local full_container_placename
if containers then
full_container_placename, _ = m_locations.key_to_placename(containers[1].group, containers[1].key)
end
local inserted_containers = false
for _, parent in ipairs(bare_label_parents) do
if parent == "+++" then
parent = "PL_PLACETYPE PREP CONTAINER"
end
if parent:find("CONTAINER") then
if not containers then
internal_error("Parent category %s needs the container of %s but no containers specified: %s",
parent, canon_label, spec)
end
local location_type = fetch_primary_placetype(canon_label, spec)
local pl_location_type = m_placetypes.pluralize_placetype(location_type)
for _, container in ipairs(containers) do
local per_container_parent = parent
local cat_as_list
if per_container_parent:find("PL_PLACETYPE") then
if spec.bare_category_parent_type then
cat_as_list = normalize_cat_as(spec.bare_category_parent_type, spec)
else
cat_as_list = find_placetype_cat_as(container.spec.divs, pl_location_type) or
find_placetype_cat_as(container.spec.addl_divs, pl_location_type)
end
end
if not cat_as_list then
local canon_placetype, ptdata, ptmatch = m_placetypes.get_placetype_data(location_type, "from category")
if not canon_placetype or not (ptdata.generic_before_non_cities or ptdata.generic_before_cities) then
internal_error("Unable to locate plural location type %s among the divs or addl_divs " ..
"for container key %s spec %s, and the location type is either not in placetype_data or " ..
"not identified as a generic placetype", pl_location_type, container.key, container.spec)
end
cat_as_list = {{type = pl_location_type, prep =
m_placetypes.get_placetype_entry_preposition(location_type)}}
end
local prefixed_key = m_placetypes.get_prefixed_key(container.key, container.spec)
per_container_parent = gsub_literally(per_container_parent, "CONTAINER", prefixed_key)
for _, cat_as in ipairs(cat_as_list) do
local per_container_per_placetype_parent = per_container_parent
per_container_per_placetype_parent = gsub_literally(per_container_per_placetype_parent, "PL_PLACETYPE",
cat_as.type)
per_container_per_placetype_parent = gsub_literally(per_container_per_placetype_parent, "PREP",
cat_as.prep)
m_table.insertIfNot(parents, per_container_per_placetype_parent)
end
end
inserted_containers = true
else
m_table.insertIfNot(parents, parent)
end
end
if not inserted_containers and containers then
-- If we didn't insert the containers above in some form, insert them now as bare categories. Note that
-- this may be different categories from the container categories inserted above.
for _, container in ipairs(containers) do
m_table.insertIfNot(parents, container.key)
end
end
if spec.addl_parents then
for _, parent in ipairs(spec.addl_parents) do
m_table.insertIfNot(parents, parent)
end
end
local function format_boxval(val, specname)
if val == true then
val = "%l"
end
if type(val) == "string" then
val = gsub_literally(val, "%l", full_location_placename)
val = gsub_literally(val, "%e", elliptical_location_placename)
if val:find("%%c") then
if not full_container_placename then
internal_error("Wikipedia/Commons spec %s = %s has %%c in it but key %s has no " ..
"containers: %s", specname, val, canon_label, spec)
end
val = gsub_literally(val, "%c", full_container_placename)
end
end
return val
end
local description = spec.fulldesc or (
"{{{langname}}} terms related to the people, culture, or territory of " ..
fetch_or_construct_location_desc(group, canon_label, spec) .. ".")
local full_placename, _ = m_locations.key_to_placename(group, canon_label)
return {
type = "chủ đề",
description = description,
breadcrumb = full_placename,
parents = parents,
wp = format_boxval(wp, "wp"),
wpcat = format_boxval(wpcat, "wpcat"),
commonscat = format_boxval(commonscat, "commonscat"),
}
end
end
end)
local function find_canonical_key_from_place(place, canon_label)
local has_the = false
local key
if place:find("^ ") then
key = place:gsub("^ ", "")
has_the = true
else
key = place
end
local group, spec = m_locations.find_canonical_key(key)
if group then
local requires_the = spec.the or false
if has_the ~= requires_the then
if has_the then
mw.log(("Mismatch in category name '%s', has 'the' in the category when it should not"):format(
canon_label))
else
mw.log(("Mismatch in category name '%s', should have 'the' in the category but does not"):
format(canon_label))
end
return nil
end
return group, key, spec
end
return nil
end
-- Handler for generic placetypes (those whose categories are added through category generation handlers or through
-- explicit category specs in the placetype data) for known locations in [[Module:place/locations]]. All such
-- placetypes have either a `generic_before_non_cities` setting (meaning they can occur before non-city locations) or
-- `generic_before_cities` setting (meaning they can occur before cities), or both. Examples of such categories are
-- "cities in the Bahamas" or "rivers in Western Australia, Australia", or (for city locations)
-- "neighbourhoods of Hong Kong" or "places in Melbourne".
insert(handlers, function(label)
for _, canon_label in ipairs { lcfirst(label), label } do
local placetype, in_of, place = canon_label:match("^([A-Za-z%- ]-) (của) (.*)$")
if not placetype then
placetype, in_of, place = canon_label:match("^([A-Za-z%- ]-) (của) (.*)$")
end
if placetype then
local normalized_placetype = placetype == "neighbourhoods" and "neighborhoods" or placetype
local canon_placetype, ptdata, ptmatch = m_placetypes.get_placetype_data(normalized_placetype, "from category")
if canon_placetype and (ptdata.generic_before_non_cities or ptdata.generic_before_cities) then
local group, key, spec = find_canonical_key_from_place(place, canon_label)
if group then
-- Check whether the location uses British spelling, but also check all containers, because
-- it's too hard to keep in sync the `british_spelling` setting for locations at all different
-- levels (e.g. cities of various countries, first and second level administrative division, etc.),
-- so we just set it at top level on the country.
local uses_british_spelling = spec.british_spelling
if uses_british_spelling == nil then
for containers in m_locations.iterate_containers(group, key, spec) do
local must_outer_break = false
for _, container in ipairs(containers) do
if container.spec.british_spelling ~= nil then
uses_british_spelling = container.spec.british_spelling
must_outer_break = true
break
end
end
if must_outer_break then
break
end
end
end
local allow_cat = true
if placetype == "neighborhoods" and uses_british_spelling or
placetype == "neighbourhoods" and not uses_british_spelling then
mw.log(("Mismatch in spelling of placetype '%s' in category '%s', should be '%s'"):format(
placetype, canon_label, uses_british_spelling and "neighbourhoods" or "neighborhoods"))
allow_cat = false
end
if spec.is_former_place and placetype ~= "địa danh" then
allow_cat = false
end
local expected_prep
if spec.is_city then
expected_prep = ptdata.generic_before_cities
else
expected_prep = ptdata.generic_before_non_cities
end
if not expected_prep then
allow_cat = false
end
if allow_cat then
if expected_prep ~= in_of then
mw.log(("Mismatch in category name '%s', has '%s' when it should have '%s'"):format(
canon_label, in_of, expected_prep))
return nil
end
local linkdesc = m_placetypes.get_placetype_display_form(placetype,
spec.is_city and "city" or "noncity", "return full")
if linkdesc == false then
mw.log(("Display form for placetype %s is false, can't categorize"):format(dump(placetype)))
return nil
end
if not linkdesc then
internal_error("Unrecognized placetype %s when processing key %s, data %s, label %s",
placetype, key, spec, canon_label)
end
desc = linkdesc .. " " .. in_of .. " " .. fetch_or_construct_location_desc(group, key, spec)
desc = "{{{langname}}} " .. desc .. "."
local parents = {}
insert(parents, key)
if spec.no_container_parent then
-- top-level country, constituent country, continent or the like
insert(parents, {name = normalized_placetype, sort = key})
if spec.placetype == "quốc gia" or m_table.contains(spec.placetype, "quốc gia") then
local category_class = m_placetypes.get_equiv_placetype_prop(normalized_placetype,
function(pt) return m_placetypes.get_placetype_prop(pt, "class") end, {
from_category = true,
no_split_qualifiers = true,
})
if not category_class then
internal_error("Saw placetype %s that is either unknown or has no `class` " ..
"setting in `placetype_data`", normalized_placetype)
end
if class_is_political_division[category_class] == nil then
internal_error("Saw unknown category class %s derived from placetype %s",
category_class, normalized_placetype)
end
if class_is_political_division[category_class] then
insert(parents, "đơn vị hành chính theo quốc gia cụ thể")
end
end
else
local container_iterator = m_locations.iterate_containers(group, key, spec)
local next_containers = container_iterator()
if next_containers then
for _, container in ipairs(next_containers) do
local container_prep
if container.spec.is_city then
container_prep = ptdata.generic_before_cities
else
container_prep = ptdata.generic_before_non_cities
end
if not container_prep then
internal_error("For container key %s spec %s defines is_city = %s but " ..
"there is no corresponding `generic_before_*` setting in the " ..
"placedata for placetype %s", container.key, container.spec,
container.spec.is_city, placetype)
end
insert(parents, {
name = placetype .. " " .. container_prep .. " " .. m_placetypes.get_prefixed_key(
container.key, container.spec),
sort = key
})
end
else
-- unrecognized countries or the like
insert(parents, {name = normalized_placetype, sort = key})
end
end
return {
type = "chủ đề thuộc nhóm tên gọi",
topic = canon_label,
description = desc,
breadcrumb = placetype,
parents = parents,
}
end
end
end
end
end
end)
-- Handler for "state capitals of the United States", "provincial capitals of Canada", etc. This must precede the next
-- handler for specific political and misc (non-political) divisions of polities and subpolities, such as
-- "provinces of the Philippines", because "departmental capitals" is listed in cat_as for French prefectures and so
-- will trigger an error if that handler runs before this one.
insert(handlers, function(label)
label = lcfirst(label)
local capital_cat, place = label:match("^([a-z%- ]- capitals) of (.*)$")
-- Make sure we recognize the type of capital.
if place and capital_cat_to_placetype[capital_cat] then
local placetype = capital_cat_to_placetype[capital_cat]
local pl_placetype = m_placetypes.pluralize_placetype(placetype)
-- Locate the container, fetch its known political divisions, and make sure the placetype corresponding to the
-- type of capital is among the list.
local group, key, spec = find_canonical_key_from_place(place, canon_label)
if group and (spec.divs or spec.addl_divs) then
local saw_match = false
local variant_matches = {}
local divlists = {}
if spec.divs then
insert(divlists, spec.divs)
end
if spec.addl_divs then
insert(divlists, spec.addl_divs)
end
for _, divlist in ipairs(divlists) do
if type(divlist) ~= "table" then
divlist = {divlist}
end
for _, div in ipairs(divlist) do
if type(div) == "string" then
div = {type = div}
end
-- HACK. Currently if we don't find a match for the placetype, we map e.g. 'autonomous region'
-- -> 'regional capitals' and 'union territory' -> 'territorial capitals'. When encountering a
-- political division like 'autonomous region' or 'union territory', chop off everything up
-- through a space to make things match. To make this clearer, we record all such
-- "variant match" cases, and down below we insert a note into the category text indicating that
-- such "variant matches" are included among the category.
if pl_placetype == div.type or pl_placetype == div.type:gsub("^.* ", "") then
saw_match = true
if pl_placetype ~= div.type then
insert(variant_matches, div.type)
end
end
end
end
if saw_match then
-- Everything checks out, construct the category description.
local placetype_desc = m_placetypes.get_placetype_display_form(pl_placetype,
placetype.is_city and "city" or "noncity")
if placetype_desc == false then
mw.log(("Display form for pl_placetype %s is false, can't categorize"):format(dump(pl_placetype)))
return nil
end
if not placetype_desc then
internal_error("Unrecognized plural placetype %s, generated as the plural of %s, which " ..
"was found as the placetype of capital placetype %s in label %s", pl_placetype,
placetype, capital_cat, label)
end
local variant_match_text = ""
if variant_matches[1] then
local real_variant_match_descs = {}
for i, variant_match in ipairs(variant_matches) do
local variant_match_desc = m_placetypes.get_placetype_display_form(variant_match,
placetype.is_city and "city" or "noncity")
if variant_match_desc == nil then
internal_error("Unrecognized variant match plural placetype %s, coming from " ..
"place key %s, data %s in label %s", variant_match, key, spec, label)
end
if variant_match_desc then
-- skip those for which the description is `false`, like `ABBREVIATION_OF states`
-- in the United States divs.
insert(real_variant_match_descs, variant_match_desc)
end
end
if real_variant_match_descs[1] then
variant_match_text = " (bao gồm " .. m_table.serialCommaJoin(real_variant_match_descs)
.. ")"
end
end
local desc = "Tên gọi {{{langname}}} về thủ đô của " .. placetype_desc .. variant_match_text ..
" trong " .. fetch_or_construct_location_desc(group, key, spec) .. "."
local full_placename, _ = m_locations.key_to_placename(group, key)
local parents = {}
if spec.no_container_parent then
-- top-level country, constituent country, continent or the like
insert(parents, {name = capital_cat, sort = key})
else
local container_iterator = m_locations.iterate_containers(group, key, spec)
local next_containers = container_iterator()
if next_containers then
for _, container in ipairs(next_containers) do
insert(parents, {
name = capital_cat .. " của " .. m_placetypes.get_prefixed_key(
container.key, container.spec),
sort = key
})
end
else
-- unrecognized countries or the like
insert(parents, {name = capital_cat, sort = key})
end
end
insert(parents, key)
return {
type = "chủ đề thuộc nhóm tên gọi",
topic = label,
description = desc,
breadcrumb = full_placename,
parents = parents,
}
end
end
end
end)
local overriding_category_descriptions = {
["autonomous cities of Spain"] = "the [[w:Autonomous communities of Spain#Autonomous_cities|autonomous cities of Spain]]",
["regions of Greece"] = "the regions ([[periphery|peripheries]]) of [[Greece]]",
["regions of North Macedonia"] = "the regions ([[periphery|peripheries]]) of [[North Macedonia]]",
["subprefectures of Japan"] = "[[subprefecture]]s of [[Japan]]ese [[prefecture]]s",
}
-- Handler for specific political and misc (non-political) divisions of locations (polities, subpolities, cities, etc.),
-- such as "provinces of the Philippines", "counties of Wales", "municipalities of Tocantins, Brazil",
-- "boroughs of New York City", etc. This does not handle categories for generic placetypes (cities, rivers, etc.) of
-- locations, which are handled by different handlers above.
insert(handlers, function(label)
-- The label comes with an initial capitalization but we have to check both lowercase-initial and capital-initial
-- versions of the placetype to handle e.g. [[:Category:en:Indian reserves of Canada]].
for _, canon_label in ipairs { label, lcfirst(label) } do
for _, minimal_placetype in ipairs { true, false } do
local match_quantifier = minimal_placetype and "-" or "+"
-- Some categories have two "of"s in them, and depending on the category, it's correct to do either a greedy
-- ([[:Category:en:Abbreviations of states of the United States]], with placetype `abbreviations of states`)
-- or non-greedy ([[:Category:en:Provinces of the Democratic Republic of the Congo]], with placetype
-- `provinces`) match. We can't know in advance which is correct so we try both possibilities, doing the
-- non-greedy one first as it seems more common (there are many locations with "of" in them, but currently
-- only `abbreviations of states` occurs with a following location).
local placetype, in_of, place = canon_label:match("^([A-Za-z%- ]" .. match_quantifier .. ") (của) (.*)$")
if not placetype then
placetype, in_of, place = canon_label:match("^([A-Za-z%- ]" .. match_quantifier .. ") (ở) (.*)$")
end
if placetype then
local group, key, spec = find_canonical_key_from_place(place, canon_label)
if group then
local function find_placetype(divs)
if divs then
if type(divs) ~= "table" then
divs = {divs}
end
for _, div in ipairs(divs) do
if type(div) == "string" then
div = {type = div}
end
local cat_as = div.cat_as or div.type
if type(cat_as) ~= "table" then
cat_as = {cat_as}
end
for _, pt_cat_as in ipairs(cat_as) do
if type(pt_cat_as) == "string" then
pt_cat_as = {type = pt_cat_as}
end
if placetype == pt_cat_as.type then
local div_parent = pt_cat_as.container_parent_type
if div_parent == nil then -- allow false
div_parent = div.container_parent_type
end
if div_parent == nil then
div_parent = placetype
end
return div_parent, pt_cat_as.prep or div.prep or "của"
end
end
end
end
return nil
end
local div_parent, div_prep = find_placetype(spec.divs)
if div_parent == nil then -- allow false
div_parent, div_prep = find_placetype(spec.addl_divs)
end
if div_parent == nil then -- allow false
div_parent, div_prep = find_placetype(spec.addl_divs_for_categorization)
end
if div_parent ~= nil then
if div_prep ~= in_of then
mw.log(("Mismatch in category name '%s', has '%s' when it should have '%s'"):format(
canon_label, in_of, div_prep))
return nil
end
local linkdesc = m_placetypes.get_placetype_display_form(placetype, spec.is_city and "city" or "noncity",
"return full")
if linkdesc == false then
mw.log(("Display form for placetype %s is false, can't categorize"):format(dump(placetype)))
return nil
end
if not linkdesc then
internal_error("Unrecognized placetype %s when processing key %s, data %s, label %s",
placetype, key, spec, canon_label)
end
local desc = overriding_category_descriptions[canon_label]
if not desc then
desc = linkdesc .. " " .. in_of .. " " .. fetch_or_construct_location_desc(group, key, spec)
end
desc = desc .. " {{{langname}}}."
local parents = {}
insert(parents, key)
if div_parent then -- div_parent may be `false`
if spec.no_container_parent then
-- top-level country, constituent country, continent or the like
insert(parents, {name = placetype, sort = " " .. key})
if spec.placetype == "quốc gia" or m_table.contains(spec.placetype, "quốc gia") then
insert(parents, "đơn vị hành chính theo quốc gia cụ thể")
end
else
local container_iterator = m_locations.iterate_containers(group, key, spec)
local next_containers = container_iterator()
if next_containers then
for _, container in ipairs(next_containers) do
insert(parents, {
name = div_parent .. " " .. in_of .. " " .. m_placetypes.get_prefixed_key(
container.key, container.spec),
sort = key
})
end
else
-- unrecognized countries or the like
insert(parents, {name = placetype, sort = " " .. key})
end
end
end
return {
type = "chủ đề thuộc nhóm tên gọi",
topic = canon_label,
description = desc,
breadcrumb = placetype,
parents = parents,
}
end
end
end
end
end
end)
labels["ngoại danh"] = {
type = "chủ đề thuộc nhóm tên gọi",
-- special-cased description
description = "{{{langname}}} [[exonym]]s.",
parents = {"địa danh"},
}
labels["đơn vị hành chính theo quốc gia cụ thể"] = {
type = "chủ đề phân nhóm",
description = "{{{langname}}} categories for political divisions of specific countries.",
parents = {"địa danh"},
}
-- Misc. FIXME: Remove the need for this.
labels["nomes of Ancient Egypt"] = {
type = "chủ đề thuộc nhóm tên gọi",
-- special-cased description
description = "{{{langname}}} names of the [[nome]]s of [[Ancient Egypt]].",
breadcrumb = "nomes",
parents = {"Ancient Egypt"},
}
-- Sui generis place categories (mostly cross-jurisdictional subcontinental/transcontinental regions)
-- FIXME: Everything here has been moved from [[Module:category tree/topic/Earth]]. Most should be removed.
labels["Atlantic Ocean"] = {
type = "related-to",
description = "default with the",
parents = {"Earth"},
}
labels["British Isles"] = {
type = "related-to",
description = "=the people, culture, or territory of [[Great Britain]], [[Ireland]], and other nearby islands",
parents = {"Europe", "islands"},
}
labels["European Union"] = {
type = "related-to",
description = "default with the",
parents = {"Europe"},
}
labels["Gascony"] = {
type = "related-to",
description = "default",
parents = {"Occitania, France"},
}
labels["Indian subcontinent"] = {
type = "related-to",
description = "default with the",
parents = {"South Asia"},
}
labels["Bengal"] = {
type = "related-to",
description = "{{{langname}}} terms related to the people, culture, or territory of [[Bengal]].",
parents = {"Indian subcontinent"},
}
labels["Kashmir"] = {
type = "related-to",
description = "{{{langname}}} terms related to the people, culture, or territory of [[Kashmir]].",
parents = {"Indian subcontinent"},
}
labels["Kashmir, India"] = {
type = "related-to",
description = "{{{langname}}} names of places in {{w|Kashmir, India}}.",
parents = {"India", "Kashmir"},
}
labels["Korea"] = {
type = "related-to",
description = "=the people, culture, or territory of [[Korea]]",
parents = {"Asia"},
}
labels["Languedoc"] = {
type = "related-to",
description = "default",
parents = {"Occitania, France"},
}
labels["Lapland"] = {
type = "related-to",
description = "=[[Lapland]], a region in northernmost Europe",
parents = {"Europe", "Finland", "Norway", "Russia", "Sweden"},
}
labels["Middle East"] = {
type = "related-to",
description = "default with the",
parents = {"Africa", "Asia"},
}
labels["Netherlands Antilles"] = {
type = "related-to",
description = "=the people, culture, or territory of the [[Netherlands Antilles]]",
parents = {"Netherlands", "North America"},
}
labels["Overseas France"] = {
type = "related-to",
description = "={{w|Overseas France}} ({{m|fr||France d'outre-mer}})",
parents = {"France"},
}
labels["Provence"] = {
type = "related-to",
description = "default",
parents = {"Provence-Alpes-Côte d'Azur, France"},
}
labels["Polish People's Republic"] = {
type = "related-to",
description = "default",
parents = {"Poland"},
}
labels["South Asia"] = {
type = "related-to",
description = "default",
parents = {"Eurasia", "Asia"},
}
return {LABELS = labels, HANDLERS = handlers}
kk6o0gc5jrui2ezaexotsp6s1k8h0pa
Thể loại:Số tiếng M'Nông Đông
14
328252
2350151
2210505
2026-05-04T15:06:43Z
WhoAlone
40420
2350151
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Mô đun:category tree/topic/Sciences
828
343330
2350242
2339080
2026-05-05T06:58:50Z
Hiyuune
50834
2350242
Scribunto
text/plain
local labels = {}
labels["khoa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Tất cả chủ đề"},
wpcat = true,
}
labels["Lý thuyết khoa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học","Nhận thức luận của khoa học","Phương pháp khoa học"},
wpcat = true,
}
labels["Phương pháp khoa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học","Nghiên cứu khoa học"},
wpcat = true,
}
labels["Nghiên cứu khoa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học","Nhận thức luận"},
wpcat = true,
}
labels["Khoa học dân gian"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học"},
wpcat = true,
}
labels["Công nghệ dân gian"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học dân gian","Công nghệ","Văn hóa dân gian"},
wpcat = true,
}
labels["acceleration"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"physics"},
}
labels["acoustics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Khoa học ứng dụng", "physics", "sound"},
}
labels["adjectives"] = {
type = "chủ đề thuộc nhóm phân loại",
description = "default",
parents = {"parts of speech"},
}
labels["Hàng không học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"khoa học"},
wpcat = true,
}
labels["aerospace"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"sciences", "space", "astronautics", "aeronautics"},
}
labels["Nông nghiệp"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học ứng dụng"},
wpcat = true,
}
labels["Chăn nuôi"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Nông nghiệp","Động vật","Văn hóa","Tiêu khiển","Động vật học","Sinh hoạt","Nhân loại học","Khoa học xã hội môi trường"},
wpcat = true,
}
labels["Giả kim thuật"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"forteana", "Ngụy khoa học", "obsolete scientific theories"},
}
labels["Y học thay thế"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Y tế", "Ngụy khoa học"},
}
labels["Hóa phân tích"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa học"},
}
labels["Giải phẫu học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[anatomy]], the study of the [[body]] and its parts.",
additional = "{{also|Thể loại:{{{langcode}}}:Bộ phận cơ thể}}",
parents = {"Sinh học", "Y học"},
}
labels["andrology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"medicine", "male"},
}
labels["Nhân loại học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[anthropology]], the study of [[human]]s.",
additional = "{{also|Thể loại:{{{langcode}}}:Con người}}",
parents = {"Động vật học", "Khoa học xã hội"},
wpcat = true,
}
labels["anti-gravity"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"fictional abilities", "gravity", "science fiction", "space access"},
}
labels["Khoa học ứng dụng"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học"},
wpcat = true,
}
labels["arachnology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[arachnology]], the study of [[spider]]s.",
additional = "{{also|Category:{{{langcode}}}:Spiders}}",
parents = {"zoology", "arthropodology"},
}
labels["Khảo cổ học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Nhân loại học", "khoa học"},
commonscat = true,
wpcat = true,
}
labels["architectural elements"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"architecture"},
}
labels["Kiến trúc"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học ứng dụng", "Nghệ thuật"},
}
labels["arthropodology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[arthropodology]], the study of [[arthropod]]s.",
additional = "{{also|Category:{{{langcode}}}:Arthropods}}",
parents = {"zoology"},
}
labels["Trí tuệ nhân tạo"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học máy tính", "Điều khiển học"},
wpcat = true,
}
labels["Khoảnh sao"] = {
type = "chủ đề thuộc nhóm tên gọi",
description = "default",
parents = {"Thiên văn học"},
}
labels["astronautics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Khoa học ứng dụng", "space"},
}
labels["Thiên văn học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[Thiên văn học]], the study of [[stars]] and other [[celestial bodies]].",
additional = "{{also|Category:{{{langcode}}}:Celestial bodies}}",
parents = {"khoa học", "Không gian"},
}
labels["Vật lý thiên văn"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Vật lý học", "Thiên văn học"},
}
labels["Hàng không"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hàng không học", "Giao thông"},
}
labels["avionics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"aeronautics", "electronics"},
}
labels["Ayurveda"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"alternative medicine", "India"},
}
labels["bacteriology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[bacteriology]], the study of [[bacteria]].",
additional = "{{also|Category:{{{langcode}}}:Bacteria}}",
parents = {"medicine", "microbiology"},
}
labels["ballistics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"mechanics"},
}
labels["biases"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "{{{langname}}} terms for [[bias|biases]], [[inclination]]s of views towards [[inaccurate]] [[representation]].",
additional = "{{also|Category:{{{langcode}}}:Logical fallacies|Category:{{{langcode}}}:Forms of discrimination}}",
parents = {"psychology", "statistics"},
}
labels["Hóa sinh"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa học", "Sinh học"},
}
labels["Sinh học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[biology]], the study of [[life]].",
additional = "{{also|Thể loại:{{{langcode}}}:Sinh vật}}",
parents = {"khoa học"},
}
labels["black holes"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Thiên văn học", "astrophysics", "gravity", "relativity"},
}
labels["Thực vật học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "=[[botany]], the study of [[plants]]",
additional = "{{also|Category:{{{langcode}}}:Plants}}",
parents = {"Sinh học"},
}
labels["Rêu học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[bryology]], the study of [[moss]]es and other lower plants.",
parents = {"Sinh học", "Thực vật học"},
}
labels["Bệnh học tim"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[cardiology]], the study of the [[heart]].",
parents = {"Y học", "Hệ tuần hoàn"},
}
labels["carpentry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"construction", "woodworking"},
}
labels["cartography"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"geography"},
}
labels["catalysis"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"chemical processes", "chemical reactions", "Hóa lý"},
}
labels["Kỹ thuật hóa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Kỹ thuật", "Hóa học"},
}
labels["chemical formulae"] = {
type = "name",
description = "default",
parents = {"chemical notation"},
}
labels["chemical notation"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"chemistry", "names", "symbols"},
}
labels["chemical reactions"] = {
type = "chủ đề thuộc nhóm liên quan,chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"chemistry"},
}
labels["chemical reagents"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"chemistry"},
}
labels["Hóa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học"},
}
labels["Thiên văn học Trung Quốc"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Thiên văn học"},
}
labels["Chinese phonetics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"phonetics", "Chinese"},
}
labels["classical mechanics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"mechanics"},
}
labels["classical studies"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"linguistics", "literature", "history"},
}
labels["climatology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[climatology]], the study of [[climate]].",
parents = {"earth sciences"},
}
labels["clinical psychology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"psychology", "pathology"},
}
labels["computational linguistics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"linguistics", "computer science"},
}
labels["Khoa học máy tính"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học", "Máy tính"},
}
labels["conchology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[conchology]], the study of mollusc [[shell]]s.",
parents = {"malacology"},
}
labels["Chòm sao"] = {
type = "chủ đề thuộc nhóm tên gọi",
description = "default",
parents = {"Thiên văn học"},
}
labels["Xây dựng"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Kỹ thuật", "Kiến trúc"},
}
labels["control theory"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"sciences", "systems"},
}
labels["cosmology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[cosmology]], the study of the [[universe]].",
parents = {"Thiên văn học"},
}
labels["criminology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[criminology]], the study of [[crime]].",
additional = "{{also|Category:{{{langcode}}}:Crime}}",
parents = {"sociology", "crime"},
}
labels["cryptography"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"formal sciences", "mathematics", "computer science"},
}
labels["cryptozoology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[cryptozoology]], the [[pseudoscientific]] study of mythological creatures.",
additional = "{{also|Category:{{{langcode}}}:Mythological creatures}}",
parents = {"zoology", "forteana"},
}
labels["crystallography"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"physics", "crystal"},
}
labels["cultural anthropology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"anthropology", "culture"},
}
labels["Điều khiển học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Toán học ứng dụng", "Lý thuyết hệ thống"},
wpcat = true,
}
labels["Sinh học tế bào"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[cytology]], the study of cell biology, cell structure, formation, classification and related topics.",
parents = {"Sinh học"},
}
labels["data management"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học thông tin", "computer science"},
}
labels["demarcation lines"] = {
type = "name",
description = "=political [[demarcation line]]s",
parents = {"politics"},
}
labels["decision theory"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"probability theory", "epistemology"},
}
labels["Nhân khẩu học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học", "Thống kê","Khoa học xã hội môi trường"},
}
labels["Nha khoa"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Y học", "Răng"},
}
labels["dermatology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[dermatology]], the study of the [[skin]].",
additional = "{{also|Category:{{{langcode}}}:Skin}}",
parents = {"medicine"},
}
labels["developmental biology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[developmental biology]], the study of the [[development]] of [[lifeform]]s.",
parents = {"biology"},
}
labels["Khoa học Trái Đất"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học"},
}
labels["Thổ nhưỡng học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học Trái Đất"},
}
labels["earthquake engineering"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"engineering"},
}
labels["Sinh thái học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[ecology]], the study of interaction between [[life]] and its environment.",
parents = {"Sinh học"},
}
labels["Kinh tế học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[economics]], the study of the [[economy]].",
parents = {"Khoa học xã hội"},
}
labels["Hệ thống sinh thái"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Sinh thái học", "Địa mạo"},
}
labels["Điện não đồ"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[electrencephalography]], the electrical measurement of the [[brain]].",
additional = "{{also|Thể loại:{{{langcode}}}:Não}}",
parents = {"Khoa học thần kinh"},
}
labels["Kỹ thuật điện"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Kỹ thuật", "Điện học"},
}
labels["Điện học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Điện từ học"},
}
labels["Điện tâm đồ"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Bệnh học tim"},
}
labels["electrodynamics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"electromagnetism"},
}
labels["electrochemistry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa lý", "electricity"},
}
labels["Điện từ học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Vật lý học"},
}
labels["element nomenclature"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"chemical notation", "names", "chemical elements"},
}
labels["embryology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[embryology]], the study of the [[embryo]].",
parents = {"biology", "developmental biology", "medicine"},
}
labels["emergency medicine"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"medicine"},
}
labels["endocrinology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[endocrinology]], the study of [[hormones]] and the [[endocrine system]].",
additional = "{{also|Category:{{{langcode}}}:Hormones}}",
parents = {"medicine"},
}
labels["Kỹ thuật"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học ứng dụng", "Công nghệ"},
}
labels["enterprise engineering"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"engineering"},
}
labels["entomology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[entomology]], the study of [[insect]]s.",
additional = "{{also|Category:{{{langcode}}}:Insects}}",
parents = {"zoology", "arthropodology"},
}
labels["Dịch tễ học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[epidemiology]].",
parents = {"Y học"},
}
labels["ethnography"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"anthropology"},
}
labels["ethnology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[ethnology]], the study of [[people]]s.",
parents = {"anthropology"},
}
labels["ethology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[ethology]], the study of [[animal]] [[behaviour]].",
parents = {"zoology"},
}
labels["Thuyết tiến hóa"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Sinh học"},
}
labels["flat earth"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used by believers in a flat earth or related to the concept.",
parents = {"pseudoscience", "obsolete scientific theories"},
}
labels["flax"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"agriculture", "Malpighiales order plants"},
}
labels["Động lực học chất lưu"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Vật lý học"},
}
labels["lâm nghiệp"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học ứng dụng"},
}
labels["forteana"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms that have a [[Fortean]] element.",
parents = {"pseudoscience"},
}
labels["functional group prefixes"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"organic chemistry"},
}
labels["functional group suffixes"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"organic chemistry"},
}
labels["gardens"] = {
type = "type",
description = "=places where plants are grown",
parents = {"home", "horticulture"},
}
labels["Khoa tiêu hóa"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[gastroenterology]], the study of the [[digestive system]].",
parents = {"Y học"},
}
labels["Di truyền học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[genetics]], the study of [[gene]]s.",
parents = {"Sinh học"},
}
labels["Địa lý học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[geography]], the study of various phenomena found on [[Earth]]'s surface.",
additional = "{{also|Category:{{{langcode}}}:Địa mạo|Category:{{{langcode}}}:Tổ chức chính trị}}",
parents = {"Khoa học Trái Đất"},
}
labels["geological periods"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Địa chất học"},
}
labels["Địa chất học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[Địa chất học]], the study of the solid parts of [[Earth]].",
parents = {"Khoa học Trái Đất"},
}
labels["geomorphology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[geomorphology]].",
parents = {"Địa chất học"},
}
labels["Địa chính trị"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Địa lý", "Chính trị"},
}
labels["geospatial science"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"earth sciences"},
}
labels["gerontology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[gerontology]], the study of [[aging]].",
additional = "{{also|Category:{{{langcode}}}:Age}}",
parents = {"Y học"},
}
labels["Ngữ pháp"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Ngôn ngữ học"},
}
labels["Cách ngữ pháp"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"Ngữ pháp"},
}
labels["grammatical moods"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"grammar"},
}
labels["gravity"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"acceleration", "astrophysics", "mechanics"},
}
labels["Phụ khoa"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Y học", "Nũ giới"},
}
labels["helminthology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[helminthology]], the study of [[helminth]]s ([[parasitic]] [[worm#Noun|worms]]).",
additional = "{{also|Category:{{{langcode}}}:Flatworms}}",
parents = {"zoology"},
}
labels["hematology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[hematology]], the study of [[blood]].",
parents = {"medicine"},
}
labels["hepatology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[hepatology]], the study of the [[liver]].",
parents = {"medicine"},
}
labels["herpetology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[herpetology]], the study of [[reptile]]s and amphibians.",
additional = "{{also|Category:{{{langcode}}}:Reptiles|Category:{{{langcode}}}:Amphibians}}",
parents = {"zoology"},
}
labels["homeopathy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"alternative medicine"},
}
labels["Trồng trọt"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Nông nghiệp", "Thực vật học"},
}
labels["hydroacoustics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"acoustics", "hydrology"},
}
labels["hydrocarbon chain prefixes"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"organic chemistry"},
}
labels["hydrocarbon chain suffixes"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"organic chemistry"},
}
labels["hydrology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[hydrology]], the study of [[water]], its movement and distribution.",
additional = "{{also|Category:{{{langcode}}}:Water}}",
parents = {"earth sciences", "water"},
}
labels["Ngư học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[ichthyology]], the study of [[fish]].",
additional = "{{also|Thể loại:{{{langcode}}}:Cá}}",
parents = {"Động vật học"},
}
labels["immunochemistry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa sinh", "Miễn dịch học"},
}
labels["Miễn dịch học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[immunology]], the study of the [[immune system]].",
parents = {"Y học"},
}
labels["Indo-European studies"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"linguistics"},
}
labels["Khoa học thông tin"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học ứng dụng"},
}
labels["inorganic chemistry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"chemistry"},
}
labels["Lĩnh vực liên ngành"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học"},
}
labels["isolines"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"cartography", "Khí tượng học"},
}
labels["Lagrange points"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"orbits"},
}
labels["lexicography"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"linguistics"},
}
labels["library science"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"sciences", "education", "Khoa học thông tin"},
}
labels["lichenology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[lichenology]], the study of [[lichen]]s.",
additional = "{{also|Category:{{{langcode}}}:Lichens}}",
parents = {"Nấm học", "phycology"},
}
labels["linguistic morphology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"linguistics"},
}
labels["Ngôn ngữ học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[linguistics]], the study and analysis of [[language]].",
additional = "{{also|Thể loại:{{{langcode}}}:Ngôn ngữ}}",
parents = {"Ngôn ngữ", "Khoa học xã hội"},
}
labels["maize (crop)"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "=[[maize]] (called [[corn]] in North America) as a crop",
additional = "For terms related to maize as a food, see [[:Category:Maize (food)]] and for maize as a plant, see [[:Category:Maize (plant)]].",
parents = {"agriculture", "grains"},
}
labels["malacology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[malacology]], the study of [[mollusk]]s.",
additional = "{{also|Category:{{{langcode}}}:Mollusks}}",
parents = {"zoology"},
}
labels["mammalogy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[mammalogy]], the study of [[mammal]]s.",
additional = "{{also|Category:{{{langcode}}}:Mammals}}",
parents = {"zoology"},
}
labels["Sinh học biển"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "Mục từ {{{langname}}} có liên quan đến [[sinh học biển]], ngành khoa học nghiên cứu các sinh vật dưới biển.",
parents = {"Sinh học"},
}
labels["masonry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"construction"},
}
labels["materials science"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"sciences", "engineering"},
}
labels["Kỹ thuật cơ khí"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Kỹ thuật"},
}
labels["Cơ học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Vật lý học"},
}
labels["medical genetics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Y học", "Di truyền học"},
}
labels["Y học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms that pertain to the the science and practice of [[medicine]].",
parents = {"Sinh học", "Y tế"},
}
labels["metamaterials"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"physics"},
}
labels["Hằng số vật lý"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"Vật lý học"},
}
labels["Học máy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Trí tuệ nhân tạo"},
}
labels["Khí tượng học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[meteorology]], the study of [[weather]].",
additional = "{{also|Thể loại:{{{langcode}}}:Thời tiết}}",
parents = {"Khoa học Trái Đất", "Khí quyển"},
}
labels["Đo lường học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[metrology]], the science of [[measure|measuring]].",
parents = {"Khoa học ứng dụng","Đo lường"},
wpcat = true,
commonscat=true,
}
labels["Hệ thống đo lường"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Đo lường"},
wpcat = true,
}
labels["Đo lường"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Quan sát khoa học","Kích thước"},
wpcat = true,
}
labels["Quan sát khoa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Phương pháp khoa học","Nhận thức luận của khoa học"},
wpcat = true,
}
labels["microbiology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[microbiology]], the study of [[life]] at [[microscopic]] scales, too small for the [[human]] [[eye]].",
parents = {"biology"},
}
labels["microscopy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[microscopy]], the field of using [[microscopes]] for study.",
parents = {"Quang học", "microbiology"},
}
labels["Khoáng vật học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[mineralogy]], the study of [[mineral]]s.",
additional = "{{also|Thể loại:{{{langcode}}}:Khoáng chất}}",
parents = {"Địa chất học"},
}
labels["Sinh học phân tử"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[molecular biology]], the study of the [[molecules]] found in [[life]], their functions and effects.",
parents = {"Hóa sinh", "Sinh học", "Di truyền học"},
}
labels["Nấm học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "Mục từ {{{langname}}} liên quan đến nấm học, nhánh của sinh học với đối tượng nghiên cứu là [[nấm]].",
additional = "{{also|Thể loại:{{{langcode}}}:Nấm}}",
parents = {"Sinh học"},
}
labels["NASA"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "=the United States National Aeronautics and Space Administration and the US space program",
parents = {"astronautics", "aviation"},
}
labels["nephrology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[nephrology]], the study of the [[kidney]]s.",
parents = {"medicine"},
}
labels["Giải phẫu thần kinh"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[neuroanatomy]], the study of the structure and organization of the [[nervous system]].",
parents = {"Giải phẫu học", "Thần kinh học", "Khoa học thần kinh"},
}
labels["Thần kinh học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[neurology]], the study of [[nerves]] and [[neurons]].",
parents = {"Y học", "Khoa học thần kinh"},
}
labels["Khoa học thần kinh"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[neuroscience]], the study of the [[nervous system]].",
parents = {"Sinh học"},
}
labels["neurosurgery"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"surgery", "neurology"},
}
labels["neutron"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"nuclear physics"},
}
labels["neutron stars"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"neutron", "gravity", "astrophysics", "relativity", "stars"},
}
labels["Danh từ"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Từ loại"},
}
labels["Năng lượng hạt nhân"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Năng lượng", "Vật lý hạt nhân", "Công nghệ"},
}
labels["nuclear fusion"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"nuclear energy"},
}
labels["Vật lý hạt nhân"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Vật lý học", "Cơ học lượng tử"},
}
labels["nuclear rocketry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"nuclear energy", "rocketry", "space access"},
}
labels["obstetrics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"developmental biology", "medicine", "pregnancy"},
}
labels["obsolete scientific theories"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "{{{langname}}} terms for types or instances of [[obsolete]] [[scientific]] [[theory|theories]] that are no longer, or have never been, widely accepted.",
parents = {"history of science"},
}
labels["Hải dương học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học"},
}
labels["oenology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[oenology]], the study of [[wine]] and [[winemaking]].",
additional = "{{also|Category:{{{langcode}}}:Wine}}",
parents = {"sciences"},
}
labels["Ung thư học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[oncology]], the study of [[cancer]].",
parents = {"Sinh học", "Y học", "Bệnh lý học"},
}
labels["onomastics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[onomastics]], the study of [[name]]s.",
additional = "{{also|Category:{{{langcode}}}:Names|Category:{{{langname}}} names}}",
parents = {"linguistics", "names"},
}
labels["ophthalmology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[ophthalmology]], the study of the [[eye]].",
additional = "{{also|Category:{{{langcode}}}:Eye}}",
parents = {"medicine", "vision"},
}
labels["Quang học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[optics]], the study of the behaviour of [[light]].",
additional = "{{also|Thể loại:{{{langcode}}}:Ánh sáng}}",
parents = {"Vật lý học"},
}
labels["orbits"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"astronautics", "gravity", "space", "curves"},
}
labels["Hóa hữu cơ"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa học"},
}
labels["orgonomy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "=the [[orgone]] theory proposed by {{w|William Reich}}",
parents = {"alternative medicine", "pseudoscience"},
}
labels["ornithology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[ornithology]], the study of [[birds]].",
additional = "{{also|Category:{{{langcode}}}:Birds}}",
parents = {"zoology"},
}
labels["paleontology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"sciences", "Địa chất học"},
}
labels["palynology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[palynology]], the study of [[particle]]s and particulate matter.",
parents = {"Địa chất học"},
}
labels["parapsychology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"forteana", "pseudoscience"},
}
labels["parasitology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"pathology", "zoology"},
}
labels["Vật lý hạt"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[particle physics]], the study of [[subatomic]] [[particle]]s.",
additional = "{{also|Category:{{{langcode}}}:Subatomic particles}}",
parents = {"Vật lý học"},
}
labels["Từ loại"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "=[[từ loại]]",
parents = {"Ngữ pháp"},
}
labels["Bệnh lý học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[pathology]], the study of [[disease]].",
additional = "{{also|Thể loại:{{{langcode}}}:Bệnh}}",
parents = {"Y học", "Bệnh"},
}
labels["petrochemistry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"chemistry", "chemical engineering", "oil industry", "petroleum"},
}
labels["Thạch luận"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[petrology]], the study of [[rock]].",
additional = "{{also|Thể loại:{{{langcode}}}:Đá}}",
parents = {"Địa chất học"},
}
labels["Dược lý học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa sinh", "Y học"},
}
labels["Dược học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Y học", "Dược lý học"},
}
labels["phonemes"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "=contrastive sounds within a language",
parents = {"phonology"},
}
labels["phonetics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"linguistics"},
}
labels["phonology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[phonology]], the organisation of [[speech]] sounds within a [[language]].",
parents = {"linguistics"},
}
labels["photochemistry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa lý", "light"},
}
labels["phrenology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"psychology", "pseudoscience"},
}
labels["phycology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[phycology]], the study of [[algae]].",
additional = "{{also|Category:{{{langcode}}}:Algae}}",
parents = {"botany", "microbiology"},
}
labels["Hóa lý"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa học", "Vật lý học"},
}
labels["physical quantities"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"physics"},
}
labels["Vật lý học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"khoa học"},
commonscat = "Physics",
wpcat = true,
}
labels["physiology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[physiology]].",
parents = {"biology", "medicine"},
}
labels["phytopathology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[phytopathology]], the study of [[disease]] in [[plant]]s.",
additional = "{{also|Category:{{{langcode}}}:Plant diseases}}",
parents = {"pathology", "botany"},
}
labels["planetary nomenclature"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học hành tinh"},
}
labels["Khoa học hành tinh"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[Khoa học hành tinh]], the study of [[planet]]s.",
additional = "{{also|Category:{{{langcode}}}:Planets}}",
parents = {"Thiên văn học", "Địa chất học"},
}
labels["plant anatomy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in the study of the structure of plants and their parts.",
parents = {"botany", "anatomy"},
}
labels["plastic surgery"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"surgery"},
}
labels["political science"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"social sciences", "politics"},
}
labels["potential theory"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"mathematics"},
}
labels["pragmatics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"linguistics"},
}
labels["prosody"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[prosody]], the study of the [[suprasegmental]] aspects of [[speech]].",
parents = {"linguistics"},
}
labels["Ngụy khoa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học"},
}
labels["Tâm thần học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Y học"},
}
labels["Phân tâm học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Tâm lý học"},
}
labels["Tâm lý học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[psychology]], the study of the [[mind]].",
additional = "{{also|Thể loại:{{{langcode}}}:Tâm trí}}",
parents = {"Khoa học xã hội"},
}
labels["Tình cảm"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Tâm lý học"},
}
labels["psychotherapy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"psychology"},
}
labels["Khoa hô hấp"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[pulmonology]], the study of the [[respiratory system]], including the [[lung]]s.",
parents = {"Y học"},
}
labels["pyrotechnics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"sciences"},
}
labels["Cơ học lượng tử"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Vật lý học"},
}
labels["relativity"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"physics"},
}
labels["rheumatology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"medicine"},
}
labels["robotics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"engineering"},
}
labels["rocketry"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"astronautics"},
}
labels["roofing"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"construction"},
}
labels["rosiculture"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Trồng trọt"},
}
labels["Xoay tròn"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Cơ học", "Hình học"},
}
labels["Russian space program"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "=the Russian and Soviet space programs",
parents = {"astronautics", "aviation"},
}
labels["sales"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"marketing"},
}
labels["Địa chấn học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[seismology]], the study of [[earthquake]]s.",
parents = {"Địa chất học","Cơ học"},
}
labels["động đất"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Địa chấn học","Khoa học Trái Đất","Khoa học hành tinh"},
wpcat = true,
commonscat = "Earthquakes",
}
labels["Kỹ thuật động đất"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"động đất"},
wpcat = true,
commonscat = "Earthquake engineering",
}
labels["Nguy hiểm địa chất"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Kỹ thuật động đất","Tự nhiên"},
wpcat = true,
commonscat = "Geological hazards",
}
labels["Sóng thần"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Địa chấn học","Kỹ thuật động đất"},
}
labels["Ngữ nghĩa học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Ngôn ngữ học"},
}
labels["Semitic linguistics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in the study and analysis of [[Semitic]] [[language]]s.",
parents = {"Ngôn ngữ học"},
}
labels["semiotics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"social sciences", "linguistics"},
}
labels["sexology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[sexology]], the study of [[human]] [[sexuality]].",
additional = "{{also|Category:{{{langcode}}}:Sex}}",
parents = {"psychology", "sex", "sociology"},
}
labels["SI units"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "=[[International System of Units|SI]] [[unit of measure|units of measure]]",
parents = {"units of measure"},
}
labels["signal processing"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Toán học ứng dụng", "telecommunications"},
wpcat = true,
commonscat = true,
}
labels["Khoa học xã hội"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học", "Xã hội"},
wpcat = true,
}
labels["Khoa học môi trường"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học Trái Đất", "Môi trường"},
wpcat = true,
}
labels["Khoa học xã hội môi trường"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học xã hội","Khoa học môi trường", "Môi trường"},
wpcat = true,
}
labels["Ngôn ngữ học xã hội"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Ngôn ngữ học", "Xã hội học"},
}
labels["Xã hội học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[sociology]], the study of [[society]].",
additional = "{{also|Category:{{{langcode}}}:Xã hội}}",
parents = {"Khoa học xã hội"},
wpcat = true,
}
labels["Công nghệ phần mềm"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Kỹ thuật", "Khoa học máy tính", "Phần mềm"},
wpcat = true,
commonscat = true,
}
labels["soil science"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"earth sciences"},
}
labels["sorting algorithms"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"Lý thuyết tính toán"},
}
labels["sound engineering"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"engineering", "sound"},
}
labels["space access"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"astronautics"},
}
labels["space sciences"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"sciences", "space"},
}
labels["Phổ học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Hóa phân tích", "Quang học", "Vật lý học"},
}
labels["statistical mechanics"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"mechanics"},
}
labels["Thống kê"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Khoa học hình thức", "Toán học"},
}
labels["surgery"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"medicine"},
}
labels["surveying"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"geography"},
}
labels["Hệ thống"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Lĩnh vực liên ngành", "khoa học", "Xã hội"},
}
labels["systems engineering"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"engineering"},
}
labels["Lý thuyết hệ thống"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"khoa học", "Hệ thống"},
}
labels["Phân loại học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
additional = "For individual [[taxa]], xem [[:Thể loại:Danh pháp hai phần]].",
parents = {"Sinh học", "Thuyết tiến hóa"},
}
labels["taxonomic ranks"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "default",
parents = {"taxonomy"},
}
labels["tenses"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"grammar"},
}
labels["teratology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[teratology]], the study of abnormalities in the [[development]] of the [[body]].",
parents = {"developmental biology", "medicine", "pathology", "toxicology"},
}
labels["Lý thuyết tính toán"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in theoretical discussion of [[computer science]] or [[computing]].",
parents = {"Khoa học máy tính"},
}
labels["Nhiệt động lực học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"Vật lý học"},
}
labels["tides"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"gravity", "periodic occurrences"},
}
labels["toxicology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[toxicology]], the study of [[poisons]], [[toxins]] and other substances with negative effects on the [[body]].",
additional = "{{also|Category:{{{langcode}}}:Poisons}}",
parents = {"medicine", "pharmacology"},
}
labels["traditional Chinese medicine"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"alternative medicine"},
}
labels["traffic engineering"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"engineering", "road transport"},
}
labels["translation studies"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default no singularize",
parents = {"linguistics"},
}
labels["traumatology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in traumatology, the study of wounds and injuries caused by accidents or violence to a person.",
parents = {"medicine", "pathology"},
}
labels["ufology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"forteana", "anti-gravity", "celestial inhabitants"},
}
labels["Đơn vị đo"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "{{{langname}}} terms that are [[unit of measure|units of measure]].",
parents = {"Đo lường học"},
commonscat = "Units of measure",
wpcat = true,
}
labels["units of time"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "{{{langname}}} terms that are [[unit of time|units of time]].",
parents = {"units of measure", "time"},
commonscat = "spans of time",
wpcat = true,
}
labels["urban studies"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Khoa học ứng dụng", "social sciences"},
}
labels["urology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"medicine"},
}
labels["Động từ"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Từ loại"},
}
labels["Thú y"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"Y học", "Động vật"},
}
labels["virology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[virology]], the study of [[virus]]es.",
additional = "{{also|Category:{{{langcode}}}:Viruses}}",
parents = {"medicine", "microbiology", "pathology"},
}
labels["volcanology"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[volcanology]], the study of [[volcano]]es.",
parents = {"Địa chất học"},
}
labels["Động vật học"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "{{{langname}}} terms used in [[zoology]], the study of [[animal]]s.",
additional = "{{also|Thể loại:{{{langcode}}}:Động vật}}",
parents = {"Sinh học"},
}
labels["zymurgy"] = {
type = "chủ đề thuộc nhóm liên quan",
description = "default",
parents = {"biochemistry", "brewing"},
}
labels["colour and pattern morphs"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "{{{langname}}} terms for [[colour]] and [[pattern]] [[morph#Etymology 2|morphs]]",
parents = {"zoology"},
}
labels["Thành hệ địa chất"] = {
type = "chủ đề thuộc nhóm tập hợp",
description = "{{{langname}}} {{w|Thành hệ địa chất}}",
parents = {"Địa chất học"},
}
return labels
eri1wdoeojg87das9m6zphd437rhxb6
Thành viên:PANG450n
2
395744
2350195
2350120
2026-05-05T03:51:23Z
Hiyuune
50834
2350195
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
2350237
2350195
2026-05-05T06:42:28Z
PANG450p
61185
Đã lùi lại sửa đổi [[Special:Diff/2350195|2350195]] của [[Special:Contributions/Hiyuune|Hiyuune]] ([[User talk:Hiyuune|thảo luận]])
2350237
wikitext
text/x-wiki
[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]]
5zocbrao17type0jq63m1brrqrwmvv9
2350246
2350237
2026-05-05T07:06:39Z
Hiyuune
50834
Đã lùi lại sửa đổi của [[Special:Contributions/PANG450p|PANG450p]] ([[User talk:PANG450p|thảo luận]]) quay về phiên bản cuối của [[User:Hiyuune|Hiyuune]]
2350195
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
2350249
2350246
2026-05-05T07:27:08Z
WhoAlone
40420
Đã khóa “[[Thành viên:PANG450n]]” ([Sửa đổi=Chỉ cho phép thành viên tự xác nhận] (vô thời hạn) [Di chuyển=Chỉ cho phép thành viên tự xác nhận] (vô thời hạn))
2350195
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
ḭ
0
395747
2350134
2026-05-04T12:16:03Z
Lcsnes
40261
Trang mới: “{{-Latn-}} {{character info|image=Latin letter I with tilde below.svg}} ==={{ĐM|desction}}=== {{head|mul|Chữ cái|chữ hoa|Ḭ}} #[[chữ cái|Chữ cái]] '''[[i]] viết thường''' với dấu ngã bên dưới [[◌̰]]. ==={{ĐM|see}}=== {{Latn-script}} =={{langname|dgk}}== ==={{ĐM|pron}}=== *{{IPA4|dgk|/ĩ/}} ==={{ĐM|letter}}=== {{head|dgk|Chữ cái|chữ hoa|Ḭ}} #Chữ ''{{l|dgk|i}}'' viết thường với dấu nguyên âm mũi hóa. #:{{quote|dgk|Titi…”
2350134
wikitext
text/x-wiki
{{-Latn-}}
{{character info|image=Latin letter I with tilde below.svg}}
==={{ĐM|desction}}===
{{head|mul|Chữ cái|chữ hoa|Ḭ}}
#[[chữ cái|Chữ cái]] '''[[i]] viết thường''' với dấu ngã bên dưới [[◌̰]].
==={{ĐM|see}}===
{{Latn-script}}
=={{langname|dgk}}==
==={{ĐM|pron}}===
*{{IPA4|dgk|/ĩ/}}
==={{ĐM|letter}}===
{{head|dgk|Chữ cái|chữ hoa|Ḭ}}
#Chữ ''{{l|dgk|i}}'' viết thường với dấu nguyên âm mũi hóa.
#:{{quote|dgk|Titibɛ̰ '''ḭ''' goɗob ka̰nd’dé ti la a geri’n’dé.|Ấy vậy, các ngươi nhờ những trái nó mà nhận-biết được. ([[s:Ma-thi-ơ/7#7:20|Ma-thi-ơ 7:20]])}}
==={{ĐM|ref}}===
*{{Chú thích web|dgk|author=Bibles International.|entryurl=https://live.bible.is/bible/DGKBIV/MAT/7|entry=MBER TA ŊAMBƐ̰ LO MATIYO 7|year=2018|work=Bible.is}}
=={{langname|xuo}}==
==={{ĐM|pron}}===
*{{IPA4|xuo|/ĩ/}}
==={{ĐM|letter}}===
{{head|xuo|Chữ cái|chữ hoa|Ḭ}}
#Chữ ''{{l|xuo|i}}'' viết thường với dấu nguyên âm mũi hóa.
#:{{quote|xuo|Zezu se ɓáy puori ká kuɗu zaɗ ká Galele riw bele, a fere nzoɓri fe ká ɓil *hul mbṵ́ k'''ḭ''' ɓari Ziɓri, a ka-káa Ɓay Kere ká se tul réke mbay Ŋgɛrɛwṵru ká tusiri key, a vaa nzoɓri ɓáy k'''ḭ'''ri sɛm ɓari riw bele, ɓáy nzoɓ kpɛɗɛri riw bele nda̰w.|Đức Chúa Jêsus đi khắp xứ Ga-li-lê, dạy-dỗ trong các nhà hội, giảng tin-lành của nước Đức Chúa Trời, và chữa lành mọi thứ tật-bịnh trong dân. ([[s:Ma-thi-ơ/4#4:23|Ma-thi-ơ 4:23]])}}
===={{ĐM|see}}====
*{{letters|lang=xuo|sc=Latn|qual=Bảng chữ cái Latinh tiếng Kuo|Aa|(A̰/a̰)|Bb|Ɓɓ|Dd|Ɗɗ|Ee|Ɛɛ|(Ɛ̰/ɛ̰)|Ff|Gg|Gb/gb|Hh|Ii|(Ḭḭ)|Kk|Kp/kp|Ll|Mm|Mb/mb|Mgb/mgb|Nn|Nd/nd|Nz/nz|Ŋŋ|Ŋg/ŋg|Oo|(O̰/o̰)|Ɔɔ|(Ɔ̰/ɔ̰)|Pp|Rr|Ss|Tt|Uu|(Ṵṵ)|Vv|Vb/vb|Ww|Yy|Zz}}
==={{ĐM|ref}}===
*{{Chú thích web|author=Wycliffe Bible Translators, Inc.|entryurl=https://www.bible.com/bible/1178/MAT.4.XUO|entry=Matiye 4|year=2013|work=Kuo}}
=={{langname|ntm}}==
==={{ĐM|pron}}===
*{{IPA4|ntm|/ĩ/}}
==={{ĐM|letter}}===
{{head|ntm|Chữ cái|chữ hoa|Ḭ}}
#Chữ cái thứ 20 trong bảng chữ cái Latinh tiếng Nateni.
#:{{quote|ntm|Kà ní yíí wenikú è yɔ̀ wèǹku, é yídá yíí y'''ḭ́ḭ̀'''pu è yɔ̀ yèǹka. Kà yohokú é yodá, kà ká̰ńyɛ̰̀ǹfa é pa̰ná, k'yé h'''ḭ'''n dacecedí.|Đức Chúa Trời đặt tên sự sáng là ngày; sự tối là đêm. Vậy, có buổi chiều và buổi mai; ấy là ngày thứ nhứt. ([[s:Sáng thế Ký/1#1:5|Sáng thế Ký 1:5]])}}
===={{ĐM|see}}====
*{{letters|lang=ntm|sc=Latn|qual=Bảng chữ cái Latinh tiếng Nateni|a|a̰|ā|á|b|c|d|e|ḛ|ē|é|ɛ|ɛ̰|ɛ̄|ɛ́|f|g|h|i|ḭ|ī|í|j|k|l|m|n|o|o̰|ō|ó|ɔ|ɔ̰|ɔ̄|ɔ́|p|q|r|s|t|u|ṵ|ū|ú|v|w|x|y|z}}
==={{ĐM|ref}}===
*{{Chú thích web|entryurl=https://www.webonary.org/nateni/browse/browse-vernacular-english/?key=ntm&letter=%E1%B8%AD&lang=en|entry=ḭ|work=Nateni – English Dictionary|year=2019|publisher=SIL International®|editor=Esaïe Winrikou}}
*{{Chú thích web|ntm|entryurl=https://live.bible.is/bible/NTMWBT/GEN/1|entry=CETÁMA 1|work=Bible.is|year=2018|author=Wycliffe Bible Translators, Inc.}}
=={{langname|sba}}==
==={{ĐM|pron}}===
*{{IPA4|sba|/ĩ/}}
==={{ĐM|letter}}===
{{head|sba|Chữ cái|chữ hoa|Ḭ}}
#Chữ ''{{l|sba|i}}'' viết thường với dấu nguyên âm mũi hóa.
#:{{quote|sba|Togə́bè dəw neelé unda ri da-kulje lai ləm, gə nékundaje gə́ d’'''ḭ''' gə bag dee pə̰ dara’g ləma, gə daje gə́ wala lai ləm tɔ. Nɛ dəw lé yeḛ iŋga njela səa gə́ to tana səa lé el ɓəi.|A-đam đặt tên các loài súc-vật, các loài chim trời cùng các loài thú đồng; nhưng về phần A-đam, thì chẳng tìm được một ai giúp-đỡ giống như mình hết. ([[s:Sáng thế Ký/2#2:20|Sáng thế Ký 2:20]])}}
==={{ĐM|ref}}===
*{{Chú thích web|sba|author=Bible Society of Chad|entryurl=https://www.bible.com/bible/516/GEN.1.SBA2015|entry=Gḭ-Néje 1|year=1989|work=Maktub gə́ To gə Kəmee}}
=={{langname|dje}}==
==={{ĐM|pron}}===
*{{IPA4|dje|/ĩ/}}
==={{ĐM|letter}}===
{{head|dje|Chữ cái|chữ hoa|Ḭ}}
#Chữ ''{{l|dje|i}}'' viết thường với dấu nguyên âm mũi hóa.
===={{ĐM|see}}====
*{{letters|lang=dje|sc=Latn|qual=Bảng chữ cái Latinh tiếng Zarma|Aa|Bb|Cc|Dd|Ee|Ff|Gg|Hh|Ii|Jj|Kk|Ll|Mm|Nn|Ɲɲ|Ŋŋ|Oo|Pp|Rr|Ss|Tt|Uu|(Vv)|Ww|Yy|Zz}}
==={{ĐM|ref}}===
*{{Chú thích web|entryurl=http://www.bisharat.net/Zarma/ZEF-I.htm|entry=I|work=Zarmaciine - English - Français|year=2001|publisher=Peace Corps, Niger}}
[[Thể loại:Khối ký tự Latin Extended Additional|2D]]
hkegaihkh3buyz3radlvqt02wur4rm2
đĭ
0
395749
2350143
2026-05-04T15:02:53Z
WhoAlone
40420
Trang mới: “=={{langname|mng}}== ==={{ĐM|pron}}=== * {{IPA4|mng|/ɗiʔ/}} ==={{ĐM|verb}}=== {{head|mng|Động từ}} # {{label|mng|Rơlơm}} [[lên]] [[lớp]] (trong trường học). ==={{ĐM|ref}}=== * [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.”
2350143
wikitext
text/x-wiki
=={{langname|mng}}==
==={{ĐM|pron}}===
* {{IPA4|mng|/ɗiʔ/}}
==={{ĐM|verb}}===
{{head|mng|Động từ}}
# {{label|mng|Rơlơm}} [[lên]] [[lớp]] (trong trường học).
==={{ĐM|ref}}===
* [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.
rrmt7f7thj4kak2cg6jfrvfrostyt6c
deh păr
0
395750
2350144
2026-05-04T15:04:32Z
WhoAlone
40420
Trang mới: “=={{langname|mng}}== ==={{ĐM|pron}}=== * {{IPA4|mng|/dɛh par/}} ==={{ĐM|noun}}=== {{head|mng|Danh từ}} # {{label|mng|Rơlơm}} [[máy bay]]. ==={{ĐM|ref}}=== * [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer. {{c|mng|Khí cụ bay}}”
2350144
wikitext
text/x-wiki
=={{langname|mng}}==
==={{ĐM|pron}}===
* {{IPA4|mng|/dɛh par/}}
==={{ĐM|noun}}===
{{head|mng|Danh từ}}
# {{label|mng|Rơlơm}} [[máy bay]].
==={{ĐM|ref}}===
* [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.
{{c|mng|Khí cụ bay}}
gm65arvgc2l9bwm3nnwjd689y2bvx6s
Thể loại:mng:Khí cụ bay
14
395751
2350145
2026-05-04T15:05:09Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350145
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:mng:Công nghệ
14
395752
2350146
2026-05-04T15:05:18Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350146
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:mng:Hàng không
14
395753
2350147
2026-05-04T15:05:21Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350147
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:mng:Hàng không học
14
395754
2350148
2026-05-04T15:05:40Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350148
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:mng:Giao thông
14
395755
2350149
2026-05-04T15:05:43Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350149
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
ră mguôp čar
0
395756
2350150
2026-05-04T15:06:34Z
WhoAlone
40420
Trang mới: “=={{langname|mng}}== ==={{ĐM|pron}}=== * {{IPA4|mng|/raʔ mguop caːr/}} ==={{ĐM|noun}}=== {{head|mng|Danh từ}} # {{label|mng|Rơlơm}} [[thỏa thuận]] giữa các [[quốc gia]]. ==={{ĐM|ref}}=== * [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.”
2350150
wikitext
text/x-wiki
=={{langname|mng}}==
==={{ĐM|pron}}===
* {{IPA4|mng|/raʔ mguop caːr/}}
==={{ĐM|noun}}===
{{head|mng|Danh từ}}
# {{label|mng|Rơlơm}} [[thỏa thuận]] giữa các [[quốc gia]].
==={{ĐM|ref}}===
* [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.
ciurxrvl0r5i2cpkozo78qsdcz3ep92
2350153
2350150
2026-05-04T15:08:08Z
WhoAlone
40420
2350153
wikitext
text/x-wiki
=={{langname|mng}}==
==={{ĐM|pron}}===
* {{IPA4|mng|/raʔ mɡuop caːr/}}
==={{ĐM|noun}}===
{{head|mng|Danh từ}}
# {{label|mng|Rơlơm}} [[thỏa thuận]] giữa các [[quốc gia]].
==={{ĐM|ref}}===
* [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.
ewf14nvt02o66lm9bienmscfzys85ww
Thể loại:Chức năng ngữ nghĩa tiếng M'Nông Đông
14
395757
2350152
2026-05-04T15:07:18Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350152
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
knuă
0
395758
2350154
2026-05-04T15:09:08Z
WhoAlone
40420
Trang mới: “=={{langname|mng}}== ==={{ĐM|pron}}=== * {{IPA4|mng|/knwaʔ/}} ==={{ĐM|noun}}=== {{head|mng|Danh từ}} # {{label|mng|Rơlơm}} [[sứ giả]] của [[ma quỷ]]. ==={{ĐM|ref}}=== * [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.”
2350154
wikitext
text/x-wiki
=={{langname|mng}}==
==={{ĐM|pron}}===
* {{IPA4|mng|/knwaʔ/}}
==={{ĐM|noun}}===
{{head|mng|Danh từ}}
# {{label|mng|Rơlơm}} [[sứ giả]] của [[ma quỷ]].
==={{ĐM|ref}}===
* [http://www.sealang.net/monkhmer/database/retrieve.pl?language=Mnong&sort=gloss&format=html Tiếng M'Nông] tại Cơ sở Dữ liệu Môn-Khmer.
6c7euaitlrey93k52v0ljtzubo11haz
𧖤
0
395759
2350164
2026-05-05T00:21:55Z
Hiyuune
50834
/* */ + mul, zh
2350164
wikitext
text/x-wiki
{{character info}}
=={{langname|mul}}==
==={{section|han}}===
{{Han char|rn=142|rad=虫|as=26|sn=32|ids=⿱𣍘䖵}}
===={{section|ref}}====
{{Han ref|kx=1105.300|hdz=42912.050|uh=275A4}}
=={{langname|zh}}==
{{zh-see|螬}}
ir5uhr49e7c1esrmcg3az6usfs4r5cy
螬
0
395760
2350165
2026-05-05T00:24:30Z
Hiyuune
50834
/* */
2350165
wikitext
text/x-wiki
{{character info}}
=={{langname|mul}}==
==={{section|han}}===
{{Han char|rn=142|rad=虫|as=11|sn=17|four=54267|canj=LITWA|ids=⿰虫曹}}
===={{section|ref}}====
* {{Han ref|kx=1094.490|dkj=33493|dj=1559.240|hdz=42884.020|uh=87AC}}
=={{langname|ja}}==
==={{section|kanji}}===
{{ja-kanji|grade=|rs=虫11}}
===={{section|reading}}====
* {{ja-readings|on=そう, ぞう, しゅう, じゅ}}
=={{langname|zh}}==
{{zh-forms|alt=𧕐,𧖤}}
==={{section|glyph origin}}===
{{Han etym}}
==={{section|pron}}===
{{zh-pron
|m=cáo
|c=cou4
|mc=y
|oc=y
|cat=
}}
==={{section|dfn}}===
{{head|zh|Hanzi}}
# {{zh-only|蠐螬}}
ch7ygeh9yq6ar6msgykb7cyr3epbm39
𧕐
0
395761
2350166
2026-05-05T00:25:51Z
Hiyuune
50834
Trang mới: “{{character info}} =={{langname|mul}}== ==={{section|han}}=== {{Han char|rn=142|rad=虫|as=17|sn=23|ids=⿱曹䖵}} ===={{section|ref}}==== {{Han ref|kx=1103.220|hdz=42906.020|uh=27550}} =={{langname|zh}}== {{zh-see|螬}}”
2350166
wikitext
text/x-wiki
{{character info}}
=={{langname|mul}}==
==={{section|han}}===
{{Han char|rn=142|rad=虫|as=17|sn=23|ids=⿱曹䖵}}
===={{section|ref}}====
{{Han ref|kx=1103.220|hdz=42906.020|uh=27550}}
=={{langname|zh}}==
{{zh-see|螬}}
f7z75l56kldvttiag0ulkavss1ooux6
cou4
0
395762
2350167
2026-05-05T00:28:12Z
Hiyuune
50834
Trang mới: “{{also|Phụ lục:Biến thể của "cou"}} =={{langname|cmn}}== ==={{section|rom}}=== {{cmn-pinyin}} # {{alternative spelling of|cmn|còu}} =={{langname|yue}}== ==={{section|pron}}=== {{Jyutping-IPA|cou4}} ==={{section|rom}}=== {{yue-jyut}} # {{yue-jyutping of|傮}} # {{yue-jyutping of|嘈}} # {{yue-jyutping of|㜖}} # {{yue-jyutping of|徂}} # {{yue-jyutping of|晠}} # {{yue-jyutping of|曹}} # {{yue-jyutping of|槽}} # {{yue-jyutping of|㯥}} # {{yue-jyutping o…”
2350167
wikitext
text/x-wiki
{{also|Phụ lục:Biến thể của "cou"}}
=={{langname|cmn}}==
==={{section|rom}}===
{{cmn-pinyin}}
# {{alternative spelling of|cmn|còu}}
=={{langname|yue}}==
==={{section|pron}}===
{{Jyutping-IPA|cou4}}
==={{section|rom}}===
{{yue-jyut}}
# {{yue-jyutping of|傮}}
# {{yue-jyutping of|嘈}}
# {{yue-jyutping of|㜖}}
# {{yue-jyutping of|徂}}
# {{yue-jyutping of|晠}}
# {{yue-jyutping of|曹}}
# {{yue-jyutping of|槽}}
# {{yue-jyutping of|㯥}}
# {{yue-jyutping of|殂}}
# {{yue-jyutping of|漕}}
# {{yue-jyutping of|𥕢}}
# {{yue-jyutping of|䄚}}
# {{yue-jyutping of|䏆}}
# {{yue-jyutping of|䐬}}
# {{yue-jyutping of|艚}}
# {{yue-jyutping of|蓸}}
# {{yue-jyutping of|螬}}
# {{yue-jyutping of|䢐}}
# {{yue-jyutping of|鰽}}
df97vo17uf6wt60gelmd5zqrjf4ase8
còu
0
395763
2350168
2026-05-05T00:30:54Z
Hiyuune
50834
+ oc, cmn
2350168
wikitext
text/x-wiki
{{also|Phụ lục:Biến thể của "cou"}}
=={{langname|oc}}==
==={{section|alt}}===
* {{alter|oc|còl|còth}}
==={{section|etym}}===
Từ {{inh|oc|pro|-}}, từ {{inh|oc|la|collum}}.
==={{section|pron}}===
* {{IPA4|oc|[ˈkɔw]}}
==={{section|n}}===
{{head|oc|Danh từ|g=m}}
# {{lb|oc|Provençal|anatomy}} [[cổ|Cổ]].
=={{langname|cmn}}==
==={{section|alt}}===
* {{alt|cmn|cou||nonstandard}}
==={{section|rom}}===
{{cmn-pinyin}}
# {{cmn-pinyin of|傶}}
# {{cmn-pinyin of|凑}}
# {{cmn-pinyin of|揅}}
# {{cmn-pinyin of|旌}}
# {{cmn-pinyin of|楱}}
# {{cmn-pinyin of|湊}}
# {{cmn-pinyin of|簁}}
# {{cmn-pinyin of|腠}}
# {{cmn-pinyin of|蔟}}
# {{cmn-pinyin of|藪}}
# {{cmn-pinyin of|輳}}
tlkm74xmgosnud86nuus2l9hxg5nd5t
Qaqortoq
0
395764
2350169
2026-05-05T00:38:24Z
Hiyuune
50834
/* */
2350169
wikitext
text/x-wiki
=={{langname|en}}==
{{wp|en:}}
==={{section|pron}}===
* {{IPA4|en|/ˈkɑː.kɔːr.tɒk/}}
==={{section|pr-noun}}===
{{en-prop}}
# {{place|en|thành phố|mun/Kujalleq|aterr/Greenland}}.
=={{langname|kl}}==
==={{section|pron}}===
* {{kl-IPA}}
==={{section|pr-noun}}===
{{head|kl|Danh từ riêng}}
# {{place|kl|thành phố|mun/Kujalleq|aterr/Greenland|t1=Qaqortoq}}.
b1pdq4wmj3p4fujx2w4yzsczu9g5lg1
aanaami
0
395765
2350170
2026-05-05T00:41:17Z
Hiyuune
50834
+ kl
2350170
wikitext
text/x-wiki
=={{langname|kl}}==
==={{section|noun}}===
{{head|kl|Biến thể hình thái danh từ}}
# {{infl of|kl|aanaa||loc|s}}
8ow8y669wypv02el1inzt8th7i9os3o
aanaamik
0
395766
2350171
2026-05-05T00:41:46Z
Hiyuune
50834
Trang mới: “=={{langname|kl}}== ==={{section|noun}}=== {{head|kl|Biến thể hình thái danh từ}} # {{infl of|kl|aanaa||ins|s}}”
2350171
wikitext
text/x-wiki
=={{langname|kl}}==
==={{section|noun}}===
{{head|kl|Biến thể hình thái danh từ}}
# {{infl of|kl|aanaa||ins|s}}
l9xv2rha5codzd0xa6zy25ymap25pwd
労働
0
395767
2350172
2026-05-05T00:42:30Z
WhoAlone
40420
Trang mới: “{{also|勞動|劳动}} =={{langname|ja}}== {{ja-kanjitab|ろう|どう|yomi=on|alt=労動:dated}} ==={{ĐM|etym}}=== Từ dạng ghép {{der|ja|ltc|-|sort=ろうどう}} {{ltc-l|勞動|id=1,1}}. {{mention|ja|動}} bị thay thế bởi [[国字#Japanese|kokuji]] {{mention|ja|働}} từ năm 1897 trở đi khi phong trào người lao động phát triển mạnh ở Nhật.<ref name="KDJ">{{R:Kokugo Dai Jiten}}</ref> ==={{ĐM|pron}}=== {{ja-pron|ろうどう|acc=0|acc_r…”
2350172
wikitext
text/x-wiki
{{also|勞動|劳动}}
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on|alt=労動:dated}}
==={{ĐM|etym}}===
Từ dạng ghép {{der|ja|ltc|-|sort=ろうどう}} {{ltc-l|勞動|id=1,1}}. {{mention|ja|動}} bị thay thế bởi [[国字#Japanese|kokuji]] {{mention|ja|働}} từ năm 1897 trở đi khi phong trào người lao động phát triển mạnh ở Nhật.<ref name="KDJ">{{R:Kokugo Dai Jiten}}</ref>
==={{ĐM|pron}}===
{{ja-pron|ろうどう|acc=0|acc_ref=ZAJ}}
{{ja-suru-acc-table|ろうどう|acc=0}}
==={{ĐM|noun}}===
{{ja-noun|ろうどう}}
# [[lao động]].
==={{ĐM|verb}}===
{{ja-verb-suru|tr=intrans|ろうどう}}
# [[lao động]].
===={{ĐM|conjugation}}====
{{ja-suru|ろうどう}}
===={{ĐM|derived}}====
{{col|ja
|{{ja-r|労%働%歌|ろう%どう%か}}
|{{ja-r|労%働%権|ろう%どう%けん}}
|{{ja-r|労働祭|ろうどうさい}}
|{{ja-r|労%働%者|ろう%どう%しゃ}}
|{{ja-r|労%働%日|ろう%どう%び}}
|{{ja-r|労%働%法|ろう%どう%ほう}}
|{{ja-r|労%働%力|ろう%どう%りょく}}
|{{ja-r|軽労働|けいろうどう}}
|{{ja-r|重%労%働|じゅう%ろう%どう}}
|{{ja-r|賃労働|ちんろうどう}}
|{{ja-r|労働 科%学|ろうどう か%がく}}
|{{ja-r|労%働 貴%族|ろう%どう き%ぞく}}
|{{ja-r|労働 協%約|ろうどう きょう%やく}}
|{{ja-r|労%働 組%合|ろう%どう くみ%あい}}
|{{ja-r|労%働 契%約|ろう%どう けい%やく}}
|{{ja-r|労%働 災%害|ろう%どう さい%がい}}
|{{ja-r|労働 三権|ろうどう さんけん}}
|{{ja-r|労%働 市%場|ろう%どう し%じょう}}
|{{ja-r|労%働 時%間|ろう%どう じ%かん}}
|{{ja-r|労働 手%段|ろうどう しゅ%だん}}
|{{ja-r|労%働 条%件|ろう%どう じょう%けん}}
|{{ja-r|労働 争%議|ろうどう そう%ぎ}}
|{{ja-r|労%働 対%象|ろう%どう たい%しょう}}
|{{ja-r|労働 大臣|ろうどう だいじん}}
|{{ja-r|労働 団体|ろうどう だんたい}}
|{{ja-r|労働 保%険|ろうどう ほ%けん}}
|{{ja-r|労働 問題|ろうどう もんだい}}
|{{ja-r|家%内 労働|か%ない ろうどう}}
|{{ja-r|季%節 労働|き%せつ ろうどう}}
|{{ja-r|筋肉 労働|きんにく ろうどう}}
|{{ja-r|強%制 労%働|きょう%せい ろう%どう}}
|{{ja-r|児%童 労働|じ%どう ろうどう}}
|{{ja-r|剰%余 労%働|じょう%よ ろう%どう}}
|{{ja-r|頭%脳 労働|ず%のう ろうどう}}
|{{ja-r|精%神 労%働|せい%しん ろう%どう}}
|{{ja-r|奴%隷 労働|ど%れい ろうどう}}
|{{ja-r|肉%体 労%働|にく%たい ろう%どう}}
|{{ja-r|年%少 労働|ねん%しょう ろうどう}}
|{{ja-r|厚%生%労%働%省|^こう%せい%-ろう%どう%-しょう}}
}}
==={{ĐM|ref}}===
<references/>
:* {{R:Kanjipedia Kotoba|0007349800}}
* {{R:Shogakukan}}
3iuhksl1ijt5nq1sg226jh85ia1776a
nukarliup
0
395768
2350173
2026-05-05T00:43:06Z
Hiyuune
50834
+ kl
2350173
wikitext
text/x-wiki
=={{langname|kl}}==
==={{section|noun}}===
{{head|kl|Biến thể hình thái danh từ}}
# {{infl of|kl|nukarleq||erg|s}}
a8wmpf32coh53dp59dvsg96u5zcgewu
nukarlermut
0
395769
2350174
2026-05-05T00:44:05Z
Hiyuune
50834
+ kl
2350174
wikitext
text/x-wiki
=={{langname|kl}}==
==={{section|noun}}===
{{head|kl|Biến thể hình thái danh từ}}
# {{infl of|kl|nukarleq||all|s}}
0i4ln8z4jdajaquvkl6yd6ec8f6ytmv
ろうどう
0
395770
2350175
2026-05-05T00:44:49Z
WhoAlone
40420
Trang mới: “{{also|ろうとう}} =={{langname|ja}}== {{ja-see-kango|労働|労動|老働|郎等|郎党}}”
2350175
wikitext
text/x-wiki
{{also|ろうとう}}
=={{langname|ja}}==
{{ja-see-kango|労働|労動|老働|郎等|郎党}}
h8tw0kel4lqmcs4vssbk6nx07wksixo
rōdō
0
395771
2350176
2026-05-05T00:45:05Z
WhoAlone
40420
Trang mới: “{{also|rodo|rodó|rodò|rodo-}} =={{langname|ja}}== ==={{ĐM|rom}}=== {{ja-romaji}} # {{ja-romanization of|ろうどう}}”
2350176
wikitext
text/x-wiki
{{also|rodo|rodó|rodò|rodo-}}
=={{langname|ja}}==
==={{ĐM|rom}}===
{{ja-romaji}}
# {{ja-romanization of|ろうどう}}
mhavslsjooo4hrshw3oy2h3gx8nqu89
労動
0
395772
2350177
2026-05-05T00:45:56Z
WhoAlone
40420
Trang mới: “=={{langname|ja}}== {{ja-kanjitab|ろう|どう|yomi=on}} {{ja-see|労働}}”
2350177
wikitext
text/x-wiki
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on}}
{{ja-see|労働}}
oaqp7ndip6t7oimhv0ta9jaqt7ghzzz
勞働
0
395773
2350178
2026-05-05T00:54:13Z
WhoAlone
40420
Trang mới: “=={{langname|vi}}== {{vi-hantutab}} ==={{ĐM|noun}}=== {{vi-noun|sc=Hani}} # {{vi-Han form of|lao động}} =={{langname|ja}}== {{ja-kanjitab|ろう|どう|yomi=on}} {{ja-see|労働}} =={{langname|ko}}== {{ko-hanjatab}} ==={{ĐM|noun}}=== {{ko-noun|hangeul=로동}} # {{hanja form of|로동|[[lao động]] ("Bắc Triều Tiên")}} ==={{ĐM|noun}}=== {{ko-noun|hangeul=노동}} # {{hanja form of|노동|[[lao động]] ("Hàn Quốc")}} =={{langname|ja}}== {{zh-form…”
2350178
wikitext
text/x-wiki
=={{langname|vi}}==
{{vi-hantutab}}
==={{ĐM|noun}}===
{{vi-noun|sc=Hani}}
# {{vi-Han form of|lao động}}
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on}}
{{ja-see|労働}}
=={{langname|ko}}==
{{ko-hanjatab}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=로동}}
# {{hanja form of|로동|[[lao động]] ("Bắc Triều Tiên")}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=노동}}
# {{hanja form of|노동|[[lao động]] ("Hàn Quốc")}}
=={{langname|ja}}==
{{zh-forms|s=劳动|alt=勞働/劳𫢙-rare}}
==={{ĐM|etym}}===
Từ này có thể được tìm thấy trong các văn bản trước thời Tần với nghĩa "vận động chân tay" và "lao động chân tay; vất vả", và trong Văn ngôn với nghĩa lịch sự.
==={{ĐM|pron}} 1===
{{zh-pron
|m=láodòng
|ma=y
|c=lou4 dung6
|h=pfs=lò-thung
|md=lò̤-dông
|mn=xm,zz,tw:lô-tōng/qz:lô͘-tǒng
|mn-t=lao5 dong6
|px=pt,xy:lor2 dorng5
|w=sh:6lau don6
|mc=1
|oc=1,1
|cat=n,v
}}
===={{ĐM|noun}}====
{{head|zh|Danh từ}}
# [[lao động]].
#: {{zh-x|熱愛 勞動|yêu '''lao động'''}}
# [[labor]]
#: {{zh-x|勞動 仲裁|trọng tài '''lao động'''}}
#: {{zh-x|勞動 關係|quan hệ '''lao động'''}}
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|活計}}
===={{ĐM|verb}}====
{{zh-verb}}
# [[lao động]].
# {{lb|zh|archaic}} [[vận động]] [[chân tay]].
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|操作}}, {{zh-l|幹活}}
===={{ĐM|derived}}====
{{col3|zh|家務勞動|勞動保護|勞動保險|勞動布|勞動對象|勞動法|勞動服|勞動改造|勞動合同|勞動教養|勞動階級|勞動節|勞動力|勞動密集|勞動密集型|勞動模範|勞動強度|勞動權|勞動日|勞動生產率|勞動市場|勞動者|勞動爭議|勞動組合|抽象勞動|具體勞動|勞動人民|勞模|腦力勞動|體力勞動|必要勞動|剩餘勞動|社會必要勞動時間|勞動專業化|強迫勞動|誠實勞動}}
===={{ĐM|desc}}====
{{CJKV||ろうどう|[[로동]]/[[노동]]|lao động|j=労働}}
==={{ĐM|pron}} 2===
{{zh-pron
|m=láodong
|c=lou4 dung6
|mn=tw:lô-tōng
|cat=v
}}
===={{ĐM|verb}}====
{{zh-verb}}
# {{lb|zh|polite|colloquial|dated}} [[làm phiền]] ai đó; [[nhờ vả]] ai đó một cách lịch sự.
oi346oksigjygb22b0oq0r1pxy39yp3
2350179
2350178
2026-05-05T00:54:29Z
WhoAlone
40420
2350179
wikitext
text/x-wiki
{{also|勞働|労働|劳动}}
=={{langname|vi}}==
{{vi-hantutab}}
==={{ĐM|noun}}===
{{vi-noun|sc=Hani}}
# {{vi-Han form of|lao động}}
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on}}
{{ja-see|労働}}
=={{langname|ko}}==
{{ko-hanjatab}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=로동}}
# {{hanja form of|로동|[[lao động]] ("Bắc Triều Tiên")}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=노동}}
# {{hanja form of|노동|[[lao động]] ("Hàn Quốc")}}
=={{langname|ja}}==
{{zh-forms|s=劳动|alt=勞働/劳𫢙-rare}}
==={{ĐM|etym}}===
Từ này có thể được tìm thấy trong các văn bản trước thời Tần với nghĩa "vận động chân tay" và "lao động chân tay; vất vả", và trong Văn ngôn với nghĩa lịch sự.
==={{ĐM|pron}} 1===
{{zh-pron
|m=láodòng
|ma=y
|c=lou4 dung6
|h=pfs=lò-thung
|md=lò̤-dông
|mn=xm,zz,tw:lô-tōng/qz:lô͘-tǒng
|mn-t=lao5 dong6
|px=pt,xy:lor2 dorng5
|w=sh:6lau don6
|mc=1
|oc=1,1
|cat=n,v
}}
===={{ĐM|noun}}====
{{head|zh|Danh từ}}
# [[lao động]].
#: {{zh-x|熱愛 勞動|yêu '''lao động'''}}
# [[labor]]
#: {{zh-x|勞動 仲裁|trọng tài '''lao động'''}}
#: {{zh-x|勞動 關係|quan hệ '''lao động'''}}
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|活計}}
===={{ĐM|verb}}====
{{zh-verb}}
# [[lao động]].
# {{lb|zh|archaic}} [[vận động]] [[chân tay]].
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|操作}}, {{zh-l|幹活}}
===={{ĐM|derived}}====
{{col3|zh|家務勞動|勞動保護|勞動保險|勞動布|勞動對象|勞動法|勞動服|勞動改造|勞動合同|勞動教養|勞動階級|勞動節|勞動力|勞動密集|勞動密集型|勞動模範|勞動強度|勞動權|勞動日|勞動生產率|勞動市場|勞動者|勞動爭議|勞動組合|抽象勞動|具體勞動|勞動人民|勞模|腦力勞動|體力勞動|必要勞動|剩餘勞動|社會必要勞動時間|勞動專業化|強迫勞動|誠實勞動}}
===={{ĐM|desc}}====
{{CJKV||ろうどう|[[로동]]/[[노동]]|lao động|j=労働}}
==={{ĐM|pron}} 2===
{{zh-pron
|m=láodong
|c=lou4 dung6
|mn=tw:lô-tōng
|cat=v
}}
===={{ĐM|verb}}====
{{zh-verb}}
# {{lb|zh|polite|colloquial|dated}} [[làm phiền]] ai đó; [[nhờ vả]] ai đó một cách lịch sự.
558ycg5t3j7s59xh45ds6qspa91ncdk
2350181
2350179
2026-05-05T00:55:40Z
WhoAlone
40420
2350181
wikitext
text/x-wiki
{{also|勞働|労働|劳动}}
=={{langname|vi}}==
{{vi-hantutab}}
==={{ĐM|noun}}===
{{vi-noun|sc=Hani}}
# {{vi-Han form of|lao động}}
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on}}
{{ja-see|労働}}
=={{langname|ko}}==
{{ko-hanjatab}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=로동}}
# {{hanja form of|로동|[[lao động]] ("Bắc Triều Tiên")}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=노동}}
# {{hanja form of|노동|[[lao động]] ("Hàn Quốc")}}
=={{langname|zh}}==
{{zh-forms|s=劳动|alt=勞働/劳𫢙-rare}}
==={{ĐM|etym}}===
Từ này có thể được tìm thấy trong các văn bản trước thời Tần với nghĩa "vận động chân tay" và "lao động chân tay; vất vả", và trong Văn ngôn với nghĩa lịch sự.
==={{ĐM|pron}} 1===
{{zh-pron
|m=láodòng
|ma=y
|c=lou4 dung6
|h=pfs=lò-thung
|md=lò̤-dông
|mn=xm,zz,tw:lô-tōng/qz:lô͘-tǒng
|mn-t=lao5 dong6
|px=pt,xy:lor2 dorng5
|w=sh:6lau don6
|mc=1
|oc=1,1
|cat=n,v
}}
===={{ĐM|noun}}====
{{head|zh|Danh từ}}
# [[lao động]].
#: {{zh-x|熱愛 勞動|yêu '''lao động'''}}
# [[labor]]
#: {{zh-x|勞動 仲裁|trọng tài '''lao động'''}}
#: {{zh-x|勞動 關係|quan hệ '''lao động'''}}
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|活計}}
===={{ĐM|verb}}====
{{zh-verb}}
# [[lao động]].
# {{lb|zh|archaic}} [[vận động]] [[chân tay]].
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|操作}}, {{zh-l|幹活}}
===={{ĐM|derived}}====
{{col3|zh|家務勞動|勞動保護|勞動保險|勞動布|勞動對象|勞動法|勞動服|勞動改造|勞動合同|勞動教養|勞動階級|勞動節|勞動力|勞動密集|勞動密集型|勞動模範|勞動強度|勞動權|勞動日|勞動生產率|勞動市場|勞動者|勞動爭議|勞動組合|抽象勞動|具體勞動|勞動人民|勞模|腦力勞動|體力勞動|必要勞動|剩餘勞動|社會必要勞動時間|勞動專業化|強迫勞動|誠實勞動}}
===={{ĐM|desc}}====
{{CJKV||ろうどう|[[로동]]/[[노동]]|lao động|j=労働}}
==={{ĐM|pron}} 2===
{{zh-pron
|m=láodong
|c=lou4 dung6
|mn=tw:lô-tōng
|cat=v
}}
===={{ĐM|verb}}====
{{zh-verb}}
# {{lb|zh|polite|colloquial|dated}} [[làm phiền]] ai đó; [[nhờ vả]] ai đó một cách lịch sự.
iqet3ebdghxvmcni3ipnxxenylr2dvr
2350188
2350181
2026-05-05T03:48:20Z
WhoAlone
40420
Thay cả nội dung bằng “=={{langname|ja}}== {{ja-kanjitab|ろう|どう|yomi=on}} {{ja-see|労働}} =={{langname|zh}}== {{zh-see|勞動|v}}”
2350188
wikitext
text/x-wiki
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on}}
{{ja-see|労働}}
=={{langname|zh}}==
{{zh-see|勞動|v}}
f1fich1f7ipwob0j3ljvvsq4375wtvo
劳𫢙
0
395774
2350180
2026-05-05T00:55:12Z
WhoAlone
40420
Trang mới: “=={{langname|zh}}== {{zh-see|勞働|ns}}”
2350180
wikitext
text/x-wiki
=={{langname|zh}}==
{{zh-see|勞働|ns}}
mvov9v790joxjpn1ib5unhtyap038ql
Thành viên:PANG450o
2
395775
2350182
2026-05-05T02:51:07Z
PANG450o
61183
Trang mới: “[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]]”
2350182
wikitext
text/x-wiki
[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]]
5zocbrao17type0jq63m1brrqrwmvv9
2350194
2350182
2026-05-05T03:50:55Z
Hiyuune
50834
2350194
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
2350236
2350194
2026-05-05T06:42:20Z
PANG450p
61185
Đã lùi lại sửa đổi [[Special:Diff/2350194|2350194]] của [[Special:Contributions/Hiyuune|Hiyuune]] ([[User talk:Hiyuune|thảo luận]])
2350236
wikitext
text/x-wiki
[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]]
5zocbrao17type0jq63m1brrqrwmvv9
2350247
2350236
2026-05-05T07:06:44Z
Hiyuune
50834
Đã lùi lại sửa đổi của [[Special:Contributions/PANG450p|PANG450p]] ([[User talk:PANG450p|thảo luận]]) quay về phiên bản cuối của [[User:Hiyuune|Hiyuune]]
2350194
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
2350248
2350247
2026-05-05T07:27:06Z
WhoAlone
40420
Đã khóa “[[Thành viên:PANG450o]]” ([Sửa đổi=Chỉ cho phép thành viên tự xác nhận] (vô thời hạn) [Di chuyển=Chỉ cho phép thành viên tự xác nhận] (vô thời hạn))
2350194
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
勞動
0
395777
2350186
2026-05-05T03:08:57Z
WhoAlone
40420
Trang mới: “{{also|勞働|労働|劳动}} =={{langname|vi}}== {{vi-hantutab}} ==={{ĐM|noun}}=== {{vi-noun|sc=Hani}} # {{vi-Han form of|lao động}} =={{langname|ja}}== {{ja-kanjitab|ろう|どう|yomi=on}} {{ja-see|労働}} =={{langname|ko}}== {{ko-hanjatab}} ==={{ĐM|noun}}=== {{ko-noun|hangeul=로동}} # {{hanja form of|로동|[[lao động]] ("Bắc Triều Tiên")}} ==={{ĐM|noun}}=== {{ko-noun|hangeul=노동}} # {{hanja form of|노동|[[lao động]] ("Hàn Quốc")}}…”
2350186
wikitext
text/x-wiki
{{also|勞働|労働|劳动}}
=={{langname|vi}}==
{{vi-hantutab}}
==={{ĐM|noun}}===
{{vi-noun|sc=Hani}}
# {{vi-Han form of|lao động}}
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on}}
{{ja-see|労働}}
=={{langname|ko}}==
{{ko-hanjatab}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=로동}}
# {{hanja form of|로동|[[lao động]] ("Bắc Triều Tiên")}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=노동}}
# {{hanja form of|노동|[[lao động]] ("Hàn Quốc")}}
=={{langname|zh}}==
{{zh-forms|s=劳动|alt=勞働/劳𫢙-rare}}
==={{ĐM|etym}}===
Từ này có thể được tìm thấy trong các văn bản trước thời Tần với nghĩa "vận động chân tay" và "lao động chân tay; vất vả", và trong Văn ngôn với nghĩa lịch sự.
==={{ĐM|pron}} 1===
{{zh-pron
|m=láodòng
|ma=y
|c=lou4 dung6
|h=pfs=lò-thung
|md=lò̤-dông
|mn=xm,zz,tw:lô-tōng/qz:lô͘-tǒng
|mn-t=lao5 dong6
|px=pt,xy:lor2 dorng5
|w=sh:6lau don6
|mc=1
|oc=1,1
|cat=n,v
}}
===={{ĐM|noun}}====
{{head|zh|Danh từ}}
# [[lao động]].
#: {{zh-x|熱愛 勞動|yêu '''lao động'''}}
# [[labor]]
#: {{zh-x|勞動 仲裁|trọng tài '''lao động'''}}
#: {{zh-x|勞動 關係|quan hệ '''lao động'''}}
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|活計}}
===={{ĐM|verb}}====
{{zh-verb}}
# [[lao động]].
# {{lb|zh|archaic}} [[vận động]] [[chân tay]].
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|操作}}, {{zh-l|幹活}}
===={{ĐM|derived}}====
{{col3|zh|家務勞動|勞動保護|勞動保險|勞動布|勞動對象|勞動法|勞動服|勞動改造|勞動合同|勞動教養|勞動階級|勞動節|勞動力|勞動密集|勞動密集型|勞動模範|勞動強度|勞動權|勞動日|勞動生產率|勞動市場|勞動者|勞動爭議|勞動組合|抽象勞動|具體勞動|勞動人民|勞模|腦力勞動|體力勞動|必要勞動|剩餘勞動|社會必要勞動時間|勞動專業化|強迫勞動|誠實勞動}}
===={{ĐM|desc}}====
{{CJKV||ろうどう|[[로동]]/[[노동]]|lao động|j=労働}}
==={{ĐM|pron}} 2===
{{zh-pron
|m=láodong
|c=lou4 dung6
|mn=tw:lô-tōng
|cat=v
}}
===={{ĐM|verb}}====
{{zh-verb}}
# {{lb|zh|polite|colloquial|dated}} [[làm phiền]] ai đó; [[nhờ vả]] ai đó một cách lịch sự.
iqet3ebdghxvmcni3ipnxxenylr2dvr
2350197
2350186
2026-05-05T03:53:14Z
Hiyuune
50834
/* Tiếng Triều Tiên */ tránh đặt tên thành "Bắc Triều Tiên" vì không trung lập (sử dụng [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]])
2350197
wikitext
text/x-wiki
{{also|勞働|労働|劳动}}
=={{langname|vi}}==
{{vi-hantutab}}
==={{ĐM|noun}}===
{{vi-noun|sc=Hani}}
# {{vi-Han form of|lao động}}
=={{langname|ja}}==
{{ja-kanjitab|ろう|どう|yomi=on}}
{{ja-see|労働}}
=={{langname|ko}}==
{{ko-hanjatab}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=로동}}
# {{hanja form of|로동|[[lao động]] ("Cộng hòa Dân chủ Nhân dân Triều Tiên")}}
==={{ĐM|noun}}===
{{ko-noun|hangeul=노동}}
# {{hanja form of|노동|[[lao động]] ("Hàn Quốc")}}
=={{langname|zh}}==
{{zh-forms|s=劳动|alt=勞働/劳𫢙-rare}}
==={{ĐM|etym}}===
Từ này có thể được tìm thấy trong các văn bản trước thời Tần với nghĩa "vận động chân tay" và "lao động chân tay; vất vả", và trong Văn ngôn với nghĩa lịch sự.
==={{ĐM|pron}} 1===
{{zh-pron
|m=láodòng
|ma=y
|c=lou4 dung6
|h=pfs=lò-thung
|md=lò̤-dông
|mn=xm,zz,tw:lô-tōng/qz:lô͘-tǒng
|mn-t=lao5 dong6
|px=pt,xy:lor2 dorng5
|w=sh:6lau don6
|mc=1
|oc=1,1
|cat=n,v
}}
===={{ĐM|noun}}====
{{head|zh|Danh từ}}
# [[lao động]].
#: {{zh-x|熱愛 勞動|yêu '''lao động'''}}
# [[labor]]
#: {{zh-x|勞動 仲裁|trọng tài '''lao động'''}}
#: {{zh-x|勞動 關係|quan hệ '''lao động'''}}
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|活計}}
===={{ĐM|verb}}====
{{zh-verb}}
# [[lao động]].
# {{lb|zh|archaic}} [[vận động]] [[chân tay]].
====={{ĐM|syn}}=====
* {{s|lao động}} {{zh-l|操作}}, {{zh-l|幹活}}
===={{ĐM|derived}}====
{{col3|zh|家務勞動|勞動保護|勞動保險|勞動布|勞動對象|勞動法|勞動服|勞動改造|勞動合同|勞動教養|勞動階級|勞動節|勞動力|勞動密集|勞動密集型|勞動模範|勞動強度|勞動權|勞動日|勞動生產率|勞動市場|勞動者|勞動爭議|勞動組合|抽象勞動|具體勞動|勞動人民|勞模|腦力勞動|體力勞動|必要勞動|剩餘勞動|社會必要勞動時間|勞動專業化|強迫勞動|誠實勞動}}
===={{ĐM|desc}}====
{{CJKV||ろうどう|[[로동]]/[[노동]]|lao động|j=労働}}
==={{ĐM|pron}} 2===
{{zh-pron
|m=láodong
|c=lou4 dung6
|mn=tw:lô-tōng
|cat=v
}}
===={{ĐM|verb}}====
{{zh-verb}}
# {{lb|zh|polite|colloquial|dated}} [[làm phiền]] ai đó; [[nhờ vả]] ai đó một cách lịch sự.
e62sqwdqw6ogoz8nv8vv686tdc6ykhz
Thể loại:Từ đánh vần với 勞 là ろう tiếng Nhật
14
395778
2350190
2026-05-05T03:49:19Z
WhoAlone
40420
Trang mới: “{{auto cat|goon|kanon}}”
2350190
wikitext
text/x-wiki
{{auto cat|goon|kanon}}
pcfeck6099nlm7ilmenvn80gp1r7w7f
Thể loại:Từ đánh vần với 勞 tiếng Nhật
14
395780
2350198
2026-05-05T03:54:27Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350198
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:Từ đánh vần với 勞 theo ngôn ngữ
14
395781
2350200
2026-05-05T03:56:26Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350200
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:Mục từ biến thể hình thái tiếng Greenland
14
395782
2350202
2026-05-05T03:59:38Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350202
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:Biến thể hình thái danh từ tiếng Greenland
14
395783
2350203
2026-05-05T03:59:41Z
WhoAlone
40420
Trang mới: “{{auto cat}}”
2350203
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:Địa danh thần thoại
14
395784
2350206
2026-05-05T04:03:22Z
Hiyuune
50834
Trang mới: “{{auto cat}}”
2350206
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
キリコ
0
395785
2350207
2026-05-05T04:04:38Z
WhoAlone
40420
Trang mới: “=={{langname|ja}}== ==={{ĐM|pr-noun}}=== {{ja-pos|proper|rom=Kiriko}} # {{given name|ja|nữ}} # {{ja-l|貴理子}} # {{ja-l|桐子}}”
2350207
wikitext
text/x-wiki
=={{langname|ja}}==
==={{ĐM|pr-noun}}===
{{ja-pos|proper|rom=Kiriko}}
# {{given name|ja|nữ}}
# {{ja-l|貴理子}}
# {{ja-l|桐子}}
il6c37atjv3bccd1pgvv6ru3qwcjcku
アースガルズ
0
395786
2350208
2026-05-05T04:05:01Z
Hiyuune
50834
Trang mới: “=={{langname|ja}}== {{wp|ja:}} ==={{section|alt}}=== * {{ja-r|アースガルド|caps=y}}, {{ja-r|アスガルド|caps=y}}, {{ja-r|アスガルズ|caps=y}}, {{ja-r|アスガード|caps=y}}, {{ja-r|caps=y|アスガルト}} ==={{section|etym}}=== {{etymon|ja|:lbor|non:Ásgarðr}} {{lbor|ja|non|Ásgarðr}}. ==={{section|pron}}=== {{ja-pron}} ==={{section|pr-noun}}=== {{ja-pos|proper}} # [[Asgard]]. {{topics|ja|Địa danh thần thoại}}”
2350208
wikitext
text/x-wiki
=={{langname|ja}}==
{{wp|ja:}}
==={{section|alt}}===
* {{ja-r|アースガルド|caps=y}}, {{ja-r|アスガルド|caps=y}}, {{ja-r|アスガルズ|caps=y}}, {{ja-r|アスガード|caps=y}}, {{ja-r|caps=y|アスガルト}}
==={{section|etym}}===
{{etymon|ja|:lbor|non:Ásgarðr}}
{{lbor|ja|non|Ásgarðr}}.
==={{section|pron}}===
{{ja-pron}}
==={{section|pr-noun}}===
{{ja-pos|proper}}
# [[Asgard]].
{{topics|ja|Địa danh thần thoại}}
h39gsr84umb93g6hdcpt9wqg1v8g6rd
2350209
2350208
2026-05-05T04:06:09Z
Hiyuune
50834
/* Từ nguyên */ (sử dụng [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]])
2350209
wikitext
text/x-wiki
=={{langname|ja}}==
{{wp|ja:}}
==={{section|alt}}===
* {{ja-r|アースガルド|caps=y}}, {{ja-r|アスガルド|caps=y}}, {{ja-r|アスガルズ|caps=y}}, {{ja-r|アスガード|caps=y}}, {{ja-r|caps=y|アスガルト}}
==={{section|etym}}===
{{etymon|ja|:bor|non:Ásgarðr}}
{{lbor|ja|non|Ásgarðr}}.
==={{section|pron}}===
{{ja-pron}}
==={{section|pr-noun}}===
{{ja-pos|proper}}
# [[Asgard]].
{{topics|ja|Địa danh thần thoại}}
1acc0bxdvbh3ipaoap4x0g0ec74u3xx
Thể loại:ja:Địa danh thần thoại
14
395787
2350210
2026-05-05T04:06:32Z
Hiyuune
50834
Trang mới: “{{auto cat}}”
2350210
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kiriko
0
395788
2350213
2026-05-05T04:07:07Z
WhoAlone
40420
Trang mới: “{{also|kiriko}} =={{langname|ja}}== ==={{ĐM|rom}}=== {{ja-romaji}} # {{ja-romanization of|キリコ}} # {{ja-romanization of|きりこ}}”
2350213
wikitext
text/x-wiki
{{also|kiriko}}
=={{langname|ja}}==
==={{ĐM|rom}}===
{{ja-romaji}}
# {{ja-romanization of|キリコ}}
# {{ja-romanization of|きりこ}}
qt6lihh3aj7kj881tsw17cnurf237oe
Thể loại:Đại dương/Tiếng Anh
14
395789
2350222
2026-05-05T04:14:24Z
Hiyuune
50834
Hiyuune đã đổi [[Thể loại:Đại dương/Tiếng Anh]] thành [[Thể loại:en:Đại dương]]
2350222
wikitext
text/x-wiki
{{Đổi hướng thể loại|Thể loại:en:Đại dương}}
rwmtf5iekai5twfj9mkb96w3t2cqyu6
xullo
0
395790
2350224
2026-05-05T04:18:28Z
Kelly zhrm
58416
Trang mới: “=={{langname|gl}}== ==={{ĐM|alt}}=== * {{alt|gl|xul.||abbreviation}} * {{alt|gl|julho||reintegrationist}} ==={{ĐM|etym}}=== Từ {{inh|gl|roa-opt|jullo}}, {{mention|roa-opt|julio}}, từ {{inh|gl|la|iulius}}. ==={{ĐM|pron}}=== {{gl-pr|audio=gl-xullo.ogg}} ==={{ĐM|n}}=== {{gl-noun|m}} # [[tháng Bảy|Tháng Bảy]]. ===={{ĐM|rel}}==== * {{l|gl|xullín}} ===={{ĐM|see}}==== {{list:Gregorian calendar months/gl}}”
2350224
wikitext
text/x-wiki
=={{langname|gl}}==
==={{ĐM|alt}}===
* {{alt|gl|xul.||abbreviation}}
* {{alt|gl|julho||reintegrationist}}
==={{ĐM|etym}}===
Từ {{inh|gl|roa-opt|jullo}}, {{mention|roa-opt|julio}}, từ {{inh|gl|la|iulius}}.
==={{ĐM|pron}}===
{{gl-pr|audio=gl-xullo.ogg}}
==={{ĐM|n}}===
{{gl-noun|m}}
# [[tháng Bảy|Tháng Bảy]].
===={{ĐM|rel}}====
* {{l|gl|xullín}}
===={{ĐM|see}}====
{{list:Gregorian calendar months/gl}}
79dze4ovyog6mqhrlnktxsked6dyfn8
xuño
0
395791
2350225
2026-05-05T04:23:12Z
Kelly zhrm
58416
Trang mới: “=={{langname|gl}}== ==={{ĐM|alt}}=== * {{alt|gl|junho||AGAL}} ==={{ĐM|etym}}=== {{inh+|gl|roa-opt|junio}}, {{mention|roa-opt|junyo}}, từ {{inh|gl|la|iūnius}}. ==={{ĐM|pron}}=== {{gl-pr}} * {{hyph|gl|xu|ño}} ==={{ĐM|n}}=== {{gl-noun|m}} # [[tháng Sáu|Tháng Sáu]]. ===={{ĐM|see}}==== {{list:Gregorian calendar months/gl}} ==={{ĐM|further}}=== * {{R:gl:DRAG}}”
2350225
wikitext
text/x-wiki
=={{langname|gl}}==
==={{ĐM|alt}}===
* {{alt|gl|junho||AGAL}}
==={{ĐM|etym}}===
{{inh+|gl|roa-opt|junio}}, {{mention|roa-opt|junyo}}, từ {{inh|gl|la|iūnius}}.
==={{ĐM|pron}}===
{{gl-pr}}
* {{hyph|gl|xu|ño}}
==={{ĐM|n}}===
{{gl-noun|m}}
# [[tháng Sáu|Tháng Sáu]].
===={{ĐM|see}}====
{{list:Gregorian calendar months/gl}}
==={{ĐM|further}}===
* {{R:gl:DRAG}}
ftvktfvhiq0gvxighv8ebm0wnhx030n
aʔgu
0
395792
2350231
2026-05-05T06:20:33Z
TheHighFighter2
42988
Trang mới: “=={{langname|tpx}}== ==={{ĐM|noun}}=== {{head|tpx|noun}} # [[phụ nữ|Phụ nữ]]. ==={{ĐM|ref}}=== * Kevin Cline, ''The Tone System of Acatepec Meꞌpaa'' * B. A. Antonio et al., ''SIL-Mexico Electronic Working Papers #9: Vocabulario básico en me'phaa'' (as Acatepec Me'phaa ''-eʔgu'' "female")”
2350231
wikitext
text/x-wiki
=={{langname|tpx}}==
==={{ĐM|noun}}===
{{head|tpx|noun}}
# [[phụ nữ|Phụ nữ]].
==={{ĐM|ref}}===
* Kevin Cline, ''The Tone System of Acatepec Meꞌpaa''
* B. A. Antonio et al., ''SIL-Mexico Electronic Working Papers #9: Vocabulario básico en me'phaa'' (as Acatepec Me'phaa ''-eʔgu'' "female")
sn3utfe46csgzkdr8dpvwx8cwp5tggg
Thể loại:Mục từ tiếng Me'phaa Acatepec
14
395793
2350232
2026-05-05T06:21:20Z
TheHighFighter2
42988
Trang mới: “{{auto cat}}”
2350232
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thể loại:Danh từ tiếng Me'phaa Acatepec
14
395794
2350233
2026-05-05T06:22:55Z
TheHighFighter2
42988
Trang mới: “{{auto cat}}”
2350233
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thành viên:PANG450p
2
395795
2350234
2026-05-05T06:41:28Z
PANG450p
61185
Trang mới: “[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]]”
2350234
wikitext
text/x-wiki
[[Đặc_biệt:Đăng_nhập_trung_ương/PANG450v]]
5zocbrao17type0jq63m1brrqrwmvv9
2350250
2350234
2026-05-05T07:27:33Z
WhoAlone
40420
2350250
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
2350251
2350250
2026-05-05T07:27:42Z
WhoAlone
40420
Đã khóa “[[Thành viên:PANG450p]]” ([Sửa đổi=Chỉ cho phép thành viên tự xác nhận] (vô thời hạn) [Di chuyển=Chỉ cho phép thành viên tự xác nhận] (vô thời hạn))
2350250
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv
Thể loại:Bãi biển
14
395799
2350241
2026-05-05T06:54:26Z
Hiyuune
50834
Trang mới: “{{auto cat}}”
2350241
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Thành viên:May Duolingo
2
395800
2350252
2026-05-05T09:40:11Z
Higashizakura
36666
ban đầu nhìn nhầm là cô nhung
2350252
wikitext
text/x-wiki
{{sock|Yummie1207|confirmed}}
ta4jm5oivxay8cdgzmdodx89akuv6mv