connectsb / localebundle
Bundle for managing locales
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/connectsb/localebundle
Requires
- symfony/symfony: >=2.1
This package is not auto-updated.
Last update: 2025-11-04 09:00:13 UTC
README
With this bundle you can get the country names of locales.
1) Installation
First you have to add the folowing lines to your composer.json file:
{
"require": {
"connectsb/localebundle": "dev-master"
}
}
You also have to add the LocaleBundle to your AppKernel.php:
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
...
new ConnectSB\TranslationBundle\ConnectSBLocaleBundle()
);
}
}
2) Usage
In the controller you can get the country of the language with the following method:
$this->get('connect_sb_locale_service')->getCountryOfLocale('en');
In Twig you can use the locale_to_country filter.