# Class: LanguageHeader

## vertx-web-js/language_header~ LanguageHeader

#### new LanguageHeader()

A parsed language header. Delivers a more direct access to the individual elements of the header it represents

Source:
  - vertx-web-js/language_header.js, line 32

### Methods

#### country() → {string}

Returns the country as reported by the HTTP client.

Source:
  - vertx-web-js/language_header.js, line 60

##### Returns:

variant

Type
  string

#### isMatchedBy(matchTry) → {boolean}

Test if this header is matched by matchTry header

##### Parameters:

Name | Type | Description
--- | --- | ---
`matchTry` | ParsedHeaderValue | The header to be matched from

Source:
  - vertx-web-js/language_header.js, line 182

##### Returns:

true if this header represents a subset of matchTry, otherwise, false

Type
  boolean

#### isPermitted() → {boolean}

Is this an allowed operation as specified by the corresponding header?

Source:
  - vertx-web-js/language_header.js, line 168

##### Returns:

Type
  boolean

#### language() → {string}

Returns the language as reported by the HTTP client.

Source:
  - vertx-web-js/language_header.js, line 46

##### Returns:

language

Type
  string

#### parameter(key) → {string}

The value of the parameter specified by this key. Each is one of 3 things:

1. null <- That key was not specified
2. ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
3. [Other] <- The value of the parameter

Note: The `q` parameter is never present.

##### Parameters:

Name | Type | Description
--- | --- | ---
`key` | string |

Source:
  - vertx-web-js/language_header.js, line 139

##### Returns:

Type
  string

#### parameters() → {Array.<string>}

The parameters specified in this header value. Note: The `q` parameter is never present.

Source:
  - vertx-web-js/language_header.js, line 154

##### Returns:

Unmodifiable Map of parameters of this header value

Type
  Array.<string>

#### rawValue() → {string}

Contains the raw value that was received from the user agent

Source:
  - vertx-web-js/language_header.js, line 88

##### Returns:

Type
  string

#### subtag(level) → {string}

A subtag of this language header.
+ info: rfc7231#section-3.1.3.1

##### Parameters:

Name | Type | Description
--- | --- | ---
`level` | number |

Source:
  - vertx-web-js/language_header.js, line 227

##### Returns:

The language subtag at specified position

Type
  string

#### subtagCount() → {number}

Source:
  - vertx-web-js/language_header.js, line 242

##### Returns:

the number of subtags this value has

Type
  number

#### tag() → {string}

The tag of the language as specified by rfc7231#section-3.1.3.1.
Equivalent to

Source:
  - vertx-web-js/language_header.js, line 212

##### Returns:

The language tag

Type
  string

#### value() → {string}

Holds the unparsed value of the header.
For the most part, this is the content before the semi-colon (";")

Source:
  - vertx-web-js/language_header.js, line 103

##### Returns:

Type
  string

#### variant() → {string}

Returns the variant as reported by the HTTP client.

Source:
  - vertx-web-js/language_header.js, line 74

##### Returns:

variant

Type
  string

#### weight() → {number}

Holds the weight specified in the "q" parameter of the header.
If the parameter is not specified, 1.0 is assumed according to rfc7231

Source:
  - vertx-web-js/language_header.js, line 119

##### Returns:

Type
  number

#### weightedOrder() → {number}

An integer that represents the absolute order position of this header

Source:
  - vertx-web-js/language_header.js, line 196

##### Returns:

Type
  number