Open
Conversation
Member
Author
|
Once the implementation is finalized the translation-related code from the Resource Loader module can be removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This API will provide a stable alternative to Vanilla's localization system and language support.
The API includes:
L10n, a utility class for localizing translation keys, and querying the language used for localization.LocalizationEvents, which contains events for language reloads.Supported features include:
.langand.jsonformat translation files.I reckon there will be two kinds of implementations of this. First, for versions 1.6 and later, the API will essentially just be a wrapper around the Vanilla system, given that the Vanilla system + OSL Resource Loader supports most features already.
Second, for versions before 1.6 and especially versions before 1.1, OSL will provide most functionality itself. It will handle fetching translation files from resource packs, language selection, and language reloads. A lot of this will be dormant, though, as the actual implementations for e.g. multiple language support (i.e. the actual translation files, language selection screen) is not within scope of this API.