From 6cf47a5fbde9fa8346c7f201435926388d78876d Mon Sep 17 00:00:00 2001 From: PugazhenthiMurugan Date: Mon, 25 May 2026 10:42:46 +0530 Subject: [PATCH 1/3] Updated Readme file content --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 366c602..d7b898d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,52 @@ -# Blazor Web App Data Form Localization -The example explore the specifics of localizing data annotations specifically for the Blazor Data Form component in a Blazor web app environment. -## Project prerequisites -Make sure that you have the compatible versions of [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/ ) and [.NET Core SDK 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) or later version in your machine before starting to work on this project. +# Blazor DataForm Localization -## How to run this application -To run this application, you need to first clone the `blazor-dataform-localization` repository and then open it in Visual Studio 2022. Now, simply build and run your project to view the output. +A compact example showing how to localize data-annotation labels, validation messages, and component strings in a Blazor WebAssembly app. + +## Overview + +A compact Blazor WebAssembly sample demonstrating how to localize data-annotation labels and validation messages using .resx resource files, and how to provide localized strings to components. + +## Features + +- Localized display names for model properties (data annotations) +- Localized validation messages using `ErrorMessageResourceName` / `ErrorMessageResourceType` + +## Prerequisites + +- [.NET SDK 8.0](https://dotnet.microsoft.com/download/dotnet/8.0) or later +- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or later +- [Visual Studio Code](https://code.visualstudio.com/) + +## Getting started + +### Clone the repository: + +```bash +git clone https://your-repo-url/blazor-dataform-localization.git +cd blazor-dataform-localization +``` + +### Run with Visual Studio + +1. Open the solution file using Visual Studio 2022 or later. +2. Restore the NuGet packages by rebuilding the solution. +3. Build the project to ensure there are no compilation errors. +4. Run the project. + +### Run with .NET CLI + +```bash +# Restore dependencies +dotnet restore + +# Run the project +dotnet run +``` + +## References + + +- Blazor Localization (official documentation): +https://learn.microsoft.com/aspnet/core/blazor/globalization-localization +- Data Annotations Localization in .NET: +https://learn.microsoft.com/aspnet/core/fundamentals/localization \ No newline at end of file From 30d6f11844bb8f5c115a0661207766e6fa81a7c0 Mon Sep 17 00:00:00 2001 From: PugazhenthiMurugan Date: Mon, 25 May 2026 11:16:04 +0530 Subject: [PATCH 2/3] Refix the error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7b898d..fae2cb0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A compact Blazor WebAssembly sample demonstrating how to localize data-annotatio ### Clone the repository: ```bash -git clone https://your-repo-url/blazor-dataform-localization.git +git clone https://github.com/SyncfusionExamples/blazor-dataform-localization.git cd blazor-dataform-localization ``` From 4b8d186b41d7451c91dfecceaaf5f143ec4a6138 Mon Sep 17 00:00:00 2001 From: PugazhenthiMurugan Date: Tue, 26 May 2026 17:57:39 +0530 Subject: [PATCH 3/3] update and fix the error --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fae2cb0..874245b 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,19 @@ # Blazor DataForm Localization -A compact example showing how to localize data-annotation labels, validation messages, and component strings in a Blazor WebAssembly app. +A compact example showing how to localize data-annotation labels, validation messages, and [DataForm](https://www.syncfusion.com/blazor-components/blazor-data-form) component strings in a Blazor Web App with hybrid rendering. ## Overview -A compact Blazor WebAssembly sample demonstrating how to localize data-annotation labels and validation messages using .resx resource files, and how to provide localized strings to components. +This sample demonstrates a model-driven localization approach for **Syncfusion DataForm** with complete data annotation support. The `UserDetails` model demonstrates how to combine Display attributes with validation error localization to achieve full UI localization without writing localization code in components. The app runs in German (de-DE) by default and shows how all DataForm field labels, validation messages, and component UI strings are resolved from .resx files. ## Features -- Localized display names for model properties (data annotations) -- Localized validation messages using `ErrorMessageResourceName` / `ErrorMessageResourceType` +- **Localized Field Labels and Validation Messages**: Map data model properties to localized display names and validation error messages +- **Component String Localization**: Integrate custom resource provider with DataForm for UI string translation +- **Multi-Language Resource Files**: Support multiple cultures with neutral and culture-specific resource assemblies +- **Application Culture Configuration**: Set global culture for consistent localization across all components +- **Multiple Validation Attributes**: Localize error messages for different validation rules on the same property +- **Hybrid Rendering**: Localization works with both server-side and client-side interactive components ## Prerequisites @@ -45,8 +49,5 @@ dotnet run ## References - -- Blazor Localization (official documentation): -https://learn.microsoft.com/aspnet/core/blazor/globalization-localization -- Data Annotations Localization in .NET: -https://learn.microsoft.com/aspnet/core/fundamentals/localization \ No newline at end of file +- https://blazor.syncfusion.com/documentation/common/localization +- https://blazor.syncfusion.com/documentation/data-form/localization \ No newline at end of file