Skip to main content

Multilingual Support

This guide explains how to enable and configure multilingual support, including dialog translation, system messages, NPC strings, and in-game language switching.


1. Enabling Multilingual Support

To enable multilingual support, edit the customs.properties file and set:

MultiLangEnable = True

Also make sure to define the default language of your server:

MultiLangDefault = en
  • Uses ISO 639 language codes
  • Default is en (English)

Then, specify which languages are allowed:

MultiLangAllowed = en,es,pt

2. Dialog Localization

Configuration

Dialogs localization is enabled automatically when MultiLangEnable = True.

How to Add Translated Dialogs

  1. Go to your Datapack project
  2. Follow this path:
data/lang/<ISO 639 code>/data/html/
  1. Add your translated file with the same name as the original file

Example

Path:

data/lang/es/data/html/noquest.htm

Content:

<html>
<body>
No estás en una misión que involucre a este NPC o no cumples con los requisitos mínimos.
</body>
</html>

3. In-Game Language Switching

To allow players to change their language in-game, enable the language handler:

MultiLangHandler = True

Once enabled, players can use the voice command:

.lang

This will open a menu where they can select their preferred language.


4. System Message Localization

Configuration

Enable system message localization:

MultiLangSystemMessageEnable = True
MultiLangSystemMessageAllowed = en,es,pt

How to Add Translated System Messages

  1. Go to your Datapack project
  2. Follow this path:
data/lang/<ISO 639 code>/sm/
  1. Add a file named:
SystemMessageLocalisation.xml

Example

Path:

data/lang/es/sm/SystemMessageLocalisation.xml

Content:

<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../xsd/SystemMessageLocalisation.xsd">
<sm id="0" text="Has sido desconectado del servidor." />
<sm id="1" text="El servidor se apagará en $s1 segundo(s). Por favor, busca un lugar seguro para desconectarte." />
</list>

5. NPC String Localization

Configuration

Enable NPC string localization:

MultiLangNpcStringEnable = True
MultiLangNpcStringAllowed = en,es,pt

How to Add Translated NPC Strings

  1. Go to your Datapack project
  2. Follow this path:
data/lang/<ISO 639 code>/ns/
  1. Add a file named:
NpcStringLocalisation.xml

Example

Path:

data/lang/es/ns/NpcStringLocalisation.xml

Content:

<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../xsd/NpcStringLocalisation.xsd">
<ns id="1010221" text="Una luna negra... ¿Ahora entiendes que ha abierto los ojos?" />
<ns id="1010222" text="Nubes de sangre se están congregando. Pronto empezará a llover. La lluvia de sangre carmesí..." />
<ns id="1010223" text="Mientras la luz insensata permanece dormida, la oscuridad será la primera en despertar. Hmmm..." />
</list>