Knowit.ContentTypeLocalizationProvider
3.0.0-beta01
dotnet add package Knowit.ContentTypeLocalizationProvider --version 3.0.0-beta01
NuGet\Install-Package Knowit.ContentTypeLocalizationProvider -Version 3.0.0-beta01
<PackageReference Include="Knowit.ContentTypeLocalizationProvider" Version="3.0.0-beta01" />
<PackageVersion Include="Knowit.ContentTypeLocalizationProvider" Version="3.0.0-beta01" />
<PackageReference Include="Knowit.ContentTypeLocalizationProvider" />
paket add Knowit.ContentTypeLocalizationProvider --version 3.0.0-beta01
#r "nuget: Knowit.ContentTypeLocalizationProvider, 3.0.0-beta01"
#:package Knowit.ContentTypeLocalizationProvider@3.0.0-beta01
#addin nuget:?package=Knowit.ContentTypeLocalizationProvider&version=3.0.0-beta01&prerelease
#tool nuget:?package=Knowit.ContentTypeLocalizationProvider&version=3.0.0-beta01&prerelease
Knowit.ContentTypeLocalizationProvider
Optimizely localization provider that provides automatically generated localization keys for content types (Pages, Blocks, Media etc.), their properties, tabs and categories, which can be used to localize them with Knowit.ResourceEditor.
Version 3.x supports Optimizely CMS 13 (.NET 10). CMS 12 sites use version 2.x. Changes per version: see CHANGELOG.md.
Installation:
dotnet add package Knowit.ContentTypeLocalizationProvider --prerelease
Leave out --prerelease once 3.0.0 is released; without it, NuGet picks the latest stable version (2.x, for CMS 12).
After installation:
- Open Startup.cs
- Register ContentTypeLocalizationProvider services with extension method
AddContentTypeLocalizationProvider - Register the provider under a name with
AddLocalizationProvider<ContentTypeLocalizationProvider>(<name>). This overload comes from Knowit.ResourceEditor (using Knowit.ResourceEditor.Extensions;); without Knowit.ResourceEditor, use the CMS'sAddLocalizationProvider<ContentTypeLocalizationProvider>()(using EPiServer.DependencyInjection;).
example:
public void ConfigureServices(IServiceCollection services)
{
services
.AddCmsAspNetIdentity<ApplicationUser>()
.AddCms()
.AddAdminUserRegistration()
;
services
.AddContentTypeLocalizationProvider()
.AddLocalizationProvider<ContentTypeLocalizationProvider>("ContentTypeLocalizationProvider");
}
- Configure ContentTypeLocalizationProvider via code implementing configuration action
example:
services.AddContentTypeLocalizationProvider(options =>
{
options.ContentCultureName = "en";
options.ContentAssemblyNames = new List<string>
{
typeof(Startup).Assembly.GetName().Name!
};
});
or/and configure via 'appsettings.json' (configuration in appSettings.json has highest priority over configuration in code)
example:
"ContentTypeLocalizationProvider": {
"ContentCultureName": "en", // Language of the texts in code. By default 'en' is used
"ContentAssemblyNames": [
"WebSiteName" // Assembly names containing content types. By default the assembly that calls AddContentTypeLocalizationProvider is used
],
"TranslateContentGroups": "false", // Specifies if all tab definitions should be listed; Default is 'true'. The groups and tabs that the listed content types use are listed with the content types anyway
"TranslateContentTypes": "false", // Specifies if content types (with their properties, groups and tabs) should be translated; Default is 'true'
"TranslateCategories": "false" // Specifies if categories should be translated; Default is 'true'
}
- Update ResourceEditor configuration - add ContentTypeLocalizationProvider in 'DefaultResourceProviders' (not required): example:
services.AddResourceEditor(options =>
{
options.DefaultResourceProviders = new List<string>
{
...,
"ContentTypeLocalizationProvider",
...
};
...
});
How to use
Content groups (tabs), content types and categories can be translated in Resource Editor. The provider lists the texts in ContentCultureName under the keys the CMS reads:
/contenttypes/<ContentTypeName>/nameand/description/contenttypes/<ContentTypeName>/properties/<PropertyName>/captionand/help, and/contenttypes/icontentdata/properties/<PropertyName>/...for properties declared on a base class/groups/<GroupName>for tabs and content type groups/categories/category[@name='<CategoryName>']/description
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- EPiServer (>= 13.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-beta01 | 98 | 10/29/2026 |
| 2.0.0 | 1,027 | 5/4/2026 |
| 1.0.2 | 232 | 5/4/2026 |
Optimizely CMS 13 support (.NET 10). Full history: https://dev.azure.com/knowitexperience/Knowit.Toolbox/_git/Knowit.ContentTypeLocalizationProvider?path=/CHANGELOG.md