How to use Weglot with Shopify Markets?
In this article, you'll learn what Shopify Markets is and how to ensure compatibility with Weglot.
What is Shopify Markets?
Is Weglot compatible with Shopify Markets?
With the subdirectories integration, translated pages are displayed using subdirectory URLs. For instance, English-translated pages would appear with a URL such as https://website.com/en/
.
The compatibility with Shopify Markets allows URLs to include both Market and language information. These elements are independent of each other and are separated by a dash within the same subdirectory.
Here's how the URL structure would look:
https://website.com/[Weglot-language]-[Shopify-Market]
Therefore, the URLs could be:
https://website.com/en-en
(for an English-translated page in the English market)
https://website.com/en-fr
(for an English-translated page in the French market)
How to integrate Weglot with Shopify Markets?
Prerequisites
- In Shopify, choose to use subfolder-type URLs for your Markets. Subfolder-type URLs are URLs like "mysite.com/de" for the German version of your market.
- Delete additional languages that you can have on your Shopify admin. To achieve that, you can go to your Shopify Admin > Settings (in the bottom left) > Languages. If you have registered languages, unpublish them and delete them. They are something different from Weglot and can create some conflicts.
- Another essential prerequisite is that you must manage your own domain name and not use a Shopify subdomain (with the URL ending with
.myshopify.com
). - You must have access to your DNS provider, where you can add and modify DNS records. This is generally where you rent your domain name (it can be Shopify itself or another provider such as GoDaddy, Google Domains, etc.).
Setup
Now that you're ready, activate the subdirectory integration in your Weglot project.
- Go to your Weglot Dashboard > Settings > Setup and click on the "Subdomains / Subdirectories" toggle button.
- Next, provide your domain name URL, and in the URL Type section, select "Subdirectories" in the dropdown menu.
- Click on "Next", and you will access the step called "Your DNS settings."
Your DNS settings
- First, you will have to add the following DNS record in your DNS provider:
host (or name) > cloudflare-verify
type > TXT
value > will be given to you during the process in Weglot
- Once you have added this new DNS record to your DNS provider, go back to your Weglot account and click on "Check DNS".
- You will then have to wait a few minutes so that the SSL certificate can be validated. Click on "Check DNS" to see if the certificate is validated.
- A new DNS entry will appear on your screen. This time, you'll need to modify the already existing DNS record in your registrar with the value given by Weglot.
If you wish to remove the subdirectories integration, you'll have to set this DNS record back to its prior value before deactivating the integration. So, you might want to take a screenshot of your current setting before modifying it. In any case, Weglot will warn you about this should you attempt to deactivate the integration.
If you don't have a subdomain in your URL (e.g., mysite.com):
The second DNS record will ask you to modify your A record.
The second DNS record will ask you to modify a CNAME record.
- Once you have modified the second DNS, save the changes and click on « Check DNS ».
Confirmation
If you are having any trouble during this process, do not hesitate to contact us at support@weglot.com.