Internationalization

Interface language

locale selects the language pack used for menus, tooltips, dialogs, and other translated UI text. locales registers language packs without selecting one. The setting is shared by the units in the Univer instance. Use LocaleType values, such as LocaleType.EN_US.

  • All products: UI: locale changes the language of menus, tooltips, dialogs, and plugin labels. It does not translate user content or rename existing units.
  • Sheets: cell formats and formulas: Number and date rendering in a cell resolves through the number-format locale override first, then the workbook snapshot locale, and finally the instance locale. region does not replace any of them. Formula behavior such as DOLLAR and currency formats in financial results still uses locale, and CJK input normalization also uses locale.
  • Docs: statistics: locale determines word segmentation and counting.

Changing language at runtime

Load the language packs of every installed plugin and preset before switching languages. loadLocales() merges translations without switching languages; setLocale() selects a language but downloads nothing. A missing translation key is displayed as the key itself. The example below loads the shared UI pack; the target-language packs of other installed plugins must be merged in the same call.

TypeScript
import { LocaleType, mergeLocales } from '@univerjs/core'import UIEnUS from '@univerjs/ui/locale/en-US'univerAPI.loadLocales(LocaleType.EN_US, mergeLocales(UIEnUS))univerAPI.setLocale(LocaleType.EN_US)console.log(univerAPI.getCurrentLocale()) // enUS

Merging language packs

mergeLocales combines the language packs of several plugins or presets into one complete language pack object:

TypeScript
import { mergeLocales } from '@univerjs/core'// You can pass multiple language pack objects to mergeconst locales = mergeLocales(  plugin1Locales,  plugin2Locales,  presetLocales,)// You can also pass an array of language pack objectsconst locales = mergeLocales([  plugin1Locales,  plugin2Locales,  presetLocales,])

Custom language packs

Univer also supports custom language packs. Assemble a language pack object as needed and pass it to the Univer instance. The preset language packs are usually stored in <rootDir>/packages/<PLUGIN_NAME>/locale.

TypeScript
import { LocaleType, Univer } from '@univerjs/core'const univer = new Univer({  locale: LocaleType.JA_JP,  locales: {    [LocaleType.JA_JP]: {      ui: {        shortcut: {          undo: '元に戻す',          redo: 'やり直す',        },      },    },  },})

Contributing translations

Univer currently provides the following built-in language packs:

  • zh-CN: Simplified Chinese
  • en-US: English
  • zh-TW: Traditional Chinese
  • zh-HK: Traditional Chinese (Hong Kong)
  • ru-RU: Russian
  • vi-VN: Vietnamese
  • fa-IR: Persian
  • fr-FR: French
  • ja-JP: Japanese
  • ko-KR: Korean
  • es-ES: Spanish
  • ca-ES: Catalan
  • sk-SK: Slovakian
  • ar-SA: Arabic
  • de-DE: German
  • id-ID: Indonesian
  • it-IT: Italian
  • pl-PL: Polish
  • pt-BR: Portuguese (Brazilian)

Univer is open source, and we welcome developers from all over the world to add or improve locales.

Regional settings

region selects the regional conventions that region-aware features follow. The setting is shared by the units in the Univer instance.

Both settings take a LocaleType value. For example, LocaleType.EN_US is enUS, while en-US is the language-pack file name and the BCP 47 tag. Do not pass a country code such as US or SG as region. A region does not need its own language pack when the UI uses a different locale.

Without an explicit region, it follows locale, including later setLocale() calls. Setting region during initialization, or calling setRegion(), stops this automatic following. After that, language changes leave the region unchanged. No public API restores the following behavior, so update both values when they should change together.

To keep the UI language while using German regional conventions, add region: LocaleType.DE_DE next to locale in createUniver() or new Univer().

TypeScript
import { LocaleType } from '@univerjs/core'univerAPI.setRegion(LocaleType.DE_DE)univerAPI.setLocale(LocaleType.EN_US)console.log(univerAPI.getCurrentRegion()) // deDE

Here the UI is in English while regional formatting remains German. getCurrentLocale() and getCurrentRegion() return the identifiers in effect. To change both at once, call both setters with the same LocaleType value.

  • Sheets: currency controls: region controls the currency icon in the toolbar, the currency and accounting choices and their previews, and the pattern that the currency command applies. Changing it does not rewrite existing cell formats or convert monetary values.
  • Docs: statistics: region formats the numbers shown in the statistics dialog and the status bar, including grouping separators. Changing region does not change the counting rules.
  • Thread comments, when enabled: region controls the date and time format that comments display, with 24-hour time and Latin digits. locale controls the comment UI text. Neither changes stored timestamps, and region is not a timezone setting.
  • Boards, Slides, Bases, PDFs: locale controls the translated UI. region is available to shared features that consume it, such as thread comments once integrated, but it does not reformat board or slide text, Base fields, or PDF content.

Right-to-left layout

Caution

RTL currently covers the UI layer only. The rendering layer does not support it yet.

Caution

Not every plugin includes a language pack. The documentation for each feature states whether it does.

TypeScript
univerAPI.setDirection('rtl')

How is this guide?

© 2026 DreamNum Co., Ltd.