Page in two languages of the same content but one has a query string attached to URL?

Page in two languages of the same content but one has a query string attached to URL?

iolo72
Shopify Partner
28 1 3

I have a registration app that creates a registration form page and the link to it is /apps/registration. So the English version URL is myshop.com/apps/registration. I created a French version but the French URL has a query string at the end to load the proper language form. The French URL is myshop.com/apps/registration?query_string=... (adding /fr to the URL also works: myshop.com/fr/apps/registration?query_string=...)

 

For this reason, switching the language will not load the proper registration page. Is there a way around this by adding a query string to the translated URL?

Reply 1 (1)

Transcy
Shopify Partner
285 19 87

Hello @iolo72 ,

 

Here's how you can achieve the solution:

  • Create a French version of the registration page using URL without the query string, like /fr/apps/registration
  • Go to Online Store -> Navigation
  • Create a new redirect with the following settings:
  • From: /apps/registration?query_string=...
    To: /fr/apps/registration
  • You can directly link to the new French URL without the query string. Shopify will handle the redirection based on the setup you've done.
<a href="/fr/apps/registration">
    Switch to French
</a>

 

Let us know if you can make it.

Transcy

Transcy - The #1 Translation and Currency Converter
- Was my answer helpful? Please hit Like or Mark it as solution!
- Get in touch with us: App Store | Blog