You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way I do this is implement Display for Id that writes Id's in hex 0xDEADBEEF. I then can insert these into labels with a prefix:
"item0xDEADBEEF" or pass them as tokens to fluent strings "crafting?item_type=item0xDEADBEEF".
Then I have a system that resolves all Text components that also have a UiLocalize component. Resolution involves first replacing the hex with the matching manifest entry's name "crafting?item_type=wood" and then passing that to bevy_fluent's content fn.
There are probably steps that could be removed, maybe the interim hex encoding, but I found that's useful for eyeballing problems.
Another neat thing you can do is mark any strings that fallback with a custom TextColor, so if you're playing in French, strings that fail to localize in French and fallback to English will show up red or whatever.
This is an important wrinkle, and it would be great to showcase how this fits together.
The text was updated successfully, but these errors were encountered: