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
InitializationModuleno longer implementsIConfigurableModuleand no longer registers services throughConfigureContainer. Register services with the.AddLanguageManager()service collection extension method inStartup.csorProgram.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.DependencyInjectionnamespace. It registers the required services, includingILanguageBranchManager,ITranslationPackageExporter,ITranslationPackageImporter,IMachineTranslatorManager, andINotificationManager. 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.Servicewas corrected toEPiServer.Labs.LanguageManager.Services. Updateusingstatements accordingly. Constants.PageNamePropertywas removed. UseEPiServer.DataAbstraction.MetaDataProperties.PageNameinstead.
Internalized business layer classes
The following classes moved from public to internal:
| Old (Public) | New (Internal) |
|---|---|
EPiServer.Labs.LanguageManager.Business.Constants | EPiServer.Labs.LanguageManager.Business.Internal.Constants |
EPiServer.Labs.LanguageManager.Business.UnitType | EPiServer.Labs.LanguageManager.Business.Internal.UnitType |
EPiServer.Labs.LanguageManager.Business.LanguageBranchManager | EPiServer.Labs.LanguageManager.Business.Internal.LanguageBranchManager |
EPiServer.Labs.LanguageManager.Business.MachineTranslatorManager | EPiServer.Labs.LanguageManager.Business.Internal.MachineTranslatorManager |
EPiServer.Labs.LanguageManager.Business.NotificationManager | EPiServer.Labs.LanguageManager.Business.Internal.NotificationManager |
EPiServer.Labs.LanguageManager.Business.ImportTranslationsJob | EPiServer.Labs.LanguageManager.Business.Internal.ImportTranslationsJob |
EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageExporter | EPiServer.Labs.LanguageManager.Business.Internal.XLIFFTranslationPackageExporter |
EPiServer.Labs.LanguageManager.Business.XLIFFTranslationPackageImporter | EPiServer.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.CognitiveTranslatorProvider | EPiServer.Labs.LanguageManager.Business.Providers.Internal.CognitiveTranslatorProvider |
EPiServer.Labs.LanguageManager.Business.Providers.UserNotificationProvider | EPiServer.Labs.LanguageManager.Business.Providers.Internal.UserNotificationProvider |
EPiServer.Labs.LanguageManager.Business.Providers.AdmAccessToken | EPiServer.Labs.LanguageManager.Business.Providers.Internal.AdmAccessToken |
Internalized configuration classes
| Old (Public) | New (Internal) |
|---|---|
EPiServer.Labs.LanguageManager.Configuration.LanguageManagerConfig | EPiServer.Labs.LanguageManager.Configuration.Internal.LanguageManagerConfig |
EPiServer.Labs.LanguageManager.Configuration.LanguageManagerSettings | EPiServer.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:
AccessRightsHelperExtensionMethodsHtmlHelperExtensionsLanguageHelperModuleHelperRegexHelperStringExtensions
Internalized model classes
| Old (Public) | New (Internal) |
|---|---|
EPiServer.Labs.LanguageManager.Models.TranslationError | EPiServer.Labs.LanguageManager.Models.Internal.TranslationError |
EPiServer.Labs.LanguageManager.Models.TranslationErrorDetail | EPiServer.Labs.LanguageManager.Models.Internal.TranslationErrorDetail |
Internalized service classes
| Old (Public) | New (Internal) |
|---|---|
EPiServer.Labs.LanguageManager.Service.DefaultChildrenContentLoader | EPiServer.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.InitializationModule | EPiServer.Labs.LanguageManager.Internal.InitializationModule |
EPiServer.Labs.LanguageManager.CustomResolver | EPiServer.Labs.LanguageManager.Internal.CustomResolver |
EPiServer.Labs.LanguageManager.LanguageManagerComponent | EPiServer.Labs.LanguageManager.Internal.LanguageManagerComponent |
EPiServer.Labs.LanguageManager.LanguageManagerModule | EPiServer.Labs.LanguageManager.Internal.LanguageManagerModule |
EPiServer.Labs.LanguageManager.LanguageManagerModuleViewModel | EPiServer.Labs.LanguageManager.Internal.LanguageManagerModuleViewModel |
EPiServer.Labs.LanguageManager.MenuProvider | EPiServer.Labs.LanguageManager.Internal.MenuProvider |
Removed API
EPiServer.Labs.LanguageManager.Business.AzureAuth.AzureAuthService– Removed entirely. Azure authentication is now handled internally by theCognitiveTranslatorProviderusing theOcp-Apim-Subscription-Keyheader directly.Constants.PageNameProperty– Was marked[Obsolete]. UseEPiServer.DataAbstraction.MetaDataProperties.PageNameinstead.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)returningTranslateTextResultwas replaced withTranslateAsync(string, string, string)returningTask<TranslateTextResult>. Custom translator providers must update their implementation.INotificationProvider.SetNotification(string, string)returningvoidwas replaced withSetNotificationAsync(string, string)returningTask. Custom notification providers must update their implementation.ITranslationPackageExporter.TryExport(int, out string, out string)returningboolwas replaced withExport(int)returningExportResult. The newExportResultrecord containsbool Success,string PackagePath, andstring ErrorMessage.ITranslationPackageImporter.Import(string, out IEnumerable<string>)returningIEnumerable<Project>was replaced withImportAsync(string)returningTask<(IEnumerable<Project>, IEnumerable<string>)>. Now async and returns a tuple instead of using anoutparameter.
Namespace correction
| Old Namespace | New Namespace |
|---|---|
EPiServer.Labs.LanguageManager.Service | EPiServer.Labs.LanguageManager.Services |
Added public API
EPiServer.Labs.LanguageManager.Models.ExportResult– Record type:ExportResult(bool Success, string PackagePath, string ErrorMessage). Returned byITranslationPackageExporter.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 the1–3range are clamped, and an error is logged at startup. Configure inappsettings.json:
{
"EPiServer": {
"CmsUI": {
"LanguageManager": {
"RecursiveDepth": 2
}
}
}
}