Skip to content

Expose the Translate component #954

@lycc193

Description

@lycc193

In the current version, as a third-party developer wanting to add translations for a specific mod, one can only provide translation files (e.g., zh.json) and have players manually copy/overwrite them into the relevant directory, which is highly inconvenient. Additionally, there is no way to monitor version control for localized translations (due to the absence of a manifest file).

Upon reviewing the source code, it was found that smapi itself allows third-party modifications to a mod's localization entries, but smapi has set them as internal, which currently only allows cp (content patcher) to access them normally. It is hoped that the relevant interfaces can be exposed public or, at the least, be made accessible through cp for third-party content packs to load translations.

example:

{
    "Changes":{
        "Action":"Load",
        "Targe":"mod_uuid/locale/zh"
        "FromFile":"asset/xxxx/zh.json"
    }
}

Related Links:
loading language files

internal translator

internal mod metadata

only cp

Metadata

Metadata

Assignees

Labels

won't fixThis ticket won't be implemented (e.g. it's not an issue, or it'll be fixed by something else).

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions