HowtoFishLocalizationAPI

v1.0.1·Updated 2026-09-06

How to Fish Localization API is a shared dependency API for How to Fish mods. It lets compatible mods load their own language files and update their UI when the game language changes.

About this mod Machine translation

Note: This description is bilingual. The Chinese section is provided below the English section.

Note: This description is a bilingual version in Chinese and English. The Chinese content is located below the English content.

How to Fish Localization API (English)

How to Fish Localization API is a shared dependency API for How to Fish mods. It lets compatible mods load their own language files and update their UI when the game language changes.

Main Features

  • Loads an external JSON localization file for each compatible mod.
  • Reads the active How to Fish language and raises LanguageChanged after a language change.
  • Provides English fallback when a language or key is missing.
  • Localizes compatible configuration labels in HowToFish.ModMenu and HTFModManager.

For Players

This mod is an API/dependency. It does not add gameplay features by itself.

Install it when another How to Fish mod lists How to Fish Localization API as a requirement.

The configuration-label integration is optional. Mods that do not register localization data are left unchanged.

For Mod Authors

Reference HowtoFishLocalizationAPI.dll and add a hard BepInEx dependency:

using System.IO;

using System.Reflection;

using BepInEx;

using HowtoFishLocalizationAPI.Api;

[BepInPlugin(PluginInfo.PLUGIN_GUID, "My Mod", "1.0.0")]

[BepInDependency(HowtoFishLocalizationAPI.PluginInfo.PLUGIN_GUID)]

public sealed class MyPlugin: BaseUnityPlugin

{

private ModLocalizer _localizer;

private void Awake()

{

string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

_localizer = LocalizationApi.For(PluginInfo.PLUGIN_GUID);

_localizer.RegisterJson(Path.Combine(directory, "MyMod.Localization.json"));

LocalizationApi.LanguageChanged += OnLanguageChanged;

}

private void OnLanguageChanged(string language)

{

// Refresh this mod's existing UI text here.

}

}

Load the JSON file from the directory containing your mod DLL. This also works with generated mod-manager folder names:

using System.IO;

using System.Reflection;

using HowtoFishLocalizationAPI.Api;

internal static class I18n

{

private const string FileName = "MyMod.Localization.json";

private static readonly ModLocalizer Localizer = Load();

internal static string Text(string key, params object args)

{

return Localizer.GetLocalizedText(key, args);

}

private static ModLocalizer Load()

{

string directory = Path.GetDirectoryName(

Assembly.GetExecutingAssembly().Location);

ModLocalizer localizer = LocalizationApi.For(PluginInfo.PLUGIN_GUID);

localizer.RegisterJson(Path.Combine(directory, FileName));

return localizer;

}

}

Use I18n.Text("your.key") for mod UI text. The args parameters are optional and use standard string.Format placeholders.

Configuration Labels

Compatible configuration managers use the following key format:

modmenu.config..

For example, a Controls / OpenWallet entry uses modmenu.config.Controls.OpenWallet. The label is applied when the configuration row is created, and missing keys keep the original configuration label.

Example localization file:

{

"en": {

"mod.name": "My Mod",

"mod.description": "A short description of my mod.",

"modmenu.config.General.Enabled": "General / Enabled"

},

"zh-CN": {

"mod.name": "My Mod",

"mod.description": "Introduction to my mod.",

"modmenu.config.General.Enabled": "General / Enabled"

}

}

Every localization file must contain an en object. If the current language or requested key is missing, the API tries en; if the key is still missing, it returns the key itself.

Supported Language Codes

  • English: en
  • Swedish: sv
  • Simplified Chinese: zh-CN
  • Traditional Chinese: zh-TW
  • French: fr
  • German: de
  • Italian: it
  • Japanese: ja
  • Korean: ko
  • Polish: pl
  • Brazilian Portuguese: pt-BR
  • Russian: ru
  • Latin American Spanish: es-MX
  • European Spanish: es-ES
  • Turkish: tr
  • Ukrainian: uk

Compatibility

  • Game: How to Fish 1.0.4+
  • ModMenu: 0.3.3+
  • HFModManager: 1.0.1

Bug Reports & Feature Suggestions

If you have any questions or fea …

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
HowtoFishLocalizationAPI-1.0.1.zip
File size
130.5 KiB