LanguageResource formatting does not respect culture
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- csharp
- Domain
- frontend, internationalization
Research direction
Find the LanguageResource formatting implementation and trace how it formats values for Paginator_SummaryItems; the issue identifies FluentPaginator.razor lines 23, 27, and 51 as examples to read. Reproduce with de-DE and {0:N0} Einträge, then verify the displayed number follows the current culture, such as 4.321.
Written by the indexing model from the issue text.
Description
🐛 Bug Report
When localizing Microsoft.FluentUI.AspNetCore.Components.Localization.LanguageResource, numbers in the format string are not localized. Instead, the strings are always formatted using the invariant culture.
💻 Repro or Code Sample
In Program.cs, set the thread culture:
CultureInfo deDeCulture = CultureInfo.GetCultureInfo("de-DE");
Thread.CurrentThread.CurrentCulture = deDeCulture;
Thread.CurrentThread.CurrentUICulture = deDeCulture;
or set the CurrentCulture
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("de-DE");
Localize Paginator_SummaryItems from default {0} items to {0:N0} Einträge.
🤔 Expected Behavior
Paginator numbers are formatted respecting the thread's culture, e.g.
4.321 for de-DE
4'321 for de-CH
4 321 for fr-BE
😯 Current Behavior
Numbers provided to LanguageResource format strings are formatted using CultureInfo.InvariantCulture, e.g.
4321
💁 Possible Solution
Use CultureInfo.CurrentCulture when formatting LanguageResource values.
See, for example, FluentPaginator.razor lines 23, 27, 51.
I am willing to contribute, but need some guidance.
🔦 Context
Minor presentation issue with high end user visibility.
🌍 Your Environment
- Windows 11 26H2
- Microsoft Edge, Google Chrome, ...
- .NET 11.0.0-rc.2.26504.105
- Fluent UI Blazor 5.0.1
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 488
- Avg merge
- 21h 51m
- Merged PRs (30d)
- 80
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/fluentui-blazor
-
fix: FluentDataGrid never unregisters its IKeyCodeService listener in DataGridPossibly taken @christian-sig claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/fluentui-blazor#5516 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
microsoft/fluentui-blazor#5519 · 1 comment ·
Maintainers usually reply within 1 day
-
[FluentSplitButton]: Foreground and background colors do not meet the minimum contrast ratioPossibly taken @dvoituron claimed this 1 day ago. Open
microsoft/fluentui-blazor#5514 · 1 assignee ·
Maintainers usually reply within 1 day
-
[FluentSortableList]: Voice access is not assigning numbers to the list items.Possibly taken @vnbaaij claimed this 1 day ago. Open
microsoft/fluentui-blazor#5513 · 1 assignee ·
Maintainers usually reply within 1 day
-
[FluentSortableList]: Narrator is not announcing the rearranging information for the list items.Possibly taken @vnbaaij claimed this 1 day ago. Open
microsoft/fluentui-blazor#5512 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in microsoft/fluentui-blazor
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Nimblesite/SharpLsp#468 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
elastic/ecs-dotnet#575 ·
-
alerts bug effort:S P2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nightscout/nocturne#2511 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 2 days
-
Crash in v3.00Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
arkane-systems/mousejiggler#140 ·