Knowit.ResourceEditor 4.0.0-beta02

This is a prerelease version of Knowit.ResourceEditor.
dotnet add package Knowit.ResourceEditor --version 4.0.0-beta02
                    
NuGet\Install-Package Knowit.ResourceEditor -Version 4.0.0-beta02
                    
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.ResourceEditor" Version="4.0.0-beta02" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Knowit.ResourceEditor" Version="4.0.0-beta02" />
                    
Directory.Packages.props
<PackageReference Include="Knowit.ResourceEditor" />
                    
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.ResourceEditor --version 4.0.0-beta02
                    
#r "nuget: Knowit.ResourceEditor, 4.0.0-beta02"
                    
#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.ResourceEditor@4.0.0-beta02
                    
#: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.ResourceEditor&version=4.0.0-beta02&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Knowit.ResourceEditor&version=4.0.0-beta02&prerelease
                    
Install as a Cake Tool

Knowit Resource Editor

Installation

Knowit.ResourceEditor provides a UI for Optimizely editors to translate (or override existing translations) for resource strings.

  • Version 4.x: Optimizely CMS 13 (.NET 10).
  • Version 3.x: Optimizely CMS 12 (.NET 8).

In order to install Resource Editor use the following command:

> dotnet add package Knowit.ResourceEditor --prerelease

Note: --prerelease is needed while 4.x is in beta, otherwise NuGet installs 3.x, which doesn't support CMS 13. CMS 12 sites install 3.x versions with --version instead.

Translations saved in Resource Editor are kept in the CMS database (Dynamic Data Store), so they stay when a site upgrades from 3.x to 4.x.

After installation:
  • Open Startup.cs
  • Register Resource Editor services with extension method AddResourceEditor
  • Register localization providers with a name, using the Resource Editor overloads that take one (using Knowit.ResourceEditor.Extensions;). The editor lists providers by name, and DefaultResourceProviders refers to them by name. The CMS's own methods without a name give a provider a random name on every start.

example:

using Knowit.ResourceEditor.App_Start;
using Knowit.ResourceEditor.Extensions;

    public void ConfigureServices(IServiceCollection services)
    {
        if (_webHostingEnvironment.IsDevelopment())
        {
            AppDomain.CurrentDomain.SetData("DataDirectory", Path.Combine(_webHostingEnvironment.ContentRootPath, "App_Data"));

            services.Configure<SchedulerOptions>(options => options.Enabled = false);
        }

        services
            .AddCmsAspNetIdentity<ApplicationUser>()
            .AddCms()
            .AddAdminUserRegistration()
            ;

        services.AddResourceEditor();

        services
            .AddEmbeddedLocalization<Startup>("Site translations")
            ;
    }

Note: On CMS 13, AddCmsAspNetIdentity in the above example needs the EPiServer.Cms.UI.AspNetIdentity package and using EPiServer.DependencyInjection; (EPiServer.CMS no longer brings them in).

Named registration methods in Knowit.ResourceEditor.Extensions:

Method Registers
services.AddEmbeddedLocalization<TAssembly>(name) the XML files embedded in the assembly of TAssembly
services.AddLocalizationProvider<TProvider>(name) a provider of your own
services.AddLocalizationProvider<TProvider, TOptions>(configure, name) a provider with options (the name comes last)
localizationOptions.AddProvider<TProvider>(name) the same, inside services.Configure<LocalizationOptions>(...)
localizationOptions.AddProvider<TProvider, TOptions>(name, configure) a provider with options, inside services.Configure<LocalizationOptions>(...)
  • Initialize ResourceEditor components with extension method UseResourceEditor,

example:

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        app.UseStaticFiles();
        app.UseRouting();
        app.UseAuthentication();
        app.UseAuthorization();

        app.UseResourceEditor();

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapContent();
        });
    }
  • Configure Resource Editor via code implementing configuration action (by default "WebAdmins" required role is used)

example:

    services.AddResourceEditor(configurePolicy => configurePolicy.RequireRole("Administrators"), options =>
        {
            options.DefaultResourceProviders = new List<string>
            {
                "Site translations" //NOTE: Registered localization providers' names should be used here.
            };
            
            options.DefaultFromLanguage = "en";
            options.DefaultToLanguage = "no";
        });
    }

or/and configure via 'appsettings.json'. Values in appsettings.json win over the values set in code, and a DefaultResourceProviders list there replaces the list set in code.

example:

"ResourceEditor": {
    "DefaultResourceProviders": 
    [
        "Site translations"
    ],
    "DefaultPageSize": "200",
    "DefaultModeIsSimple": "true",
    "DefaultSortField": "From",
    "DefaultIsAscending": "false",
    "DefaultFromLanguage": "en",
    "DefaultToLanguage": "no",
    "AutoSaveInterval": "15000",
    "TranslationsFileNameFormat": "translations_{0}.xml",
    "TranslationsArchiveFileName": "translations.zip"
  }

How to use

ResourceEditor can be found in the CMS menu under Add-ons → Resource Editor

Common scenarios

Translate resources

  1. Select From and To languages
  2. Optionally add a search phrase and press Load button. Leave search phrase empty to load all resources
  3. When resources are loaded
  • Use To column to add translation and press Enter, Tab or mouse click to next resource in order to save changes. Check Status column to ensure changes are saved
  • Use local filtering (heading of each column)
  • Sorting

NOTE: There is a toggle Hide translated/Show overridden that can be useful when already translated needs to be hidden or otherwise show translated only. By default, none of them is checked. When this filter is changed resources must be reloaded by pressing Load button

Edit resources

In order to edit existing or previously added translations set From and To languages to a needed language. Use To column for editing.

Advanced scenarios

Configuration

Commonly used providers must be configured in Startup.cs. Usually there are built-in providers like EPiServerShellModulesResources, EPiServerShellProductModulesResources etc. that doesn’t need to be translated and therefore must be hidden by default. Settings->Resource providers in the advanced panel allow to temporary enable them and translate/change.

Export/Import

This function might be useful when changes are done in one environment and then needs to be moved to another for instance from Staging to Production or otherwise when Staging needs to be refreshed from Production.

  • Export All - Exports all resources regardless applied filter
  • Export Filtered - Exports all filtered. Only server filter is taken into account, local filters (heading of each column) are ignored
  • When resources are imported all existing are overwritten so be careful with import in production environment and do a backup using Export All
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
4.0.0-beta02 100 10/29/2026
4.0.0-beta01 106 10/29/2026
3.0.0 1,074 5/4/2026
2.1.2 243 5/4/2026

Fixed extra scrollbars in the CMS shell and DefaultResourceProviders from appsettings. Full history: https://dev.azure.com/knowitexperience/Knowit.Toolbox/_git/Knowit.ResourceEditor?path=/CHANGELOG.md