For AI agents: the complete documentation index is available at /lite-db/zh/llms.txt, the full documentation bundle is available at /lite-db/zh/llms-full.txt, and this page is available as Markdown at /lite-db/zh/usage/localization.md.
  • 简体中文
  • 本地化

    Achieve.Database.Localization 命名空间包含一个基于 SQLite 表数据的简单本地化辅助工具。

    设置语言

    LocalizationManager.SetLanguage(SystemLanguage.Korean);

    语言改变时会触发 LocalizationManager.onChangeLanguage 事件。

    查询字符串

    var text = LocalizationManager.GetString(1001);

    也可以显式指定语言。

    var english = LocalizationManager.GetString(1001, SystemLanguage.English);

    查询集合

    var collection = LocalizationManager.GetCollection(1001);
    var data = collection.GetLocalizedData(SystemLanguage.Japanese);

    本地化表模型需要支持基于 LocalizationCollection 的 LiteDB.Get<LocalizationCollection>(key)。