MultiLanguageStrings

v1.0.1·Updated 2024-12-15

Localization interface for custom server-side messages.

About this mod Machine translation

Gazyi.MultiLanguageStrings

Northstar mod that adds localization interface for custom server-side messages.

Using this mod

Clients

Clients need this mod only if their game language is not English.

Unlike in other Portal 2 branch Source games, ConVar cl_language is not flagged as "USERINFO". This mod creates "USERINFO"-flagged ConVar cl_mls_serverlang that copies value of cl_language, so servers can receive its value.

If Northstar adds FCVAR_USERINFO flag to cl_language ConVar, this requirement will be removed.

Servers and Modders

Client language is checked after connection, by default it's English. For debugging, clients can use console command cl_mls_forcelanguage to override language until level change.

This mod uses JSON translation tables that are located in: \R2Northstar\save_data\Gazyi.MultiLanguageStrings. After level change, it'll try to load translation file.json for every enabled mod.

JSON file example:

{

"Mod":"Gazyi.MultiLanguageStrings",

"#HelloWorld":

{

"english":"Hello World!",

"french":"Bonjour le Monde!",

"german":"Hallo Welt!",

"spanish":"Hola Mundo!",

"italian":"Ciao Mondo!",

"japanese":"こんにちは世界!",

"polish":"Witaj świecie!",

"russian":"Привет, мир!",

"tchinese":"Hello world!",

"portuguese":"Olá, mundo!",

"mspanish":"Hola Mundo!"

}

}

Global functions:

string function ServerLocalizeTokenForClient( entity player, string szToken, string modName ) - Returns translated string for mod token, if it exists. If there's no translation for client language, fallbacks to English.

void function ServerAddTranslationsForToken( string szToken, LocalizedStringStruct localizedStruct, string modName, bool bForceSaveTranslation = false ) - Adds translation for specified token to runtime translation table. Saves current mod translation table if there's no file for mod or "bForceSaveTranslation" is set to "true".

Install & use Install: Northstar client mod

  1. Install the Northstar client first (the open-source community client for Titanfall 2; its release page provides an installer). It loads the mods.
  2. Unzip the archive from playbuff and put its contents into the Northstar/mods/ folder inside your Titanfall2 directory.
  3. Start the game through NorthstarLauncher.exe — the console lists the mods it loaded.

Northstar is for private servers and custom content; do not use it to connect to official servers.

Dependencies

Install these first, or the mod will not work:

northstar-Northstar

File & checksum

Filename
MultiLanguageStrings-1.0.1.zip
File size
85.8 KiB