Drupal - Integration / Setup
Translate your Drupal website
Translate all your content and make your Drupal website multilingual within minutes.
- Create an account on Weglot
- Create your project
- Add your new languages
- Create your subdomains
- Add your language switcher
1) Create an account on Weglot
First, sign up for a Weglot account.
We'll send you an email to validate your address. You'll then be able to access your Weglot account.
2) Create your project
After validating your email, you’ll be taken to your Weglot Dashboard. Name your project and select ‘Drupal’ as your website technology.
3) Add your new languages
Add your website's URL, the language your website is in (without Weglot), and the languages you wish to translate your Drupal site into.
You can choose the type or URL you wish to use for the integration. Both options are good for your SEO. The only differences are the URL structure. For example, for the French version of your website, the URLs would look like:
4) Create your subdomains
In this step, you’ll create your SEO-friendly subdomains, for example, fr.mywebsite.com (if you want to translate your website into French).
You will need access to your domain name provider account. The following video demonstrates the process with Google Domains – check our videos for other domain name providers or contact us at email@example.com if you need any help.
In the section where you add your CNAME entries, ‘name’ will be the language code given to you in the Weglot setup process and the ‘data’ section will be the value given by Weglot.
Here, the name is fr, and the value is 47cbfc60.translate-sp.weglot.io.
⚠️ The value is an example and will be different in your case.
After you’ve saved this entry in your domain name provider, go back to your Weglot account and click on the ‘Check DNS’ button. This should turn green but may take up to 10 minutes to do so.
5) Add your language switcher
Copy the piece of code from your Weglot setup process.
You can use the module Asset Injector to add the Weglot snippet to your Drupal website's header. Create a new script and paste the snippet there. Make sure to check the "Load the script into the header" option.
Contact us at firstname.lastname@example.org if you have any problems with this step.
Your multilingual Drupal website is live!
Head to your Drupal website to see your multilingual website. To edit your translations, create custom translation rules, and much more – go to your Weglot Dashboard.