diff options
author | Arun Isaac | 2020-03-13 18:16:34 +0530 |
---|---|---|
committer | Arun Isaac | 2020-03-13 18:20:04 +0530 |
commit | 188efd7f47ffd620aff8eecfe5d8fdd2fc9bf397 (patch) | |
tree | 703a9f1560d75f4fd417f9356680e86523d92be2 | |
parent | 1d4816ac660583adf86c18e57694caa5501b00c2 (diff) | |
download | ennum-188efd7f47ffd620aff8eecfe5d8fdd2fc9bf397.tar.gz ennum-188efd7f47ffd620aff8eecfe5d8fdd2fc9bf397.tar.lz ennum-188efd7f47ffd620aff8eecfe5d8fdd2fc9bf397.zip |
Use language name in interlanguage links.
* ennu-html.el (ennu--iso-639-1-alist): New variable.
(ennu-html-inner-template): Use language name in interlanguage links.
-rw-r--r-- | ennu-html.el | 190 |
1 files changed, 189 insertions, 1 deletions
diff --git a/ennu-html.el b/ennu-html.el index 8f38ba5..f78f357 100644 --- a/ennu-html.el +++ b/ennu-html.el @@ -4,6 +4,192 @@ (require 'subr-x) (require 'xmlgen) +(defconst ennu--iso-639-1-alist + '(("ab" . "аҧсуа бызшәа, аҧсшәа") + ("aa" . "Afaraf") + ("af" . "Afrikaans") + ("ak" . "Akan") + ("sq" . "Shqip") + ("am" . "አማርኛ") + ("ar" . "العربية") + ("an" . "aragonés") + ("hy" . "Հայերեն") + ("as" . "অসমীয়া") + ("av" . "авар мацӀ, магӀарул мацӀ") + ("ae" . "avesta") + ("ay" . "aymar aru") + ("az" . "azərbaycan dili") + ("bm" . "bamanankan") + ("ba" . "башҡорт теле") + ("eu" . "euskara, euskera") + ("be" . "беларуская мова") + ("bn" . "বাংলা") + ("bh" . "भोजपुरी") + ("bi" . "Bislama") + ("bs" . "bosanski jezik") + ("br" . "brezhoneg") + ("bg" . "български език") + ("my" . "ဗမာစာ") + ("ca" . "català") + ("ch" . "Chamoru") + ("ce" . "нохчийн мотт") + ("ny" . "chiCheŵa, chinyanja") + ("zh" . "中文 (Zhōngwén), 汉语, 漢語") + ("cv" . "чӑваш чӗлхи") + ("kw" . "Kernewek") + ("co" . "corsu, lingua corsa") + ("cr" . "ᓀᐦᐃᔭᐍᐏᐣ") + ("hr" . "hrvatski jezik") + ("cs" . "čeština, český jazyk") + ("da" . "dansk") + ("dv" . "ދިވެހި") + ("nl" . "Nederlands, Vlaams") + ("dz" . "རྫོང་ཁ") + ("en" . "English") + ("eo" . "Esperanto") + ("et" . "eesti, eesti keel") + ("ee" . "Eʋegbe") + ("fo" . "føroyskt") + ("fj" . "vosa Vakaviti") + ("fi" . "suomi, suomen kieli") + ("fr" . "français, langue française") + ("ff" . "Fulfulde, Pulaar, Pular") + ("gl" . "galego") + ("ka" . "ქართული") + ("de" . "Deutsch") + ("el" . "ελληνικά") + ("gn" . "Avañe'ẽ") + ("gu" . "ગુજરાતી") + ("ht" . "Kreyòl ayisyen") + ("ha" . "(Hausa) هَوُسَ") + ("he" . "עברית") + ("hz" . "Otjiherero") + ("hi" . "हिन्दी, हिंदी") + ("ho" . "Hiri Motu") + ("hu" . "magyar") + ("ia" . "Interlingua") + ("id" . "Bahasa Indonesia") + ("ie" . "Originally called Occidental; then Interlingue after WWII") + ("ga" . "Gaeilge") + ("ig" . "Asụsụ Igbo") + ("ik" . "Iñupiaq, Iñupiatun") + ("io" . "Ido") + ("is" . "Íslenska") + ("it" . "Italiano") + ("iu" . "ᐃᓄᒃᑎᑐᑦ") + ("ja" . "日本語 (にほんご)") + ("jv" . "ꦧꦱꦗꦮ, Basa Jawa") + ("kl" . "kalaallisut, kalaallit oqaasii") + ("kn" . "ಕನ್ನಡ") + ("kr" . "Kanuri") + ("ks" . "कश्मीरी, كشميري") + ("kk" . "қазақ тілі") + ("km" . "ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ") + ("ki" . "Gĩkũyũ") + ("rw" . "Ikinyarwanda") + ("ky" . "Кыргызча, Кыргыз тили") + ("kv" . "коми кыв") + ("kg" . "Kikongo") + ("ko" . "한국어") + ("ku" . "Kurdî, كوردی") + ("kj" . "Kuanyama") + ("la" . "latine, lingua latina") + ("lb" . "Lëtzebuergesch") + ("lg" . "Luganda") + ("li" . "Limburgs") + ("ln" . "Lingála") + ("lo" . "ພາສາລາວ") + ("lt" . "lietuvių kalba") + ("lu" . "Tshiluba") + ("lv" . "latviešu valoda") + ("gv" . "Gaelg, Gailck") + ("mk" . "македонски јазик") + ("mg" . "fiteny malagasy") + ("ms" . "bahasa Melayu, بهاس ملايو") + ("ml" . "മലയാളം") + ("mt" . "Malti") + ("mi" . "te reo Māori") + ("mr" . "मराठी") + ("mh" . "Kajin M̧ajeļ") + ("mn" . "Монгол хэл") + ("na" . "Dorerin Naoero") + ("nv" . "Diné bizaad") + ("nd" . "isiNdebele") + ("ne" . "नेपाली") + ("ng" . "Owambo") + ("nb" . "Norsk bokmål") + ("nn" . "Norsk nynorsk") + ("no" . "Norsk") + ("ii" . "ꆈꌠ꒿ Nuosuhxop") + ("nr" . "isiNdebele") + ("oc" . "occitan, lenga d'òc") + ("oj" . "ᐊᓂᔑᓈᐯᒧᐎᓐ") + ("cu" . "ѩзыкъ словѣньскъ") + ("om" . "Afaan Oromoo") + ("or" . "ଓଡ଼ିଆ") + ("os" . "ирон æвзаг") + ("pa" . "ਪੰਜਾਬੀ") + ("pi" . "पाऴि") + ("fa" . "فارسی") + ("pl" . "język polski, polszczyzna") + ("ps" . "پښتو") + ("pt" . "Português") + ("qu" . "Runa Simi, Kichwa") + ("rm" . "rumantsch grischun") + ("rn" . "Ikirundi") + ("ro" . "Română") + ("ru" . "Русский") + ("sa" . "संस्कृतम्") + ("sc" . "sardu") + ("sd" . "सिन्धी, سنڌي، سندھی") + ("se" . "Davvisámegiella") + ("sm" . "gagana fa'a Samoa") + ("sg" . "yângâ tî sängö") + ("sr" . "српски језик") + ("gd" . "Gàidhlig") + ("sn" . "chiShona") + ("si" . "සිංහල") + ("sk" . "slovenčina, slovenský jazyk") + ("sl" . "slovenski jezik, slovenščina") + ("so" . "Soomaaliga, af Soomaali") + ("st" . "Sesotho") + ("es" . "Español") + ("su" . "Basa Sunda") + ("sw" . "Kiswahili") + ("ss" . "SiSwati") + ("sv" . "svenska") + ("ta" . "தமிழ்") + ("te" . "తెలుగు") + ("tg" . "тоҷикӣ, toçikī, تاجیکی") + ("th" . "ไทย") + ("ti" . "ትግርኛ") + ("bo" . "བོད་ཡིག") + ("tk" . "Türkmen, Түркмен") + ("tl" . "Wikang Tagalog") + ("tn" . "Setswana") + ("to" . "faka Tonga") + ("tr" . "Türkçe") + ("ts" . "Xitsonga") + ("tt" . "татар теле, tatar tele") + ("tw" . "Twi") + ("ty" . "Reo Tahiti") + ("ug" . "ئۇيغۇرچە, Uyghurche") + ("uk" . "Українська") + ("ur" . "اردو") + ("uz" . "Oʻzbek, Ўзбек, أۇزبېك") + ("ve" . "Tshivenḓa") + ("vi" . "Tiếng Việt") + ("vo" . "Volapük") + ("wa" . "walon") + ("cy" . "Cymraeg") + ("wo" . "Wollof") + ("fy" . "Frysk") + ("xh" . "isiXhosa") + ("yi" . "ייִדיש") + ("yo" . "Yorùbá") + ("za" . "Saɯ cueŋƅ, Saw cuengh") + ("zu" . "isiZulu"))) + (defun expand-file-name* (name default-directory) (expand-file-name name (concat "/" default-directory))) @@ -52,7 +238,9 @@ (slug (ennu-post-slug translation))) (replace-regexp-in-string "<a " (format "<a hreflang=\"%s\" " lang) - (ennu-export-post slug lang (plist-get info :backend))))) + (ennu-export-post slug + (map-elt ennu--iso-639-1-alist lang nil 'string=) + (plist-get info :back-end))))) (plist-get info :translations) ", ")) ;; Tags |