With this Bundle you are able to switch the users language with ease.
composer require thomasdcodes/language-switcher-bundleIf 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'To use the Language Switch inside your navigation template inside a li-Tag:
{% include '@TdcLanguageSwitcher/_language_switch.html.twig' %}