thomasdcodes / language-switcher-bundle
Gives a possibility to change the language, store it in session and set it as default language
Installs: 97
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.2
- symfony/framework-bundle: >=7.0.0
- symfony/translation: >=7.0.0
README
Description
With this Bundle you are able to switch the users language with ease.
Install
composer require thomasdcodes/language-switcher-bundle
If you're using Symfony Flex, the Bundle should be registered in your config/bundles.php
Inside config/routes add a new file (tdc_language_switcher_bundle.yaml) with the following standard settings:
tdc_language_switcher_bundle.routes: resource: '@TdcLanguageSwitcherBundle/config/routes.yaml'
Template
To use the Language Switch inside your navigation template inside a li-Tag:
{% include '@TdcLanguageSwitcher/_language_switch.html.twig' %}