{"id":15410548,"url":"https://github.com/damienbod/aspnetcorelocalization","last_synced_at":"2025-04-06T07:12:13.106Z","repository":{"id":2428755,"uuid":"44405911","full_name":"damienbod/AspNetCoreLocalization","owner":"damienbod","description":"Localization.SqlLocalizer \u0026 ASP.NET Core MVC Localization Examples","archived":false,"fork":false,"pushed_at":"2023-05-10T10:53:21.000Z","size":785,"stargazers_count":249,"open_issues_count":27,"forks_count":102,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-03-30T05:08:22.170Z","etag":null,"topics":["asp-net-core","aspnetcore","ef-core","globalization","localization","mvc","sql"],"latest_commit_sha":null,"homepage":"http://damienbod.com/2015/10/21/asp-net-5-mvc-6-localization/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damienbod.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-10-16T19:19:59.000Z","updated_at":"2025-03-13T10:29:21.000Z","dependencies_parsed_at":"2023-07-05T21:01:45.211Z","dependency_job_id":null,"html_url":"https://github.com/damienbod/AspNetCoreLocalization","commit_stats":{"total_commits":261,"total_committers":13,"mean_commits":"20.076923076923077","dds":0.08429118773946365,"last_synced_commit":"3e88aa6701cde503e1595d529e27770fb0e98f50"},"previous_names":["damienbod/aspnet5localization"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damienbod%2FAspNetCoreLocalization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damienbod%2FAspNetCoreLocalization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damienbod%2FAspNetCoreLocalization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damienbod%2FAspNetCoreLocalization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damienbod","download_url":"https://codeload.github.com/damienbod/AspNetCoreLocalization/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445671,"owners_count":20939958,"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","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":["asp-net-core","aspnetcore","ef-core","globalization","localization","mvc","sql"],"created_at":"2024-10-01T16:44:58.361Z","updated_at":"2025-04-06T07:12:13.075Z","avatar_url":"https://github.com/damienbod.png","language":"C#","readme":"\n|                           | Build                                                                                                                                                       | Localization.SqlLocalizer                                                                                                                                   |\n| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| .net core                 | [![Build status](https://ci.appveyor.com/api/projects/status/gyychgc7l5g4g5lb?svg=true)](https://ci.appveyor.com/project/damienbod/aspnet5localization)      | [![NuGet Status](http://img.shields.io/nuget/v/Localization.SqlLocalizer.svg?style=flat-square)](https://www.nuget.org/packages/Localization.SqlLocalizer/) |\n\n\n========================\n\nDocumentation: http://localizationsqllocalizer.readthedocs.io/en/latest/\n\n\n\u003ca href=\"https://www.nuget.org/packages/Localization.SqlLocalizer/\"\u003eNuGet\u003c/a\u003e | \u003ca href=\"https://github.com/damienbod/AspNetCoreLocalization/issues\"\u003eIssues\u003c/a\u003e | \u003ca href=\"https://github.com/damienbod/AspNetCoreLocalization/tree/master/src/Localization.SqlLocalizer\"\u003eCode\u003c/a\u003e\n\n\n\u003cstrong\u003eBasic Usage ASP.NET Core\u003c/strong\u003e\n\nAdd the NuGet package to the project.csproj file\n\n``` json\n\"dependencies\": {\n        \"Localization.SqlLocalizer\": \"3.1.0\",\n```\n\nAdd the DbContext and use the AddSqlLocalization extension method to add the SQL Localization package.\n\n``` cs\npublic void ConfigureServices(IServiceCollection services)\n{\n    // init database for localization\n    var sqlConnectionString = Configuration[\"DbStringLocalizer:ConnectionString\"];\n\n    services.AddDbContext\u003cLocalizationModelContext\u003e(options =\u003e\n        options.UseSqlite(\n            sqlConnectionString,\n            b =\u003e b.MigrationsAssembly(\"ImportExportLocalization\")\n        ),\n        ServiceLifetime.Singleton,\n        ServiceLifetime.Singleton\n    );\n\n    // Requires that LocalizationModelContext is defined\n    services.AddSqlLocalization(options =\u003e options.UseTypeFullNames = true);\n\n```\n\nCreate your database\n\n```\ndotnet ef migrations add Localization --context localizationModelContext\n\ndotnet ef database update Localization --context localizationModelContext\n```\n\n========================\n\n# ASP.NET Core MVC Localization Example\n\n\u003cul\u003e\n    \u003cli\u003e\u003ca href=\"http://damienbod.com/2015/10/21/asp-net-5-mvc-6-localization/\"\u003eASP.NET Core MVC Localization\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"http://damienbod.com/2015/10/24/using-dataannotations-and-localization-in-asp-net-5-mvc-6/\"\u003eUsing DataAnnotations and Localization in ASP.NET Core MVC \u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"http://damienbod.com/2016/01/29/asp-net-core-1-0-using-sql-localization/\"\u003eASP.NET Core using SQL Localization\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamienbod%2Faspnetcorelocalization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamienbod%2Faspnetcorelocalization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamienbod%2Faspnetcorelocalization/lists"}