Leiv’s Translation API
Leiv’s Translation API is a fast, background library mod that automatically translates missing language keys locally, eliminating unlocalized text across supported mods.
介绍
🌐 Leiv’s Translation API
Leiv’s Translation API is the dynamic localization engine of the Leiv Ecosystem Suite.
While Leiv’s API handles the logic and Leiv’s Network Lib handles the sync, this library ensures that every menu, tooltip, and text element is perfectly localized. It is a highly optimized language manager designed to dynamically load, cache, and apply translation files at runtime without requiring hardcoded strings. It ensures that mods like Leiv’s Config Menu and others display the correct text flawlessly.
⚠️ PLAYER NOTE: This is a required core dependency for user interface and text-driven mods within the Leiv Ecosystem. It does not add blocks or items on its own, but must be installed alongside my mods to display localized text, menus, and tooltips correctly!
✨ Key Features
- 🌐 Dynamic Namespace Registration: Automatically discovers and registers language files across all 11 Leiv ecosystem namespaces on startup.
- 🚀 DictCache Acceleration: High-speed in-memory translation cache that resolves language keys in microseconds.
- 📝 Dynamic Tooltip Resolution: Automatically pairs configuration rules and UI elements with their corresponding
.desctranslation keys. - 🔄 Hot-Reload Support: Supports dynamic language switching in-game without forcing a client restart.
🛠️ Technical Highlights (For Developers & Modpack Creators)
Leiv’s Translation API provides a game-code-decoupled localization pipeline:
- 🧠 LeivTranslationEngine: The core translation scanner that dynamically loads
assets/<namespace>/lang/*.jsonfiles into a unified cache. - 🔍 DictCache Engine: Optimized key-value dictionary engine featuring instant fallback handling when a key is missing in a specific language.
- 💬 Dynamic Placeholder Injector: Supports string interpolation and runtime parameter injection for dynamic UI descriptions.
- 🎨 Formatting Abstraction: Cleanly strips or converts legacy Minecraft color codes (
§) and modern Component formatting on demand.
🔗 Dependencies
This library ensures that the ecosystem’s text is as dynamic as its logic:
- Requires: Leiv’s Lib & Leiv’s API (Make sure both are installed!)
- Used By: Leiv’s GUI, Leiv’s Config Menu, ItemCuller, Keybind Profiles, EnderStash, and all other Leiv Ecosystem end-mods.
💬 Community & Support
Got questions, feedback, or need to report a bug? Join the community!
- 👥 Discord: Join Leiv’s Community
- 🐛 Issue Tracker: Report bugs via the official Discord ticket system.
常见问题
Leiv’s Translation API 支持哪些 Minecraft 版本?
Leiv’s Translation API 支持 Minecraft Java 版 1.20.1–26.2,共 4 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
Leiv’s Translation API 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
leiv436 的其他作品
查看全部 →ItemCuller
Improves performance by not rendering dropped items outside the player's view. Lightweight, client-side optimization for smoother gameplay.
Leiv’s Lib
Leiv's Lib is the lightweight core framework required to power all mods in the Leiv Ecosystem Suite, optimizing performance and streamlining core mechanics under the hood.
Leiv’s API
Leiv's API is the mandatory, highly reliable core library that manages configurations, validation, and system rules for all mods created by Leiv.
Mystic Arts & Spellbooks
A custom modpack built around Iron's Spells 'n Spellbooks and my favorite add-ons! Enhance your magical adventure with new spells, dungeons, weapons, world features and more!
评论
登录后评论和评分