Breaking changes in Language Manager 6.0.0
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.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:
- AccessRightsHelper
- ExtensionMethods
- HtmlHelperExtensions
- LanguageHelper
- ModuleHelper
- RegexHelper
- StringExtensions
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 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 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 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 1–3 range are clamped, and an error is logged at startup. Configure in appsettings.json:
{
"EPiServer": {
"CmsUI": {
"LanguageManager": {
"RecursiveDepth": 2
}
}
}
}