General Integration - Integration / Setup

Translate your website with Weglot

This general setup guide describes how to translate your website with Weglot.

Introduction

You can integrate Weglot into your website in 3 different ways:

  • JavaScript integration
  • Subdomains integration
  • Subdirectories integration

If you're still in the testing, developing, or staging phase, use our JavaScript integration.

Subdomains/Subdirectories integrations

This integration is better for SEO since it hosts your translated pages on subdomains (like fr.mysite.com) or subdirectories (like www.mysite.com/fr), and you have a dedicated URL for each language. That means your translated pages inherit the authority you've built on your original website.

It can take 15 minutes to install and requires you to add DNS record entries (feel free to contact us if you need some help).

IMPORTANT

To use one of these integrations, you will need to have your own domain name. If you haven’t bought or connected your DNS to your website already, don’t choose this integration yet. You will need to create subdomains or subdirectories, so you need to access the DNS records area of your domain name.

Step 1: Create an account on Weglot (~ 1 minute)

You'll find and manage all your translations on this account. Simply create a Weglot account here.

Step 2: Select your website technology / CMS

Select your website technology. If it isn't available, select “Other”.

Step 3: Choose languages

Then, you reach the "Configure your languages" page where you need to specify the original language of your website (the language in which your website was initially created) and the languages you want to translate it into.

In the example below:

  • the original language is: French
  • the translated language is: English

Click “Next” to go to the next step.

Step 4: Add your website details

You will land on a new page where you need to enter your website's URL (you must enter your own domain name, like mywebsite.com), not a URL generated by your CMS.

Then, click on the "Next" button.

Step 5: Enter your new DNS entries

In this step, you will add new DNS entries to your DNS record.

If you chose the subdomain-based integration, you'll need to enter a CNAME entry for each translated language (in this example, there's only one CNAME entry needed for the "en" subdomain).

If you chose the subdirectory-based integration, you'll need to enter/edit two DNS entries in your domain name registrar. The value of each entry depends on your website.

If you bought your domain name via your CMS platform, then you should be able to add new entries (CNAME / Aliases) to your DNS records directly inside your CMS admin.

Otherwise, if you bought your domain on an external provider (like GoDaddy, 1&1, Gandhi, etc.), you can add the new entries (CNAME / Aliases) directly to this external provider account. If you are not sure how to do it or where it is, don't hesitate to reach out to us at support@weglot.com.

Step 6: Validate the DNS entries

After adding and saving your entries, go back to your Weglot account tab. Click “Check DNS”. If everything goes well, you should see a green check icon instead of the red cross. It means the DNS entries were successfully configured. Then, click on “Next”.

Step 7: Copy/Paste the JavaScript snippet

It can take several minutes to finish setting up your subdomains or subdirectories. In the meantime, simply copy the JavaScript code snippet provided to you.

If you use a CMS, find the option to add a JavaScript snippet in the head section of your HTML pages (usually in the CMS settings).

Otherwise, simply paste the JavaScript snippet on all your website HTML pages just before the closing head tag.

Step 8: It’s done!

Go to your website, and you should see the language button at the bottom right. It might take a few minutes to make sure the subdomains are properly set up and for the language switcher to appear (thanks to the JavaScript snippet). 

Try changing the language when the language switcher appears, you should see your translated website!

Step 9: Start editing your translations

You can now review and manually edit your translations in your Weglot account.

Log in to your Weglot Dashboard and then go to Projects > Your project to find all your translations and edit them.


Have any feedback on this article? Let us know!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us