Menu

## Language
in package
implements JsonSerializable

Language.php : 18

### Table of Contents

#### Interfaces

JsonSerializable

#### Properties

$code : string
$id : string
$isoName : string|null
$languagesNames : array<string|int, mixed>|null
$names : array<string|int, mixed>|null
$nativeName : string|null
$region : string|null
$regionsNames : array<string|int, mixed>|null
$variant : string|null

#### Methods

__construct() : mixed
__toString() : string
  Returns the original locale ID.
all() : array<string|int, mixed>
  Get the list of the known languages.
getCode() : string
  Returns the code of the locale "en"/"fr".
getFullIsoDescription() : string
  Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable.
getFullIsoName() : string
  Returns the long ISO language name.
getFullNativeDescription() : string
  Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable.
getFullNativeName() : string
  Return the full name of the language in this language.
getId() : string
  Returns the original locale ID.
getIsoDescription() : string
  Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.
getIsoName() : string
  Returns the short ISO language name.
getNames() : array<string|int, mixed>
  Get both isoName and nativeName as an array.
getNativeDescription() : string
  Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable.
getNativeName() : string
  Get the short name of the language in this language.
getRegion() : string|null
  Returns the region part of the locale.
getRegionName() : string|null
  Returns the region name for the current language.
getVariant() : string|null
  Returns the variant code such as cyrl/latn.
getVariantName() : string|null
  Returns the variant such as Cyrillic/Latin.
jsonSerialize() : string
  Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.
regions() : array<string|int, mixed>
  Get the list of the known regions.
setIsoName() : static
  Set the ISO language name.
setNativeName() : static
  Set the name of the language in this language.

### Properties

#### $code

Language.php : 26
`protected string $code`

#### $id

Language.php : 24
`protected string $id`

#### $isoName

Language.php : 34
`protected string|null $isoName = null`

#### $languagesNames

Language.php : 20
`protected static array<string|int, mixed>|null $languagesNames = null`

#### $names

Language.php : 32
`protected array<string|int, mixed>|null $names = null`

#### $nativeName

Language.php : 36
`protected string|null $nativeName = null`

#### $region

Language.php : 30
`protected string|null $region = null`

#### $regionsNames

Language.php : 22
`protected static array<string|int, mixed>|null $regionsNames = null`

#### $variant

Language.php : 28
`protected string|null $variant = null`

### Methods

#### __construct()

Language.php : 38
`public __construct(string $id) : mixed`

##### Parameters

$id : string

#### __toString()

Language.php : 259

Returns the original locale ID.

`public __toString() : string`

##### Return values

string

#### all()

Language.php : 60

Get the list of the known languages.

`public static all() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### getCode()

Language.php : 104

Returns the code of the locale "en"/"fr".

`public getCode() : string`

##### Return values

string

#### getFullIsoDescription()

Language.php : 237

Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable.

`public getFullIsoDescription() : string`

##### Return values

string

#### getFullIsoName()

Language.php : 155

Returns the long ISO language name.

`public getFullIsoName() : string`

##### Return values

string

#### getFullNativeDescription()

Language.php : 248

Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable.

`public getFullNativeDescription() : string`

##### Return values

string

#### getFullNativeName()

Language.php : 175

Return the full name of the language in this language.

`public getFullNativeName() : string`

##### Return values

string

#### getId()

Language.php : 96

Returns the original locale ID.

`public getId() : string`

##### Return values

string

#### getIsoDescription()

Language.php : 215

Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.

`public getIsoDescription() : string`

##### Return values

string

#### getIsoName()

Language.php : 195

Returns the short ISO language name.

`public getIsoName() : string`

##### Return values

string

#### getNames()

Language.php : 83

Get both isoName and nativeName as an array.

`public getNames() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### getNativeDescription()

Language.php : 226

Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable.

`public getNativeDescription() : string`

##### Return values

string

#### getNativeName()

Language.php : 205

Get the short name of the language in this language.

`public getNativeName() : string`

##### Return values

string

#### getRegion()

Language.php : 136

Returns the region part of the locale.

`public getRegion() : string|null`

##### Return values

string|null

#### getRegionName()

Language.php : 147

Returns the region name for the current language.

`public getRegionName() : string|null`

⚠ ISO 3166-2 short name provided with no warranty, should not be used for any purpose to show official state names.

##### Return values

string|null

#### getVariant()

Language.php : 112

Returns the variant code such as cyrl/latn.

`public getVariant() : string|null`

##### Return values

string|null

#### getVariantName()

Language.php : 120

Returns the variant such as Cyrillic/Latin.

`public getVariantName() : string|null`

##### Return values

string|null

#### jsonSerialize()

Language.php : 267

Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable.

`public jsonSerialize() : string`

##### Return values

string

#### regions()

Language.php : 73

Get the list of the known regions.

`public static regions() : array<string|int, mixed>`

⚠ ISO 3166-2 short name provided with no warranty, should not be used for any purpose to show official state names.

##### Return values

array<string|int, mixed>

#### setIsoName()

Language.php : 165

Set the ISO language name.

`public setIsoName(string $isoName) : static`

##### Parameters

$isoName : string

##### Return values

static

#### setNativeName()

Language.php : 185

Set the name of the language in this language.

`public setNativeName(string $nativeName) : static`

##### Parameters

$nativeName : string

##### Return values

static

## Search results