Language Consideration
The Language Consideration feature is best suited for store owners who have Shopify markets configured for multiple countries/regions and want to redirect visitors from the initial store (specific page) URL to the exact same page URL on their native store with the required Language code.
There are types of functionalities in the feature
Default
Locale from Redirect URL
Lets understand the Default option functionality in Relative Redirect:
In the Default functionality, there are certain cases in which the user will be redirected to the Destination store with language code as per the rule created in the app:
Let’s understand the above cases with the help of the below example stores:
We have created the switcher with 2 Store URLs with Language codes (locale) –
Initial Store (US Store with Language code) ‘en-us’ – www.american-store.com/
Destination Store (French Store with Language code) ‘en-fr’ – www.french-store.com/
In the Switcher rule, we have added the above URLs with the Language codes.
Case-1: If the language code is added in the rule, on priority it will update the language code on the destination store.
Case-1.1: If there is no language code ‘en-us’ in the Initial URL:
If a visitor from France land on the product in the US store ‘www.american-store.com/products/french-salt‘, on selecting the destination store in the switcher with the language code ‘en-fr’ ‘www.french-store.com/en-fr/products/french-salt‘ on the French store.
Case-1.2: If the language code ‘en-us’ is available in the Initial URL:
If a visitor from France lands on the product in the US store with language code ‘en-us’ ‘www.american-store.com/en-us/products/french-salt‘, now using the Default, the user will be redirected to the destination store with the update language code ‘en-fr’ ‘www.french-store.com/en-fr/products/french-salt‘ on the French store.
Case-2: If the language code is not available in the rule, then on priority it will forward the code of initial store to the destination store.
Case-2.1: If there is no language code ‘en-us’ in the Initial URL:
If a visitor from France land on the product in the US store ‘www.american-store.com/products/french-salt‘, the user will be redirected to the destination store ‘www.french-store.com/products/french-salt‘ on the French store.
Case-2.2: If the language code ‘en-us’ is available in the Initial URL:
If a visitor from France land on the product in the US store ‘www.american-store.com/en-us/products/french-salt‘, in this case the language code ‘en-us’ will be forwarded to the destination store ‘www.french-store.com/en-us/products/french-salt‘.
Note: If the language code is not available on the Destination store, it will show a ‘404’ error.
In the above case, if the language code ‘en-us’ or the product is not available in the French Store, it will show a ‘404’ error.
Now in the Locale from Redirect URL functionality, the language code will be considered as per the availability in the destination URL only:
In this feature, if you have created a rule with the language code ‘en-fr’ in the app, then the visitors from France landing on US store will redirect from ‘www.american-store.com/products/french-salt‘ URL to the destination URL ‘www.french-store.com/en-fr/products/french-salt‘ preserving the ‘en-fr’ Language code in the URL.
In case the language code ‘en-fr’ is not available in the rule, it will remove the initial language code i.e. ‘en-us’ from the URL and will redirect to ‘www.french-store.com/products/french-salt‘ URL.
Please note that in case the product/page is not available on the Destination store, it will show a ‘404’ error.
Last updated