diff --git a/docs/index.html b/docs/index.html index 77173e9..3eb2a93 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,8 +1,6 @@ - - ISO To Language @@ -61,7 +59,7 @@

ISO To Language

Light and fast module to convert iso country and languages codes into country names, there is no unnecessary stuff only the bare essentials.

https://www.npmjs.com/package/isotolanguage

-
isoInfoisoInfoisoInfoisoInfoisoInfoisoInfovalidateISOvalidateISOvalidateISOvalidateISOformatIsoformatIsoformatIsoformatIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetGroupedBygetGroupedBygetGroupedBygetKeyValuegetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetCountriesByLanguage

Fn: isoInfo

Gets information about the iso.

Example: isoInfo('it')

Args: {"iso":"it"}

{
+    
isoInfoisoInfoisoInfoisoInfoisoInfoisoInfovalidateISOvalidateISOvalidateISOvalidateISOformatIsoformatIsoformatIsoformatIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetIsogetGroupedBygetGroupedBygetGroupedBygetKeyValuegetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetAllgetCountriesByLanguage

Fn: isoInfo

Gets information about the iso.

Example: isoInfo('it')

Args: {"iso":"it"}

{
   "name": "Italian",
   "original": "Italiano",
   "iso3": "ita",
@@ -132,7 +130,7 @@ 

ISO To Language

"iso3": "ita", "iso2": "it" } -}

Fn: validateISO

a function that validates if the iso code and returns the type.

Example: validateISO('it')

Args: {"iso":"it"}

language

Fn: validateISO

a function that validates if the iso code and returns the type.

Example: validateISO('gb')

Args: {"iso":"gb"}

country

Fn: validateISO

this case will return false because the iso code is invalid

Example: validateISO('EN')

Args: {"iso":"EN"}

false

Fn: validateISO

passing the type will return if the iso code is valid or not in that type

Example: validateISO('en', 'language')

Args: {"iso":"en","type":"language"}

true

Fn: formatIso

Will format the iso code into a language and country

Example: formatIso('en', 'GB')

Args: {"lang":"en","country":"GB"}

en-GB

Fn: formatIso

Will format the iso code into a language and country

Example: formatIso('Italiano', 'Italy')

Args: {"lang":"Italiano","country":"Italy"}

false

Fn: formatIso

Will format the iso code into a language and country using the locale separator

Example: formatIso('en', 'GB', 'locale')

Args: {"lang":"en","country":"GB","separator":"locale"}

en_GB

Fn: formatIso

Will format the iso code into a language and country using a custom separator

Example: formatIso('ca', 'ES', ↔⭐')

Args: {"lang":"ca","country":"ES","separator":"⭐"}

ca⭐ES

Fn: getIso

Returns the information about the iso code

Example: getIso('en')

Args: {"key":"en"}

{
+}

Fn: validateISO

a function that validates if the iso code and returns the type.

Example: validateISO('it')

Args: {"iso":"it"}

language

Fn: validateISO

a function that validates if the iso code and returns the type.

Example: validateISO('gb')

Args: {"iso":"gb"}

country

Fn: validateISO

this case will return false because the iso code is invalid

Example: validateISO('EN')

Args: {"iso":"EN"}

false

Fn: validateISO

passing the type will return if the iso code is valid or not in that type

Example: validateISO('en', 'language')

Args: {"iso":"en","type":"language"}

true

Fn: formatIso

Will format the iso code into a language and country

Example: formatIso('en', 'GB')

Args: {"lang":"en","country":"GB"}

en-GB

Fn: formatIso

Will format the iso code into a language and country

Example: formatIso('Italiano', 'Italy')

Args: {"lang":"Italiano","country":"Italy"}

it-IT

Fn: formatIso

Will format the iso code into a language and country using the locale separator

Example: formatIso('en', 'GB', 'locale')

Args: {"lang":"en","country":"GB","separator":"locale"}

en_GB

Fn: formatIso

Will format the iso code into a language and country using a custom separator

Example: formatIso('ca', 'ES', ↔⭐')

Args: {"lang":"ca","country":"ES","separator":"⭐"}

ca⭐ES

Fn: getIso

Returns the information about the iso code

Example: getIso('en')

Args: {"key":"en"}

{
   "name": "English",
   "original": "English",
   "iso3": "eng",
@@ -153,7 +151,17 @@ 

ISO To Language

"name": "Italy", "original": "Italia", "iso3": "ITA" -}

Fn: getIso

Finds for the requested term and returns the information about the language iso code, key accept as value: iso2, iso3, name, original and type: language

Example: getIso('Italiano', 'language')

Args: {"key":"Italiano","type":"language"}

false

Fn: getIso

Finds for the requested term and returns the information about the iso code

Example: getIso('Italiano', 'language')

Args: {"key":"Italiano","type":"language"}

false

Fn: getIso

Finds for the requested term and returns the information about the iso code and return the required field as value

Example: getIso('Italiano', 'language', 'iso2')

Args: {"key":"Italiano","type":"language","field":"iso2"}

false

Fn: getIso

the type can be omitted if you want to search in both country and language iso code fields

Example: getIso('Spain', undefined, 'name')

Args: {"key":"Spain","type":"undefined","field":"name"}

Spain

Fn: getIso

the third parameter can be an array of fields to return even only one

Example: getIso('Switzerland', "country", ['capital'])

Args: {"key":"Switzerland","type":"country","field":"capital"}

{
+}

Fn: getIso

Finds for the requested term and returns the information about the language iso code, key accept as value: iso2, iso3, name, original and type: language

Example: getIso('Italiano', 'language')

Args: {"key":"Italiano","type":"language"}

{
+  "name": "Italian",
+  "original": "Italiano",
+  "iso3": "ita",
+  "iso2": "it"
+}

Fn: getIso

Finds for the requested term and returns the information about the iso code

Example: getIso('Italiano', 'language')

Args: {"key":"Italiano","type":"language"}

{
+  "name": "Italian",
+  "original": "Italiano",
+  "iso3": "ita",
+  "iso2": "it"
+}

Fn: getIso

Finds for the requested term and returns the information about the iso code and return the required field as value

Example: getIso('Italiano', 'language', 'iso2')

Args: {"key":"Italiano","type":"language","field":"iso2"}

it

Fn: getIso

the type can be omitted if you want to search in both country and language iso code fields

Example: getIso('Spain', undefined, 'name')

Args: {"key":"Spain","type":"undefined","field":"name"}

Spain

Fn: getIso

the third parameter can be an array of fields to return even only one

Example: getIso('Switzerland', "country", ['capital'])

Args: {"key":"Switzerland","type":"country","field":"capital"}

{
   "iso2": "CH",
   "languages": [
     "de",
@@ -453,7 +461,7 @@ 

ISO To Language

}, { "two": "nl_ -(...)

Fn: getAll

Get all will return an object with all ISO codes and their respective country data

Example: getAll()

Args: {}

{
+(...)

Fn: getAll

Get all will return an object with all ISO codes and their respective country data

Example: getAll()

Args: {}

{
   "AD": {
     "languages": [
       "ca"
@@ -683,12 +691,16 @@ 

ISO To Language

"lan (...)

Fn: getAll

Returns iso3 codes for all languages

Example: getAll('language-iso3', 'language')

Args: {"field":"iso3","type":"language"}

{
   "aar": {
-    "iso2": "aa",
-    "name": "Afar"
+    "name": "Afar",
+    "original": "Afaraf",
+    "iso3": "aar",
+    "iso2": "aa"
   },
   "abk": {
-    "iso2": "ab",
-    "name": "Abkhazian"
+    "name": "Abkhazian",
+    "original": "аҧсуа",
+    "iso3": "abk",
+    "iso2": "ab"
   },
   "ace": {
     "name": "Achinese"
@@ -715,43 +727,35 @@ 

ISO To Language

"name": "Afrihili" }, "afr": { - "iso2": "af", - "name": "Afrikaans" + "name": "Afrikaans", + "original": "Afrikaans", + "iso3": "afr", + "iso2": "af" }, "ain": { "name": "Ainu" }, "aka": { - "iso2": "ak", - "name": "Akan" + "name": "Akan", + "original": "Akan", + "iso3": "aka", + "iso2": "ak" }, "akk": { "name": "Akkadian" }, "alb": { - "iso2": "sq", - "name": "Albanian" + "name": "Albanian", + "original": "Shqip", + "iso3": "alb", + "iso2": "sq" }, "ale": { "name": "Aleut" }, "alg": { "hierarchy": [ - "North American Indian languages", - "aql", - "Algonquian languages" - ], - "name": "Algonquian languages" - }, - "alt": { - "name": "Southern Altai" - }, - "amh": { - "iso2": "am", - "name": "Amharic" - }, - "ang": { - "nam + "North American Indi (...)

Fn: getCountriesByLanguage

Example: getCountriesByLanguage('it')

Args: {}

{
   "CH": {
     "languages": [
@@ -789,4 +793,11 @@ 

ISO To Language

"iso3": "VAT" } }
-
+