Language problem if you switch from "all products" page to a specific product

Language problem if you switch from "all products" page to a specific product

SH-munich
Visitor
1 0 1

Hi everyone,

 

If I switch to my second store language (not my main language) and if I go to an all products page - where you can get an overview of all products, the language is still fine. 

 

If I then click on a specific product, the language switches to my main language.

 

The problem is that the URL is not taking the language identifier .. any solutions for that?

 

Thanks a lot!

Replies 2 (2)

Transcy
Shopify Partner
285 19 87

Hello @SH-munich ,

We are Transcy - The #1 Translator and Currency Converter.

 

You may configure your language settings to ensure that the language identifier is properly included in the URL for all pages, including product pages. Here's how:

  • Go to your Online Store -> Themes -> Actions -> Edit Code 
  • In the code editor, locate the "theme.liquid" file and open it.
  • Look for the <html> tag and add lang="{{ shop.locale }}" after it. This will add the language code to the HTML tag, which will help search engines and other systems identify the language of your website.
  • Save and go back to your Themes page -> Customize and click on "Language" 
  • Here, you can add additional languages and set the language prefix for each language.
  • Save your changes and then test

Hope this can help, please hit us up if you have any further questions.

 

Have a nice day,

Transcy team.

Transcy - The #1 Translation and Currency Converter
- Was my answer helpful? Please hit Like or Mark it as solution!
- Get in touch with us: App Store | Blog

richbrown_staff
Shopify Staff
652 96 171

Hey @SH-munich , something on your store is not using the 'Routes object' - which means that locales get passed through. When I look at a collection, whilst in English, and hover over a product, I can see that the link doesn't contain /en/. Usually this is caused by 3rd party apps. If you use any apps that present your collections in a certain way, such as filter apps, try turning them off and refreshing. If the locale works, then this is the issue - and speak to their developers and ask them to use the routes object (https://shopify.dev/docs/api/liquid/objects/routes).  

To learn more visit the Shopify Help Center or the Community Blog.