What do I set the "key" to in localization

Hello,
I’m currently localizing my game, but for some reason, the bad ending part of my game won’t appear, I’ve tried 5 times playing the game (in-game) but it still won’t appear.

I’ve got to the point where I decided to do it manually, because it’s not very long anyways.

But I’m not sure what to set the “key” to?

I assume I set context to the translated content, and what do I set example to?

I’ve had a look at the wiki, but I’m unable to find anything about manual translations.

2 Likes

The key value for localisation is so you can quickly perform lookups on LocalizationTables and the like. It’s optional, though would be helpful if you’re manually translating and need a specific translation applied to some text. It’s relevant for functions such as FormatByKey.

You can see more examples of localisation keys being used if you take a look through the Lua Chat System. Key is helpful for manual translations and quickly looking up translations of text as needed according to the current locale.