Documentation

Languages : string
in package

This enum contains the different languages that are supported by the website.

This is directly related to contents of decisions from GEWISDB. Be careful when making changes here and not there.

LangParam is the format compatible with $translator->translate(locale: $langparam) Locale should be compatible with dates.

Tags
psalm-type

LangParam = 'en'|'nl'

psalm-type

Locale = 'en_GB'|'nl_NL'

Table of Contents

Cases

Dutch  = 'dutch_netherlands'
English  = 'english_greatbritain'

Methods

fromLangParam()  : Languages
Get the language from a language param ('en', 'nl')
fromLocale()  : Languages
Get the language from a locale ('en_GB', 'nl_NL')
getLangParam()  : LangParam
Get the language param ('en', 'nl') from a language An explode is not possible because of psalm
getLocale()  : Locale
Get the locale ('en_GB', 'nl_NL') from a language
getName()  : string
stringValues()  : array<string|int, string>
values()  : array<string|int, Languages|string>

Cases

Methods

fromLangParam()

Get the language from a language param ('en', 'nl')

public static fromLangParam(LangParam $langParam) : Languages
Parameters
$langParam : LangParam
Return values
Languages

fromLocale()

Get the language from a locale ('en_GB', 'nl_NL')

public static fromLocale(Locale $locale) : Languages
Parameters
$locale : Locale
Return values
Languages

getLangParam()

Get the language param ('en', 'nl') from a language An explode is not possible because of psalm

public getLangParam() : LangParam
Return values
LangParam

getLocale()

Get the locale ('en_GB', 'nl_NL') from a language

public getLocale() : Locale
Return values
Locale

getName()

public getName(Translator $translator) : string
Parameters
$translator : Translator
Return values
string

stringValues()

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

        
On this page

Search results