-
-
Notifications
You must be signed in to change notification settings - Fork 320
Expose the Translate component #954
Copy link
Copy link
Closed as not planned
Labels
won't fixThis ticket won't be implemented (e.g. it's not an issue, or it'll be fixed by something else).This ticket won't be implemented (e.g. it's not an issue, or it'll be fixed by something else).
Milestone
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).This ticket won't be implemented (e.g. it's not an issue, or it'll be fixed by something else).
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:
Related Links:
loading language files
internal translator
internal mod metadata
only cp