將 ISO 3166-1 代碼轉換為 i18n 中的國家/地區名稱

將 ISO 3166-1 alpha-2 或 alpha-3 或數字國家/地區代碼轉換為 i18n 中的國家/地區名稱

目前為 2022-10-03 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/452413/1100478/convert%20ISO%203166-1%20code%20to%20country%20names%20in%20i18n.js

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
sitebucket
版本
0.1
建立日期
2022-10-03
更新日期
2022-10-03
尺寸
86.1 KB
授權條款
Copyright sitebucket.net

usage

supported languages: ar, bn, de, en, es, fr, hi, it, jp, ko, pt, ru, zh-cn, zh-hk, zh-tw

alpha-2 code to country name a22country(a2, lang="en")

alpha-3 code to country name a32country(a3, lang="en")

numeric code to country name num2country(num, lang="en")

test

console.log(a22country("AF"));
console.log(a22country("AF", "ar"));
console.log(a22country("AF", "bn"));
console.log(a22country("AF", "de"));
console.log(a22country("AF", "en"));
console.log(a22country("AF", "es"));
console.log(a22country("AF", "fr"));
console.log(a22country("AF", "hi"));
console.log(a22country("AF", "it"));
console.log(a22country("AF", "jp"));
console.log(a22country("AF", "ko"));
console.log(a22country("AF", "pt"));
console.log(a22country("AF", "ru"));
console.log(a22country("AF", "zh-cn"));
console.log(a22country("AF", "zh-hk"));
console.log(a22country("AF", "zh-tw"));
console.log("-----");
console.log(a32country("ALA"));
console.log(a32country("ALA", "ar"));
console.log(a32country("ALA", "bn"));
console.log(a32country("ALA", "de"));
console.log(a32country("ALA", "en"));
console.log(a32country("ALA", "es"));
console.log(a32country("ALA", "fr"));
console.log(a32country("ALA", "hi"));
console.log(a32country("ALA", "it"));
console.log(a32country("ALA", "jp"));
console.log(a32country("ALA", "ko"));
console.log(a32country("ALA", "pt"));
console.log(a32country("ALA", "ru"));
console.log(a32country("ALA", "zh-cn"));
console.log(a32country("ALA", "zh-hk"));
console.log(a32country("ALA", "zh-tw"));
console.log("-----");
console.log(num2country("008"));
console.log(num2country("008", "ar"));
console.log(num2country("008", "bn"));
console.log(num2country("008", "de"));
console.log(num2country("008", "en"));
console.log(num2country("008", "es"));
console.log(num2country("008", "fr"));
console.log(num2country("008", "hi"));
console.log(num2country("008", "it"));
console.log(num2country("008", "jp"));
console.log(num2country("008", "ko"));
console.log(num2country("008", "pt"));
console.log(num2country("008", "ru"));
console.log(num2country("008", "zh-cn"));
console.log(num2country("008", "zh-hk"));
console.log(num2country("008", "zh-tw"));

output

Afghanistan
أفغانستان
আফগানিস্তান
Afghanistan
Afghanistan
Afganistán
AFGHANISTAN
अफगानिस्तान
Afghanistan
アフガニスタン
아프가니스탄
Afeganistão
Афганистан
阿富汗
阿富汗
阿富汗
-----
Åland Islands
جزر أولاند
অলান্দ দ্বীপপুঞ্জ
Åland
Åland Islands
Åland
ÅLAND, ÎLES
Åland Islands
Isole Åland
オーランド諸島
올란드 제도
Aland, Ilhas
Аландские острова
奥兰
奧蘭
奧蘭
-----
Albania
ألبانيا
আলবেনিয়া
Albanien
Albania
Albania
ALBANIE
अल्बानिया
Albania
アルバニア
알바니아
Albânia
Албания
阿尔巴尼亚
阿爾巴尼亞
阿爾巴尼亞

data source