Skip to content
Doeke Zanstra edited this page Jul 25, 2024 · 5 revisions

Configuration

Update the Trix.config.lang object e.g. according to the language set by <html lang="xx"> with something like this:

import * as Trix from "trix"
import translations from "./my-trix-translations"

const translation = translations[document.documentElement.lang]
if (translation) {
  Trix.config.lang = translation
}

Translations

The reference language is English.

German (de)

Trix.config.lang = 
  bold: "Fett" 
  bullets: "Liste" 
  byte:  "Byte" 
  bytes: "Bytes" 
  captionPlaceholder: "Bildunterschrift hinzufügen…" 
  code: "Code" 
  heading1: "Titel" 
  indent: "Einzug vergrössern" 
  italic: "Kursiv" 
  link: "Link" 
  numbers: "Aufzählung" 
  outdent: "Einzug verkleinern" 
  quote: "Zitat" 
  redo: "Wiederherstellen" 
  remove: "Entfernen" 
  strike: "Durchgestrichen" 
  undo: "Rückgängig" 
  unlink: "Link entfernen" 
  url: "URL" 
  urlPlaceholder: "URL eingeben…" 
  GB: "GB" 
  KB: "KB" 
  MB: "MB" 
  PB: "PB" 
  TB: "TB" 

French (fr)

Trix.config.lang = 
  bold: "Gras" 
  bullets: "Liste" 
  byte:  "Octet" 
  bytes: "Octets" 
  captionPlaceholder: "Ajouter légende…" 
  code: "Code" 
  heading1: "Titre" 
  indent: "Agrandir retrait" 
  italic: "Cursif" 
  link: "Lien" 
  numbers: "Énumération" 
  outdent: "Réduire retrait" 
  quote: "Citation" 
  redo: "Refaire" 
  remove: "Supprimer" 
  strike: "Biffé" 
  undo: "Annuler" 
  unlink: "Supprimer lien" 
  url: "URL" 
  urlPlaceholder: "Saisir URL…" 
  GB: "Go" 
  KB: "Ko" 
  MB: "Mo" 
  PB: "Po" 
  TB: "To" 

Dutch (nl)

Trix.config.lang = 
  attachFiles: "Voeg bestanden toe"
  bold: "Vet"
  bullets: "Opsommingstekens"
  byte: "Byte"
  bytes: "Bytes"
  captionPlaceholder: "Voeg bijschrift toe…"
  code: "Code"
  heading1: "Kop"
  indent: "Inspringing vergroten"
  italic: "Cursief"
  link: "Link"
  numbers: "Nummering"
  outdent: "Inspringing verkleinen"
  quote: "Citaat"
  redo: "Herhalen"
  remove: "Verwijderen"
  strike: "Doorhalen"
  undo: "Ongedaan maken"
  unlink: "Link verwijderen"
  url: "URL"
  urlPlaceholder: "Type een URL…"
  KB: "kB"
  MB: "MB"
  GB: "GB"
  TB: "TB"
  PB: "PB"
Clone this wiki locally