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

Feature/more languages #3

Merged
merged 11 commits into from
Mar 4, 2018
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: node_js
sudo: false
node_js:
- "4"
- "5"
- "6"
- "7"
- "8"
- "9"
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/cospired/i18n-iso-languages.svg?branch=master)](https://travis-ci.org/cospired/i18n-iso-languages)

# i18n-iso-languages

i18n for ISO 3166-1 country codes. We support Alpha-2, Alpha-3 B and T codes from https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Expand Down Expand Up @@ -40,8 +42,15 @@ console.log(languages.getNames("en")); // { 'ab': 'Abkhazian', 'aa': 'Afar', [..

### Supported languages (ISO 639-1)

* `de`: German
* `en`: English
* `br`: Breton (based on https://br.wikipedia.org/wiki/Listenn_glok_kodoù_ISO_639-1)
* `cs`: Czech (based on https://cs.wikipedia.org/wiki/Seznam_kódů_ISO_639-1)
* `de`: German (by native speaker)
* `en`: English (ISO 639-1 standard names)
* `fr`: French (based on https://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1)
* `hu`: Hungarian (based on https://hu.wikipedia.org/wiki/ISO_639-1_nyelvkódok_listája)
* `is`: Islandic (based on https://is.wikipedia.org/wiki/Listi_yfir_tungumálakóða_%C3%AD_ISO_639-1)
* `lv`: Latvian (based on https://lv.wikipedia.org/wiki/ISO_639-1_kodu_saraksts)
* `lt`: Lithuanian (based on https://lt.wikipedia.org/wiki/Sąrašas:ISO_639-1_kodai)

[List of ISO 639-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)

Expand Down
118 changes: 59 additions & 59 deletions codes.json
Original file line number Diff line number Diff line change
@@ -1,92 +1,95 @@
[
["ab","abk","abk","ISO 639-1:ab"],
["aa","aar","aar","ISO 639-1:aa"],
["ab","abk","abk","ISO 639-1:ab"],
["ae","ave","ave","ISO 639-1:ae"],
["af","afr","afr","ISO 639-1:af"],
["ak","aka","aka","ISO 639-1:ak"],
["sq","sqi","alb","ISO 639-1:sq"],
["am","amh","amh","ISO 639-1:am"],
["ar","ara","ara","ISO 639-1:ar"],
["an","arg","arg","ISO 639-1:an"],
["hy","hye","arm","ISO 639-1:hy"],
["ar","ara","ara","ISO 639-1:ar"],
["as","asm","asm","ISO 639-1:as"],
["av","ava","ava","ISO 639-1:av"],
["ae","ave","ave","ISO 639-1:ae"],
["ay","aym","aym","ISO 639-1:ay"],
["az","aze","aze","ISO 639-1:az"],
["bm","bam","bam","ISO 639-1:bm"],
["ba","bak","bak","ISO 639-1:ba"],
["eu","eus","baq","ISO 639-1:eu"],
["be","bel","bel","ISO 639-1:be"],
["bn","ben","ben","ISO 639-1:bn"],
["bg","bul","bul","ISO 639-1:bg"],
["bh","bih","bih","ISO 639-1:bh"],
["bi","bis","bis","ISO 639-1:bi"],
["bs","bos","bos","ISO 639-1:bs"],
["bm","bam","bam","ISO 639-1:bm"],
["bn","ben","ben","ISO 639-1:bn"],
["bo","bod","tib","ISO 639-1:bo"],
["br","bre","bre","ISO 639-1:br"],
["bg","bul","bul","ISO 639-1:bg"],
["my","mya","bur","ISO 639-1:my"],
["bs","bos","bos","ISO 639-1:bs"],
["ca","cat","cat","ISO 639-1:ca"],
["ch","cha","cha","ISO 639-1:ch"],
["ce","che","che","ISO 639-1:ce"],
["ny","nya","nya","ISO 639-1:ny"],
["zh","zho","chi","ISO 639-1:zh"],
["cv","chv","chv","ISO 639-1:cv"],
["kw","cor","cor","ISO 639-1:kw"],
["ch","cha","cha","ISO 639-1:ch"],
["co","cos","cos","ISO 639-1:co"],
["cr","cre","cre","ISO 639-1:cr"],
["hr","hrv","hrv","ISO 639-1:hr"],
["cs","ces","cze","ISO 639-1:cs"],
["cu","chu","chu","ISO 639-1:cu"],
["cv","chv","chv","ISO 639-1:cv"],
["cy","cym","wel","ISO 639-1:cy"],
["da","dan","dan","ISO 639-1:da"],
["de","deu","ger","ISO 639-1:de"],
["dv","div","div","ISO 639-1:dv"],
["nl","nld","dut","ISO 639-1:nl"],
["dz","dzo","dzo","ISO 639-1:dz"],
["ee","ewe","ewe","ISO 639-1:ee"],
["el","ell","gre","ISO 639-1:el"],
["en","eng","eng","ISO 639-1:en"],
["eo","epo","epo","ISO 639-1:eo"],
["es","spa","spa","ISO 639-1:es"],
["et","est","est","ISO 639-1:et"],
["ee","ewe","ewe","ISO 639-1:ee"],
["fo","fao","fao","ISO 639-1:fo"],
["fj","fij","fij","ISO 639-1:fj"],
["eu","eus","baq","ISO 639-1:eu"],
["fa","fas","per","ISO 639-1:fa"],
["ff","ful","ful","ISO 639-1:ff"],
["fi","fin","fin","ISO 639-1:fi"],
["fj","fij","fij","ISO 639-1:fj"],
["fo","fao","fao","ISO 639-1:fo"],
["fr","fra","fre","ISO 639-1:fr"],
["ff","ful","ful","ISO 639-1:ff"],
["fy","fry","fry","ISO 639-1:fy"],
["ga","gle","gle","ISO 639-1:ga"],
["gd","gla","gla","ISO 639-1:gd"],
["gl","glg","glg","ISO 639-1:gl"],
["ka","kat","geo","ISO 639-1:ka"],
["de","deu","ger","ISO 639-1:de"],
["el","ell","gre","ISO 639-1:el"],
["gn","grn","grn","ISO 639-1:gn"],
["gu","guj","guj","ISO 639-1:gu"],
["ht","hat","hat","ISO 639-1:ht"],
["gv","glv","glv","ISO 639-1:gv"],
["ha","hau","hau","ISO 639-1:ha"],
["he","heb","heb","ISO 639-1:he"],
["hz","her","her","ISO 639-1:hz"],
["hi","hin","hin","ISO 639-1:hi"],
["ho","hmo","hmo","ISO 639-1:ho"],
["hr","hrv","hrv","ISO 639-1:hr"],
["ht","hat","hat","ISO 639-1:ht"],
["hu","hun","hun","ISO 639-1:hu"],
["hy","hye","arm","ISO 639-1:hy"],
["hz","her","her","ISO 639-1:hz"],
["ia","ina","ina","ISO 639-1:ia"],
["id","ind","ind","ISO 639-1:id"],
["ie","ile","ile","ISO 639-1:ie"],
["ga","gle","gle","ISO 639-1:ga"],
["ig","ibo","ibo","ISO 639-1:ig"],
["ii","iii","iii","ISO 639-1:ii"],
["ik","ipk","ipk","ISO 639-1:ik"],
["io","ido","ido","ISO 639-1:io"],
["is","isl","ice","ISO 639-1:is"],
["it","ita","ita","ISO 639-1:it"],
["iu","iku","iku","ISO 639-1:iu"],
["ja","jpn","jpn","ISO 639-1:ja"],
["jv","jav","jav","ISO 639-1:jv"],
["ka","kat","geo","ISO 639-1:ka"],
["kg","kon","kon","ISO 639-1:kg"],
["ki","kik","kik","ISO 639-1:ki"],
["kj","kua","kua","ISO 639-1:kj"],
["kk","kaz","kaz","ISO 639-1:kk"],
["kl","kal","kal","ISO 639-1:kl"],
["km","khm","khm","ISO 639-1:km"],
["kn","kan","kan","ISO 639-1:kn"],
["ko","kor","kor","ISO 639-1:ko"],
["kr","kau","kau","ISO 639-1:kr"],
["ks","kas","kas","ISO 639-1:ks"],
["kk","kaz","kaz","ISO 639-1:kk"],
["km","khm","khm","ISO 639-1:km"],
["ki","kik","kik","ISO 639-1:ki"],
["rw","kin","kin","ISO 639-1:rw"],
["ky","kir","kir","ISO 639-1:ky"],
["kv","kom","kom","ISO 639-1:kv"],
["kg","kon","kon","ISO 639-1:kg"],
["ko","kor","kor","ISO 639-1:ko"],
["ku","kur","kur","ISO 639-1:ku"],
["kj","kua","kua","ISO 639-1:kj"],
["kv","kom","kom","ISO 639-1:kv"],
["kw","cor","cor","ISO 639-1:kw"],
["ky","kir","kir","ISO 639-1:ky"],
["la","lat","lat","ISO 639-1:la"],
["lb","ltz","ltz","ISO 639-1:lb"],
["lg","lug","lug","ISO 639-1:lg"],
Expand All @@ -96,35 +99,34 @@
["lt","lit","lit","ISO 639-1:lt"],
["lu","lub","lub","ISO 639-1:lu"],
["lv","lav","lav","ISO 639-1:lv"],
["gv","glv","glv","ISO 639-1:gv"],
["mk","mkd","mac","ISO 639-1:mk"],
["mg","mlg","mlg","ISO 639-1:mg"],
["ms","msa","may","ISO 639-1:ms"],
["ml","mal","mal","ISO 639-1:ml"],
["mt","mlt","mlt","ISO 639-1:mt"],
["mi","mri","mao","ISO 639-1:mi"],
["mr","mar","mar","ISO 639-1:mr"],
["mh","mah","mah","ISO 639-1:mh"],
["mi","mri","mao","ISO 639-1:mi"],
["mk","mkd","mac","ISO 639-1:mk"],
["ml","mal","mal","ISO 639-1:ml"],
["mn","mon","mon","ISO 639-1:mn"],
["mr","mar","mar","ISO 639-1:mr"],
["ms","msa","may","ISO 639-1:ms"],
["mt","mlt","mlt","ISO 639-1:mt"],
["my","mya","bur","ISO 639-1:my"],
["na","nau","nau","ISO 639-1:na"],
["nv","nav","nav","ISO 639-1:nv"],
["nb","nob","nob","ISO 639-1:nb"],
["nd","nde","nde","ISO 639-1:nd"],
["ne","nep","nep","ISO 639-1:ne"],
["ng","ndo","ndo","ISO 639-1:ng"],
["nb","nob","nob","ISO 639-1:nb"],
["nl","nld","dut","ISO 639-1:nl"],
["nn","nno","nno","ISO 639-1:nn"],
["no","nor","nor","ISO 639-1:no"],
["ii","iii","iii","ISO 639-1:ii"],
["nr","nbl","nbl","ISO 639-1:nr"],
["nv","nav","nav","ISO 639-1:nv"],
["ny","nya","nya","ISO 639-1:ny"],
["oc","oci","oci","ISO 639-1:oc"],
["oj","oji","oji","ISO 639-1:oj"],
["cu","chu","chu","ISO 639-1:cu"],
["om","orm","orm","ISO 639-1:om"],
["or","ori","ori","ISO 639-1:or"],
["os","oss","oss","ISO 639-1:os"],
["pa","pan","pan","ISO 639-1:pa"],
["pi","pli","pli","ISO 639-1:pi"],
["fa","fas","per","ISO 639-1:fa"],
["pl","pol","pol","ISO 639-1:pl"],
["ps","pus","pus","ISO 639-1:ps"],
["pt","por","por","ISO 639-1:pt"],
Expand All @@ -133,31 +135,30 @@
["rn","run","run","ISO 639-1:rn"],
["ro","ron","rum","ISO 639-1:ro"],
["ru","rus","rus","ISO 639-1:ru"],
["rw","kin","kin","ISO 639-1:rw"],
["sa","san","san","ISO 639-1:sa"],
["sc","srd","srd","ISO 639-1:sc"],
["sd","snd","snd","ISO 639-1:sd"],
["se","sme","sme","ISO 639-1:se"],
["sm","smo","smo","ISO 639-1:sm"],
["sg","sag","sag","ISO 639-1:sg"],
["sr","srp","srp","ISO 639-1:sr"],
["gd","gla","gla","ISO 639-1:gd"],
["sn","sna","sna","ISO 639-1:sn"],
["si","sin","sin","ISO 639-1:si"],
["sk","slk","slo","ISO 639-1:sk"],
["sl","slv","slv","ISO 639-1:sl"],
["sm","smo","smo","ISO 639-1:sm"],
["sn","sna","sna","ISO 639-1:sn"],
["so","som","som","ISO 639-1:so"],
["sq","sqi","alb","ISO 639-1:sq"],
["sr","srp","srp","ISO 639-1:sr"],
["ss","ssw","ssw","ISO 639-1:ss"],
["st","sot","sot","ISO 639-1:st"],
["es","spa","spa","ISO 639-1:es"],
["su","sun","sun","ISO 639-1:su"],
["sw","swa","swa","ISO 639-1:sw"],
["ss","ssw","ssw","ISO 639-1:ss"],
["sv","swe","swe","ISO 639-1:sv"],
["sw","swa","swa","ISO 639-1:sw"],
["ta","tam","tam","ISO 639-1:ta"],
["te","tel","tel","ISO 639-1:te"],
["tg","tgk","tgk","ISO 639-1:tg"],
["th","tha","tha","ISO 639-1:th"],
["ti","tir","tir","ISO 639-1:ti"],
["bo","bod","tib","ISO 639-1:bo"],
["tk","tuk","tuk","ISO 639-1:tk"],
["tl","tgl","tgl","ISO 639-1:tl"],
["tn","tsn","tsn","ISO 639-1:tn"],
Expand All @@ -175,12 +176,11 @@
["vi","vie","vie","ISO 639-1:vi"],
["vo","vol","vol","ISO 639-1:vo"],
["wa","wln","wln","ISO 639-1:wa"],
["cy","cym","wel","ISO 639-1:cy"],
["wo","wol","wol","ISO 639-1:wo"],
["fy","fry","fry","ISO 639-1:fy"],
["xh","xho","xho","ISO 639-1:xh"],
["yi","yid","yid","ISO 639-1:yi"],
["yo","yor","yor","ISO 639-1:yo"],
["za","zha","zha","ISO 639-1:za"],
["zh","zho","chi","ISO 639-1:zh"],
["zu","zul","zul","ISO 639-1:zu"]
]
9 changes: 8 additions & 1 deletion entry-node.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
var library = require("./index");

var locales = [
require("./langs/br.json"),
require("./langs/cs.json"),
require("./langs/de.json"),
require("./langs/en.json")
require("./langs/en.json"),
require("./langs/fr.json"),
require("./langs/hu.json"),
require("./langs/is.json"),
require("./langs/lv.json"),
require("./langs/lt.json")
];

for (var i = 0; i < locales.length; i++) {
Expand Down
Loading