I’m struggling with the following scenario:
-
I have one theme, using GIT integration
-
I have multiple plus stores for the same brand, for each locale/language
-
I can translate all repo files using the normal locale/**.json and translation string logic
-
Brand managers can create content pages for each store using the theme customiser and sections, which in their turn create page.xxx.json files in the live theme, which in my turn i pull using the theme:pull feature so they are added to the repo
-
The pages will always be locale-unique, meaning we would have something like page.landingpage-uk.json, page.landingpage-it.json, … which means they can just sit safely next to each other in the templates folder
So far so good. But, here the problem comes in: what about the uniquely-named shared default files like index.json, product.json, … If these files are being edited using the theme customiser, they are overwritten with the language/locale from the store where it was just edited in. That means there would need to be a index-de.json, index-uk.json, index-it.json, .. which is of course not allowed nor possible as Shopify only expects index.json.
I thought about using the ‘context’ feature (described here: https://help.shopify.com/en/manual/online-store/themes/customizing-themes/store-contextualization) but after a talk with Shopify Plus Support, it appears these context specific versions of a page will only show based on a geolocation app (meaning, index.context.[markethandle].json would only be served if the visitor is located in France). So that’s not an option.
In short: how do i serve locale-specific shopify-unique JSON page templates like index.json across multiple stores using the same connected GIT theme?