{"id":37035223,"url":"https://github.com/valdisiljuconoks/localization-provider-core","last_synced_at":"2026-01-14T04:10:25.673Z","repository":{"id":29050266,"uuid":"120096583","full_name":"valdisiljuconoks/localization-provider-core","owner":"valdisiljuconoks","description":"Database driven localization provider for .NET applications (with administrative management UI)","archived":true,"fork":false,"pushed_at":"2024-10-22T18:28:59.000Z","size":10580,"stargazers_count":121,"open_issues_count":20,"forks_count":21,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-01T05:24:31.396Z","etag":null,"topics":["adminui","database","dotnetcore","localization","localization-tool","localizationprovider"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valdisiljuconoks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"valdisiljuconoks","custom":"https://paypal.me/valdisiljuconoks"}},"created_at":"2018-02-03T14:06:43.000Z","updated_at":"2025-06-15T05:21:17.000Z","dependencies_parsed_at":"2023-01-14T14:15:14.409Z","dependency_job_id":"ac430914-1e5b-46e9-9a35-15fb270592a5","html_url":"https://github.com/valdisiljuconoks/localization-provider-core","commit_stats":{"total_commits":305,"total_committers":8,"mean_commits":38.125,"dds":"0.049180327868852514","last_synced_commit":"49d255df1e6ca34d7a05f453f12363743c677305"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/valdisiljuconoks/localization-provider-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2Flocalization-provider-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2Flocalization-provider-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2Flocalization-provider-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2Flocalization-provider-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valdisiljuconoks","download_url":"https://codeload.github.com/valdisiljuconoks/localization-provider-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valdisiljuconoks%2Flocalization-provider-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["adminui","database","dotnetcore","localization","localization-tool","localizationprovider"],"created_at":"2026-01-14T04:10:25.157Z","updated_at":"2026-01-14T04:10:25.666Z","avatar_url":"https://github.com/valdisiljuconoks.png","language":"C#","funding_links":["https://github.com/sponsors/valdisiljuconoks","https://paypal.me/valdisiljuconoks"],"categories":[],"sub_categories":[],"readme":"[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=valdisiljuconoks_localization-provider-core\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=valdisiljuconoks_localization-provider-core)\n\n# Supporting LocalizationProvider\n\nIf you find this library useful, cup of coffee would be awesome! You can support further development of the library via [Paypal](https://paypal.me/valdisiljuconoks).\n\n# Localization Provider v8.0 IS OUT!\n\nRead more about v8.0 release [here](https://github.com/valdisiljuconoks/LocalizationProvider/?tab=readme-ov-file#localization-provider-v80-is-out).\n\n# What is the LocalizationProvider project?\n\nLocalizationProvider project is ASP.NET Core web application localization provider on steroids.\n\nGiving you the main following features:\n* Database-driven localization provider for .Net applications\n* Easy resource registrations via code\n* Supports hierarchical resources (with the help of child classes)\n\n## Source Code Repos\nThe whole package of libraries is split into multiple git repos (with submodule linkage in between). Below is list of all related repositories:\n* [Main Repository](https://github.com/valdisiljuconoks/LocalizationProvider/)\n* [.NET Runtime Repository](https://github.com/valdisiljuconoks/localization-provider-core)\n* [Optimizely Integration Repository](https://github.com/valdisiljuconoks/localization-provider-epi)\n\n\n## Project Structure\n\nDatabase localization provider is split into main [abstraction projects](https://github.com/valdisiljuconoks/LocalizationProvider) and .NET Core support project (this).\n\n## Getting Started\n\n### Bare Minimum to Start With\nBelow are code fragments that are essential to get started with a localization provider.\n\nInstall required packages:\n\n```\n\u003e dotnet add package LocalizationProvider.AspNetCore\n\u003e dotnet add package LocalizationProvider.AdminUI.AspNetCore\n\u003e dotnet add package LocalizationProvider.Storage.SqlServer\n```\n\nFollowing service configuration (usually in `Startup.cs`) is required to get the localization provider working:\n\n```csharp\npublic class Startup\n{\n    public void ConfigureServices(IServiceCollection services)\n    {\n        // add your authorization provider (asp.net identity, identity server, whichever..)\n\n        services\n            .AddControllersWithViews()\n            .AddMvcLocalization();\n\n        services.AddRazorPages();\n        services.AddRouting();\n\n        services.AddDbLocalizationProvider(_ =\u003e\n        {\n            _.UseSqlServer(Configuration.GetConnectionString(\"DefaultConnection\"));\n            ...\n        });\n\n        services.AddDbLocalizationProviderAdminUI(_ =\u003e\n        {\n            ...\n        });\n    }\n\n    ...\n}\n```\n\nAnd following setup of the application is required as a minimum (also usually located in `Startup.cs`):\n\n```csharp\npublic class Startup\n{\n    ...\n\n    public void Configure(IApplicationBuilder app, IHostingEnvironment env)\n    {\n        app.UseRouting();\n        app.UseAuthentication();\n        app.UseAuthorization();\n\n        app.UseDbLocalizationProvider();\n        app.UseDbLocalizationProviderAdminUI();\n        app.UseDbLocalizationClientsideProvider(); //assuming that you like also Javascript\n\n        app.UseEndpoints(endpoints =\u003e\n        {\n            endpoints.MapControllers();\n            endpoints.MapRazorPages();\n            endpoints.MapDbLocalizationAdminUI();\n            endpoints.MapDbLocalizationClientsideProvider();\n        });\n    }\n}\n```\n\nYou can grab some snippets from this sample `Startup.cs` file:\n\n```csharp\nusing System.Collections.Generic;\nusing System.Globalization;\nusing DbLocalizationProvider.AdminUI.AspNetCore;\nusing DbLocalizationProvider.AdminUI.AspNetCore.Routing;\nusing DbLocalizationProvider.AspNetCore;\nusing DbLocalizationProvider.AspNetCore.ClientsideProvider.Routing;\nusing DbLocalizationProvider.Core.AspNetSample.Data;\nusing DbLocalizationProvider.Core.AspNetSample.Resources;\nusing DbLocalizationProvider.Storage.SqlServer;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Identity;\nusing Microsoft.AspNetCore.Localization;\nusing Microsoft.EntityFrameworkCore;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Logging;\nusing Microsoft.Extensions.Options;\n\nnamespace SampleApp\n{\n    public class Startup\n    {\n        public Startup(IConfiguration configuration)\n        {\n            Configuration = configuration;\n        }\n\n        public IConfiguration Configuration { get; }\n\n        public void ConfigureServices(IServiceCollection services)\n        {\n            services.AddDbContext\u003cApplicationDbContext\u003e(\n                options =\u003e options.UseSqlServer(Configuration.GetConnectionString(\"DefaultConnection\")));\n\n            services\n                .AddDefaultIdentity\u003cIdentityUser\u003e()\n                .AddRoles\u003cIdentityRole\u003e()\n                .AddEntityFrameworkStores\u003cApplicationDbContext\u003e();\n\n            services\n                .AddControllersWithViews()\n                .AddMvcLocalization();\n\n            services.AddRazorPages();\n            services.AddRouting();\n\n            var supportedCultures = new List\u003cCultureInfo\u003e { new CultureInfo(\"sv\"), new CultureInfo(\"no\"), new CultureInfo(\"en\") };\n\n            services.Configure\u003cRequestLocalizationOptions\u003e(opts =\u003e\n            {\n                opts.DefaultRequestCulture = new RequestCulture(\"en\");\n                opts.SupportedCultures = supportedCultures;\n                opts.SupportedUICultures = supportedCultures;\n            });\n\n            services.AddDbLocalizationProvider(_ =\u003e\n            {\n                _.EnableInvariantCultureFallback = true;\n                _.ScanAllAssemblies = true;\n                _.FallbackCultures.Try(supportedCultures);\n                _.UseSqlServer(Configuration.GetConnectionString(\"DefaultConnection\"));\n            });\n\n            services.AddDbLocalizationProviderAdminUI(_ =\u003e\n            {\n                _.RootUrl = \"/localization-admin\";\n                _.ShowInvariantCulture = true;\n                _.ShowHiddenResources = false;\n                _.DefaultView = ResourceListView.Tree;\n            });\n        }\n\n        public void Configure(IApplicationBuilder app, IHostingEnvironment env)\n        {\n            if (env.IsDevelopment())\n            {\n                app.UseDeveloperExceptionPage();\n            }\n            else\n            {\n                app.UseExceptionHandler(\"/Home/Error\");\n                app.UseHsts();\n            }\n\n            var options = app.ApplicationServices.GetService\u003cIOptions\u003cRequestLocalizationOptions\u003e\u003e();\n            app.UseRequestLocalization(options.Value);\n\n            app.UseRouting();\n            app.UseHttpsRedirection();\n            app.UseStaticFiles();\n            app.UseAuthentication();\n            app.UseAuthorization();\n\n            app.UseDbLocalizationProvider();\n            app.UseDbLocalizationProviderAdminUI();\n            app.UseDbLocalizationClientsideProvider();\n\n            app.UseEndpoints(endpoints =\u003e\n            {\n                endpoints.MapControllers();\n                endpoints.MapRazorPages();\n\n                endpoints.MapDbLocalizationAdminUI();\n                endpoints.MapDbLocalizationClientsideProvider();\n            });\n        }\n    }\n}\n```\n\nAlso, you can refer to [sample app in GitHub](https://github.com/valdisiljuconoks/localization-provider-core/tree/master/tests/DbLocalizationProvider.Core.AspNetSample) for some more hints if needed.\n\n### More Detailed Help\n\n* [Getting Started](docs/getting-started-netcore.md)\n* [Getting Started with AdminUI](docs/getting-started-adminui.md)\n* [Localizing App Content](docs/localizing-content-netcore.md)\n* [Localizing View Model (with DataAnnotations attributes)](docs/localizing-viewmodel-netcore.md)\n* [Localizing Client-side](docs/client-side-provider-netcore.md)\n\n## GitHub Source Code Structure\n\n.NET Core support project has its own repo while main abstraction projects are included as [submodules](https://gist.github.com/gitaarik/8735255) here.\n\n# How to Contribute\n\nIt's super cool if you read this section and are interesed how to help the library. Forking and playing around sample application is the fastest way to understand how localization provider is working and how to get started.\n\nForking and cloning repo is first step you do. Keep in mind that provider is split into couple repositories to keep thigns separated. Additional repos are pulled in as submodules. If you Git client does not support automatic checkout of the submodules, just execute this command at the root of the checkout directory:\n\n```\ngit clone --recurse-submodules git://github.com/...\n```\n\n## Building AdminUI.AspNetCore Project\nYou will need to run `npm install` at root of the project to get some of the dependencies downloaded to get started.\nSome files from these packages are embedded as part of the AdminUI - therefore compilation will fail without those files.\n\n# Other Versions\n\n## v7.0 is OUT\n\nPlease read more in [this blog post](https://tech-fellow.eu/2022/01/23/dblocalizationprovider-for-optimizely/)!\n\n## What's new in v6?\nPlease [refer to this post](https://tech-fellow.eu/2020/02/22/localization-provider-major-6/) to read more about new features in v6.\n\n# More Info\n\n* [Part 1: Resources and Models](https://tech-fellow.eu/2016/03/16/db-localization-provider-part-1-resources-and-models/)\n* [Part 2: Configuration and Extensions](https://tech-fellow.eu/2016/04/22/db-localization-provider-part-2-configuration-and-extensions/)\n* [Part 3: Import and Export](https://tech-fellow.eu/2017/02/23/localization-provider-import-and-export-merge/)\n* [Part 4: Resource Refactoring and Migrations](https://tech-fellow.eu/2017/10/10/localizationprovider-tree-view-export-and-migrations/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaldisiljuconoks%2Flocalization-provider-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaldisiljuconoks%2Flocalization-provider-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaldisiljuconoks%2Flocalization-provider-core/lists"}