HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Breaking changes in Language Manager 6.0.0

Describes breaking changes when upgrading to Language Manager 6.0.0 for CMS 13.

This article covers breaking changes in Language Manager 6.0.0, including classes made internal, removed APIs, async method migrations, and service registration changes.

.NET 10 requirement

Language Manager 6.0.0 requires .NET 10.0. You must update your project target framework from net6.0 to net10.0 in your .csproj file.

Service registration

  • InitializationModule no longer implements IConfigurableModule and no longer registers services through ConfigureContainer. Register services with the .AddLanguageManager() service collection extension method in Startup.cs or Program.cs:
// Startup.cs → ConfigureServices
public void ConfigureServices(IServiceCollection services)
{
    services
        .AddCmsHost()
        .AddCmsCore()
        .AddCmsUI()
        // ... other Optimizely services ...
        .AddLanguageManager();   // ← Add this line
}
  • The extension method is in the EPiServer.DependencyInjection namespace. It registers the required services, including ILanguageBranchManager, ITranslationPackageExporter, ITranslationPackageImporter, IMachineTranslatorManager, and INotificationManager. It also configures an HTTP client with retry and resilience policies for the Cognitive Translator.

Cross-cutting changes

  • Classes that were previously public are internal. Consumer code must use the public interfaces through dependency injection instead of referencing concrete classes directly.
  • The namespace EPiServer.Labs.LanguageManager.Service was corrected to EPiServer.Labs.LanguageManager.Services. Update using statements accordingly.
  • Constants.PageNameProperty was removed. Use EPiServer.DataAbstraction.MetaDataProperties.PageName instead.

Internalized business layer classes

The following classes moved from public to internal:

Old (Public)New (Internal)
EPiServer.Labs.LanguageManager.Business.ConstantsEPiServer.Labs.LanguageManager.Business.Internal.Constants
EPiServer.Labs.LanguageManager.Business.UnitTypeEPiServer.Labs.LanguageManager.Business.Internal.UnitType
EPiServer.Labs.LanguageManager.Business.LanguageBranchManagerEPiServer.Labs.LanguageManager.Business.Internal.LanguageBranchManager
EPiServer.Labs.LanguageManager.Business.MachineTranslatorManagerEPiServer.Labs.LanguageManager.Business.Internal.MachineTranslatorManager
EPiServer.Labs.LanguageManager.Business.NotificationManagerEPiServer.Labs.LanguageManager.Business.Internal.NotificationManager
EPiServer.Labs.LanguageManager.Business.ImportTranslationsJobEPiServer.Labs.LanguageManager.Business.Internal.ImportTranslationsJob
EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageExporterEPiServer.Labs.LanguageManager.Business.Internal.XLIFFTranslationPackageExporter
EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageImporterEPiServer.Labs.LanguageManager.Business.Internal.XLIFFTranslationPackageImporter

Use the corresponding public interfaces (ILanguageBranchManager, IMachineTranslatorManager, INotificationManager, ITranslationPackageExporter, ITranslationPackageImporter) through dependency injection instead.

Internalized provider classes

Old (Public)New (Internal)
EPiServer.Labs.LanguageManager.Business.Providers.CognitiveTranslatorProviderEPiServer.Labs.LanguageManager.Business.Providers.Internal.CognitiveTranslatorProvider
EPiServer.Labs.LanguageManager.Business.Providers.UserNotificationProviderEPiServer.Labs.LanguageManager.Business.Providers.Internal.UserNotificationProvider
EPiServer.Labs.LanguageManager.Business.Providers.AdmAccessTokenEPiServer.Labs.LanguageManager.Business.Providers.Internal.AdmAccessToken

Internalized configuration classes

Old (Public)New (Internal)
EPiServer.Labs.LanguageManager.Configuration.LanguageManagerConfigEPiServer.Labs.LanguageManager.Configuration.Internal.LanguageManagerConfig
EPiServer.Labs.LanguageManager.Configuration.LanguageManagerSettingsEPiServer.Labs.LanguageManager.Configuration.Internal.LanguageManagerSettings

Use ILanguageManagerConfig through dependency injection instead.

Internalized helper classes

All helper classes moved from EPiServer.Labs.LanguageManager.Helpers to EPiServer.Labs.LanguageManager.Helpers.Internal and became internal:

  • AccessRightsHelper
  • ExtensionMethods
  • HtmlHelperExtensions
  • LanguageHelper
  • ModuleHelper
  • RegexHelper
  • StringExtensions

Internalized model classes

Old (Public)New (Internal)
EPiServer.Labs.LanguageManager.Models.TranslationErrorEPiServer.Labs.LanguageManager.Models.Internal.TranslationError
EPiServer.Labs.LanguageManager.Models.TranslationErrorDetailEPiServer.Labs.LanguageManager.Models.Internal.TranslationErrorDetail

Internalized service classes

Old (Public)New (Internal)
EPiServer.Labs.LanguageManager.Service.DefaultChildrenContentLoaderEPiServer.Labs.LanguageManager.Services.Internal.DefaultChildrenContentLoader

Use IChildrenContentLoader through dependency injection instead. Note the namespace correction from Service to Services.

Internalized shell and UI classes

Old (Public)New (Internal)
EPiServer.Labs.LanguageManager.InitializationModuleEPiServer.Labs.LanguageManager.Internal.InitializationModule
EPiServer.Labs.LanguageManager.CustomResolverEPiServer.Labs.LanguageManager.Internal.CustomResolver
EPiServer.Labs.LanguageManager.LanguageManagerComponentEPiServer.Labs.LanguageManager.Internal.LanguageManagerComponent
EPiServer.Labs.LanguageManager.LanguageManagerModuleEPiServer.Labs.LanguageManager.Internal.LanguageManagerModule
EPiServer.Labs.LanguageManager.LanguageManagerModuleViewModelEPiServer.Labs.LanguageManager.Internal.LanguageManagerModuleViewModel
EPiServer.Labs.LanguageManager.MenuProviderEPiServer.Labs.LanguageManager.Internal.MenuProvider

Removed API

  • EPiServer.Labs.LanguageManager.Business.AzureAuth.AzureAuthService – Removed entirely. Azure authentication is now handled internally by the CognitiveTranslatorProvider using the Ocp-Apim-Subscription-Key header directly.
  • Constants.PageNameProperty – Was marked [Obsolete]. Use EPiServer.DataAbstraction.MetaDataProperties.PageName instead.
  • ILanguageBranchManager – Obsolete method stubs (CopyDataFromMasterBranchAsync, CreateLanguageBranchAsync, TranslateAndCopyDataFromMasterBranchAsync) were removed from the interface. Use the current method signatures.

Changed method signatures

  • IMachineTranslatorProvider.Translate(string, string, string) returning TranslateTextResult was replaced with TranslateAsync(string, string, string) returning Task<TranslateTextResult>. Custom translator providers must update their implementation.
  • INotificationProvider.SetNotification(string, string) returning void was replaced with SetNotificationAsync(string, string) returning Task. Custom notification providers must update their implementation.
  • ITranslationPackageExporter.TryExport(int, out string, out string) returning bool was replaced with Export(int) returning ExportResult. The new ExportResult record contains bool Success, string PackagePath, and string ErrorMessage.
  • ITranslationPackageImporter.Import(string, out IEnumerable<string>) returning IEnumerable<Project> was replaced with ImportAsync(string) returning Task<(IEnumerable<Project>, IEnumerable<string>)>. Now async and returns a tuple instead of using an out parameter.

Namespace correction

Old NamespaceNew Namespace
EPiServer.Labs.LanguageManager.ServiceEPiServer.Labs.LanguageManager.Services

Added public API

  • EPiServer.Labs.LanguageManager.Models.ExportResult – Record type: ExportResult(bool Success, string PackagePath, string ErrorMessage). Returned by ITranslationPackageExporter.Export().
  • EPiServer.Labs.LanguageManager.LanguageManagerOptions.RecursiveDepth – Controls how many hierarchy levels to include in translation or cloning operations. Default: 1 (selected content only). Maximum: 3. Values outside the 13 range are clamped, and an error is logged at startup. Configure in appsettings.json:
{
  "EPiServer": {
    "CmsUI": {
      "LanguageManager": {
        "RecursiveDepth": 2
      }
    }
  }
}