A Monogatari game can tell its story in several languages, with a copy of the script for each, and its interface (menus, buttons, messages) comes translated in eighteen languages. This page describes the settings and calls involved. For a walk through translating a whole game, see Translating your game.

The settings and the preference

Name Kind Default What it does
MultiLanguage setting false The script holds one copy of the story per language.
LanguageSelectionScreen setting true With MultiLanguage on, ask new players to pick a language before anything else.
Language preference 'English' The language the game starts in, for the interface and, with MultiLanguage on, the story.

A game with one script can still show its interface in another language: set the Language preference in js/options.js to one of the languages Monogatari ships. Its players can’t change it, since the settings screen only offers a language selector in multi-language games.

A script in several languages

1. Turn on MultiLanguage

In js/options.js, set MultiLanguage to true:

  // Change to true for a MultiLanguage GameScreen.
  'MultiLanguage': true,

Reload now and the game reports an error, because the script isn’t in several languages yet. With the language selection screen on, it says Metadata for language “Start” could not be found.: the game took your labels for languages. With it off, it says Script Language “English” Was Not Found.

2. Put each language’s labels in its own object

A single-language script has its labels at the top:

monogatari.script({
  'Start': [
    'Hi, welcome to your first Visual Novel with Monogatari.',
    'jump Other',
  ],
  'Other': [
    'Another label!',
    'end',
  ],
});

A multi-language script has languages at the top, and each holds the same labels, translated:

monogatari.script({
  'English': {
    'Start': [
      'Hi, welcome to your first Visual Novel with Monogatari.',
      'jump Other',
    ],
    'Other': [
      'Another label!',
      'end',
    ],
  },
  'Español': {
    'Start': [
      'Hola, bienvenido a tu primera novela visual con Monogatari.',
      'jump Other',
    ],
    'Other': [
      '¡Otro label!',
      'end',
    ],
  },
});

Reload: the language selection screen appears.

3. Set the default language

The Language preference at the end of js/options.js is the language a player starts in when they don’t pick one, and the one a game without the selection screen uses:

  // Initial Language for Multilanguage Games or for the Default GUI Language.
  'Language': 'Español',

Language names

The name of each language in your script must be the name Monogatari’s interface translations use: 'Español', not 'Spanish' or 'es'. The game uses it to find the interface’s strings and, on the selection screen, the language’s flag. The table below lists them. For a language Monogatari doesn’t ship, add its strings and its metadata yourself (see Adding an interface language); without them, the selection screen reports Metadata for language “…” could not be found.

Keep the labels the same in every language

A save remembers the label and the step (the position in that label) the player was at, not the language. A game saved in one language and loaded in another resumes at the same step of the same label in the other script. Give every language the same label names and the same number of statements in each label, so each step is the same moment of the story in all of them. Where a translation needs one line less, a next statement, which moves on at once, keeps the count.

A jump to a label that one language lacks shows The label “…” does not exist to players of that language.

Spreading languages over several files

Each language can live in its own file. A second monogatari.script({ 'English': { … } }) call, however, replaces the whole English script with the labels it gives. To add labels to a language from another file, use monogatari.label(). Split Files shows both.

The language selection screen

A screen titled "Select your language" with two buttons, a United States flag over "English" and a Mexican flag over "Español"
The language selection screen of a game in English and Spanish.

With MultiLanguage and LanguageSelectionScreen both on, the first time a player opens the game it shows a button for each language of your script, in the order the script lists them, with the language’s flag. The title cycles every two seconds through each language’s way of saying “Select your language”. The player’s choice is stored with their preferences, and the game goes on to its loading screen and main menu.

The screen only appears to players who have no stored preferences yet. To see it again yourself, open the game in a private window, or clear the stored data of the game’s address in your browser’s site settings.

With LanguageSelectionScreen off, the game starts in the Language preference and players change it on the settings screen.

The settings screen’s language selector

The settings screen in Spanish, titled Configuración, with a Lenguaje section holding a drop-down list
The settings screen of a multi-language game, with the language selector.

In a multi-language game, the settings screen has a Language selector listing your script’s languages. A new choice changes the interface at once and is stored. The line on screen stays as it is; the next line comes from the new language’s script, at the same label and step. The selector also follows a language picked on the selection screen or set by your own code.

Removing a language later

A player’s language stays stored after an update. If a new version of your game drops a language that a player picked, the game starts in your Language setting (from js/options.js) for that player, and stores it as their language; the browser’s console says so. Players who picked a language you kept see no change. Before 2.9.0, those players got a blank page.

The languages Monogatari ships

The interface comes translated in these eighteen languages. The name is what you write in Language and in your script; the code formats the dates on save slots and becomes the page’s language (and its writing direction: ar is right to left); the icon is the flag on the selection screen.

Name Code Icon Strings identical to English
Bahasa Indonesia id 🇮🇩 4
Български bg 🇧🇬 0
Беларуская be 🇧🇾 0
Deutsch de 🇩🇪 5
English en 🇺🇸 (all 62)
Español es 🇲🇽 2
Français fr 🇫🇷 3
Magyar hu 🇭🇺 2
Nederlands nl 🇳🇱 8
Português pt 🇵🇹 2
Português do Brasil pt-br 🇧🇷 2
Русский ru 🇷🇺 0
اللغه العربية ar 🇦🇪 0
한국어 ko 🇰🇷 0
日本語 ja 🇯🇵 1
繁體中文 zh-hant 🇹🇼 0
简体中文 zh-hans 🇨🇳 0
toki pona en 🕮 2

Each language has the same 62 strings. The last column counts the strings whose text is the same as in English. They are the same word in that language (OK, Audio, Auto, Start in German, Credits in Dutch), except in toki pona, whose Select your language and save name placeholder are still in English. You can change any of them in your own game, as described next.

Interface strings

monogatari.translation(language) returns a language’s strings, and monogatari.translations() returns every language’s:

const spanish = monogatari.translation('Español');
console.log(spanish.Start); // 'Comenzar'

To change some strings of a language, give monogatari.translation() the ones to change; the rest stay as they are:

monogatari.translation('Deutsch', {
  'Start': 'Spiel starten',
  'Credits': 'Mitwirkende',
});

Put these calls in js/script.js, before the game starts. The English strings, with their keys, are in Monogatari’s repository (src/translations/English.ts), or in your game: open the browser’s console and type monogatari.translation('English').

Adding an interface language

For a language Monogatari doesn’t ship, give it all 62 strings and its metadata. A string you leave out shows in English, with an error dialog while you develop; starting from a copy of the English strings avoids the dialogs for the strings you haven’t translated yet:

monogatari.translation('tlhIngan Hol', {
  ...monogatari.translation('English'),
  'Start': 'tagh',
  'SelectYourLanguage': 'Hol yIwIv',
});

monogatari.languageMetadata('tlhIngan Hol', {
  code: 'en',
  icon: '🖖',
});

The language then appears on the selection screen and in the settings screen’s selector as soon as your script has a copy of the story under the same name.

Language metadata

Field What it is
code A language code (ISO 639-1, such as es), used to write the dates on save slots in that language (28 nov 2026, 13:19:50 in Spanish) and set as the page’s lang. A right-to-left language’s code (ar, fa, he, ur…) also turns the page right to left: the menus, the quick menu and the text box are mirrored.
icon The text shown above the language’s name on the selection screen, usually a flag emoji.

monogatari.languageMetadata(language, { … }) sets them, keeping the fields you leave out. monogatari.languageMetadata(language) reads them.

Translated text in your own HTML

An element inside the game whose data-string attribute names a string shows that string in the player’s language, and changes when they switch:

<p data-string="Greeting">Welcome back</p>

The string must exist in every language the game offers (monogatari.translation('English', { 'Greeting': 'Welcome back' }) and so on).

Interface strings inside your script

_(Key) in a line of dialog is replaced with the string of that key in the player’s language. A key you add with monogatari.translation() works too:

monogatari.translation('English', { 'Greeting': 'Welcome back' });
monogatari.translation('Español', { 'Greeting': 'Bienvenido de nuevo' });
'_(Greeting), Yui.'

The line reads “Welcome back, Yui.” in English and “Bienvenido de nuevo, Yui.” in Spanish. A key with no string in that language is left as it was written.