Shopware 6 is able to load your snippet files automatically if you stick to a convention regarding file structure and naming. You have to store your snippet files in the <plugin root>/src/Resources/snippet
directory of your plugin, but you can use further subdirectories if you want to. Use the naming pattern <name>.<locale>
, where you can freely define the name part. The locale part must map to the ISO string of the supported locale in this snippet file. If you provide base translations, meaning that you ship translations for a whole new language, you indicate it with a .base
suffix in your file name. Keep in mind that in this case you also have to use the name, so your complete filename may look like this: <name>.<locale>.base.json
.