Skip to content

Commit 159e208

Browse files
fix(discovery): Adjusting minor issues in discovery domain (#1963)
* fix(discovery): Adjusting minor issues in discovery domain * Update guides/plugins/apps/administration/adding-snippets.md * Update guides/plugins/apps/content/index.md * Update resources/references/upgrades/core/translation/extension-translation.md * fix suggestion * Streamling "country" instead of "region" * fix more terminologies --------- Co-authored-by: Su <[email protected]> Co-authored-by: sushmangupta <[email protected]>
1 parent d0cf985 commit 159e208

File tree

5 files changed

+30
-26
lines changed

5 files changed

+30
-26
lines changed

concepts/translations/built-in-translation-system.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ determine if an update is necessary.
7070
When loading translations, the system follows a defined priority order to resolve conflicts:
7171

7272
1. Database translations – These have the highest priority. You can define them to override all other translations.
73-
2. Region-specific translations (e.g. `en-GB`, `en-US` or `de-DE`) – These can be provided for country-dependent
73+
2. Country-specific translations (e.g. `en-GB`, `en-US` or `de-DE`) – These can be provided for country-dependent
7474
translations or dialects as small patch files. For more information about the language-layer changes, you can have a
7575
look at its documentation.
76-
3. Region-agnostic translations (`en` and `de`) – These are shipped with Shopware and its plugins. They ensure that the
76+
3. Country-agnostic translations (`en` and `de`) – These are shipped with Shopware and its plugins. They ensure that the
7777
system always has a reliable fallback language and provide a consistent developer experience without requiring you
7878
to wait until your translations are accepted at [translate.shopware.com](https://translate.shopware.com). For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](/concepts/translations/fallback-language-selection.md).
7979
4. Built-in translation system – Finally, the translations installed via the built-in translation system are applied.

guides/plugins/apps/administration/adding-snippets.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ nav:
77
# Adding translations for apps
88

99
Adding snippets to the administration works the same way for plugins and apps. The only difference is the file structure and that apps are not allowed to override existing snippet keys. The only thing to do, therefore, is to create new files in the following directory: `<app root>/Resources/app/administration/snippet`
10-
Additionally, you need JSON file for each language you want to support, using its specific language locale, 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).
10+
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.
11+
12+
For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../../../concepts/translations/fallback-language-selection.md).
1113

1214
Since everything else works the same, please refer to our [Adding translations for plugins](../../plugins/administration/templates-styling/adding-snippets) guide for more information.

guides/plugins/apps/content/index.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ nav:
77

88
# Content
99

10-
create layouts, and control the visibility of content based on various conditions. It provides a flexible and intuitive system for managing and presenting your store's content, helping you deliver a seamless and engaging customer experience.
11-
12-
The following section guides how to extend Shopware CMS via a custom app.
10+
You can assign content to specific categories, create layouts, and control the visibility of content based on various conditions. It provides a flexible and intuitive system for managing and presenting your store's content, helping you deliver a seamless and engaging customer experience.

guides/plugins/themes/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ nav:
99

1010
Basically a theme can be an app/plugin that aims at changing the visual appearance of the Storefront.
1111

12+
```text
1213
Extensions
1314
├── Plugin
1415
│ └── can include a Theme (not for Cloud)
1516
└── App
1617
└── can include a Theme (Cloud-ready)
18+
```
1719

1820
A Shopware theme plugin/app allows businesses to customize and modify the appearance and design of their online store. It provides the ability to change the layout, styling, and visual elements, such as fonts, colors, and images, to match your brand identity and desired user experience. Businesses can easily manage and apply their custom themes, switch between them, and ensure consistent branding across their store.
1921

resources/references/upgrades/core/translation/extension-translation.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ title: Migrating Extensions
44
position: 20
55
---
66

7-
# Migrating Extension Translations To The Region-Independent Snippet Layer
7+
# Migrating Extension Translations to the Country-Independent Snippet Layer
88

9-
Starting with **Shopware 6.7.3**, a new region-independent snippet layer has been introduced to reduce duplicate
9+
Starting with **Shopware 6.7.3**, a new country-independent snippet layer has been introduced to reduce duplicate
1010
translations across similar language variants (e.g., `en-GB`, `en-US`, `en-CA` can share a common "en" base layer).
1111

1212
This change implements a hierarchical fallback system that automatically resolves translations through multiple layers,
@@ -16,45 +16,52 @@ significantly reducing maintenance overhead for extension developers.
1616

1717
The snippet loading system now follows this resolution order:
1818

19-
1. **Region-specific layer** (e.g., `en-GB`, `de-DE`) — Highest priority
19+
1. **Country-specific layer** (e.g., `en-GB`, `de-DE`) — Highest priority
2020
2. **Language base layer** (e.g., `en`, `de`, `es`) **NEW fallback layer**
21-
3. **Default fallback** (`en`) - Last resort
21+
3. **British English fallback** (`en-GB`) - Legacy fallback to maximize compatibility
22+
4. **Default fallback** (`en`) - Last resort
2223

2324
When a translation key is requested, Shopware will:
2425

25-
- First check the specific region variant (e.g., `es-AR`)
26+
- First check the specific country variant (e.g., `es-AR`)
2627
- If not found, check the base language (e.g., `es`)
28+
- If not found, the legacy fallback will be checked (`en-GB`)
2729
- Finally, fall back to `en` if still not found
2830

2931
**Result**: ~90% reduction in duplicate translations while maintaining full functionality.
3032

31-
## Migrating your extensions
33+
## Migrating Your Extensions
34+
35+
### Automatic
36+
37+
Shipping with Shopware **6.7.3**, there's the command line tool `bin/console translation:lint-filenames` that can be used to
38+
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).
3239

3340
### Manual
3441

35-
### Step 1: Rename your existing files
42+
#### Step 1: Rename your existing files
3643

3744
Rename your existing files from country-specific naming to the language base layer naming.
3845

3946
```Generic
4047
├── messages.en-GB.base.json ⇒ messages.en.base.json
4148
├── messages.de-DE.base.json ⇒ messages.de.base.json
4249
├── messages.fr-FR.base.json ⇒ messages.fr.base.json
43-
└············
50+
└···
4451
```
4552

46-
### Step 2: Re-create empty country-specific files
53+
#### Step 2: Re-create empty country-specific files
4754

4855
Re-create empty files with the former names of the country-specific naming.
4956

5057
```Generic
5158
├── messages.en-GB.base.json
5259
├── messages.de-DE.base.json
5360
├── messages.fr-FR.base.json
54-
└············
61+
└···
5562
```
5663

57-
### Step 3: Remove duplicates from other country-specific files
64+
#### Step 3: Remove duplicates from other country-specific files
5865

5966
Check for duplicate translations across country-specific files and remove them from the country-specific layer.
6067

@@ -66,21 +73,16 @@ Here are some example locales that are a dialect to the generic base layer.
6673
├── messages.de-AT.base.json (dialect of de-DE with the de base layer)
6774
├── messages.de-CH.base.json (dialect of de-DE with the de base layer)
6875
├── messages.pt-BR.base.json (dialect of pt-PT with the pt base layer)
69-
└············
76+
└···
7077
```
7178

72-
For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](/concepts/translations/fallback-language-selection.md).
73-
74-
### Automatic
75-
76-
Shipping with Shopware **6.7.3**, there's the command line tool `bin/console snippet:check-files` that can be used to
77-
check the translation files, or use the `--fix` parameter to even automate the migration process.
79+
For more details on selecting a fallback language and structuring your snippet files, see the [Fallback Languages guide](../../../../../concepts/translations/fallback-language-selection.md).
7880

7981
## Testing Your Migration
8082

8183
After the snippet files have been renamed, changing the locale to one of the empty snippet sets should still provide
82-
all translated strings. Changing to a region-specific locale should also provide all translated strings with just
83-
region-specific terms being replaced.
84+
all translated strings. Changing to a country-specific locale should also provide all translated strings with just
85+
country-specific terms being replaced.
8486

8587
## Best Practices
8688

0 commit comments

Comments
 (0)