-
Notifications
You must be signed in to change notification settings - Fork 47
Language and Translation
Commander text, strategy reports, and chat are generated from Languages\<Language>. Registered languages and encodings are defined in root Languages.txt.
- Copy
Languages\Englishto a directory named with the new language's canonical name. - Translate every file while preserving filenames and tab-separated structure.
- Add a
Languages.txtrow containing language name, selection confirmation, menu hotkey code, and encoding. - Compile each required version and install it into a test map.
- Test startup selection, Commander menus, reports, allied messages, and enemy taunts.
Use UTF-8 unless the target specifically requires another encoding; the compiler reads this field from Languages.txt.
| Files | Content |
|---|---|
Commander.txt, CommandsTrans.txt
|
Commander labels and commands. Preserve key columns and placeholders. |
CommanderStart.txt |
Startup and mode-selection text. |
Strategy.txt |
Strategy names/reports keyed by strategy function name. |
Strengths.txt |
Composition-strength labels. |
Translations.txt |
Variable values and alternate word forms. |
Chat*.txt |
Situation-specific messages and taunts. |
Never translate a table's identifier/key column. It connects text to code. Chat should sound natural rather than being a literal translation, but variables and conditions must remain valid.
Square brackets substitute a value:
My [Color] [Race] army will defeat your [PlayerColor] [PlayerRace] army.
| Variable | Value |
|---|---|
[Name] |
AI profile name. |
[Race], [Color]
|
Speaking AI's race and color. |
[PlayerRace], [PlayerColor]
|
Associated or receiving player. |
[TargetRace], [TargetColor]
|
Current attack target, when set. |
[Strategy] |
Current translated strategy name. |
[RandomRace] |
Random race name. |
[OwnGold], [OwnLumber]
|
Current resources. |
[PlayerNum], [MaxPlayerNum]
|
Active and maximum player counts. |
[MapSize], [Difficulty]
|
Derived map-size and difficulty labels. |
Only use target variables in message groups fired while a target exists.
A leading brace expression filters a line. Comma-separated conditions must all pass:
{FFA}Every opponent is a target.
{Race=HUMAN,OwnGold>=500}The Human treasury is ready.
{Race!=UNDEAD,Random<=50}This eligible line has a 50 percent chance.
{!RaceChoiceRandom}I was assigned a fixed race.
Operators are =, !=, <, <=, >, and >=.
| Kind | Names |
|---|---|
| Boolean |
1vs1, FFA, RaceChoiceRandom (prefix with ! to negate). |
| Numeric |
Random, Time, OwnGold, OwnLumber, Strength, TargetStrength, PlayerNum, MaxPlayerNum, MapSizeX, MapSizeY, Handicap. |
| Text |
Race, PlayerRace, and other string variables. Race values are HUMAN, ORC, ELF, and UNDEAD. |
Random is regenerated from 0 through 100 for every candidate line. PlayerRace is retained and evaluated for each recipient, allowing recipient-specific filtering.
Translations.txt supports suffixes for plurals, cases, gender, or other grammar:
HUMAN human
HUMAN:S humans
ORC orc
ORC:S orcs
Use a suffix after the colon:
I am a [Race]; are there any other [Race:S] here?
Provide every suffix for every value that the variable may produce; the runtime cannot infer missing forms.
- Preserve key columns and exact tab delimiters.
- Preserve
[Variable],[Variable:Form], and leading{Condition}syntax. - Define every used word form in
Translations.txt. - Use
1vs1; the legacy manual's1on1spelling is obsolete. - Keep characters compatible with the declared encoding and Warcraft target.
- Compile first, then test several races, colors, targets, modes, resource levels, and map sizes.