Метод | Описание | |
---|---|---|
__construct ( array $availableLocales ) | Constructor. | |
createWithLocales ( string $defaultLocale, string $rootDir ) : static | Creates a new instance with the installed languages. | |
onKernelRequest ( |
Sets the default locale based on the request or session. |
Метод | Описание | |
---|---|---|
formatLocaleId ( string $locale ) : string | Formats a string to represent a locale ID. | |
getLocale ( |
Returns the locale from the request, the session or the HTTP header. |
public __construct ( array $availableLocales ) | ||
$availableLocales | array |
public static createWithLocales ( string $defaultLocale, string $rootDir ) : static | ||
$defaultLocale | string | |
$rootDir | string | |
Результат | static |
public onKernelRequest ( |
||
$event |