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

feat: Localize Numbers #1

Merged
merged 3 commits into from
Nov 15, 2024
Merged

feat: Localize Numbers #1

merged 3 commits into from
Nov 15, 2024

Conversation

TurtIeSocks
Copy link
Owner

@TurtIeSocks TurtIeSocks commented Nov 14, 2024

This adds support for localizing numbers, both in its own individual component I18nNumber and via interpolation for the I18nText component with a new method with_num_arg. This utilizes a couple of crates from the icu4x project, namely icu_decimal and fixed_decimal.

In this crate, they are behind the numbers feature but it is enabled by default since this is a pretty standard behavior. If you don't need it though, set default-features = false and you can save yourself some external dependencies.

@TurtIeSocks TurtIeSocks merged commit 58c2b79 into main Nov 15, 2024
4 checks passed
@TurtIeSocks TurtIeSocks deleted the i18n-number-component branch November 15, 2024 20:13
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

Successfully merging this pull request may close these issues.

1 participant