Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Translate contextual json templates (index, product...)

Translate contextual json templates (index, product...)

Kangei-Florian
Tourist
7 0 0

Hi,

due to a bug - translations disappear during push (see: https://github.com/Shopify/cli/issues/3165) - how can I translate contextual templates? I am currently trying to map everything in git, but I am missing the translations of the individual markets. All texts contained therein are assigned to the default language (which seems logical).

But how can I control the different languages in different markets?

Or do I have to go via attributes and locales?

How does the app (Translate & Adapt) store the Market - Local information?

 

E.g. index context:

Bildschirmfoto 2024-01-19 um 12.24.51.png

 

Thanks and greetings

Florian 

Replies 2 (2)

richbrown_staff
Shopify Staff
652 96 166

Hi @Kangei-Florian , Shopify themes and Git do not currently play well with translations and we'd suggest not using this for the time being and instead translating within the Translate & Adapt app. Assuming you're referring to adapting your theme for a specific market in the online store editor, new JSON files get made in the store's default language. To translate those, as they are market specific they'll be found under 'Adapting (language) for (the market you changed in online store editor)' or you can click the three dots in the section name and Localize to take you there:

richbrown_staff_1-1705672477919.png

 

Go to the last page and you'll see an 'Only in (Market name)' section where you can add translations manually. Note that you need to do this for each non-default language you have on your store.

 

Hope that makes sense. If this isn't your use case let me know.

 

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

Samh1
Shopify Partner
3 0 0

Translating B2B contextual template content of Themes is still causing problems. B2B contextual content is treated as a "Market context", and thus does not appear to Translate & Adapt app to be localized. I'm referring to the contextual templates that are completely separated from the default content (e.g. by creating new section to only B2B side, the theme editor asks if you want to separate, and you click yes).

So basically every B2B store that has multiple languages and creates separate content to themes for B2B customers has problems, as the B2B contextual content is not translatable from anywhere. It's only visible in store's default language.

 

It is possible to create the content in Default content and hide it (the hidden content is then translatable), and then put it visible at B2B side, but if you make changes to Default side (even small ones), it will cause the B2B side go haywards and you need to set up the visibility of all sections again. Such fun for index page where you might have 20 different sections etc..

 

If anyone has a solution how could we translate contextual B2B content, please let me know! So far I have found no solutions for this. If not, I'm hoping for a quick fix from Shopify. This B2B side in Themes is a Shopify Plus feature, just saying...