Skip to content
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

Localization String Formatting for Units #12

Open
stiefeljackal opened this issue Aug 31, 2024 · 0 comments
Open

Localization String Formatting for Units #12

stiefeljackal opened this issue Aug 31, 2024 · 0 comments

Comments

@stiefeljackal
Copy link

With the current formatting implementation, it is currently only possible to produce an English (US) translated string for a given unit (e.g., 200 meters, 1000 grams, 30 days, etc.). There is currently no way to produce localization strings for other languages besides English (US).

In order to support other locales, there should be a feature in place that allows one to register a unit string formatter that can provide the formatted string of a given unit. If the library offers a way to register a unit string formatter, it can provide a more flexible option for formatting a unit's string name than the current implementation.

For the case of Resonite, the unit string formatting logic for different Locales can be handled outside of Elements.Quantity as long as the unit string formatter delegate is registered on Resonite's end.

I do have something that I am working that will offer this functionality, but I will wait until the review of #11 is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant