Skip to content
Javan Makhmali edited this page Oct 17, 2018 · 4 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"