DEV Community
Follow
Upgrade Umbraco 13 to 16: Localization
This blog post details updating localization in Umbraco, transitioning from version 13 to 16. Backoffice localization, previously XML-based, now uses JavaScript files registered via manifests in `umbraco-package.json`. The conversion involves changing XML files to JavaScript objects, maintaining key aliases. Description fields require wrapping keys in curly brackets due to Markdown processing. Backend .NET localization shifts from `ILocalizationService` to `ILanguageService` and `IDictionaryService`, while `ILocalizeTextService` remains for XML file access. Umbraco extensions utilize localization through manifests and components inherit from `UmbLitElement` or use `UmbElementMixin` for localization helpers. Custom web components can employ `<umb-localize>` elements similar to AngularJS. JavaScript localization allows for arguments and placeholders, enabling dynamic text updates, such as pluralization. Detailed documentation is referenced for further information on each aspect of localization updates. The overall process, while involving changes, is manageable with the provided guidance and AI assistance for large file conversions.