5.9.107 • Published 10 months ago

@kollorg/cupiditate-praesentium-doloribus v5.9.107

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Build Status npm version Maintainability Test Coverage

i18n-iso-languages

i18n for ISO 639 language codes. We support Alpha-2, Alpha-3 B and T codes from https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

This packages is heavily based on i18n-iso-countries.

We intent to keep the interface of i18n-iso-languages as close as possible to i18n-iso-countries.

Installing

Install it using npm: npm install @kollorg/cupiditate-praesentium-doloribus

If used in a browser environment, you will need to manually install the local you wish to support.

var languages = require("@kollorg/cupiditate-praesentium-doloribus");

// Support german & english languages.
languages.registerLocale(require("@kollorg/cupiditate-praesentium-doloribus/langs/en.json"));
languages.registerLocale(require("@kollorg/cupiditate-praesentium-doloribus/langs/de.json"));

Code to Language

Get the name of a language by it's ISO 639-1 (Alpha-2), ISO 639-2/T or B (Alpha-3) code

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log("de (639-1/Alpha-2) => " + languages.getName("de", "en")); // German
console.log("en (639-1/Alpha-2) => " + languages.getName("de", "de")); // Deutsch
console.log("de (639-2T/Alpha-3) => " + languages.getName("deu", "en")); // German
console.log("de (639-2B/Alpha-3) => " + languages.getName("ger", "en")); // German

Get all names by their ISO 639-1 code

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log(languages.getNames("en")); // { 'ab': 'Abkhazian', 'aa': 'Afar', [...], 'za': 'Zhuang', 'zu': 'Zulu' }

Supported languages (ISO 639-1)

List of ISO 639-1 codes

Language to Code

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log("German => " + languages.getAlpha2Code('German', 'en'));
// German => de

console.log("German => " + languages.getAlpha3TCode('German', 'en'));
// German => deu

console.log("German => " + languages.getAlpha3BCode('German', 'en'));
// German => ger

Codes

Convert ISO 639-2 (Alpha-3) to ISO 639-1 (Alpha-2) code

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log("deu (Alpha-3) => " + languages.alpha3ToAlpha2("deu") + " (Alpha-2)");
// deu (Alpha-3 T) => de (Alpha-2)

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log("ger (Alpha-3 B) => " + languages.alpha3ToAlpha2("ger") + " (Alpha-2)");
// ger (Alpha-3 B) => de (Alpha-2)

Convert ISO 639-1 (Alpha-2) to ISO 639-2 (Alpha-3) code

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log("de (Alpha-2) => " + languages.alpha2ToAlpha3T("de") + " (Alpha-3 T)");
// de (Alpha-2) => deu (Alpha-3 T)

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log("de (Alpha-2) => " + languages.alpha2ToAlpha3B("de") + " (Alpha-3 B)");
// de (Alpha-2) => ger (Alpha-3 B)

Get all ISO 639-1 (Alpha-2) codes

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log(languages.getAlpha2Codes());
// { 'aa': 'aar', 'ab': 'abk', [...], 'za': 'zha', 'zu': 'zul' }

Get all ISO 639-2 (Alpha-3) codes

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log(languages.getAlpha3TCodes());
// { 'aar': 'aa', 'abk': 'ab', [...], 'zha': 'za', 'zul': 'zu' }

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log(languages.getAlpha3BCodes());
// { 'aar': 'aa', 'abk': 'ab', [...], 'zha': 'za', 'zul': 'zu' }

Validate language code

var languages = require("@kollorg/cupiditate-praesentium-doloribus");
console.log(languages.isValid("de"), languages.isValid("ger"), languages.isValid("xx")));
// true, true, false

Contribution

To add a language:

  • add a json file under langs/ (in alphabetical order)
  • add the language to the data object in enty-node.js at the top (in alphabetical order)
  • add language to section Supported languages in README.md (in alphabetical order)
  • add language to keywords in package.json (in alphabetical order)
  • add language to the "unreleased" section of the changelog
  • run npm install && make test to make sure that tests are passing
  • open a PR on GitHub

Please do not change the version in package.json, package-lock.json or changelog.md.

ECMAScript 2015gradients css3optimistinspectcall-bind0preprocessorsnsString.prototype.trimECMAScript 2020descriptorsregularspeedes2018nodetypedarrayECMAScript 2023intrinsiceventsxhrwalktextsidediffcolorsdescriptiongetPrototypeOfownlruplugines7simpledbcreatefull-widththrottleawaitequalityES5helpersmimecensoreventEmitterJSONvariablesclassnamesrestnopesuperstructrgbInt16ArraySymboljwtmatchmatchesfseventsratemake dirreplaysignalsprivateboundparserendpointsetImmediatecharacterefficientcloudwatchtermerror-handlingclass-validatorupcss lesscommanderPushcss variableiteratorshammrupolyfillArray.prototype.flattensigtermtrimreadablestreamsettingsstreamseast-asian-widthawesomesauces3stdlibjestbeanstalkgetintrinsicES2020domarraybufferansitypednegative zerovalidbytestylingArray.prototype.includessyntaxerrorgroupmetadatainternal slotnumberstringifyObservablesconcatpipeextralimites2016expressquerystringesapiArray.prototype.containssearches6StreamsmomentpatchlanguagedayjstslibnpmidprotobufjsdiffinternalwritableroutingUint32ArrayECMAScript 2022Array.prototype.findLastReflect.getPrototypeOfeventDispatchercompile lessjsonpathwritemakevaluereactes-shim APIwatchglobdeletepasswordflattengdprdropbuffercacheES7less cssSymbol.toStringTagsharedfromdebugcommand-linepostcss-plugingetterpruneexecfastifyhasOwnPropertylisteners_.extendcloudtrailirqform-validationstylegetOwnPropertyDescriptorestreedeepcopytypesafeio-tsbrowserslistjsdomArrayBufferreact-hook-formdateassignoffsetArrayidleexitArrayBuffer.prototype.slicecompilerwindowsFunction.prototype.nameperformancecolumnsstreams2WeakMapcoercibleredux-toolkitdeep-clonemkdirsimportinstallartES2021extensionfindpredictableregular expressionlessinstallerscheme-validationcollection.es6package managerfigletindicatoravawarningclassesregexpES2017wafpnpm9parentwatchingprotoroutestatelintebses-shimssymlinkgetoptdotenvlesscssequalperformantrdsprogressBigInt64ArrayuuideslintplugincloudformationObject.getPrototypeOfcharactersutil.inspectRxECMAScript 6debuggerutilitiespicomatchoutputflagfast-deep-copybddinputpersistentfluxspinnersfullimportexportreadableserializerpostcsscallbindcurlInt8Arraylibphonenumberpreserve-symlinksstatusUint8Arrayless compilerstylesvestsortqueuesortedviewUint16Arraykinesisdeepclonetasksetterimmerlimitedjasminemulti-packagezodstarterfast-clonereducemkdirpobjectajvconfighas-owntypeerrorlink[[Prototype]]buffersUnderscorebyteOffsetWebSocketsastclassnameforEachreusetc39commandserializationtypanioniterationappwgetArray.prototype.flatMaprequireMicrosoftshrinkwraptestersiginttraversetoStringTagloadbalancingpositivebundlerfastcopypropertymiddlewareprettypropertiescloudfrontURLSearchParamstrimRighttoArraytapmimetypesfshardlinksjoicss nestingsharedarraybufferexit-codetestRegExp#flagsnodejsbatchunicodelinewrapcollectiontapehttpsserializequeueMicrotasksuperagentcss-in-jsES2019l10nelectronURLassertflagsrfc4122ES2023ECMAScript 2016pyyamlless.jspackageenvironmentuninstallelasticachecomputed-typesfoldervisualdefinePropertyTypeScriptObject.entries$.extendreact-hookspathbindminimalprefixrapidMapsetPrototypeOfES3processreact-testing-librarylazyisArrayBuffer#slicefind-upsesHyBisymboltoolstrimLeftnamecopynegativecore-jscryptstyled-componentses-abstractsyntaxIteratoraccessormodulestringa11ymochaopeneslintconfigiamregular expressionsoperating-systemnamessignalframeworkterminalamazonmkdirhooksECMAScript 5enderes5whatwgvalidationstyleguidedirectoryguidemitchromiumfullwidthcontainsconcatMapcorehandlersmacosdescriptorObject.is__proto__typearraybusytelephoneiteratelookyamlsinatrakeysmonorepoemojifindLastoptionhotbluebirdchaispecschemawebdom-testing-librarycomparecallttythroatinferenceArray.prototype.findLastIndexstreamreduxgroupBydirtrimEndsafeObjectauthqueryutilityparseStreamimmutableshebanghttpbootstrap cssinvariantdefineObject.fromEntriesvpcdataViewtoSortedconsumevariables in csscryptoReactiveExtensionsslicesymbolsbreakjapanesefunctionconsolechannelprotocol-buffersschemeBigUint64ArraydynamodbECMAScript 7ES8promisestypesCSSrangeerrorECMAScript 2017someArray.prototype.flatprivate dataflatMapwrapjsxtrimStartfpses2015concurrencyPromiselastjsonlockfiledeep
@kollorg/eveniet-praesentium@kollorg/eveniet-et@kollorg/exercitationem-assumenda-qui@kollorg/fuga-harum@kollorg/facere-optio@kollorg/fugiat-animi@kollorg/facilis-eum@kollorg/fugiat-cum-libero@kollorg/fuga-ipsum-illum@kollorg/facere-suscipit@kollorg/fugit-id-quisquam@kollorg/fuga-laborum@kollorg/ipsam-omnis@kollorg/ipsum-eaque-quibusdam@kollorg/ipsum-porro@kollorg/ipsum-sint@kollorg/itaque-voluptatum@kollorg/ipsam-labore@kollorg/labore-facilis-ab@kollorg/iste-sed-quos@kollorg/itaque-laudantium-nesciunt@kollorg/labore-facilis@kollorg/laudantium-molestias@kollorg/labore-minus-nesciunt@kollorg/laboriosam-neque@kollorg/labore-quidem@kollorg/laudantium-fuga@kollorg/labore-magnam@kollorg/magnam-iure@kollorg/magnam-natus@kollorg/libero-iste-molestiae@kollorg/molestias-asperiores@kollorg/minus-eveniet-dolor@kollorg/modi-fugit-accusantium@kollorg/molestias-non@kollorg/molestias-aperiam@kollorg/molestias-quae-iste@kollorg/modi-saepe@kollorg/molestiae-pariatur@kollorg/mollitia-cupiditate@kollorg/natus-ipsum@kollorg/mollitia-neque-maiores@kollorg/natus-tenetur-laudantium@kollorg/nemo-omnis@kollorg/necessitatibus-qui@kollorg/neque-non@kollorg/nihil-dolorem@kollorg/nisi-deserunt-suscipit@kollorg/nisi-aliquid-eum@kollorg/officia-voluptatem-eius@kollorg/officiis-earum-ducimus@kollorg/odio-cupiditate@kollorg/officia-porro@kollorg/occaecati-totam@kollorg/odit-exercitationem@kollorg/officia-explicabo@kollorg/odio-aspernatur@kollorg/odit-accusantium@kollorg/praesentium-perferendis@kollorg/quae-nam-minus@kollorg/provident-unde@kollorg/placeat-sapiente@kollorg/possimus-dolorem-occaecati@kollorg/possimus-dolores@kollorg/provident-ab-facilis@kollorg/qui-itaque@kollorg/quaerat-veritatis@kollorg/quam-hic@kollorg/quaerat-dolorem-soluta@kollorg/quaerat-error@kollorg/quaerat-ad@kollorg/quidem-dolores-ad@kollorg/quis-dolorem@kollorg/quisquam-totam@kollorg/repudiandae-accusamus-corrupti@kollorg/rerum-quaerat-et@kollorg/saepe-eum@kollorg/rerum-laudantium@kollorg/sapiente-consequatur-maxime@kollorg/rem-rem@kollorg/saepe-rem@kollorg/saepe-ut@kollorg/reiciendis-pariatur@kollorg/reiciendis-rem@kollorg/unde-quae-dignissimos@kollorg/unde-ullam@kollorg/temporibus-quas@kollorg/tenetur-eius@kollorg/ullam-consequuntur@kollorg/ullam-modi@kollorg/tempora-maiores@kollorg/unde-commodi-illo@kollorg/temporibus-explicabo@kollorg/veritatis-eius@kollorg/vitae-tempore-qui@kollorg/veritatis-aliquam@kollorg/veritatis-alias@kollorg/vitae-quia-incidunt@kollorg/vero-quaerat-itaque@kollorg/voluptatum-veniam
5.9.107

10 months ago

5.9.106

10 months ago

5.9.105

10 months ago

5.9.104

10 months ago

5.8.104

11 months ago

5.8.102

11 months ago

5.8.103

11 months ago

5.8.101

11 months ago

5.8.100

11 months ago

5.8.99

11 months ago

5.8.98

11 months ago

5.8.97

11 months ago

5.8.96

11 months ago

5.8.95

11 months ago

5.8.94

11 months ago

5.8.93

11 months ago

5.6.84

11 months ago

5.4.61

12 months ago

5.6.83

11 months ago

5.4.62

12 months ago

5.6.86

11 months ago

5.6.85

11 months ago

5.4.60

12 months ago

5.6.80

11 months ago

5.6.82

11 months ago

5.6.81

11 months ago

5.6.87

11 months ago

5.4.63

12 months ago

5.6.73

12 months ago

5.4.50

1 year ago

5.6.72

12 months ago

5.4.51

1 year ago

5.6.75

12 months ago

5.6.74

12 months ago

5.8.92

11 months ago

5.6.71

12 months ago

5.6.70

12 months ago

5.8.90

11 months ago

5.8.91

11 months ago

4.2.20

1 year ago

4.2.21

1 year ago

4.2.22

1 year ago

4.2.23

1 year ago

5.2.38

1 year ago

5.2.37

1 year ago

5.2.36

1 year ago

5.4.58

1 year ago

5.2.35

1 year ago

5.4.59

12 months ago

5.2.34

1 year ago

5.4.56

1 year ago

5.2.33

1 year ago

5.4.57

1 year ago

5.2.32

1 year ago

5.6.77

11 months ago

5.4.54

1 year ago

5.2.31

1 year ago

4.2.24

1 year ago

5.6.76

12 months ago

5.4.55

1 year ago

5.2.30

1 year ago

4.2.25

1 year ago

5.6.79

11 months ago

5.4.52

1 year ago

5.6.78

11 months ago

5.4.53

1 year ago

5.8.87

11 months ago

5.6.64

12 months ago

5.8.88

11 months ago

5.2.29

1 year ago

5.2.28

1 year ago

5.2.27

1 year ago

5.4.49

1 year ago

5.2.26

1 year ago

5.2.25

1 year ago

5.4.47

1 year ago

4.2.17

1 year ago

5.6.69

12 months ago

5.4.48

1 year ago

4.2.18

1 year ago

4.2.19

1 year ago

5.8.89

11 months ago

5.6.66

12 months ago

5.6.65

12 months ago

5.6.68

12 months ago

4.2.15

1 year ago

5.6.67

12 months ago

4.2.16

1 year ago

5.5.63

12 months ago

5.7.87

11 months ago

5.3.47

1 year ago

5.3.46

1 year ago

5.3.45

1 year ago

5.3.44

1 year ago

5.3.43

1 year ago

5.3.42

1 year ago

5.5.64

12 months ago

5.3.41

1 year ago

5.3.40

1 year ago

5.3.39

1 year ago

5.3.38

1 year ago

3.2.15

1 year ago

3.2.14

1 year ago

2.2.13

1 year ago

2.2.14

1 year ago

2.1.13

1 year ago

2.1.12

1 year ago

2.1.11

1 year ago

2.1.10

1 year ago

2.1.9

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago