Reputation: 108
Is it possible to change the shopify Language in client side.
I have 3 Language locale file. I want to translate based on client choice
is it possible to use below code to change my language.
{% assign shop.locale = 'fr' %}
thanks in advance.
Upvotes: 0
Views: 1275
Reputation: 1016
Seems there is no good enough solution, I have built this my own client-rendered solution. My solution provide:
single domain
not reload page on change language
unlimited language
unlimited page view
FREE
https://gist.github.com/Asoul/e5ee0a0f0ed17c93383ff47818b319c4
I open my source code above. I think this is some foundamatal infrastrcuture for an ec website, that's shameful to charge on this.
Hope these code can help some people.
But I think the perfect solution is that Shopify can offer a server-rendered method, not client rendered.
Upvotes: 1
Reputation: 3615
After doing some research, I realized that there was no "Plug and Play" solution available.
Creating one store per language would have been too expensive and requires you to somehow sync your stores.
A JavaScript solution does not supports SEO.
Shopify has a tool called langify using this we can do it but it has monthly recurring price I have added the link for your reference. Shopyify App store link
Upvotes: 0