{"id":30196276,"url":"https://github.com/kardelruveyda/dotnet-localization-example","last_synced_at":"2025-08-13T05:17:42.435Z","repository":{"id":307906830,"uuid":"1031044738","full_name":"KardelRuveyda/dotnet-localization-example","owner":"KardelRuveyda","description":"A simple ASP.NET Core MVC example demonstrating how to implement multilingual support using IStringLocalizer and IViewLocalizer with .resx resource files.","archived":false,"fork":false,"pushed_at":"2025-08-02T22:26:42.000Z","size":1024,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T00:14:52.261Z","etag":null,"topics":["dotnet","dotnetcore","localization","mvc"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KardelRuveyda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-02T22:13:20.000Z","updated_at":"2025-08-02T22:26:45.000Z","dependencies_parsed_at":"2025-08-03T00:14:53.785Z","dependency_job_id":"6590f98d-0fa2-4abe-b970-96ff40bdcde7","html_url":"https://github.com/KardelRuveyda/dotnet-localization-example","commit_stats":null,"previous_names":["kardelruveyda/multilangdemo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/KardelRuveyda/dotnet-localization-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KardelRuveyda%2Fdotnet-localization-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KardelRuveyda%2Fdotnet-localization-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KardelRuveyda%2Fdotnet-localization-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KardelRuveyda%2Fdotnet-localization-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KardelRuveyda","download_url":"https://codeload.github.com/KardelRuveyda/dotnet-localization-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KardelRuveyda%2Fdotnet-localization-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270183606,"owners_count":24541341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","dotnetcore","localization","mvc"],"created_at":"2025-08-13T05:17:32.278Z","updated_at":"2025-08-13T05:17:42.389Z","avatar_url":"https://github.com/KardelRuveyda.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌍 MultiLangDemo - ASP.NET Core Localization Example\n\nMultiLangDemo is a sample ASP.NET Core MVC project that demonstrates how to implement **multi-language support** using `IStringLocalizer` and `IViewLocalizer`.\n\nUsers can view the site in their preferred language based on browser settings or a query string.\n\n---\n\n## 📁 Project Structure\n\n```\nMultiLangDemo/\n├── Controllers/\n│   └── HomeController.cs\n├── Views/\n│   └── Home/\n│       └── Index.cshtml\n├── Resources/\n│   └── Views/\n│       └── Home/\n│           ├── Index.en-US.resx\n│           ├── Index.tr-TR.resx\n│           └── Index.de-DE.resx\n├── Program.cs\n├── MultiLangDemo.csproj\n└── README.md\n```\n\n---\n\n## 🚀 Getting Started\n\n### ✅ Requirements\n\n- [.NET 9 SDK](https://dotnet.microsoft.com/download)\n- Visual Studio Code or Visual Studio 2022+\n- Git (optional)\n\n### 🔧 Setup Instructions\n\n```bash\ngit clone https://github.com/yourusername/MultiLangDemo.git\ncd MultiLangDemo\ndotnet restore\ndotnet run\n```\n\nThe application will launch at:  \n👉 https://localhost:5001\n\n---\n\n## 🌐 Testing Localization\n\nYou can switch the UI language by appending `?ui-culture=xx-XX` to the URL:\n\n| Language | URL Example                                      |\n|----------|--------------------------------------------------|\n| 🇺🇸 English | `https://localhost:5001/?ui-culture=en-US`       |\n| 🇹🇷 Turkish | `https://localhost:5001/?ui-culture=tr-TR`       |\n| 🇩🇪 German  | `https://localhost:5001/?ui-culture=de-DE`       |\n\n---\n\n## 🧩 Key Concepts\n\n- `IViewLocalizer`: Used in Razor Views to localize UI content.\n- `IStringLocalizer\u003cT\u003e`: Used in controllers or services to retrieve localized strings.\n- `.resx` Files: Resource files that store key-value pairs for each supported culture.\n\n---\n\n## 💡 Sample Output\n\nWhen visiting `https://localhost:5001/?ui-culture=tr-TR`:\n\n```\nHoş geldiniz!\nAktif dil: tr-TR\n```\n\nWhen visiting `https://localhost:5001/?ui-culture=en-US`:\n\n```\nWelcome to our site!\nActive culture: en-US\n```\n\n---\n\n## ➕ Adding a New Language\n\nTo add support for French:\n\n1. Create a new resource file:  \n   `Resources/Views/Home/Index.fr-FR.resx`\n\n2. Add translation keys and values:\n\n| Name            | Value                      |\n|-----------------|----------------------------|\n| WelcomeMessage  | Bienvenue sur notre site   |\n\n3. Add `fr-FR` to the supported cultures list in `Program.cs`.\n\n---\n\n## 🔒 Security Note\n\nIf you encounter a warning like:\n\n```\nPackage 'System.Text.RegularExpressions' 4.3.0 has a known high severity vulnerability\n```\n\nYou can upgrade the package using:\n\n```bash\ndotnet add package System.Text.RegularExpressions --version 4.3.1\n```\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkardelruveyda%2Fdotnet-localization-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkardelruveyda%2Fdotnet-localization-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkardelruveyda%2Fdotnet-localization-example/lists"}