Belayer

How the translation system works

This site is written in English, but you can read it in 25 languages — pick one from the selector in the top corner. Nothing here was pre-translated, and there are no per-language files to maintain. The whole thing runs live on Verbuise (opens in a new tab), one of the products Belayer builds. Here is exactly how it works.

One script tag

The entire feature is a single file. Drop it on a page and it does three things: adds the language picker, finds the text worth translating, and swaps it in place when you choose a language. No build step, no framework.

<script src="/assets/js/verbuise-translate.js" defer></script>

It finds the text itself

On load, the script walks the page for the elements that actually hold copy — headings, paragraphs, list items — and remembers each one’s original markup. It skips what shouldn’t move: code blocks and the picker itself.

Proper nouns take care of themselves. The runtime knows that Belayer, Verbuise, or a name like Jude Wilson shouldn’t be translated, and leaves them as they are — along with any HTML and placeholders in the source.

Translation happens at request time

When you pick a language, the script batches the collected strings and sends them to the Verbuise (opens in a new tab) runtime — one POST /v1/translate call per batch, with the target locale. Verbuise returns the adapted text and the script writes it straight back into the page. Right-to-left languages like Arabic and Hebrew also flip the layout direction.

It’s fast the second time

Every result is cached on both ends. Verbuise keeps a translation memory on its side, so a phrase it has already seen comes back in single-digit milliseconds and costs nothing. The script also caches results in your browser, so once you’ve viewed the site in a language, switching back to it is instant.

It never breaks the page

The runtime is built to degrade, not fail. If a request is slow or the network drops, the call resolves with the original English text instead of throwing — so the page always renders. A short retry picks up anything that finished late. The worst case is simply that you keep reading in English.

That’s the whole system: one script, live translation, cached on both ends, with the source text as a permanent safety net. It’s the same runtime Verbuise offers any product — this site just happens to be a small demo of it.

If you want this on your own site or product, it’s built with Verbuise (opens in a new tab) — the localization runtime behind this page, and one of the products built under Belayer.