Texts: Edit and translate

If you want to change or translate texts, you can do this in the vast majority of cases using text modules. This is a basic function of Shopware and not a function of our themes, although we of course also use this practical basic function extensively.

Editing and translating texts with snippets

If you want to change or translate a text, open the snippet manager in your administration's "Settings".

You can find the snippet manager of Shopware 6 in the Shopware settings:

  • "Settings" => "Shop" => "Snippets"

Select the desired language set and search for the desired text. This way, you should be able to find the corresponding snippet directly.

For example

Let's take the phone number in the "Service Hotline" widget in the footer.

Support and counselling via:

0180 - 000000

Mon-Fri, 9 am - 5 pm

Open the snippet manager and select the English language set (usually "BASE en-GB").

Now search for small pieces of text such as "0180 - 000000" or "Support and counselling via" or "Mon-Fri, 9 am - 5 pm" and shorten your search until you find one or more snippets.

Note: Not all snippets are HTML-capable. However, if a snippet uses HTML code, this is a good indicator that it is HTML-capable.

Once you have found the right snippet (e.g. footer.serviceHotline), you can customise it as you like and translate it into other languages.

Save your changes and reload the Storefront.

If the change is not displayed, clear the Shopware cache and your browser cache.

As a final tip, we recommend that you save the original texts of snippets in the best possible way, for example in a text file. This way you can always revert to them.


Find snippets even faster

For many of the features in ThemeWare®, you will find a link in the help text for the relevant theme configuration that will take you directly to the editor for the corresponding snippet.


%Placeholders% in snippets

In some snippets, you will find placeholders such as %shippingTime%. These are replaced by a specific value using a Twig function in the corresponding template file.

storefront.en-GB.json
...
"deliveryShippingTime": "Estimated delivery time: %shippingTime% workdays",
...

Do not change these placeholders if you want to continue using them.

If you want to stop displaying the delivery time, for example, you can also remove the placeholder.

Note: A placeholder is only replaced if the template that uses the corresponding snippet provides for this. This means that you cannot use placeholders in any other snippets.


Further information

You can find more information on the topic of "snippets" in the following article:

Snippets

The following overview shows all of the snippets available in ThemeWare®:

You can also find more information on the topic of "snippets" in the Shopware documentation:

Last updated

Was this helpful?