asdoria / sylius-locale-switcher-plugin
A change locale plugin for sylius
Installs: 3 061
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 0
Forks: 3
Open Issues: 2
Type:sylius-plugin
Requires
- php: ^7.4 || ^8.0
- sylius/sylius: ^1.9
README
Asdoria Locale Switcher Plugin
This plugin allows you to change locale in sylius shop while keeping the page you are on.
Features
- Change the locale of the store and don't redirect to home.
Installation
- run
composer require asdoria/sylius-locale-switcher-plugin
- Add the bundle in
config/bundles.php
. You must put the LocaleSwitcher Plugin line ABOVE TwigBundle
Asdoria\SyliusLocaleSwitcherPlugin\AsdoriaSyliusLocaleSwitcherPlugin::class => ['all' => true], [...] Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
- Import config in
config/packages/_sylius.yaml
imports: - { resource: "@AsdoriaSyliusLocaleSwitcherPlugin/Resources/config/config.yaml"}
- Copy the template overrides from the bundle directory
From: [shop_dir] vendor/asdoria/sylius-locale-switcher-plugin/src/Resources/views/bundles/SyliusShopBundle/*
To: [shop_dir] templates/bundles/SyliusShopBundle/*