-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Localisation Plugin #461
Comments
Localization support via https://github.com/projectfluent/fluent-rs would be good. |
Prior art: https://github.com/amethyst/amethyst/tree/master/amethyst_locale @zbraniecki are you still involved with Fluent? |
yep. we're currently working on the next release - mostly ergonomics and higher level (locale fallbacking and resource management). |
I think I may have forgotten to mention somethings in description. We may also need to support other assets like audio, images...etc I am going to update the description to better capture the feature set. This will enable us to better understand the scope of work that will be required to get a fully functional localisation plugin. |
hi all! The update I mentioned has been released and the current 0.13 version is quite close to what I hope to release as 1.0. It mostly covers the lower-level bits tho, and I'm now working on the higher level ergonomic wrappers. We're also making progress on MessageFormat 2.0 which is what we hope to make a universal standard for localization format and I hope it'll be a straight superset of Fluent. The reason I'm bringing it up is that after MF2.0, we'll start deeper exploration of standardization of bindings of localization to UI. Fluent already does it in form of Fluent DOM and Fluent React, but I expect there's a lot to explore with proper declarative bindings. And that architecture might be important for Bevy and Amethyst, much like it is fundamental for any GUI toolkit. Here's my outline of the mental model that I'd like to propose for Bevy to think through as you decide how to integrate localization - raphlinus/crochet#7 |
See also #1459. |
I like the idea of Fluent. Regarding asset localization: I think the straightforward solution would be to use localization strings for the asset paths. This would compose neatly with the language, and also will not require any changes to the actual asset server, which means this could be implemented as a separate crate without any upstream requirements. Another option would be to somehow enhance path resolution in the asset server, but this would mean having separate logic from string localization, which might be unnecessary complexity? |
Hi all, just an update. I recently was able to merge final refactor of Firefox Platform migration to Fluent Rust. This involves the low level bits (fluent-syntax, fluent-bundle) but also higher level (fluent-fallback and l10nregistry-rs). This means that the stack is now production ready since, well, it's used in production in a major software :) l10nregistry-rs is a fairly sophisticated, and severely underdocumented localization resource manager which allows Firefox Platform to do things like registering resource sources on fly (language packs), unregister etc. And The bindings to DOM are currently in C++ and we have an equivalent in JS and bindigns to React are in JS. For Bevy, I'd recommend considering writing your own resource manager, or bundling l10n into the default asset resource manager if you have one. If you'll want to work on that, I'd be happy to review/brainstorm and ensure fluent-rs is ready. |
there is an external plugin bevy_fluent by @kgv |
Seeing how there is a 3rd party crate for this right now. I'm closing this issue. If we ever need first-party localization support in the future, we may either include bevy_fluent or some other solution. |
How do you render multiple languages with bevy_fluent? |
It would be nice to have a localisation plugin that can set regional text, sound and images depending on the language-region preference like in unreal or godot. The localisation can be defined in a .csv (and other formats can be supported if needed). Providing localisation components can greatly enhance the user experience when setting up the scene,
eg,
If you need a ui text comp to be localised you can attach a LocaliseText component with the key to an Entity with UI Text component. The LocaliseText component system will set the UI Text component with correct string from the localisation data at runtime. Similarly we can have LocaliseSprite with sprite key to set the correct image on a sprite.
Godot Localisation
Unreal Localisation
The text was updated successfully, but these errors were encountered: