Skip to content

Auto-Tagging

Auto-tagging adds invisible markers to your translatable elements so the editor overlay can identify which key belongs to which text. When you click a tagged element, the overlay knows exactly which translation key to edit.

Each framework adapter can provide a getKeyFromElement(element) method that inspects a DOM element and returns its translation key. For frameworks where this isn’t possible (or convenient), you tag elements explicitly:

FrameworkTagging Method
ReactuseLocaliveTag('key') hook — spreads props onto the element
Vuev-localive-tag="'key'" directive
Angular[attr.data-i18n-key]="'key'" attribute binding
Sveltedata-i18n-key="key" attribute
const tag = useLocaliveTag('nav.home');
return <a {...tag}>{t('nav.home')}</a>;

This renders as:

<a data-i18n-key="nav.home">Home</a>

The LiveEditorOverlay reads data-i18n-key and highlights matching elements when the editor is active.