dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.21k stars 9.95k forks source link

Blazor g11n/i18n support #51181

Closed davhdavh closed 8 months ago

davhdavh commented 11 months ago

Is there an existing issue for this?

Describe the bug

I just tried out Blazor in .net 8, and I can see it is still mostly developed by people that live in USA and never has to make multi language apps👎

  1. dotnet new blazor => default template hard codes <html lang=en>👎
  2. dotnet new blazor --use-server true --use-wasm true => Add code Server side to fetch lang from db and set it => wasm reverts to browser language👎
  3. Set CultureInfo.DefaultThreadCurrentCulture = new("da-DK") => a. <html lang=en> still remains👎 b. <meta http-equiv="content-language" content=""> not added c. <div id=app> lang attribute not added So how is browser/search engine going to figure out I show a different language than en?👎
  4. Want dataannotations translations? Install nuget package with language support for my new language? Ofcourse not 👎

Expected Behavior

Out of the box support for the most trivial app that supports a handful of cultures and supports loading that value from somewhere.

IMHO, the default template should support multiple languages and all the default texts using resx files instead of hard coded values.

Steps To Reproduce

see above

Exceptions (if any)

No response

.NET Version

8.0-rc.1

Anything else?

No response

ghost commented 11 months ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost commented 9 months ago

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

mkArtakMSFT commented 8 months ago

Thanks for contacting us. The main thing from this list that we plan to do is already tracked as part of https://github.com/dotnet/aspnetcore/issues/26941. As for the rest, these are not things that we plan to do in the near future.