Different content based on locale.

Solved
Highlighted
New Member
11 0 0

Currently i'm using iframe to show a video on my page with a static url to the video.

I've added a locale file for FR to support french in my shop, and here's my question.

 

I have 2 videos (one in english and one in french) where / how should I save the video url for the french version so when the user is from FR locale, they see the french video instead of the english video?

 

Is there a way to save variables inside locale file for me to retrieve from template files?

0 Likes
Highlighted
Shopify Partner
1026 215 470

@aceduck 

 

first, let me know how exactly you are managing multiple languages? Are you using any third party APP?

 

Thank you,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
0 Likes
Highlighted
New Member
11 0 0

I read on a community forum somewhere that adding a json file into locale folder is the way to do it? Is that not correct?

0 Likes
Highlighted
Shopify Partner
1026 215 470

This is an accepted solution.

@aceduck 

 

No, locale folder JSON file only used when you change your store default language from Admin > Settings > Store languages

means, if you want to run multiple languages on your store then you have to go with any third party APP like langify

 

Thank you,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
0 Likes
Highlighted
New Member
11 0 0

Thanks for the reply @Tejas_Nadpara 

After I use langify to support multiple languages, can I achieve what my original post was asking? Or is that not possible to do on Shopify?

0 Likes
Highlighted
Shopify Partner
1026 215 470

@aceduck 

 

Yes, you can display different video, text, image, etc.. based on the language but it would not automatically change language based on user location. You have to set all languages on your site header or somewhere else and the user has to change the language manually so content will display based on user selected language.

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
0 Likes
Highlighted
New Member
11 0 0

Do you know if there's a way to change the language based on location in any way?

Or I guess I could create different domains for each language, but then after that where would I write the code to detect location and redirect?

0 Likes
Highlighted
Shopify Partner
1026 215 470

@aceduck 

 

I checked Langify app description and found that it already gives that option. You can check read about the App features.

"Automatic language detection (customers will be redirected to their preferred language automatically)"

 

Thank you,

Tejas

Shopify Expert | Skype: tejas.nadpara
- Like and Mark as an Accepted Solution if reply helpful
- Feel free to contact me on support@hexaecommerce.com regarding any help
0 Likes
Highlighted
Explorer
191 3 12

Hi there!

 

You mentioned you have a video with versions of English and French. As you proposed in the follow-ups, you are right, you could create different domains or URLs for each language, and direct your visitors to corresponding URLs based on their locations. For example, exampleshop.com/en for English version, and exampleshop.com/fr for French version. 

 

There are GeoIP solutions could help you detect your visitors' locations and auto direct your visitors based on their locations, for example, Geo Targetly. If a visitor is in France, and he goes to exampleshop.com, it will auto direct him to exampleshop.com/fr. With its particular Geo Redirect tool, you can simply set up redirect rules within a few steps. No code is necessary. It will generate Javascript code accordingly for you to add to your website. Shopify platform is well supported. 

 

Feel free to reach out if you have any questions. Hope it helps!

0 Likes
Highlighted
New Member
6 0 0

Hi there,

 

I have the same initial problem. I have an online store with 2 locals : FR and ENG. I am using the Langify app for all translations. I have a video section on my website where it showcase an ENG video, and I would love that when the costumer changes local for the FR website, they see the FR video instead. Do you know how to do that? Do I need to code something or everything can be done with Langigy? If so, how do I do it?

 

Thanks a lot! :)

 

0 Likes