You are viewing a potentially older version of this package. View all versions.
darmuh-YapLocalizer-0.1.2 icon

YapLocalizer

Utility mod for adding localized text to the game!

Date uploaded a day ago
Version 0.1.2
Download link darmuh-YapLocalizer-0.1.2.zip
Downloads 825
Dependency string darmuh-YapLocalizer-0.1.2

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2304 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2304

README

YapLocalizer

Utility mod for adding localized text to the game!

Features

This utility mod is designed for mod developers to make adding new localizations quick and easy!

  • Add Localized Text or Verbal Commands easily with ModLocalizedText and ModLocalizedPhrase

ModLocalizedText - Adds modded localized text with optional translations

Simply define a key and any translations you'd like to add.

Example:

            .SetLocalization(SystemLanguage.English, "Test");
  • The above example would translate any localized text with key TEST_LOCAL_KEY to Test when the game language is set to english.

NOTE: If you do not set any translations, the LocalizationKey will be displayed instead.
An Optional fallbackResult can be defined that will be displayed when localization fails.

ModLocalizedPhrase - Adds modded voice commands with optional localizations

Define a key and any translations you'd like to add. Constructor takes a "Default Command" for when localization fails.

Example:

            .AddLocalization(SystemLanguage.Italian, ["cane", "alto"]);
  • The above example would replace UP DOG's localization values.
  • It defines a localization for Italian, which currently is not supported in-game.
  • If YAPYAP were to include an updated localization for italian, the above localization would be used.
  • Any other undefined language currently in the game will use the default command, UP EASE unless otherwise specified via AddLocalization

CHANGELOG

Changelog

0.1.2

  • Per recommendations from Robyn, converted some internal List<T> to Dictionary types for better lookup performance.
    • No more LINQ :)
  • LocalizationKeys are also no longer case sensitive, go wIlD!

0.1.1

  • Added HasLocal to ModLocalizedText
  • Uploaded to nuget for those who do not want to depend on this mod via Aaron's thunderstore nuget

0.1.0

  • Initial release.