20

Globalization in Blazor UI

 4 years ago
source link: https://www.telerik.com/blogs/globalization-in-blazor-ui
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Blazor is growing rapidly and we are starting to see apps go into production. This means that they will be accessed by people from all over the world, so your app’sInternationalization game needs to be on point. Telerik UI for Blazor components now react to current culture and show numbers and dates in the appropriate format.

We are here to help – since 2.4.0 Telerik UI for Blazor components have supported localized translations , and now with 2.5.0 we implemented the other part of the globalization feature – taking the CurrentCulture from the thread and using it to render the appropriate formats for dates and numbers.

For example, if the culture is de-DE, the user will see the Euro symbol from a number formatted as a currency in theNumericTextBox, but if the culture is en-US, they will see a $ sign.

M3eQNvV.png!web

This also applies to dates – the default formats, month names, day names and so on are taken from the culture. You can see this all in one place in theDateTimePicker.

Here’s how this compares in the underlying DateInput – this screenshot is from the list of standard format strings from theSupported Formats.

M7bqq2a.png!web

Code Time

Or, rather, codeless time - there isn’t a single line of code you need to write for the Telerik components to support number and date formatting. We simply read the current thread culture that you set in your app.

What’s Next

In addition to adding major components and features, we are also working on general functionality that will affect the entire range. We have RTL support, Keyboard support (navigation) and Accessibility (such as WAI-ARIA and WCAG compliance) on our radar, and we are working on implementing these features as well. As usual, stay tuned!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK