Difference between revisions of "Localization"

From DemonCrawl Wiki
Jump to navigation Jump to search
(Created page with "Therefore Games are currently in the process of adding [https://en.wikipedia.org/wiki/Internationalization_and_localization localization support] to DemonCrawl. As of v1.53, m...")
(No difference)

Revision as of 22:04, 31 July 2020

Therefore Games are currently in the process of adding localization support to DemonCrawl. As of v1.53, many strings can already be replaced through an external JSON file.

If you would like to translate DemonCrawl to another language--or if you simply want to swap out some item text with dank memes--this page will serve as a guide to help you get started.

Strings

DemonCrawl loads all of its strings on startup from the following file:

[Your Steam installation folder]\steamapps\Common\DemonCrawl\assets\strings\YourLanguage.json

Note: Many English strings are already hardcoded into the game and thus do not have to be included in your JSON file. If a string is missing from your JSON, DemonCrawl will fallback to the hardcoded English string.

You may switch your active language at the top of the Gameplay Options screen:

LanguageSelection.png

The list of languages is determined by the files found at the aforementioned path. If you wanted to translate DemonCrawl to Klingon, for example, you would first need to create a file called Klingon.json.

Formatting

In your DemonCrawl installation folder, you will find a file called Demo.json which contains every external string currently supported by the game. We recommend skimming through this file to get a better understanding of JSON formatting and DemonCrawl's key naming conventions. Do note that JSON is cAsE SeNsiTive.

Here are some examples:

Items

  • "Item":"Your Item Title"
  • "Item_desc":"Your item description."
  • "Item_msg":"A toast notification related to your item."

e.g.

  • "Brass Knuckles":"Brass Knuckles"
  • "Brass Knuckles_desc":"For the next 10 turns, you can powerchord any cell."
  • "Apple_msg":"Your Brass Knuckles broke!"

Items may have multiple toast notifications, which are often suffixed with SUCCESS, FAIL, or any of DemonCrawl's event triggers:

  • NO_TRIGGER
  • PRE_DMG
  • DMG
  • PRE_ENTER_STAGE
  • ENTER_STAGE
  • BEGIN_STAGE
  • COMPLETE_STAGE
  • LEAVE_STAGE
  • GAIN_COINS
  • SPEND_COINS
  • SPEND_COINS_ALT
  • RESTORE_LIFE
  • GAIN_MAX_LIFE
  • LOSE_LIFE
  • LOSE_MAX_LIFE
  • ENTER_SPECIAL_STAGE
  • LEAVE_SPECIAL_STAGE
  • GAIN_DEFENSE
  • LOSE_DEFENSE
  • ARMOR_BREAK
  • ARMOR_REMOVE
  • GAIN_THIS_ITEM
  • GAIN_ITEM
  • CONSUME_ITEM
  • USE_THIS_ITEM
  • PRE_USE_ITEM
  • LOSE_ITEM
  • LOSE_THIS_ITEM
  • USE_MAGIC
  • COLLECT_LOOT
  • COLLECT_COIN
  • COLLECT_DIAMOND
  • COLLECT_HEART
  • COLLECT_CHEST
  • PRE_MONSTER_REVEAL
  • MONSTER_REVEAL
  • OBJECT_DIE
  • AFTER_OBJECT_DIE
  • SAWBLADE_EXPLODE
  • FAMILIAR_MOVE
  • MISTAKE
  • OPEN_CELL
  • DISCOVER_VALUE
  • STATUS_COMPLETE
  • STAGE_TIMER
  • EACH_TURN
  • QUEST_COMPLETE
  • GUARANTEE_OBJECTS
  • BUY_ITEM_SHOP
  • SPAWN_OBJECT
  • ORB_CREATE
  • PROJECTILE_CREATE
  • BURN_OBJECT
  • FREEZE_MONSTER
  • APPLY_AURA
  • PASS_TURN
  • CHAIN_WARNINGS
  • UPDATE_CHAIN
  • BREAK_CHAIN
  • ACTIVATE_MYSTIC_STATUE
  • TRY_POWERCHORD
  • UPDATE_SHOP
  • BEFORE_MAGIC
  • GAME_OVER
  • MAGIC_DO_COLUMN
  • MAGIC_DO_ROW
  • MAGIC_RADIUS
  • CANCEL_GAIN_MAX_LIFE
  • CANCEL_RESTORE_LIFE
  • ADJUST_RESTORE_LIFE_VALUE
  • ADJUST_COIN_VALUE
  • ADJUST_DIAMOND_VALUE
  • ADJUST_ITEM_FIND_MIN
  • ADJUST_ITEM_FIND_MAX
  • ADJUST_LOSE_LIFE_VALUE
  • ADJUST_STATUS_DURATION
  • REPEAT_STRANGER
  • REPEAT_REVEAL
  • STATUS_AFTER
  • STATUS_EVERY
  • STATUS_CANCEL
  • STATUS_REMOVE
  • DO_AUTODISCHARGE