victoire / localeswitcher-widget
Victoire LocaleSwitcher widget
Installs: 171
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 15
Forks: 4
Open Issues: 2
Type:symfony-bundle
Requires
- php: >=5.5.9
- symfony/framework-bundle: ~2.8|~3.0
- victoire/victoire: ~2 | ~3.0
README
Victoire LocaleSwitcher Bundle
What is the purpose of this bundle
This bundles gives you access to the LocaleSwitcher Widget which enables a language switcher on your website.
Set Up Victoire
If you haven't already, you can follow the steps to set up Victoire here
Install the bundle
php composer.phar require victoire/localeswitcher-bundle
Do not forget to add the bundle in your AppKernel !
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
...
new Victoire\Widget\LocaleSwitcherBundle\VictoireWidgetLocaleSwitcherBundle(),
);
return $bundles;
}
}
Add some extra localized links in the locale switcher
Sometimes, for example for a large company with some subsidiaries which aren't manage by this website, we would like to add extra localized links in the locale switcher.
Just add some config to get things done:
#config.yml
victoire_widget_locale_switcher:
extraLocalizedLinks:
jp: http://google.jp/
us: https://google.us/
ca: https://google.ca/
pl: http://google.pl/
...
You can have the complete list of managed countries in Resources/public/images/flags
.