Layer 1 of 6
Core
- @diglot/core
The segment model, hashing, validation, diffs and records. It has no parser dependency and imports no Node built-ins, so it runs in browsers and edge runtimes too.
diglot splits markdown into hashed segments and keeps every translation in git. Machines write the first draft, and the people who review it have the last word.
docs/intro.md
Nuxt is powered by [Nitro](https://nitro.build), and `useFetch` is built in.
skeleton · 87ecf1244d975205
Nuxt is powered by {0}Nitro{/0}, and {1} is built in.
fr/segments/87/87ecf1244d975205.json
Nuxt est propulsé par {0}Nitro{/0}, et {1} est intégré.
The translator only ever sees the middle form. The link and the code come back from the source.
Layer 6 of 6
An experimental plugin shows a diglot store in x18n, so reviewers can edit and approve translations in a browser instead of editing JSON.
Why diglot
Every heading, paragraph, list item, table cell and prose comment has its own identity, so a one-line edit touches one translation.
One small JSON record per locale and hash. Reviews, edits and rollbacks are ordinary commits and pull requests.
Identical text shares one hash, so it is translated once across files, sources and branches.
URLs, inline code, components and HTML are placeholders. Changing them never triggers a new translation, and a translation cannot alter them.
Quick start
sources:
- name: nuxt-main
repo: nuxt/nuxt
ref: main
path: ../nuxt
dir: docs
pnpm dlx @diglot/cli extract # write .diglot/manifest/<source>.json
pnpm dlx @diglot/cli status # coverage per locale and source
pnpm dlx @diglot/cli validate # check every record
pnpm dlx @diglot/cli build # write dist/<locale>.json