Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete custom language mapping #1080

Merged
merged 1 commit into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/tools/languageTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ namespace

// These mappings are not provided by the ICU library, any such mappings can be manually added here
std::map<std::string, std::string> iso639_3 = {
{"ami", "Amis"},
{"atj", "atikamekw"},
{"azb", "آذربایجان دیلی"},
{"bcl", "central bikol"},
{"bgs", "tagabawa"},
{"blk", "ပအိုဝ်ႏ"},
{"bxr", "буряад хэлэн"},
{"cbk", "chavacano"},
{"cdo", "閩東語"},
Expand All @@ -23,13 +25,16 @@ std::map<std::string, std::string> iso639_3 = {
{"eml", "emiliân-rumagnōl"},
{"fbs", "српскохрватски"},
{"fon", "fɔ̀ngbè"},
{"gcr", "Kriyòl gwiyannen"},
{"guw", "Gungbe"},
{"hbs", "srpskohrvatski"},
{"hyw", "հայերէն/հայերեն"},
{"ido", "ido"},
{"kbp", "kabɩyɛ"},
{"kld", "Gamilaraay"},
{"lbe", "лакку маз"},
{"lbj", "ལ་དྭགས་སྐད་"},
{"lld", "ladin"},
{"map", "Austronesian"},
{"mhr", "марий йылме"},
{"mnw", "ဘာသာမန်"},
Expand All @@ -41,10 +46,15 @@ std::map<std::string, std::string> iso639_3 = {
{"olo", "livvi"},
{"pih", "Pitcairn-Norfolk"},
{"pnb", "Western Panjabi"},
{"pwn", "Pinayuanan"},
{"rmr", "Caló"},
{"rmy", "romani shib"},
{"roa", "romance languages"},
{"twi", "twi"},
{"skr", "سرائیکی"},
{"szy", "Sakizaya"},
{"tay", "Tayal"},
{"tgl", "Wikang Tagalog"},
{"twi", "Akwapem Twi"},
// ICU for Ubuntu versions <= focal (20.04) returns "" for the language code ""
// unlike the later versions - which returns "und". We map this value to "Undetermined" for a common ground.
{"", "Undetermined"},
Expand Down
Loading