Localization

From CK3 Wiki
Jump to navigation Jump to search

Localization files can be found in the localization folder.

Unlike most other files, they localization files have .yml extension.

All files names should look like this: <something>_l_<language>.yml

The file format is UTF-8 with BOM.

Text formatting should begin with a # character and end with #!:

#<formatting code> <text> #!

Example:
#P +15%#!

Insert other localization keys: $<other key>$ (e.g. $special_contract_march_short$ )

Example:

l_english:
 innovation_motte:0 "Mottes"
 innovation_motte_desc:0 "Simple yet effective, building our castles on raised earthen mounds is the best way to ensure we quite literally have the high ground over our enemies."
 unlock_tribal_economic_buildings:0 "Unlocks all Tribal Era [economic_buildings|E]"
 unlock_tribal_military_buildings:0 "Unlocks all Tribal Era [military_buildings|E]"
 unlock_march_contract:0 "Unlocks the #high $special_contract_march_short$#! [feudal_contract|E]"

Note that the digit 0 after the : does not matter - the parser completely skips this and it is merely present for the purposes of version-tracking by Paradox' localization team.

Commands[edit | edit source]

Commands are used in instances where localisation must be dynamic and change based on certain conditions. Invoking a command will print out a specific string of text.

Commands need to be scoped, usually within a character. Example:

[ROOT.Char.GetLadyLord] [ROOT.Char.GetNamePossessiveRegnal] [ROOT.Char.GetFirstNameNicknamed]

Gender[edit | edit source]

These commands will show text that vary based on the gender of the character in scope.

Command
GetHerHim
GetHerHis
GetHerHisMy
GetHersHis
GetHerselfHimself
GetLadyLord
GetSheHe
GetDaughterSon
GetDaughterSonPossessive

Character names[edit | edit source]

These commands will show some variation of the name of the character. This is not a complete list.

Command
GetFirstName
GetFirstNameBase
GetFirstNameNicknamed
GetFirstNameNicknamedNoTooltip
GetFirstNameNicknamedNoTooltipRegnal
GetFirstNameNicknamedOrMe
GetFirstNameNicknamedOrMeNoTooltip
GetFirstNameNicknamedOrMeNoTooltipRegnal
GetFirstNameNicknamedOrMeRegnal
GetFirstNameNicknamedPossessive
GetFirstNameNicknamedPossessiveNoTooltip
GetFirstNameNicknamedPossessiveNoTooltipRegnal
GetFirstNameNicknamedPossessiveOrMy
GetFirstNameNicknamedPossessiveOrMyNoTooltip
GetFirstNameNicknamedPossessiveOrMyNoTooltipRegnal
GetFirstNameNicknamedPossessiveOrMyRegnal
GetFirstNameNicknamedPossessiveRegnal
GetFirstNameNicknamedRegnal
GetFirstNameNoTooltip
GetFirstNameNoTooltipRegnal
GetFirstNameOrMe
GetFirstNameOrMeNoTooltip
GetFirstNameOrMeNoTooltipRegnal
GetFirstNameOrMeRegnal
GetFirstNamePossessive
GetFirstNamePossessiveNoTooltip
GetFirstNamePossessiveNoTooltipRegnal
GetFirstNamePossessiveOrMy
GetFirstNamePossessiveOrMyNoTooltip
GetFirstNamePossessiveOrMyNoTooltipRegnal
GetFirstNamePossessiveOrMyRegnal
GetFirstNamePossessiveRegnal
GetFirstNameRegnal
GetTitledFirstName
GetFullName
GetFullNameNicknamed
GetFullNameNicknamedNoTooltip
GetFullNameNicknamedNoTooltipRegnal
GetFullNameNicknamedOrMe
GetFullNameNicknamedOrMeNoTooltip
GetFullNameNicknamedOrMeNoTooltipRegnal
GetFullNameNicknamedOrMeRegnal
GetFullNameNicknamedPossessive
GetFullNameNicknamedPossessiveNoTooltip
GetFullNameNicknamedPossessiveNoTooltipRegnal
GetFullNameNicknamedPossessiveOrMy
GetFullNameNicknamedPossessiveOrMyNoTooltip
GetFullNameNicknamedPossessiveOrMyNoTooltipRegnal
GetFullNameNicknamedPossessiveOrMyRegnal
GetFullNameNicknamedPossessiveRegnal
GetFullNameNicknamedRegnal
GetFullNameNoTooltip
GetFullNameNoTooltipRegnal
GetFullNameOrMe
GetFullNameOrMeNoTooltip
GetFullNameOrMeNoTooltipRegnal
GetFullNameOrMeRegnal
GetFullNamePossessive
GetFullNamePossessiveNoTooltip
GetFullNamePossessiveNoTooltipRegnal
GetFullNamePossessiveOrMy
GetFullNamePossessiveOrMyNoTooltip
GetFullNamePossessiveOrMyNoTooltipRegnal
GetFullNamePossessiveOrMyRegnal
GetFullNamePossessiveRegnal
GetFullNameRegnal
GetName
GetNameNicknamed
GetNameNicknamedNoTooltip
GetNameNicknamedNoTooltipRegnal
GetNameNicknamedOrMe
GetNameNicknamedOrMeNoTooltip
GetNameNicknamedOrMeNoTooltipRegnal
GetNameNicknamedOrMeRegnal
GetNameNicknamedPossessive
GetNameNicknamedPossessiveNoTooltip
GetNameNicknamedPossessiveNoTooltipRegnal
GetNameNicknamedPossessiveOrMy
GetNameNicknamedPossessiveOrMyNoTooltip
GetNameNicknamedPossessiveOrMyNoTooltipRegnal
GetNameNicknamedPossessiveOrMyRegnal
GetNameNicknamedPossessiveRegnal
GetNameNicknamedRegnal
GetNameNoTooltip
GetNameNoTooltipRegnal
GetNameOrMe
GetNameOrMeNoTooltip
GetNameOrMeNoTooltipRegnal
GetNameOrMeRegnal
GetNamePossessive
GetNamePossessiveNoTooltip
GetNamePossessiveNoTooltipRegnal
GetNamePossessiveOrMy
GetNamePossessiveOrMyNoTooltip
GetNamePossessiveOrMyNoTooltipRegnal
GetNamePossessiveOrMyRegnal
GetNamePossessiveRegnal
GetNameRegnal

Command Arguments[edit | edit source]

Command Arguments are used to modify dynamic localization commands. They always go at the end of a command.

Argument Description Example Without Argument With Argument
|U
Capitalizes command output
Tea is ready, my [ROOT.Char.GetLadyLord|U].
Tea is ready, my lady. Tea is ready, my Lady.
|L
Transforms to command output to lowercase
Tea is ready. [ROOT.Char.GetSheHe|L] said.
Tea is ready. He said. Tea is ready. he said.

Special Characters[edit | edit source]

Some sets of characters perform special functions.

Command Description Example
\n Line break. Works only in certain cases.
#P Formats text "positive"
#P A very good thing has happened#!
OR
[GetFullName|P]
#N Formats text "negative"
#N A rather bad thing has happened#!
OR
[GetFullName|N]
#help Text is shown using a help style
#help If you do not give either Gold or Soldiers to the war effort, your [head_of_faith|E] will condemn you and you will lose [piety|E].#!
#I Text is displayed in an informational style
#I Click to view your [GetPlayer.GetCouncillorPosition( 'councillor_court_chaplain' ).GetPositionName]#!
#W Text is displayed as a warning
#W Only your younger children lacks [guardians|E]#!
#T Text is displayed as a title
#T Randomize Dynasty Name#!
#E Text is displayed as a game concept
#E Randomize#!
#X Text is displayed as a warning in italic format
#X Choosing a New Appearance will discard ALL previous changes!#!
#S Formats text bold and italic
#S Occupying Counties:#!
#V Formats text white
#V This text is white #!
OR
[GetFullName|V]
#EMP Text is emphasized
#EMP Emphasis here #!
#weak Text has a lighter color
#weak footnote or aside #!
#bold Text is displayed in bold
You have #bold NOT #! done this
#italic Text is displayed in italics
You #italic will #! do this

Linking[edit | edit source]

Localization strings can link to game concepts as follows:

[concept_key|E]

# So for example
[faith|E]

By default the concept starts with first letter in upper case, you can set the first letter in lower case as follows :

[concept_key|El]

# So for example
"The word [faith|El] is now starting by a lower case letter"

The expression linking to the game concept can be customized as follows :

[Concept('concept_key','Customized expression')|E]

# So for example
"The game concept link [Concept('faith','religion')|E] is now written as religion."

Rounding numbers[edit | edit source]

If a numeric value has a decimal portion, it can be rounded by using the desired number of decimal places, such as:

# Round to 2 decimals
[some_value|2]

# Remove all decimals:
[some_value|0]

Note that the value is always rounded down.


Icons[edit | edit source]

You can display icons on text with specific tags:

Careful! @warning_icon!, you are going to drop all your gold [gold_i] if you keep running like that!
Tag Addressable
@warning_icon!
[gold_i]

Usage of special characters & Line breaks[edit | edit source]

If you wish to input characters such as " in a string, utilize \ before every usage:

Hello, I am \"totally\" not going to stab you!
Hello, I am #weak\"totally\" not# going to stab you!

If you want to break line, you can use /n:

This is line one, which will show up above,/nWhile this is line two, coming right at you from below.

Avoid adding spaces before or after the line break to preserve the text's alignment.

References[edit | edit source]