Using a translatable string from Vanilla

Discussion of Lua and LuaWML support, development, and ideas.

Moderators: Forum Moderators, Developers

Post Reply
Posts: 214
Joined: April 29th, 2017, 11:37 pm

Using a translatable string from Vanilla

Post by Choicerer » June 14th, 2018, 1:18 pm

I'd like to use some translatable strings from vanilla (specifically Enemy, Owned, Allied) that get shown under village description
in lua.theme_items. But I have no idea what those strings would be called, or how I should go on about using them.

In the source code, they appear to be functions inside the terrain_type class... I think they might be returning "Allied Village", not just "Allied", but I could still extract the first word in lua (that would work nicely, maybe not that nicely in French, Spanish and a couple of other languages :D ) .


Got it. The text domain is #textdomain wesnoth and the variable name _"Enemy village" (case sensitive)
Creator of Choicerer's Map Randomizer - Better Odds -
The Better Names Mod - Architecture Mod -
Curse of Satan Claus - The Trolling Mod -
and the Mushroom Isar.

Post Reply