Pionia Core

Language
in package
implements JsonSerializable

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

$isoName

protected string|null $isoName = null

$languagesNames

protected static array<string|int, mixed>|null $languagesNames = null

$names

protected array<string|int, mixed>|null $names = null

$nativeName

protected string|null $nativeName = null

$region

protected string|null $region = null

$regionsNames

protected static array<string|int, mixed>|null $regionsNames = null

$variant

protected string|null $variant = null

Methods

__construct()

public __construct(string $id) : mixed
Parameters
$id : string

__toString()

Returns the original locale ID.

public __toString() : string
Return values
string

all()

Get the list of the known languages.

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

getCode()

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

public getCode() : string
Return values
string

getFullIsoDescription()

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

public getFullIsoDescription() : string
Return values
string

getFullIsoName()

Returns the long ISO language name.

public getFullIsoName() : string
Return values
string

getFullNativeDescription()

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

public getFullNativeDescription() : string
Return values
string

getFullNativeName()

Return the full name of the language in this language.

public getFullNativeName() : string
Return values
string

getId()

Returns the original locale ID.

public getId() : string
Return values
string

getIsoDescription()

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

public getIsoDescription() : string
Return values
string

getIsoName()

Returns the short ISO language name.

public getIsoName() : string
Return values
string

getNames()

Get both isoName and nativeName as an array.

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

getNativeDescription()

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

public getNativeDescription() : string
Return values
string

getNativeName()

Get the short name of the language in this language.

public getNativeName() : string
Return values
string

getRegion()

Returns the region part of the locale.

public getRegion() : string|null
Return values
string|null

getRegionName()

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()

Returns the variant code such as cyrl/latn.

public getVariant() : string|null
Return values
string|null

getVariantName()

Returns the variant such as Cyrillic/Latin.

public getVariantName() : string|null
Return values
string|null

jsonSerialize()

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

public jsonSerialize() : string
Return values
string

regions()

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()

Set the ISO language name.

public setIsoName(string $isoName) : static
Parameters
$isoName : string
Return values
static

setNativeName()

Set the name of the language in this language.

public setNativeName(string $nativeName) : static
Parameters
$nativeName : string
Return values
static

        
On this page

Search results