Tutorial: Basic Usage of Content Patcher Translation Keys (i18n)

From The Stardew Modding Wiki
Jump to navigation Jump to search

CP Translation Keys[edit | edit source | hide | hide all]

A missing i18n field has prompted this Korean game to display the text in the default English instead.

When editing crafting/cooking recipe or animal data in Content Patcher or BFAV, the final field is often a translation key. This is important for allowing compatibility with other languages (TODO: explain why). For example, a recipe adding a craftable battery might look like this:

"Battery": "335 1 338 1 767 5/Home/9/true/Mining 6/でんち"

If the last field is left blank:

"Battery": "335 1 338 1 767 5/Home/9/true/Mining 6"

Content Patcher will still accept the code, but the game will read the item as null in non-English languages, which can cause errors and crashes, as well as not displaying correctly in-game.

For best support, an i18n token (see below for i18n information should be used to ensure multi-language compatibility:

"Battery": "335 1 338 1 767 5/Home/9/true/Mining 6/Template:I18n:Battery