Documentation

Language
in package

Table of Contents

LANGUAGE_TPL_PATTERN  = '/\{\$lang\((.*)\)\}/U'
DEFAULT_LOCALE  = 'en_US'
$defaultLanguage  : array<string|int, mixed>
$locale  : string
$localeLanguage  : array<string|int, mixed>
$availableLocales  : array<string|int, mixed>
$coreLanguageVariables  : array<string|int, mixed>
__construct()  : mixed
addExceptionLanguageVariable()  : mixed
get()  : string
getLanguage()  : mixed

Constants

LANGUAGE_TPL_PATTERN

public mixed LANGUAGE_TPL_PATTERN = '/\{\$lang\((.*)\)\}/U'

DEFAULT_LOCALE

private mixed DEFAULT_LOCALE = 'en_US'

Properties

$defaultLanguage

public static array<string|int, mixed> $defaultLanguage

$locale

public static string $locale = self::DEFAULT_LOCALE

$localeLanguage

public static array<string|int, mixed> $localeLanguage

$availableLocales

private array<string|int, mixed> $availableLocales = array('en_US', 'de_DE')

$coreLanguageVariables

private static array<string|int, mixed> $coreLanguageVariables = array('_' => array('exceptions' => array('invalidVariable' => '[INVALID VARIABLE &quot;%s&quot;]', 'invalidLanguageVariable' => '[INVALID LANGUAGE VARIABLE &quot;%s&quot;]', 'templateNotFound' => '[Template &quot;%s&quot; not found]', 'templateSyntaxError' => '[Syntax Exception in template: &quot;%s&quot;]')))

Methods

__construct()

public __construct() : mixed
Return values
mixed

addExceptionLanguageVariable()

public static addExceptionLanguageVariable(mixed $key, mixed $value) : mixed
Parameters
$key : mixed
$value : mixed
Return values
mixed

get()

public static get(string $variable, string|int|float|null ...$values) : string
Parameters
$variable : string
$values : string|int|float|null
Return values
string

getLanguage()

private getLanguage() : mixed
Return values
mixed

Search results