Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,5 @@ redirects:
resources/references/core-reference/rules-reference.html: guides/development/troubleshooting/rules-reference.html
guides/hosting/installation-updates/extension-managment.html: guides/hosting/installation-updates/extension-management.html
guides/installation/start-developing.html: guides/development/start-developing.html
concepts/translations/: concepts/framework/translations/

Comment thread
bojanrajh marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ When loading translations, the system follows a defined priority order to resolv
look at its documentation.
3. Country-agnostic translations (`en` and `de`) – These are shipped with Shopware and its plugins. They ensure that the
system always has a reliable fallback language and provide a consistent developer experience without requiring you
to wait until your translations are accepted at [translate.shopware.com](https://crowdin.com/project/shopware6). For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](./../../concepts/translations/fallback-language-selection).
to wait until your translations are accepted at [translate.shopware.com](https://crowdin.com/project/shopware6). For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](./../../concepts/framework/translations/fallback-language-selection).
4. Built-in translation system – Finally, the translations installed via the built-in translation system are applied.

## Built-in translation system and Flysystem
Expand Down
2 changes: 1 addition & 1 deletion guides/plugins/apps/administration/adding-snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Adding snippets to the Administration works the same way for plugins and apps. T

Additionally, you need JSON files for each language you want to support, using the respective language locale (e.g., `de.json`, `en.json`). You can also include patch files for dialects, such as `en-US.json`, to provide country-specific translations.

For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../../../concepts/translations/fallback-language-selection.md).
For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../../../concepts/framework/translations/fallback-language-selection.md).

Since everything else works the same, please refer to our [Adding translations for plugins](../../plugins/administration/templates-styling/adding-snippets) guide for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ By default Shopware 6 uses the [Vue I18n](https://kazupon.github.io/vue-i18n/sta

## Creating snippet files

Normally you use snippets in your custom module. To keep things organized, create a new directory named `snippet` inside module directory `<plugin root>/src/Resources/app/administration/src/module/<your-module>/snippet`. For each language you want to support, you need a JSON file inside it, e.g., `de-DE.json`, `en-GB.json`. For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../../../../concepts/translations/fallback-language-selection.md).
Normally you use snippets in your custom module. To keep things organized, create a new directory named `snippet` inside module directory `<plugin root>/src/Resources/app/administration/src/module/<your-module>/snippet`. For each language you want to support, you need a JSON file inside it, e.g., `de-DE.json`, `en-GB.json`. For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../../../../concepts/framework/translations/fallback-language-selection.md).

::: info
Providing snippets for apps works the same as in plugins but it has a more simplistic file structure. Also, unlike plugins, App-Snippets **are not allowed** to override existing snippet keys. So, use the following path for vendor-prefixed app snippet files: `<app root>/Resources/app/administration/snippet`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The domain can be freely defined (we recommend your extension name in kebab case
Locales should follow the ISO string of the supported language, such as `de`, `en`, or `es-AR`.
This format follows [IETF BCP 47](https://datatracker.ietf.org/doc/html/bcp47), restricted to [ISO 639-1 (2-letter) language codes](https://en.wikipedia.org/wiki/ISO_639-1) as used by [Symfony](https://symfony.com/doc/current/reference/constraints/Locale.html), but with dashes (`-`) instead of underscores (`_`).

For more information on selecting proper locales, see our documentation on [Fallback language selection](../../../../../concepts/translations/fallback-language-selection.md).
For more information on selecting proper locales, see our documentation on [Fallback language selection](../../../../../concepts/framework/translations/fallback-language-selection.md).

In case you want to provide base translations (ship translations for a whole new language), indicate it with the suffix `.base` in your file name.
Now the filename convention to be followed looks like this `<name>.<locale>.base.json` - for example, `my-app.de.base.json`.
Expand Down
4 changes: 2 additions & 2 deletions guides/upgrades-migrations/extension-translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ When a translation key is requested, Shopware will:
### Automatic

Shipping with Shopware **6.7.3**, there's the command line tool `bin/console translation:lint-filenames` that can be used to
check the translation files, or use the `--fix` parameter to even automate the migration process. For more information, see [this migration article](../../../../../concepts/translations/fallback-language-selection.md#migration-and-linting-via-command).
check the translation files, or use the `--fix` parameter to even automate the migration process. For more information, see [this migration article](../../concepts/framework/translations/fallback-language-selection.md#migration-and-linting-via-command).

Comment thread
bojanrajh marked this conversation as resolved.
### Manual

Expand Down Expand Up @@ -76,7 +76,7 @@ Here are some example locales that are dialects of the generic base layer.
└···
```

For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../../../../concepts/translations/fallback-language-selection.md).
For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../concepts/framework/translations/fallback-language-selection.md).

Comment thread
bojanrajh marked this conversation as resolved.
## Testing Your Migration

Expand Down
2 changes: 1 addition & 1 deletion guides/upgrades-migrations/language-pack-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ Starting with **Shopware 6.7.7.0** and **Language Pack 5.37.1**, the migration p
please update Shopware to >= 6.7.7.0, Language Pack to >= 5.37.1, remove the translation files created from running the
command and run the command again. Or follow the updated migration guide.

[translation-system]: ../../../../../concepts/translations/built-in-translation-system.md
[translation-system]: ../../concepts/framework/translations/built-in-translation-system.md
[language-pack-plugin]: https://store.shopware.com/en/swag338126230916f/shopware-language-pack.html
[shopware-translations]: https://translate.shopware.com
Loading