# i18n

It is possible to add internationalization for plugins.

# Translate text

To add i18n files, use the i18n plugin property. To translate a text, use $t("pluginName.textKey").


const EN = {
  "textKey": "This text is in english.",

const FR = {
  "textKey": "Ce texte est en français",

const myPlugin = {
  name: "myPlugin",
  i18n: {
    en: EN,
    fr: FR,
  component: {
    template: "<div>{{ $t('myPlugin.textKey') }}</div>"

# Set the viewer locale

To set the viewer local, use the locale property of the makeBIMDataViewer configuration object:

const viewer = makeBIMDataViewer({
  locale: "en",

The available locales are:

  • French: fr (default)
  • English: en
  • Spanish: es
  • German: de
  • Italian: it