[HELP] Some localisation keys work, others don't

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Uroshnor

Sergeant
106 Badges
Jun 19, 2012
90
3
  • Stellaris: Synthetic Dawn
  • Hearts of Iron III
  • Heir to the Throne
  • Cities: Skylines - Snowfall
  • Leviathan: Warships
  • Magicka
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Hearts of Iron III: Their Finest Hour
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - After Dark
  • Cities: Skylines Deluxe Edition
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Dungeonland
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • For the Motherland
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Stellaris: Nemesis
  • Crusader Kings II: Conclave
  • 500k Club
  • Europa Universalis III Complete
For some reason, certain localisation keys don't work for me - they'll just display the name of the key in-game rather than the text of the key, even if they're defined in the same file and with the same syntax as other keys that do work.

I've noticed this happening in species and countries that are spawned by event, as well as in solar system initializers.

For example, I'm working on a Dune-themed mod now, and I'm spawning the Fremen species with the following code:
Code:
create_species = {
    is_mod = yes            # I'm making them a subspecies of humans
    name = "NAME_Fremen"
    plural = "NAME_Fremen_Plural"
    adjective = "NAME_Fremen_Adjective"
    namelist = "HUM1"
    class = THIS
    portrait = THIS
    homeworld = PREV
    traits = {
        trait = "trait_fremen"
        trait = "trait_adaptive"
        trait = "trait_nomadic"
        trait = "trait_conservational"
    }
    
    effect = {
        set_species_flag = fremen_species
        save_global_event_target_as = fremen_species
    }
}

And the localisation keys are defined like this:
Code:
l_english:
 NAME_Fremen:0 "Fremen"
 NAME_Fremen_Plural:0 "Fremen"
 NAME_Fremen_Adjective:0 "Fremen"

In-game, this shows up as a species named Fremen, but with the plural showing up as NAME_Fremen_Plural and the adjective as NAME_Fremen_Adjective.

Does anyone know why this is happening and/or how to fix it?
 

17blue17

Field Marshal
68 Badges
Nov 9, 2003
6.596
379
  • Stellaris: Galaxy Edition
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • 500k Club
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
For some reason, certain localisation keys don't work for me - they'll just display the name of the key in-game rather than the text of the key, even if they're defined in the same file and with the same syntax as other keys that do work.

I've noticed this happening in species and countries that are spawned by event, as well as in solar system initializers.

For example, I'm working on a Dune-themed mod now, and I'm spawning the Fremen species with the following code:
Code:
create_species = {
    is_mod = yes            # I'm making them a subspecies of humans
    name = "NAME_Fremen"
    plural = "NAME_Fremen_Plural"
    adjective = "NAME_Fremen_Adjective"
    namelist = "HUM1"
    class = THIS
    portrait = THIS
    homeworld = PREV
    traits = {
        trait = "trait_fremen"
        trait = "trait_adaptive"
        trait = "trait_nomadic"
        trait = "trait_conservational"
    }
 
    effect = {
        set_species_flag = fremen_species
        save_global_event_target_as = fremen_species
    }
}

And the localisation keys are defined like this:
Code:
l_english:
 NAME_Fremen:0 "Fremen"
 NAME_Fremen_Plural:0 "Fremen"
 NAME_Fremen_Adjective:0 "Fremen"

In-game, this shows up as a species named Fremen, but with the plural showing up as NAME_Fremen_Plural and the adjective as NAME_Fremen_Adjective.

Does anyone know why this is happening and/or how to fix it?

Normally problems with localization files are due to wrong encoding. Open your file with the free notepad++ and then look at the tabs across the top and choose the encoding tab and see if it shows the encoding to be utf8 WITH bom. Must be with BOM for localization files and ANSI or utf8 without bom for all other files. If it is not then choose convert to utf8 with BOM and save. Otherwise I am not sure what the problem would be.
 

Uroshnor

Sergeant
106 Badges
Jun 19, 2012
90
3
  • Stellaris: Synthetic Dawn
  • Hearts of Iron III
  • Heir to the Throne
  • Cities: Skylines - Snowfall
  • Leviathan: Warships
  • Magicka
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Hearts of Iron III: Their Finest Hour
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - After Dark
  • Cities: Skylines Deluxe Edition
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Dungeonland
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • For the Motherland
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Stellaris: Nemesis
  • Crusader Kings II: Conclave
  • 500k Club
  • Europa Universalis III Complete
Normally problems with localization files are due to wrong encoding. Open your file with the free notepad++ and then look at the tabs across the top and choose the encoding tab and see if it shows the encoding to be utf8 WITH bom. Must be with BOM for localization files and ANSI or utf8 without bom for all other files. If it is not then choose convert to utf8 with BOM and save. Otherwise I am not sure what the problem would be.
The localisation file is already UTF-8-BOM, and the event file is plain UTF-8. That's not the problem here.

Like I said, plenty of other localisation keys in the same localisation file work just fine.
 

Ryika

Field Marshal
52 Badges
Apr 16, 2018
2.813
8.356
The other tags go into the localisation_synced folder, not the normal localisation folder.

Don't quite understand the reasoning behind it (Probably because different languages treat plurals and stuff like that differently?), but that's how it works.
 

Uroshnor

Sergeant
106 Badges
Jun 19, 2012
90
3
  • Stellaris: Synthetic Dawn
  • Hearts of Iron III
  • Heir to the Throne
  • Cities: Skylines - Snowfall
  • Leviathan: Warships
  • Magicka
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Hearts of Iron III: Their Finest Hour
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - After Dark
  • Cities: Skylines Deluxe Edition
  • Stellaris
  • Europa Universalis IV: Pre-order
  • Dungeonland
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • For the Motherland
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Stellaris: Nemesis
  • Crusader Kings II: Conclave
  • 500k Club
  • Europa Universalis III Complete
The other tags go into the localisation_synced folder, not the normal localisation folder.

Don't quite understand the reasoning behind it (Probably because different languages treat plurals and stuff like that differently?), but that's how it works.
Oh, weird. Just the plurals and adjectives, though? Not the actual name?