Localization in Blazor Maps Component
17 Dec 20241 minute to read
The Blazor Maps component supports localization, allowing it to display content in any language by integrating localized text resources. Static text elements, such as zoom toolbar tooltips and placeholder text for tile images that fail to load, can be translated into various languages (e.g., Arabic, German, French) by defining the appropriate locale value. To efficiently manage language-specific content, the localization process can utilize .resx files, enabling developers to maintain translations with ease. This feature enhances user experience and accessibility by allowing users to interact with the Maps component in their preferred language while ensuring seamless integration into applications tailored for diverse global audiences.
You can add culture-specific resource files using .resx files in your application. Please refer to the Blazor Localization topic for details on localizing Syncfusion® Blazor components.
The table below shows the locale keywords and their corresponding text that can be displayed in the Blazor Maps component. These keywords represent various UI elements, such as tooltips for zoom toolbar including zoom, zoom in/out, pan and reset actions. By defining these locale keys, developers can customize the text displayed to users in different languages.
Locale key words | Text to display |
Maps_Zoom | Zoom |
Maps_ZoomIn | Zoom in |
Maps_ZoomOut | Zoom out |
Maps_Reset | Reset |
Maps_Pan | Pan |
Maps_ImageNotFound | Image Not Found |
These translations allow the Maps component to adapt to the user’s preferred language, enhancing accessibility and usability.
The image below illustrates how the tooltip displays for the zoom toolbar values in different cultures.