akki-team/sylius-localization-plugin

1.1.1 2025-01-29 10:24 UTC

This package is auto-updated.

Last update: 2025-03-29 01:09:31 UTC


README

Overview

Installation

  1. Install the plugin to your project with the following command:
$ composer require akki-team/sylius-localization-plugin
  1. After the installation, check that the plugin is correctly declared in your project in the file config/bundles.php.
 return [
    ...
    Akki\SyliusLocalizationPlugin\AkkiSyliusLocalizationPlugin::class => ['all' => true],
];
  1. Import config in your config/packages/_sylius.yaml file:
# config/packages/_sylius.yaml

imports:
    ...
    
    - { resource: "@AkkiSyliusLocalizationPlugin/Resources/config/config.yaml" }
  1. Import routing in your config/routes.yaml file:
# config/routes.yaml
...

akki_sylius_localization_plugin:
  resource: "@AkkiSyliusLocalizationPlugin/Resources/config/routes.yaml"
  1. Update your database
$ php bin/console cache:clear
$ php bin/console doctrine:migrations:diff
$ php bin/console doctrine:migrations:migrate
  1. Import translations in database
$ php bin/console akki:translations:load

Configuration

By default, @cache.app is used to put translations in cache. You can override with other an other cache :

# config/akki_sylius_localization_plugin.yaml

akki_sylius_localization_plugin:
  cache: my_new_cache

⚠️ Warning

It is recommended to use the command akki:translations:load after each (or at each) deployment to import new translations.