Skip to content

glot for Drupal

CMS · Connector

glot connects to Drupal directly: it reads your content, translates it with your glossary and checks, and writes the translations back into Drupal's own languages.

Connect Drupal

  1. In glot, open your project → Integrations → Drupal and fill in the connection form (the credentials and permissions it asks for are listed in the docs).
  2. Click Test connection, then Sync now: glot pulls your content, translates it with your glossary and validation rules, and writes each language back.
  3. Later changes sync automatically through the webhook URL shown on the card, or on the next scheduled sync.
Full connector documentation

Alternative: the universal tag

To translate in the browser what the Drupal integration doesn't cover, add the universal tag instead.

  1. In glot, create a project and add your languages.
  2. Open glot Edge → Website tag and enter your site's address: glot translates it and shows you a preview. Once the tag is pasted, check the installation there and turn the tag on.
  3. Copy your tag from that tab: it already carries your project and its public key (data-key). The tag below shows its shape.
glot tag
<script src="https://app.glotlang.com/widget/glot.js" data-project="your-project" data-key="pk_…" async></script>
  1. In your custom theme (or a sub-theme), open THEME.libraries.yml.
  2. Add a library with header: true and the glot script URL under js: with type: external, and its attributes (async: true, data-glot-app: true, data-project, data-server, data-source, data-locales, data-key).
  3. In THEME.info.yml, list the library under libraries: (for example - THEME/glot) so it loads on every page.
  4. Clear the Drupal cache and check the page source for the glot script.
Website tag guide

Plan requirements

Drupal is self-hosted open source; no plan limits. You need access to the theme files. Core has no admin field for site-wide head code.

On the glot side, see Pricing for what each plan includes. glot Edge (translated URLs) is part of the Growth plan, with a limited trial on Pro.

Translated URLs for search engines

For translated pages that search engines index without running JavaScript, put glot Edge on a subdomain of your domain (es.example.com) with two DNS records:

DNS records (the TXT token is shown in glot Edge → Setup)
es.example.com.        CNAME  edge.glotlang.com.
_glot.es.example.com.  TXT    "<token shown in the dashboard>"

You control your own domain and DNS, so add the CNAME and TXT at your DNS provider or registrar.

How glot Edge works

Questions

Is glot a Drupal partner?
No. glot is independent, and not affiliated with or endorsed by Drupal. This guide only uses Drupal's standard features.
Does glot change my Drupal content?
Your source content stays as it is. glot writes the translations into Drupal's own language fields, where you can review them before you publish.
Will search engines index my translations?
Not from the tag alone: it translates in the browser, so search engines mostly index your source language. Translated pages with their own URLs need glot Edge or a platform that publishes each language on its own URL.
Can I just paste the tag into html.html.twig?
It can work, but Drupal's documented way is a library in *.libraries.yml attached from *.info.yml. Edit a custom or sub-theme, not a contributed theme, or updates will overwrite it.
How do I add data- attributes in libraries.yml?
Under the script's attributes: key. A value of true prints the attribute with no value, which suits data-glot-app.

Official Drupal documentation

Translate your Drupal site

Create a project, choose your languages, and follow the steps above.

Drupal is a trademark of its owner. glot is not affiliated with Drupal.