မဝ်ဂျူ:scripts/print
မံက်ပြာကတ်
Use this to update Module:scripts/by name and Module:scripts/code to canonical name.
- Copy the following to Module:scripts/by name:
return {
["Blissymbols"] = "Blis",
["Book Pahlavi"] = "Phlv",
["Braille"] = "Brai",
["Chisoi"] = "Chis",
["Chorasmian"] = "Chrs",
["Clear Script"] = "xwo-Mong",
["Cypro-Minoan"] = "Cpmn",
["Demotic"] = "Egyd",
["Dogra"] = "Dogr",
["Dongba"] = "Nkdb",
["Elymaic"] = "Elym",
["Fraktur"] = "Latf",
["Gaelic"] = "Latg",
["Garay"] = "Gara",
["Geba"] = "Nkgb",
["Hieratic"] = "Egyh",
["Image-rendered"] = "Image",
["Jurchen"] = "Jurc",
["Khema"] = "Gukh",
["Khitan Large"] = "Kitl",
["Khitan Small"] = "Kits",
["Kirat Rai"] = "Krai",
["Kpelle"] = "Kpel",
["Lai Tay"] = "Tayo",
["Loma"] = "Loma",
["Moon"] = "Moon",
["Nag Mundari"] = "Nagm",
["Northeastern Iberian"] = "Ibrnn",
["Nyiakeng Puachue Hmong"] = "Hmnp",
["Ol Onal"] = "Onao",
["Old Uyghur"] = "Ougr",
["Ranjana"] = "Ranj",
["Rongorongo"] = "Roro",
["Sidetic"] = "Sidt",
["Simplified Han"] = "Hans",
["Southeastern Iberian"] = "Ibrns",
["Sui"] = "Shui",
["Sunuwar"] = "Sunu",
["Tamyig"] = "sit-tam-Tibt",
["Tangsa"] = "Tnsa",
["Tigalari"] = "Tutg",
["Todhri"] = "Todr",
["Tolong Siki"] = "Tols",
["Toto"] = "Toto",
["Traditional Han"] = "Hant",
["Visible Speech"] = "Visp",
["Vithkuqi"] = "Vith",
["Wancho"] = "Wcho",
["Woleai"] = "Wole",
["Xibe"] = "sjo-Mong",
["Yezidi"] = "Yezi",
["flag semaphore"] = "Semap",
["uncoded"] = "Zzzz",
["undetermined"] = "Zyyy",
["ကယျာလဳ"] = "Kali",
["ကာတာကာနာ"] = "Kana",
["ကာဒ်တေတ်"] = "Goth",
["ကာနာ"] = "Hrkt",
["ကာန်နာဒါ"] = "Knda",
["ကိုဝ်ရဳယျာ"] = "Kore",
["ကုဒ်မောဝ်"] = "Morse",
["ကေတဳ"] = "Kthi",
["ကော့ပ်တိ"] = "Copt",
["ကြူနဳဖံင်"] = "Xsux",
["ခစေၚ်တြေံ"] = "Ital",
["ခမေန်"] = "Khmr",
["ခါခေယှေန် အာယ်လ်ဘေနဳယာန်"] = "Aghb",
["ခါရဝ်သတဳ"] = "Khar",
["ခါရေင်ယာန်"] = "Cari",
["ခါဝဳ"] = "Kawi",
["ခုတ်သူရေဝ်"] = "Geok",
["ခုဒ်သကဳ"] = "Khoj",
["ချာမူခဳ"] = "pa-Arab",
["ချေန်"] = "Cham",
["ချေန်ကမာ"] = "Cakm",
["ချေဝ်ရဝ်ကဳ"] = "Cher",
["ဂကောံအက္ခရ်ဗွဟ်ရမျာင်"] = "Ipach",
["ဂရေတ်"] = "Grek",
["ဂရေန်တာ"] = "Gran",
["ဂလာဂဝ်လေတ်တေတ်"] = "Glag",
["ဂုဂျာရတဳ"] = "Gujr",
["ဂူမူခဳ"] = "Guru",
["ဂေန်ဂျာလာဂွေန်ဒဳ"] = "Gong",
["ဂျပါန်"] = "Jpan",
["ဂျဝ်ဂျဳယာန်"] = "Geor",
["ဂျာဗာ"] = "Java",
["ဂၞန်သင်္ချာရုမဳ"] = "Rumin",
["ဃှဳဝါတာ"] = "Shrd",
["စူယေင်"] = "Bopo",
["စဳရယ်လ်"] = "Cyrl",
["စဳရယ်လ်တြေံ"] = "Cyrs",
["ဆိုရေန်ဆေမ်ပေန်"] = "Sora",
["ဍုင်ဗၟာ"] = "Mymr",
["တဂ်ဗါန်ဝါ"] = "Tagb",
["တဂ်ဝါ"] = "Teng",
["တမဳလ်"] = "Taml",
["တာဂရေဝ်"] = "Takr",
["တာန်ဂူ"] = "Tang",
["တိရဟုတာ"] = "Tirh",
["တေလုဂု"] = "Telu",
["တဳဖဳနေတ်"] = "Tfng",
["တဳဗဝ်"] = "Tibt",
["ထဏး"] = "Thaa",
["ထေဝနာခရေဝ်"] = "Deva",
["ဒဝ်ဂရာ"] = "Diak",
["ဒါတ်ဇရာန်"] = "Dsrt",
["ဒူဒါဝါဒဳ"] = "Sind",
["ဒူဖလှါန်ယာန်"] = "Dupl",
["နာန်ဒဳနာဂါရေဝ်"] = "Nand",
["နာၜထေင်"] = "Nbat",
["နူသျှူ"] = "Nshu",
["နဳဝါ"] = "Newa",
["ပန်ကၠၚ်ဇာနာဗဇြာ"] = "Zanb",
["ပါတေတ်"] = "Batk",
["ပါမာဲရင်"] = "Palm",
["ပါမေတ်တြေံ"] = "Perm",
["ပါလာဝဳ လိက်ဇြေဟ်"] = "Prti",
["ပါလာဝဳ သဝ်ဒါန်"] = "Phlp",
["ပဲါလဳ"] = "Bali",
["ပဲါသေံ"] = "pal-Avst",
["ဖရာမ်မဳလ်"] = "Brah",
["ဖါန်လာက်"] = "Plrd",
["ဖါဲသေင်အော"] = "Pauc",
["ဖာသဳတြေံ"] = "Xpeo",
["ဖဳနေတ်ယှေန်"] = "Phnx",
["ဖှတ်-ပါ"] = "Phag",
["ဗါဲဗါဲရေန်"] = "Tglg",
["ဗာမာန်"] = "Bamu",
["ဗာသာ"] = "Bass",
["ဗီုပြင်ချူခရက်"] = "Sgnw",
["ဘင်္ဂါလဳ"] = "Beng",
["မဏဳန်ၜေါအ်ရ"] = "Mtei",
["မရုန်သာ"] = "Mroo",
["မလေဝ်ယျလာမ်"] = "Mlym",
["မဝ်ဒဳ"] = "Modi",
["မသာရေန်ဂွေန်ဒဳ"] = "Gonm",
["မဟာဂျနဳ"] = "Mahj",
["မါန်ဒဳ"] = "Mend",
["မာတ်ချေန်"] = "Marc",
["မာဒဝ်ဖှါန်ဒရေန်"] = "Medf",
["မာန်ချူ"] = "mnc-Mong",
["မာန်တာခ်နဳ"] = "Mult",
["မာန်ဒိုင်"] = "Mand",
["မာန်နေတ်ခဳယာန်"] = "Mani",
["မာယာ"] = "Maya",
["မောန်"] = "Hmng",
["မဳရဝ်ဣတေတ် ခဝ်သေတ်"] = "Merc",
["မဳရဝ်ဣတေတ် ဟာဲရဝ်ကလေတ်တေတ်"] = "Mero",
["ယူဂရေတ်တေတ်"] = "Ugar",
["ယဳ"] = "Yiii",
["ရဝ်ဟေင်ဂျာ ဟာဲနဳဖှဳ"] = "Rohg",
["ရူနေတ်"] = "Runr",
["ရေဂျေန်"] = "Rjng",
["လပ်ချာ"] = "Lepc",
["လေတ်ရှုကဳ"] = "Bhks",
["လေန်နဳယျာ (က)"] = "Lina",
["လေန်နဳယျာ (ခ)"] = "Linb",
["လေန်ၜေါအ်"] = "Limb",
["လေပ်တဲင်"] = "Latn",
["လဳကဳ"] = "Leke",
["လဳဒဳဒါန်"] = "Lydi",
["လဳသေုန်"] = "Lisu",
["ဝါန်ထာရာ"] = "Maka",
["ဝါရာန်ခဃှဳတဳ"] = "Wara",
["ဝေါဟာရသဍုင်ခမ်နာဒါ"] = "Cans",
["ဝဲါ"] = "Vaii",
["သင်္ကေတ"] = "Zsym",
["သင်္ကေတကြိယျာဂဳတ"] = "Music",
["သင်္ချာလ္ပာ်သက်ခရက်သမ္တီလဝ်"] = "Zmth",
["သတ်ဂျဳယာန်"] = "Sogd",
["သတ်ဂျဳယာန်တြေံ"] = "Sogo",
["သဝ်ယွေန်ဗဝ်"] = "Soyo",
["သာန်ဓနဳ"] = "Sund",
["သေတ်ဒေါန်"] = "Sidd",
["သေတ်ပရဳရေတ်"] = "Cprt",
["သေန်လဝ်တဳ နာဂရေဝ်"] = "Sylo",
["သေဝ်ရာတ်သာတ်တရာ"] = "Saur",
["သေံ"] = "Thai",
["သေံဃိန်"] = "Lana",
["သေံတာဲခေါင်"] = "Tale",
["သေံဗဳယေတ်"] = "Tavt",
["သေံလုတၟိ"] = "Talu",
["သေံလေဴ"] = "Laoo",
["သဳရိလင်္ကာ"] = "Sinh",
["သဳရဳယျာ"] = "Syrc",
["သျမာရိဠူ"] = "Samr",
["သျှဗဳယာန်"] = "Shaw",
["ဟန်ဂူ"] = "Hang",
["ဟာနူမှု"] = "Hano",
["ဟာန်"] = "Hani",
["ဟာန်ဂါရေဝ်တြေံ"] = "Hung",
["ဟေက်ထရာန်"] = "Hatr",
["ဟဳဘရဝ်"] = "Hebr",
["ဟဳရာဂါနာ"] = "Hira",
["ဟွံဂွံသမ္တီလဝ်"] = "None",
["အင်ဖဳရေဲ အာရမေအဳ"] = "Armi",
["အဗါတ်သတေန်"] = "Avst",
["အယ်လ်ဗာသာန်"] = "Elba",
["အဝ်ကမ်"] = "Ogam",
["အဝ်ခန်ရုန်"] = "Orkh",
["အဝ်ချဳကဳ"] = "Olck",
["အဝ်ဇြဳ"] = "Osge",
["အဝ်ရေဝ်ယာ"] = "Orya",
["အဝ်သမာန်ယာ"] = "Osma",
["အာက်လာမ်"] = "Adlm",
["အာန်တဳအဝ်ဖေန်"] = "Ethi",
["အာန်နာတဝ်လဳယာန် အက္ခရ်အဳဇေတ်တြေံတြဟ်"] = "Hluw",
["အာပဲါကာ"] = "Afak",
["အာမေနဳယျာ"] = "Armn",
["အာရဗဳ"] = "Arab",
["အာရေဗဳယာန်သမၠုင်ကျာတြေံ"] = "Sarb",
["အာရေဗဳယာန်သၟဝ်ကျာတြေံ"] = "Narb",
["အာဟုမ်"] = "Ahom",
["အိန်'ဂဝ်"] = "Nkoo",
["အိန်ဒါတ်"] = "Inds",
["အုဲဂူစေံ"] = "Mong",
["အေက်စမဳ"] = "as-Beng",
["အဳဇေတ်ဃှေန် အက္ခရ်အဳဇေတ်တြေံတြဟ်"] = "Egyp",
["ၜေါအ်ဂဳနဳ"] = "Bugi",
["ၜေါအ်ဟေက်"] = "Buhd",
}
- Copy the following to Module:scripts/code to canonical name:
return {
["Adlm"] = "အာက်လာမ်",
["Afak"] = "အာပဲါကာ",
["Aghb"] = "ခါခေယှေန် အာယ်လ်ဘေနဳယာန်",
["Ahom"] = "အာဟုမ်",
["Arab"] = "အာရဗဳ",
["Armi"] = "အင်ဖဳရေဲ အာရမေအဳ",
["Armn"] = "အာမေနဳယျာ",
["Avst"] = "အဗါတ်သတေန်",
["Bali"] = "ပဲါလဳ",
["Bamu"] = "ဗာမာန်",
["Bass"] = "ဗာသာ",
["Batk"] = "ပါတေတ်",
["Beng"] = "ဘင်္ဂါလဳ",
["Bhks"] = "လေတ်ရှုကဳ",
["Blis"] = "Blissymbols",
["Bopo"] = "စူယေင်",
["Brah"] = "ဖရာမ်မဳလ်",
["Brai"] = "Braille",
["Bugi"] = "ၜေါအ်ဂဳနဳ",
["Buhd"] = "ၜေါအ်ဟေက်",
["Cakm"] = "ချေန်ကမာ",
["Cans"] = "ဝေါဟာရသဍုင်ခမ်နာဒါ",
["Cari"] = "ခါရေင်ယာန်",
["Cham"] = "ချေန်",
["Cher"] = "ချေဝ်ရဝ်ကဳ",
["Chis"] = "Chisoi",
["Chrs"] = "Chorasmian",
["Copt"] = "ကော့ပ်တိ",
["Cpmn"] = "Cypro-Minoan",
["Cprt"] = "သေတ်ပရဳရေတ်",
["Cyrl"] = "စဳရယ်လ်",
["Cyrs"] = "စဳရယ်လ်တြေံ",
["Deva"] = "ထေဝနာခရေဝ်",
["Diak"] = "ဒဝ်ဂရာ",
["Dogr"] = "Dogra",
["Dsrt"] = "ဒါတ်ဇရာန်",
["Dupl"] = "ဒူဖလှါန်ယာန်",
["Egyd"] = "Demotic",
["Egyh"] = "Hieratic",
["Egyp"] = "အဳဇေတ်ဃှေန် အက္ခရ်အဳဇေတ်တြေံတြဟ်",
["Elba"] = "အယ်လ်ဗာသာန်",
["Elym"] = "Elymaic",
["Ethi"] = "အာန်တဳအဝ်ဖေန်",
["Gara"] = "Garay",
["Geok"] = "ခုတ်သူရေဝ်",
["Geor"] = "ဂျဝ်ဂျဳယာန်",
["Glag"] = "ဂလာဂဝ်လေတ်တေတ်",
["Gong"] = "ဂေန်ဂျာလာဂွေန်ဒဳ",
["Gonm"] = "မသာရေန်ဂွေန်ဒဳ",
["Goth"] = "ကာဒ်တေတ်",
["Gran"] = "ဂရေန်တာ",
["Grek"] = "ဂရေတ်",
["Gujr"] = "ဂုဂျာရတဳ",
["Gukh"] = "Khema",
["Guru"] = "ဂူမူခဳ",
["Hang"] = "ဟန်ဂူ",
["Hani"] = "ဟာန်",
["Hano"] = "ဟာနူမှု",
["Hans"] = "Simplified Han",
["Hant"] = "Traditional Han",
["Hatr"] = "ဟေက်ထရာန်",
["Hebr"] = "ဟဳဘရဝ်",
["Hira"] = "ဟဳရာဂါနာ",
["Hluw"] = "အာန်နာတဝ်လဳယာန် အက္ခရ်အဳဇေတ်တြေံတြဟ်",
["Hmng"] = "မောန်",
["Hmnp"] = "Nyiakeng Puachue Hmong",
["Hrkt"] = "ကာနာ",
["Hung"] = "ဟာန်ဂါရေဝ်တြေံ",
["Ibrnn"] = "Northeastern Iberian",
["Ibrns"] = "Southeastern Iberian",
["Image"] = "Image-rendered",
["Inds"] = "အိန်ဒါတ်",
["Ipach"] = "ဂကောံအက္ခရ်ဗွဟ်ရမျာင်",
["Ital"] = "ခစေၚ်တြေံ",
["Java"] = "ဂျာဗာ",
["Jpan"] = "ဂျပါန်",
["Jurc"] = "Jurchen",
["Kali"] = "ကယျာလဳ",
["Kana"] = "ကာတာကာနာ",
["Kawi"] = "ခါဝဳ",
["Khar"] = "ခါရဝ်သတဳ",
["Khmr"] = "ခမေန်",
["Khoj"] = "ခုဒ်သကဳ",
["Kitl"] = "Khitan Large",
["Kits"] = "Khitan Small",
["Knda"] = "ကာန်နာဒါ",
["Kore"] = "ကိုဝ်ရဳယျာ",
["Kpel"] = "Kpelle",
["Krai"] = "Kirat Rai",
["Kthi"] = "ကေတဳ",
["Lana"] = "သေံဃိန်",
["Laoo"] = "သေံလေဴ",
["Latf"] = "Fraktur",
["Latg"] = "Gaelic",
["Latn"] = "လေပ်တဲင်",
["Leke"] = "လဳကဳ",
["Lepc"] = "လပ်ချာ",
["Limb"] = "လေန်ၜေါအ်",
["Lina"] = "လေန်နဳယျာ (က)",
["Linb"] = "လေန်နဳယျာ (ခ)",
["Lisu"] = "လဳသေုန်",
["Loma"] = "Loma",
["Lyci"] = "လဳဒဳဒါန်",
["Lydi"] = "လဳဒဳဒါန်",
["Mahj"] = "မဟာဂျနဳ",
["Maka"] = "ဝါန်ထာရာ",
["Mand"] = "မာန်ဒိုင်",
["Mani"] = "မာန်နေတ်ခဳယာန်",
["Marc"] = "မာတ်ချေန်",
["Maya"] = "မာယာ",
["Medf"] = "မာဒဝ်ဖှါန်ဒရေန်",
["Mend"] = "မါန်ဒဳ",
["Merc"] = "မဳရဝ်ဣတေတ် ခဝ်သေတ်",
["Mero"] = "မဳရဝ်ဣတေတ် ဟာဲရဝ်ကလေတ်တေတ်",
["Mlym"] = "မလေဝ်ယျလာမ်",
["Modi"] = "မဝ်ဒဳ",
["Mong"] = "အုဲဂူစေံ",
["Moon"] = "Moon",
["Morse"] = "ကုဒ်မောဝ်",
["Mroo"] = "မရုန်သာ",
["Mtei"] = "မဏဳန်ၜေါအ်ရ",
["Mult"] = "မာန်တာခ်နဳ",
["Music"] = "သင်္ကေတကြိယျာဂဳတ",
["Mymr"] = "ဍုင်ဗၟာ",
["Nagm"] = "Nag Mundari",
["Nand"] = "နာန်ဒဳနာဂါရေဝ်",
["Narb"] = "အာရေဗဳယာန်သၟဝ်ကျာတြေံ",
["Nbat"] = "နာၜထေင်",
["Newa"] = "နဳဝါ",
["Nkdb"] = "Dongba",
["Nkgb"] = "Geba",
["Nkoo"] = "အိန်'ဂဝ်",
["None"] = "ဟွံဂွံသမ္တီလဝ်",
["Nshu"] = "နူသျှူ",
["Ogam"] = "အဝ်ကမ်",
["Olck"] = "အဝ်ချဳကဳ",
["Onao"] = "Ol Onal",
["Orkh"] = "အဝ်ခန်ရုန်",
["Orya"] = "အဝ်ရေဝ်ယာ",
["Osge"] = "အဝ်ဇြဳ",
["Osma"] = "အဝ်သမာန်ယာ",
["Ougr"] = "Old Uyghur",
["Palm"] = "ပါမာဲရင်",
["Pauc"] = "ဖါဲသေင်အော",
["Perm"] = "ပါမေတ်တြေံ",
["Phag"] = "ဖှတ်-ပါ",
["Phli"] = "ပါလာဝဳ လိက်ဇြေဟ်",
["Phlp"] = "ပါလာဝဳ သဝ်ဒါန်",
["Phlv"] = "Book Pahlavi",
["Phnx"] = "ဖဳနေတ်ယှေန်",
["Plrd"] = "ဖါန်လာက်",
["Polyt"] = "ဂရေတ်",
["Prti"] = "ပါလာဝဳ လိက်ဇြေဟ်",
["Ranj"] = "Ranjana",
["Rjng"] = "ရေဂျေန်",
["Rohg"] = "ရဝ်ဟေင်ဂျာ ဟာဲနဳဖှဳ",
["Roro"] = "Rongorongo",
["Rumin"] = "ဂၞန်သင်္ချာရုမဳ",
["Runr"] = "ရူနေတ်",
["Samr"] = "သျမာရိဠူ",
["Sarb"] = "အာရေဗဳယာန်သမၠုင်ကျာတြေံ",
["Saur"] = "သေဝ်ရာတ်သာတ်တရာ",
["Semap"] = "flag semaphore",
["Sgnw"] = "ဗီုပြင်ချူခရက်",
["Shaw"] = "သျှဗဳယာန်",
["Shrd"] = "ဃှဳဝါတာ",
["Shui"] = "Sui",
["Sidd"] = "သေတ်ဒေါန်",
["Sidt"] = "Sidetic",
["Sind"] = "ဒူဒါဝါဒဳ",
["Sinh"] = "သဳရိလင်္ကာ",
["Sogd"] = "သတ်ဂျဳယာန်",
["Sogo"] = "သတ်ဂျဳယာန်တြေံ",
["Sora"] = "ဆိုရေန်ဆေမ်ပေန်",
["Soyo"] = "သဝ်ယွေန်ဗဝ်",
["Sund"] = "သာန်ဓနဳ",
["Sunu"] = "Sunuwar",
["Sylo"] = "သေန်လဝ်တဳ နာဂရေဝ်",
["Syrc"] = "သဳရဳယျာ",
["Tagb"] = "တဂ်ဗါန်ဝါ",
["Takr"] = "တာဂရေဝ်",
["Tale"] = "သေံတာဲခေါင်",
["Talu"] = "သေံလုတၟိ",
["Taml"] = "တမဳလ်",
["Tang"] = "တာန်ဂူ",
["Tavt"] = "သေံဗဳယေတ်",
["Tayo"] = "Lai Tay",
["Telu"] = "တေလုဂု",
["Teng"] = "တဂ်ဝါ",
["Tfng"] = "တဳဖဳနေတ်",
["Tglg"] = "ဗါဲဗါဲရေန်",
["Thaa"] = "ထဏး",
["Thai"] = "သေံ",
["Tibt"] = "တဳဗဝ်",
["Tirh"] = "တိရဟုတာ",
["Tnsa"] = "Tangsa",
["Todr"] = "Todhri",
["Tols"] = "Tolong Siki",
["Toto"] = "Toto",
["Tutg"] = "Tigalari",
["Ugar"] = "ယူဂရေတ်တေတ်",
["Vaii"] = "ဝဲါ",
["Visp"] = "Visible Speech",
["Vith"] = "Vithkuqi",
["Wara"] = "ဝါရာန်ခဃှဳတဳ",
["Wcho"] = "Wancho",
["Wole"] = "Woleai",
["Xpeo"] = "ဖာသဳတြေံ",
["Xsux"] = "ကြူနဳဖံင်",
["Yezi"] = "Yezidi",
["Yiii"] = "ယဳ",
["Zanb"] = "ပန်ကၠၚ်ဇာနာဗဇြာ",
["Zmth"] = "သင်္ချာလ္ပာ်သက်ခရက်သမ္တီလဝ်",
["Zsym"] = "သင်္ကေတ",
["Zyyy"] = "undetermined",
["Zzzz"] = "uncoded",
["as-Beng"] = "အေက်စမဳ",
["fa-Arab"] = "အာရဗဳ",
["kk-Arab"] = "အာရဗဳ",
["ks-Arab"] = "အာရဗဳ",
["ku-Arab"] = "အာရဗဳ",
["mnc-Mong"] = "မာန်ချူ",
["ms-Arab"] = "အာရဗဳ",
["mzn-Arab"] = "အာရဗဳ",
["ota-Arab"] = "အာရဗဳ",
["pa-Arab"] = "ချာမူခဳ",
["pal-Avst"] = "ပဲါသေံ",
["pjt-Latn"] = "လေပ်တဲင်",
["ps-Arab"] = "အာရဗဳ",
["sd-Arab"] = "အာရဗဳ",
["sit-tam-Tibt"] = "Tamyig",
["sjo-Mong"] = "Xibe",
["tt-Arab"] = "အာရဗဳ",
["ug-Arab"] = "အာရဗဳ",
["ur-Arab"] = "အာရဗဳ",
["xwo-Mong"] = "Clear Script",
}
local export = {}
local function generate_table(name_to_code)
local result = {}
local script_data = mw.loadData("Module:scripts/data")
local iterate
if name_to_code then
for code, data in pairs(script_data) do
if not result[data[1]] or #code == 4 then
-- Sometimes, multiple scripts have the same name, e.g. 'Arab',
-- 'fa-Arab', 'ur-Arab' and several others are called "Arabic".
-- Prefer the one with four characters when disambiguating.
result[data[1]] = code
end
end
else
for code, data in pairs(script_data) do
result[code] = data[1]
end
end
return result
end
local function dump(data, name_to_code)
local output = { "return {" }
local i = 1
local sorted_pairs = require "Module:table".sortedPairs
for k, v in sorted_pairs(data) do
i = i + 1
output[i] = ('\t[%q] = %q,'):format(k, v)
end
table.insert(output, "}")
return table.concat(output, "\n")
end
function export.code_to_name(frame)
return require "Module:debug".highlight(dump(generate_table(false), false))
end
function export.name_to_code(frame)
return require "Module:debug".highlight(dump(generate_table(true), true))
end
return export