kgv / bevy_fluent

Bevy plugin for localization using Fluent.
Apache License 2.0
114 stars 16 forks source link

Fluent Parameters #40

Closed csandven closed 8 months ago

csandven commented 9 months ago

As far as I have seen, there is currently no way of using the fluent variables in tlf files. This PR makes it so that you can use that feature of fluent-rs.

The ui-example was extended to demonstrate how to use it.

csandven commented 9 months ago

@kgv I do not know any Russian, so if you might help me with that, it would be appriciated

zwazel commented 9 months ago

could be wrong, but this seems very similar to #32 from me. I also assumed you couldn't use the parameters, but you actually could. i'm not so up to date with this crate, but last time i used it in bevy 0.11.x i could just do

localization.content("id?attribute=value")

as seen here: https://docs.rs/fluent_content/0.0.5/fluent_content/struct.Request.html#examples