Change language dynamically in international themes

Highlighted
New Member
1 0 5

More and more Shopify users need to support foreign languages. Shopify now requires internationalization on its themes and it is great: we have a locale file for each language and a nice UI in admin to translate themes in new languages if possible. So themes support many languages.

BUT, even though each theme now comes in 5 or 6 languages, as a Shopify website, you can only use ONE!! there is no language switching. I can name 20 countries where people have more than one national language... beyond Canada of course!!

Why not enable clients/users to specify in shopping cart the language to use/display? (shopping cart seems to be the only place where you can have "session" data to pass to server. This works well for Langify and mss)

We only need from Shopify a global variable like {{ cart.language }} and then allow browser clients to update that cart variable (and then themes can have a language switcher). Then server can load the locale file for the theme based on that global variable... or something like this... It seems so easy and all the hard work has been done already: Shopify theme translation framework is nice and themes come with multiple languages already.

It should be very easy (and painless) for Shopify to enable clients to switch theme language. Like this apps like Langiffy and mss can focus on content translation and theme translations are not duplicated. Shopify customers will be able to fully benefit from multi language themes.

Merry Christmas - Joyeux Noel - frohe Weihnachten - Feliz Navidad (pick one only! sorry...)

NOTE:  Now, to support multiple languages switching on a site, we have to use apps like Langify or mss.. Fine, these apps are needed to translate content  anyway (pages, products, variants, collections). But when you use these app, since Shopify does not allow theme language switching, we have to re translate the theme. It is a waste of time and not very convenient. So all theme translation data are duplicated manually as shop metafields by these apps to provide client switching... and a lot of unnecessary metafield data and liquid code is piling up in our shops and themes...

Theme translations are theme related and should stay there. User should not have to use workarounds and duplication to access theme languages. And it seems clients cannot even access these locale files (like other asset files??) to do client side switching if Shopify wont do it.

5 Likes
Shopify Partner
8 0 18

Hey Herve,

If you want a seamless multilingual supported site check out localize.js

https://localizejs.com/docs/integrations/shopify

 

3 Likes
Excursionist
18 0 18

Localize.JS has worked very well for me too!

A+ support and easy integration.

It even auto-detects the user's language.

Try it out! =>

https://apps.shopify.com/localize

https://localizejs.com/docs/integrations/shopify

2 Likes
Shopify Partner
2 0 0

Hey Joshua,

Could you the difference between langify and localize.js? I've been reading both info pages on the app store, but unable to really figure out the pros and cons of each? How does langify solve the above user's problem? Does this address the "single url" issue? Does it provide a checkout in multiple languages?

Thanks!

0 Likes
New Member
9 0 0

Hey Herve, have you tried using an app to help with your language translation? This one really helped me out:) https://apps.shopify.com/windrose-global-ecommerce if you wanna see how it works you can check it out here: http://www.youngandreckless.com/ and click the little world icon. I've been really happy with the service and the integration is pretty seamless. 

Hope that helps! 

0 Likes
Shopify Partner
19 0 2

Very interesting topic, we plan to do the same. But with all the Shopify Apps, I wonder how it works out with SEO. Does google list the product side for each language??

Cheers Tobi - Playmakers Football - http://www.playmakers-football.de
0 Likes
Shopify Partner
100 0 8

Hi Tobi,

Johannes from langify here.

There are indeed some restrictions when it comes to multilingual and SEO when using apps such as langify:

1. The sitemap.xml cannot be translated as it is generated by shopify automatically and there is no way to get around this.

2. URLs cannot be translated when using a single store + a translation app. That is, http://my-awesome-shop/products/my-awesome-product will always be the same no matter what language your customer is browsing your store.

When using multiple stores (one per language) you could at least translate the product name (the /products part, however, will always show up as /products)

All that said, langify injects the translations on the server-side and also allows you to "host" your languages at different (sub)domains.

Both (server-side translations and separation by domains) are required if multilingual SEO is important to you.

langify also allows you to translate your meta tags (title + description) and supports hreflang tags as suggested by Google.

Here is a customer that is using langify + multiple domains so that you can see how it looks like (SEO is pretty good for all languages):

http://rusteprotection.com

http://fi.rusteprotection.com

http://de.rusteprotection.com

Some final thoughts:

- Translations should be as complete as possible

- Prefer professional human translations over poor machine translations. Actually langify does not support machine translations at all whereas some other apps do.

- Separate your languages by domains and link to them wherever possible (language specific blog posts, social networks, etc.).

Hope this helps a bit :)

1 Like
Shopify Partner
19 0 2

Hey Johannes

Thanks a lot for your response, it's a great write up. Especially to know that transpations are injected server-side helps a lot.

I check http://rusteprotection.com, this looks good, I only wonder why the cart is empty when I switch language. Shouldn't this matter?

Anyway, I"ll give it a try! Cheers Tobi

 

Cheers Tobi - Playmakers Football - http://www.playmakers-football.de
0 Likes
Shopify Partner
100 0 8

Hi Tobi,

Great! Actually shopify is storing/managing the cart on a per dmain basis. So it's one cart per domain. Unfortunately this is something I cannot workaround.

If you have any questions feel free to reach out to me via support@langify-app.com.

Best Regards,

Johannes

0 Likes
Excursionist
107 0 4

Take a look at my site and see if you think the translation is good

It was free and took me less than 5 minutes.

 

If anyone is interested I can post how I did it. 

0 Likes