PHP Class Bolt\Provider\TranslationServiceProvider

Inheritance: implements Silex\ServiceProviderInterface
Mostrar archivo Open project: bolt/bolt

Public Methods

Method Description
addResources ( Silex\Application $app, string $locale ) : array Adds all resources that belong to a locale.
boot ( Silex\Application $app )
register ( Silex\Application $app )

Protected Methods

Method Description
mergeGenericLocales ( array $inputLocales ) : string[] Adds generic locales into a given list.
mergeUtf8Locales ( array $inputLocales ) : string[] Adds UTF-8 suffixes for each locale in given list.
setDefaultTimezone ( Silex\Application $app )

Method Details

addResources() public static method

Adds all resources that belong to a locale.
public static addResources ( Silex\Application $app, string $locale ) : array
$app Silex\Application
$locale string
return array

boot() public method

public boot ( Silex\Application $app )
$app Silex\Application

mergeGenericLocales() protected method

[fr_FR, es, en_GB, en_US] -> [fr_FR, fr, es, en_GB, en_US, en]
protected mergeGenericLocales ( array $inputLocales ) : string[]
$inputLocales array
return string[]

mergeUtf8Locales() protected method

Adds UTF-8 suffixes for each locale in given list.
protected mergeUtf8Locales ( array $inputLocales ) : string[]
$inputLocales array
return string[]

register() public method

public register ( Silex\Application $app )
$app Silex\Application

setDefaultTimezone() protected method

protected setDefaultTimezone ( Silex\Application $app )
$app Silex\Application