Languages
Every text of the viewer – toolbar, messages, errors and dialogs – is translated. Pick a language to preview it.
| Code | Language | Direction | Sample |
|---|
Add a language
import { registerLocale } from "@meshesha/officetohtml";
registerLocale("it", {
open: "Apri file",
download: "Scarica",
print: "Stampa",
emptyTitle: "Nessun documento aperto",
// … see the Messages type for all keys; missing keys fall back to English
});
new OfficeViewer("#viewer", { locale: "it" });Contributions of new translations are welcome – add them to src/core/i18n.ts and open a pull request.