Knowit.ContentTypeLocalizationProvider 3.0.0-beta01

This is a prerelease version of Knowit.ContentTypeLocalizationProvider.
dotnet add package Knowit.ContentTypeLocalizationProvider --version 3.0.0-beta01
                    
NuGet\Install-Package Knowit.ContentTypeLocalizationProvider -Version 3.0.0-beta01
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Knowit.ContentTypeLocalizationProvider" Version="3.0.0-beta01" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Knowit.ContentTypeLocalizationProvider" Version="3.0.0-beta01" />
                    
Directory.Packages.props
<PackageReference Include="Knowit.ContentTypeLocalizationProvider" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Knowit.ContentTypeLocalizationProvider --version 3.0.0-beta01
                    
#r "nuget: Knowit.ContentTypeLocalizationProvider, 3.0.0-beta01"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Knowit.ContentTypeLocalizationProvider@3.0.0-beta01
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Knowit.ContentTypeLocalizationProvider&version=3.0.0-beta01&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Knowit.ContentTypeLocalizationProvider&version=3.0.0-beta01&prerelease
                    
Install as a Cake Tool

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's AddLocalizationProvider<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>/name and /description
  • /contenttypes/<ContentTypeName>/properties/<PropertyName>/caption and /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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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,021 5/4/2026
1.0.2 232 5/4/2026