accept-language
Advanced tools
Comparing version 3.0.14 to 3.0.15
{ | ||
"name": "accept-language", | ||
"version": "3.0.14", | ||
"version": "3.0.15", | ||
"description": "Accept-Language parser for nodejs", | ||
@@ -5,0 +5,0 @@ "main": "Build/Source/AcceptLanguage.js", |
@@ -33,3 +33,3 @@ accept-language [![Build Status](https://travis-ci.org/tinganho/node-accept-language.png)](https://travis-ci.org/tinganho/node-accept-language) | ||
#### acceptLanguage.languages(Array languageTags); | ||
Define your language tags ordered in highest priority comes first fashion. The language tags must comply with [BCP47][] standard. | ||
Define your language tags ordered in highest priority comes first fashion. The first language will act as a default language in case of no match. The language tags must comply with [BCP47][] standard. | ||
@@ -41,3 +41,3 @@ ```javascript | ||
#### acceptLanguage.get(String acceptLanguageString); | ||
Get the most likely language given an `Accept-Language` string. In order for it to work you must set all your languages first. | ||
Get a matched language given an `Accept-Language` string. In case of no match, the default language or `null` will be returned. | ||
```javascript | ||
@@ -44,0 +44,0 @@ acceptLanguage.get('en-GB,en;q=0.8,sv'); |
10247