2017 © Pedro Peláez
 

symfony-bundle localebundle

Bundle for managing locales

image

connectsb/localebundle

Bundle for managing locales

  • Wednesday, December 17, 2014
  • by timhovius
  • Repository
  • 2 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Symfony Locale Bundle

With this bundle you can get the country names of locales., (*1)

1) Installation

First you have to add the folowing lines to your composer.json file:, (*2)

{
    "require": {
        "connectsb/localebundle": "dev-master"
    }
}

You also have to add the LocaleBundle to your AppKernel.php:, (*3)

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:, (*4)

    $this->get('connect_sb_locale_service')->getCountryOfLocale('en');

In Twig you can use the locale_to_country filter., (*5)

The Versions

17/12 2014

dev-master

9999999-dev

Bundle for managing locales

  Sources   Download

MIT

The Requires