From the course: Blazor WebAssembly: Foundational Skills
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Globalization and localization - Blazor Tutorial
From the course: Blazor WebAssembly: Foundational Skills
Globalization and localization
- [Instructor] Depending on where you are in the world, there are differences from country to country in the language, the currency used, and how a price is displayed. Blazor WebAssembly in .net6 supports a limited number of ASP.NET calls globalization features, such as formatting a number or how a price is displayed. In addition, the string localizer feature is supported. That means that a word or a phrase can be changed, depending on where the user is based. By default, the application culture is set by the browser's language for the user who is making the request. This is set in the except hyphen language parameter in the headers when making the request. As I'm based in the United Kingdom, the header is set as en-GB. As a result, the application is currently showing the prices in British pounds, or GBP, which is the local currency for the United Kingdom. In .net, a decimal can be rendered as a local currency and price…