Closed adopilot closed 2 years ago
@lewing FYI
Tagging subscribers to this area: @tarekgh, @safern, @krwq See info in area-owners.md if you want to be subscribed.
/cc @EgorBo @steveisok
@lewing what is the strategy to address such issues? Just add the missing locales?
bs
is not presented in the list of locales we support (and neither in https://developer.chrome.com/webstore/i18n)
That is a different issue. The culture data is split up to save space so you can't just load any culture at runtime and expect it to work. You should be able to enable that full culture list by setting <BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
in your csproj
/cc @pranavkm
@EgorBo I think we may just need to document things
That is a different issue. The culture data is split up to save space so you can't just load any culture at runtime and expect it to work. You should be able to enable that full culture list by setting
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
in your csproj/cc @pranavkm
I apologies,I did delete my comment.
@lewing it's documented here https://docs.microsoft.com/en-us/dotnet/standard/globalization-localization/globalization-icu#icu-on-webassembly (has a link to list of supported locales)
Yeah, I didn't realize the app was initializing a new culture. We should probably call that out in our docs.
@lewing it's documented here https://docs.microsoft.com/en-us/dotnet/standard/globalization-localization/globalization-icu#icu-on-webassembly (has a link to list of supported locales)
I think we should add a more detailed description on the options to enable a full globalization experience, like the MSBuild property that @lewing pointed out here, does that make sense?
I'm experiencing the same after upgrading to RC2. However, the culture I'm using is nl
, which is listed in the icu/optimal.json
file. However, it's doesn't appear to be loaded.
What I'm doing: DateTime.Today.ToString("dddd d MMMM yyyy", CultureInfo.CreateSpecificCulture("nl"))
, which prints Thursday 15 October 2020
instead of the localized version.
@cornem is that with <BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
in your .csproj and what language is your browser set to?
No, is that required now?
On Thu, Oct 15, 2020, 5:35 PM Larry Ewing notifications@github.com wrote:
@cornem https://github.com/cornem is that with
true in your .csproj?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dotnet/runtime/issues/43398#issuecomment-709408036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4LJPPY3LILLNKQSM2KSB3SK4JDXANCNFSM4SQ2GJHA .
@cornem by default Blazor loads a small subset of culture data based on the browser's current language setting. That option tells blazor to load a larger subset of cultures that is intended to mirror the cultures the browser supports.
Btw, I've added a note about this in our docs:https://docs.microsoft.com/en-us/aspnet/core/blazor/globalization-localization?view=aspnetcore-5.0#blazor-webassembly. It should take another day for the website to update.
I'm having the same issue for Norwegian, Bokmål (Norway)” (nb-NO).
To Reproduce: Create a Blazor WebAssembly hosted app (.net5.0) -- ASP.NET Core version: 5.0.102 Is set in Program.cs
Is configured in .csproj
Is added in index.html
Does not include the norwegian codes nb-no and DateTime.Now.ToString() returns
Merging with issue for Norwegian: https://github.com/dotnet/runtime/issues/53239. It turns out that on the current whitelist all the locales reported in both issues are missing, so it looks like a duplicate.
I upgraded my Blazor webassembly project to .Net5 RC2 (from .Net5 RC1) and I did notice that month names for my (Bosnian) ui culture are wrong.
Here is steps to reporduce:
In Main metoh of Program class I do set cultures to Bosninan
On any razor page when I try to get long date: