You are viewing a potentially older version of this package. View all versions.
HsgtLgt-Autolocalization-1.0.0 icon

Autolocalization

AutoLocalization is a game localization tool specifically designed for BepInEx mods. It exports descriptions and texts of configuration options for players to localize and translate, making it easy to localize all your mod settings!

Date uploaded 11 months ago
Version 1.0.0
Download link HsgtLgt-Autolocalization-1.0.0.zip
Downloads 62
Dependency string HsgtLgt-Autolocalization-1.0.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2333
ValheimModding-YamlDotNet-16.3.1 icon
ValheimModding-YamlDotNet

Shared version 16.3.0 of YamlDotNet from Antoine Aubry and contributors, net47 package for use in Valheim mods. Maintained by the ValheimModding team.

Preferred version: 16.3.1

README

🚀 AutoLocalization 模组介绍

专为 BepInEx 模组设计的游戏本地化工具,自动导出配置选项文本供玩家翻译,轻松实现模组设置的本地化!

✨ 核心功能

  • 🌍 一键翻译:自动检测并翻译配置选项描述
  • 🔄 兼容热重载:翻译更新后无需重启游戏(约 5 秒生效)
  • 📥 智能文本集合:自动收集新模组的未翻译文本
  • 🧠 自动识别:识别所有模组的配置描述
  • 📝 简单翻译格式:使用易编辑的 YAML 文件
  • 🌐 多语言支持:支持中文/日语/韩语等任意语言

📥 安装步骤

  1. 下载模组文件
  2. 解压到游戏根目录
  3. Autolocalization.dll 放入 BepInEx/plugins 文件夹
  4. 启动游戏自动初始化

⚠️ 关键提示:此模组必须是第一个加载的插件!在 AutoLocalization 之前加载的插件将无法翻译


🛠️ 使用指南

首次使用

  1. 启动游戏
  2. 模组将在 BepInEx/config/智能本地化引擎 生成:
    • AutolocalizationGlobalTranslations.yaml(翻译文件)
    • AutolocalizationUntranslatedTexts.yaml(未翻译文本)

🔧 热重载流程

  1. 编辑 AutolocalizationGlobalTranslations.yaml 添加/更新翻译
  2. 保存文件
  3. 等待约 5 秒
  4. 返回游戏查看更新

➕ 处理新模组

  1. 安装新模组并启动游戏
  2. 新文本将自动添加至 AutolocalizationUntranslatedTexts.yaml
  3. 复制新条目到 AutolocalizationGlobalTranslations.yaml
  4. 添加翻译后保存即可自动加载

📝 示例 YAML 格式

Offset relative to the upper right corner of the inventory (side elements included): 相对于物品栏右上角的偏移量(包含侧边元素)
Enabled slot obtaining progression. If disabled - all enabled slots will be available from the start. [Synced with Server]: 启用槽位解锁进度。禁用时-所有槽位初始可用。[与服务器同步]
Main menu button caption: 主菜单按钮标题
'[ServerSync] Gain XP when interacting with Pickables': '[服务器同步]与可拾取物互动时获得经验'

❓ 常见问题

Q:翻译不生效怎么办?
A:

  1. 检查文本匹配:确保翻译文件中的文本与未翻译文本完全一致(包括大小写/空格/标点)
  2. 验证加载顺序:AutoLocalization 必须是第一个加载的插件
  3. 检查 YAML 语法:确保无缺失冒号/正确缩进/有效字符
  4. 等待重载:保存文件后需等待约 5 秒
  5. 确认文件位置:位于 BepInEx/config/智能本地化引擎/

📜 更新日志

v1.0.0 (2025-07-23)

  • 首个稳定版发布
  • 新增调试模式

❤️ 支持开发者

如果本模组提升了您的游戏体验:

开发者寄语:感谢使用 AutoLocalization!您的支持是持续优化的动力

CHANGELOG

📜 Changelog

v1.5.6

  • 🔧 Translation Key Conflict Detection - Added automatic detection and resolution for translation key conflicts:
    • System automatically detects when multiple original texts are translated to the same key
    • Automatically generates unique suffixes based on MD5 hash to prevent duplicate key errors
    • Prevents BepInEx configuration errors caused by duplicate keys
  • Translation Validation Mechanism - Enhanced translation validation to ensure compliance with BepInEx requirements:
    • Validates that translated text does not contain invalid characters (=, \n, \t, , ", ', [, ])
    • Ensures translated text has no leading or trailing spaces
    • Automatically removes invalid translations to prevent mod crashes
  • 🔄 Fixed Translation File Merging - Fixed issue where translation files were automatically merged during secondary collection:
    • Translation files now correctly merge without data loss
    • Improved file merging logic to handle multiple translation sources (translations.yaml and collected_items.yaml)
    • Added persistent group memory to maintain grouping stability across file saves
    • Note: This fix only affects grouping metadata, not user-provided translation text in translations.yaml
  • 🛡️ Enhanced Exception Handling - Optimized exception handling in configuration and GUID mapping stages:
    • Improved exception detection and handling during ConfigEntry/ConfigDefinition processing
    • Better error recovery and logging when building GUID mappings
    • Prevents crashes caused by unhandled exceptions in configuration processing

v1.5.5

  • 📝 YAML File Format Documentation Update - Translation files now support two formats:
    • Nested format: Grouped by mod GUID for easier management and organization of translation content
    • Flat format: A simple backward-compatible format suitable for small-scale translations
    • The system automatically recognizes and loads both formats, users can choose according to their needs
  • ⚙️ New Collection Feature Toggle Configuration - Added [Collection] configuration section in .com.HsgtLgt.autolocalization.cfg:
    • EnableCollection: Controls whether to enable the collection feature
    • After translation is complete, the collection feature can be disabled to improve game startup speed
    • When disabled, the system only applies existing translations and no longer collects new content

v1.5.4

  • 🎨 Updated Icons - Improved visual design and user interface with new icons
  • 📝 Updated MD Content - Enhanced documentation and markdown files for better readability and user guidance

v1.5.2

  • 🔧 Fixed Translation File Loading - System now correctly recognizes and loads user-provided translation files

v1.5.0

  • Complete core architecture rebuild
  • New high-performance caching system
  • Improved file management and user experience
  • Optimized translation workflow