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
Table of Contents
Cases
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
English
Dutch
Methods
fromLangParam()
Get the language from a language param ('en', 'nl')
public
static fromLangParam(LangParam $langParam) : Languages
Parameters
- $langParam : LangParam
Return values
LanguagesfromLocale()
Get the language from a locale ('en_GB', 'nl_NL')
public
static fromLocale(Locale $locale) : Languages
Parameters
- $locale : Locale
Return values
LanguagesgetLangParam()
Get the language param ('en', 'nl') from a language An explode is not possible because of psalm
public
getLangParam() : LangParam
Return values
LangParamgetLocale()
Get the locale ('en_GB', 'nl_NL') from a language
public
getLocale() : Locale
Return values
LocalegetName()
public
getName(Translator $translator) : string
Parameters
- $translator : Translator
Return values
stringstringValues()
public
static stringValues() : array<string|int, string>
Return values
array<string|int, string>values()
public
static values() : array<string|int, Languages|string>