eZPublishCommunityProject  2013.5
eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface Interface Reference

Interface for locale converters. More...

+ Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface:

Public Member Functions

 convertToEz ($posixLocale)
 Converts a locale in POSIX format to eZ Publish internal format. More...
 
 convertToPOSIX ($ezpLocale)
 Converts a locale in eZ Publish internal format to POSIX format. More...
 

Detailed Description

Interface for locale converters.

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

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

Member Function Documentation

eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface::convertToEz (   $posixLocale)

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

Returns null if conversion cannot be made.

Parameters
string$posixLocale
Returns
string|null

Implemented in eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverter.

eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface::convertToPOSIX (   $ezpLocale)

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

Returns null if conversion cannot be made.

Parameters
string$ezpLocale
Returns
string|null

Implemented in eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverter.


The documentation for this interface was generated from the following file: