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.

Tip: You can find more information about the basic functions of Shopware 6 in the Shopware documentation. If you need more information about the topic ‘text modules’, we recommend the following article: Shopware 6 - Snippets

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.

Tip: The trick here is that the link is integrated into the snippet as HTML code. So if you search for "Support and counselling via: 0180 - 000000" you won't find the snippet because the snippet's text is "Support and counselling via: <a href="tel:+49180000000">0180 - 000000...".

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

Tip: Similar to snippets with HTML code, it may also be that a punctuation mark (e.g. a colon) is not part of the snippet itself. Omit closing punctuation marks if you don't find a snippet.

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.

Tip: You can also search the corresponding JSON file in the Shopware core for the text you are looking for: storefront.en-GB.json


%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

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

You can find more information about snippets in the Shopware documentation:

Last updated

Logo

© 2024 by ThemeWare® | Made with 💙 by TC-Innovations GmbH