Blazor g11n/i18n support #51181
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-templates
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Pillar: Technical Debt
Status: Resolved
Milestone
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👎
dotnet new blazor
=> default template hard codes<html lang=en>
👎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👎CultureInfo.DefaultThreadCurrentCulture = new("da-DK")
=>a.
<html lang=en>
still remains👎b.
<meta http-equiv="content-language" content="">
not addedc.
<div id=app>
lang attribute not addedSo how is browser/search engine going to figure out I show a different language than en?👎
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
The text was updated successfully, but these errors were encountered: