EU4 uses a different localisation system compared to previous Paradox games. It uses a format similar to YAML. It will look something like this:
l_english: MENU_MESSAGES_DISABLE_ALL:0 "Disable all" FILTER:0 "Filter" TO_ME:0 "To me" FROM_ME:0 "From me" INTERESTING:0 "Interesting" OTHERS:0 "Others" hre_province_restored:0 "Territory restored to the Empire" DECAY:0 "Decay"
| Note the extra space at the beginning of each line except the first, which is needed since each row is a subnode to the node called “l_english”.|
The number after the colon is a version number.
The file must be encoded as UTF-8 with a byte order mark (UTF-8-BOM). If a localisation-file is encoded as a single-byte encoding such as ISO 8859-1, the game will fail to read the file and you will receive
Missing Localisation! instead of your intended text-string. To ensure the correct encoding, copy a vanilla localization-file or use an advanced editor like Notepad++ to set it using the Convert to …-option within the encoding-menu.
| Localisation-files use UTF-8-BOM only, while other game's text-files (|
Also note that there must not be any space before the
: that separates key and value. If so, the game will fail to parse all the lines that will follow the broken one.
key: "value" → Working case. ✔
key : "value" → Non-working case. ✘
In order to localize a string with quotes within it, these must first be escaped, like so:
l_english: STRING_WITH_QUOTES: "This string contains \"quotes\", therefore it's awesome!"
(NB: this appears to not actually be the case, see for example
flavor_bur.21.t in . It appears no two localisation files can have the same file name.)
If you are creating a new localisation file for your mod, the filename must end with
_l_english.yml, for example
mymod_l_english.yml. When localising for languages other than English, replace
english with that language (
New formatting standardEdit
The localization system also has support for formatting text in the localization strings instead of the C++ code. In order to format a variable, type '§' followed by the wanted formatting rules and then end the expression with '§!'.
The following formatting rules are implemented:
|%||conversion of value to percent|
|*||conversion of value to SI units|
|=||Prepend '+' if the value is positive and '-' for negative|
|0..9||Number of decimals|
|W,B,G,R,b,g,Y,M,T||colors the text|
|+||Colors values green if positive, yellow if zero, red if negative|
|-||Colors values red if positive, yellow if zero, green if negative|
As an example, if we want to convert a fixed point value to percent with one decimal, color it green if it is positive, we can now write it as $VAL|%2+$!. If we want to color a value yellow with 3 decimals and add a '+' sign if the value is positive, we could write it as §=Y3$VAL$§ etc.
We can display localisation dynamic information (like the religion of a province) in a couple of ways.
This is the cleaner, newer, flexible way of calling data to display in localisation. It uses a system similar to scope from event modding, though keep in mind it uses a unique set, outlined below. It will be familiar to anybody who has done object-oriented programming.
Some examples - notice how the game is directed from an event's Root/From and through the scopes until we find the information we need.
We can use an additional scope:
We can use multiple scopes:
|Operator||From Scope||To Scope||Description|
|ColonialParent||country||country||Overlord of a Colonial nation|
|Culture||country & province||culture||Culture of a country|
|Dynasty||character||dynasty||royal house of a ruler|
|From||FROM province or country|
|Owner||province||country||Owner of a province|
|Religion||country & province||religion||Religion|
|Root||ROOT province or country|
|TAG||country||We can just directly scope to a country (e.g. FRA)|
|TradeCompany||country||country(?)||Trade company subject|
|GetAreaName||province||Area of a province||[This.GetAreaName]|
|GetAdjective||country||country adjective, e.g. Spanish|
|GetCapitalName||province||Gets a province's city name (e.g. Paris)||[From.Capital.GetCapitalName]|
|GetFlagshipName||country||Country's Flagship Name||[Root.GetFlagshipName]|
|GetGroupName||culture||culture group e.g. British|
|religion||religion group e.g. Christian|
|GetName||all||Gets main name for almost any object; England, Catholicism, Henry VIII, Tudors...|
|GetTitle||character||e.g. King, President|
|GetTradeGoodsName||province||names Trade goods produced in province|
|GetYear||none||doesn't need a scope, returns current year||[GetYear]|
|GovernmentName||country||Gets a country's government name (e.g. Kingdom)||[Root.GovernmentName]|
|GetXEDip||country||French language only : Permet d'accorder féminin ou masculin||excellent[Root.GetXEDip]|
|GetErEreDip||country||French language only : Permet d'accorder le mot 'conseiller'||conseill[Root.GetErEreDip]|
There are a number of scalar identifiers that appear in the game's existing localisation files. These aren't very flexible or pretty, but we can use them if they have the correct scope.
Some of these probably don't work with events, missions etc. because they need to be given other data through the game's code.
|$CAPITAL$||country||Displays root country's capital province||Île-de-France|
|$CAPITAL_CITY$||country||Displays root country's capital city||Paris|
|$CONTROLLERNAME$||province||Displays root province's controller (winner of siege)||England|
|$COUNTRY$||country||Displays root country's name||France|
|$COUNTRY_ADJ$||country||Displays root country's adjective||French|
|$COUNTRY_RELIGION$||country||Displays root country's religion||Catholic|
|$CULTGROUP$||Culture group. Unsure if it can be used in events|
|$CULTURE$||country||Displays root country's primary_culture||Francien|
|$DYNASTY$||country||Displays root country's ruler's dynasty||Tudor|
|$EMPERORNAME$||Holy Roman Emperor?|
|$HEIR_ADJ$||heir possessive adjective||his/her|
|$HEIR_CAP_ADJ$||capitalised heir possessive adjective||His/Her|
|$HEIR_O_PRONOUN$||heir object pronoun||him/her|
|$HEIR_CAP_O_PRONOUN$||capitalised heir object pronoun||him/her|
|$HEIR_S_PRONOUN$||heir subject pronoun||he/she|
|$HEIR_CAP_S_PRONOUN$||capitalised heir subject pronoun||He/She|
|$MONARCH$||country||Displays root country's ruler's name||Henry VIII|
|$MONARCHTITLE$||country||Displays root country's ruler's title||King|
|$NCARDINALS$||integer number of cardinals|
|$OVERLORD$||country||name subject nation's liege lord|
|$PERYEAR$||Yearly Separatism decrease|
|$PROVINCECAPITAL$||province||Displays root province's capital city||Paris|
|$PROVINCECULTURE$||province||Displays root province's culture|
|$UNTIL$||Year Separatism ends|
|$YEAR$||country||Displays the current year||1444|
Replace localisation keysEdit
To replace vanilla localisation, create a folder inside the localisation folder named
replace. In this folder place your localisation files containing the vanilla localisation keys you want to replace. You can also mod localisation in the same way as anything else. Localisation is ignored in calculating the checksum.
Cultural province namesEdit
If "Use dynamic province names" is turned on, province names change from their values in the
localisation folder based on the culture of the current owner. These names are listed under
common/province_names, which has one file per culture group, culture, or tag; each file contains a list, each entry being a province number, an equals sign, and a quoted name. For example,
13 = "Slesvicko" 40 = "Klajpeda" 41 = "Královec" 42 = "Varmie" 43 = "Gdansk" 44 = "Hamburk" 45 = "Lubek" 46 = "Roztoky" 48 = "Kolobreh" 49 = "Nová Marka"
The most specific name available will be used. For example, province 282, normally called Yedisan and owned by Crimea in 1444, is called Hocabey if owned by a Turkish country; if it's owned by the Ottomans, however, it's called Özü, even if they're Turkish.
Graphical icons are inserted with the pound symbol (£).
|Monarch power||Administrative Power||£adm£|
Importing/exporting text to translate itEdit
To export, create a shortcut of the game exe. Right click and choose properties, and enter
last in target. This will create a folder in your game folder called "customizable_localization". These files can now be opened and translated. Put your translation in the language column that applies. If yours are not there, you can rename one of the others.
If you're using Steam, instead of creating a shortcut, right click on EU4 in Steam and choose properties. On the General tab, click "Set Launch Options..." and enter the above. Remember to remove it afterwards, since the game doesn't actually start with this option.
To import, create a folder next to the recently created and name it localization_translated. Put your files there. They must be named l_language (name of the language) in the start of the file name and import with this line:
You will then get a bunch of files in your documents folder, in a new folder named
These files need to be copied and pasted into the localization folder in the game. When you have done both export and import, the structure will look something like this:
All in all, if you are translating for example our English text to another language, you won't need to care that much about the formatting, just mimic what we wrote. If you are adding text for your mod, you may want to give the first two headlines some extra attention.