Language. Problem with translating my mod into Russian

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Language. Problem with translating my mod into Russian

Postby Soosisya » Mon Jan 11, 2021 2:58 am

So I've decided to translate everything in my mod into Spanish and Russian, starting with the custom menu options. While it works perfectly in Spanish, it seems gzdoom can't find the Russian localization. It shows every single string in English (default language). Here is my code:
Code: Select allExpand view
[enu default]

MOD_OPTIONS "Mod options";
TITLE_OPTIONS "Risk of Doom options";
CHEST_LIMIT "Limited maximum amount of chests";
CHEST_AMOUNT "Maximum amount of chests on the map";
MINICHEST_LIMIT "Limited maximum amount of small chests";
MINICHEST_AMOUNT "Maximum amount of small chests on the map";

[
rus]

MOD_OPTIONS "Опции мода";
TITLE_OPTIONS "Опции Risk of Doom";
CHEST_LIMIT "Ограниченное количество сундуков";
CHEST_AMOUNT "Максимальное количество сундуков на карте";
MINICHEST_LIMIT "Ограниченное количество маленьких сундуков";
MINICHEST_AMOUNT "Максимальное количество маленьких сундуков на карте";

[
esm]

MOD_OPTIONS "Opciones de mod";
TITLE_OPTIONS "Opciones de Risk of Doom";
CHEST_LIMIT "La contidad limitada de los cofres";
CHEST_AMOUNT "La contidad máxima de los cofres en el mapa";
MINICHEST_LIMIT "La contidad limitada de los cofres pequeños";
MINICHEST_AMOUNT "La contidad máxima de los cofres pequeños en el mapa";
 

The default menu translates into Russian just fine. So I assume Gzdoom already has a built-in Russian font
Soosisya
 
Joined: 31 Oct 2020

Re: Language. Problem with translating my mod into Russian

Postby Player701 » Mon Jan 11, 2021 3:33 am

The language code is ru, not rus.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Language. Problem with translating my mod into Russian

Postby Soosisya » Mon Jan 11, 2021 3:36 am

Player701 wrote:The language code is ru, not rus.

On the Zdoom wiki it says "rus" (even my slade highlights it as a key word)
Soosisya
 
Joined: 31 Oct 2020

Re: Language. Problem with translating my mod into Russian

Postby Player701 » Mon Jan 11, 2021 3:38 am

Then it's either that the wiki has incorrect information, or it's a GZDoom bug. However, I've tested it just now with a single language file, and "ru" works fine for me while "rus" doesn't. My own project uses "ru" as well, and everything works properly there.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Language. Problem with translating my mod into Russian

Postby Graf Zahl » Mon Jan 11, 2021 8:22 am

Generally, only use the first two letters, unless you need special handling for a specific dialect of a language. Spanish has two supported dialects, this is the only reason why "esm" works - but not if your customer lives in Spain.
Russian is "ru", there are no dialects that use the third letter.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests