How to use Weglot with Shopify Markets?
This article explains what Shopify Markets is and how to make it work with Weglot.
What is Shopify Markets?
Is Weglot compatible with Shopify Markets?
https://website.com/en/
.
Shopify Markets URLs include both market and language information, which are independent of each other and separated by a dash.
Here's how the URL structure would look:
https://website.com/[Weglot-language]-[Shopify-Market]
So, the URLs could be:
https://website.com/fr-ca
(for a French-translated page for the Canadian market)
https://website.com/en-ca
(for an English-translated page for the Canadian market)
How to integrate Weglot with Shopify Markets?
If you haven't any Shopify Market set up, you can take a look at this article from Shopify.
This will help you to manage your Markets.
If you already have Markets set up, you can go to the following "Before you begin" section.
Before you begin:
In your Shopify admin, 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.
You can choose this type of URL by going to your Shopify admin > Settings > Markets.
Once here, click on the targeted market, then go to the "Market settings" and "Languages and domains".
The next step is to go to "Manage domains", choose "Use subfolders" and choose a domain suffix.
Shopify languages are different from Weglot and are using the Shopify Translation API. Using them can lead to some conflicts in the code and the translation.
To avoid any potential conflicts, please unpublish and delete additional languages, you can access them on your Shopify admin. Go to your Shopify Admin > Settings (in the bottom left) > Languages.
For this integration to work, you must manage your own domain name and not use a Shopify subdomain (with the URL ending with
.myshopify.com
).- You need access to your DNS provider to add or modify DNS records. This is usually where you manage your domain, like Shopify, GoDaddy, or Google Domains.
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. In the URL Type section, select "Subdirectories" in the dropdown menu.
- Click on "Next", and you'll be brought to "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 subdirectory setup process on Weglot
- After adding the new DNS record to your DNS provider, go back to your Weglot account and click on "Check DNS".
- Wait a few minutes for the SSL certificate to be validated. To check if this has been done, click on "Check DNS".
- A new DNS entry will appear on your screen. Modify the existing DNS record in your registrar with the value Weglot gave.
If you wish to remove the subdirectories integration, set this DNS record back to its previous value before deactivating the integration. We recommend taking a screenshot of your current settings before modifying them. 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
Once Weglot is working well on your Shopify Markets store, you can look at this article we made to optimize your use of Weglot on this store (translate dynamic content, checkout, and mail notifications).
If you encounter any issues during the process, do not hesitate to contact us at support@weglot.com.