Ir al contenido

glot para Drupal

CMS · Conector

glot se conecta directamente a Drupal: lee tu contenido, lo traduce con tu glosario y tus comprobaciones, y escribe las traducciones en los idiomas de Drupal.

Los pasos de la plataforma están en inglés, con los nombres de menú de la interfaz de Drupal.

Conectar 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.
Documentación completa del conector

Alternativa: la etiqueta universal

Para traducir en el navegador lo que la integración de Drupal no cubre, añade la etiqueta universal.

  1. En glot, crea un proyecto y añade tus idiomas.
  2. Abre glot Edge → Etiqueta web y escribe la dirección de tu sitio: glot lo traduce y te muestra una vista previa. Una vez pegada la etiqueta, comprueba allí la instalación y actívala.
  3. Copia tu etiqueta desde esa pestaña: ya incluye tu proyecto y su clave pública (data-key). La etiqueta de abajo muestra su forma.
Etiqueta de glot
<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.
Guía de la etiqueta web

Planes necesarios

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.

En glot, consulta los precios para ver qué incluye cada plan. glot Edge (URL traducidas) forma parte del plan Growth, con una prueba limitada en Pro.

URL traducidas para los buscadores

Para páginas traducidas que los buscadores indexen sin ejecutar JavaScript, coloca glot Edge en un subdominio de tu dominio (es.example.com) con dos registros DNS:

Registros DNS (el token TXT aparece en glot Edge → Configuración inicial)
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.

Cómo funciona glot Edge

Preguntas

¿glot es socio de Drupal?
No. glot es independiente y no está afiliado a Drupal ni respaldado por Drupal. Esta guía solo usa las funciones estándar de Drupal.
¿glot modifica mi contenido de Drupal?
Tu contenido de origen queda igual. glot escribe las traducciones en los campos de idioma de Drupal, donde puedes revisarlas antes de publicar.
¿Los buscadores indexarán mis traducciones?
No solo con la etiqueta: traduce en el navegador, así que los buscadores indexan sobre todo tu idioma de origen. Las páginas traducidas con URL propias requieren glot Edge o una plataforma que publique cada idioma en su propia 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.

Documentación oficial de Drupal

Traduce tu sitio de Drupal

Crea un proyecto, elige tus idiomas y sigue los pasos anteriores.

Drupal es una marca de su propietario. glot no está afiliado a Drupal.