Zum Inhalt springen

glot für Drupal

CMS · Connector

glot verbindet sich direkt mit Drupal: Es liest Ihre Inhalte, übersetzt sie mit Ihrem Glossar und Ihren Prüfungen und schreibt die Übersetzungen in die Sprachen von Drupal zurück.

Die Schritte der Plattform sind auf Englisch, mit den Menünamen der Oberfläche von Drupal.

Drupal verbinden

  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.
Vollständige Connector-Dokumentation

Alternative: das universelle Tag

Um im Browser zu übersetzen, was die Drupal-Integration nicht abdeckt, fügen Sie stattdessen das universelle Tag hinzu.

  1. Erstellen Sie in glot ein Projekt und fügen Sie Ihre Sprachen hinzu.
  2. Öffnen Sie glot Edge → Website-Tag und geben Sie die Adresse Ihrer Website ein: glot übersetzt sie und zeigt Ihnen eine Vorschau. Ist das Tag eingefügt, prüfen Sie dort die Installation und schalten Sie das Tag ein.
  3. Kopieren Sie Ihr Tag aus diesem Tab: Es enthält bereits Ihr Projekt und seinen öffentlichen Schlüssel (data-key). Das Tag unten zeigt seine Form.
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.
Anleitung zum Website-Tag

Erforderliche Tarife

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.

Was jeder glot-Tarif enthält, sehen Sie unter Preise. glot Edge (übersetzte URLs) ist Teil des Growth-Tarifs, mit einer begrenzten Testphase in Pro.

Übersetzte URLs für Suchmaschinen

Für übersetzte Seiten, die Suchmaschinen ohne JavaScript indexieren, setzen Sie glot Edge auf eine Subdomain Ihrer Domain (es.example.com), mit zwei DNS-Einträgen:

DNS-Einträge (das TXT-Token steht in glot Edge → Einrichtung)
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.

So funktioniert glot Edge

Fragen

Ist glot ein Partner von Drupal?
Nein. glot ist unabhängig, weder mit Drupal verbunden noch von Drupal empfohlen. Diese Anleitung nutzt nur Standardfunktionen von Drupal.
Ändert glot meine Inhalte in Drupal?
Ihre Ausgangsinhalte bleiben unverändert. glot schreibt die Übersetzungen in die Sprachfelder von Drupal, wo Sie sie vor dem Veröffentlichen prüfen können.
Indexieren Suchmaschinen meine Übersetzungen?
Mit dem Tag allein kaum: Es übersetzt im Browser, Suchmaschinen indexieren also vor allem Ihre Ausgangssprache. Übersetzte Seiten mit eigenen URLs brauchen glot Edge oder eine Plattform, die jede Sprache unter einer eigenen URL veröffentlicht.
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.

Offizielle Dokumentation von Drupal

Übersetzen Sie Ihre Drupal-Website

Erstellen Sie ein Projekt, wählen Sie Ihre Sprachen und folgen Sie den Schritten oben.

Drupal ist eine Marke ihres Inhabers. glot ist nicht mit Drupal verbunden.