Download the PHP package pmaxs/silex-locale without Composer
On this page you can find all versions of the php package pmaxs/silex-locale. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download pmaxs/silex-locale
More information about pmaxs/silex-locale
Files in pmaxs/silex-locale
Download pmaxs/silex-locale
More information about pmaxs/silex-locale
Files in pmaxs/silex-locale
Vendor pmaxs
Package silex-locale
Short Description Silex service provider to adjust locale/language via url
License MIT
Homepage https://github.com/pmaxs/silex-locale
Package silex-locale
Short Description Silex service provider to adjust locale/language via url
License MIT
Homepage https://github.com/pmaxs/silex-locale
Please rate this library. Is it a good library?
Informations about the package silex-locale
Silex-locale
Silex service provider to adjust locale/language via url.
Installation
Options
- locale.locales - available locales
- locale.default_locale - default locale
- locale.resolve_by_host - resolve locale from host name
- locale.exclude_routes - routes that should be excluded (service routes)
Urls
- locale.resolve_by_host = 0
- default locale: scheme://host/...
- not default locale: scheme://host/{{locale}}/...
- locale.resolve_by_host = 1
- default locale: scheme://host/...
- not default locale: scheme://{{locale}}.host/...
Loading provider
silex v1.x
silex v2.x
Usage
Url generation
- Index url
- Current locale
- php:
$app['locale.url_generator']->getIndexUrl()
- twig:
locale_get_index_url()
- Any locale
- php:
$app['locale.url_generator']->getIndexUrlForLocale('es')
- twig:
locale_get_index_url_for_locale('es')
- Other urls
- Current locale
- php: standard silex mechanism for url generation
$app['url_generator']->generate(...)
- twig: standard twig mechanism for url generation
path(...)
- Any locale
- php:
$app['locale.url_generator']->generate('es', $name, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
- twig:
locale_generate('es', $name, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
All versions of silex-locale with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package pmaxs/silex-locale contains the following files
Loading the files please wait ....