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
- 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).
- Click Test connection, then Sync now: glot pulls your content, translates it with your glossary and validation rules, and writes each language back.
- Later changes sync automatically through the webhook URL shown on the card, or on the next scheduled sync.
Alternative: the universal tag
To translate in the browser what the Drupal integration doesn't cover, add the universal tag instead.
- In glot, create a project and add your languages.
- 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.
- Copy your tag from that tab: it already carries your project and its public key (data-key). The tag below shows its shape.
<script src="https://app.glotlang.com/widget/glot.js" data-project="your-project" data-key="pk_…" async></script>- In your custom theme (or a sub-theme), open THEME.libraries.yml.
- 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).
- In THEME.info.yml, list the library under libraries: (for example - THEME/glot) so it loads on every page.
- Clear the Drupal cache and check the page source for the glot script.
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:
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 worksQuestions
- 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.
More integrations: CMS
Drupal is a trademark of its owner. glot is not affiliated with Drupal.