App for language flags and href lang

Klemens
Tourist
3 0 1

Hey guys,

I tried the Google search for several hours, but didn't find anything that would be helpful to me. My problem: I've got two separate Shopify shops. 1 for German, 1 for English. Now I would like to "link" them. I can't use the "normal" href lang code in the liquid, because my handles are different. I am now looking for an app or some code that would do the following:


- link the German and the English pages. If a customer comes to the wrong language he should be able to click on the flag and be redirected to the correct page. For example, that's the German page: https://www.viita-watches.com/pages/warum-viita and this should be linked to the correct English page: https://en.viita-watches.com/pages/why-viita with the right href lang tag

 

Is there any app or code that could help me?

Best, Klemens

Reply 1 (1)

KieranR
Shopify Partner
333 27 115

Don't know of any apps that do what you're asking sorry. But you could try something like this: 

  • Use Shopify metafields to create and store a set of "hreflang" alt pages as a field attached to each product/collection/page/blog/article.
  • Custom code the hreflang logic in theme liquid/HTML to pull in these metafields appropriately.
  • (optional) use a spreadsheet to pre-plan out all the mappings, then bulk import the metafields with something like Exceljet if you have lots of pages.

Other approaches involve having one store instance and using the newer language/multi-domain features of Shopify on a single installation + language app. More info here: 

 

 

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.