Interface

eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface

interface LocaleConverterInterface

Interface for locale converters.

eZ Publish uses <ISO639-2/B>- locale format (mostly, some supported locales being out of this format, e.g. cro-HR). Symfony uses the standard POSIX locale format (_), which is supported by Intl PHP extension.

Locale converters are meant to convert in those 2 formats back and forth.

Methods

string|null convertToPOSIX(string $ezpLocale)

Converts a locale in eZ Publish internal format to POSIX format.

string|null convertToEz(string $posixLocale)

Converts a locale in POSIX format to eZ Publish internal format.

Details

at line 28
public string|null convertToPOSIX(string $ezpLocale)

Converts a locale in eZ Publish internal format to POSIX format.

Returns null if conversion cannot be made.

Parameters

string $ezpLocale

Return Value

string|null

at line 38
public string|null convertToEz(string $posixLocale)

Converts a locale in POSIX format to eZ Publish internal format.

Returns null if conversion cannot be made.

Parameters

string $posixLocale

Return Value

string|null