London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
With EPiServer 7 a new localization service was introduced in the EPiServer Framework, replacing the previously used localization models. The purpose with this consolidation is to make the localization procedure faster and easier.
The purpose of this change was the following:The new solution consists of two main component types, the localization service and the localization providers. The localization service is the service you use when you want to retrieve a localized string resource. The service contains an abstract base class that serve as the main entry point, and a default implementation that uses providers in the background to retrieve localized resources from various locations in the system. Additional providers can be configured and added to the service if required, either in the web.config file or using the API.
Most of the functionality contained by the EPiServer.Core.LanguageManager class has now been migrated to the new EPiServer.Framework.Localization.LocalizationService class, and the LanguageManager has been marked as obsolete. You can still use the LanguageManager as it will redirect requests to the LocalizationService.
Though strictly not needed, the lang folder under the web directory will continue to work as before and any language XML files placed here will be read by a default localization provider that is added automatically. If you do not wish for this to happen, you can just remove the folder or set the value of the addDefaultProvider attribute of the resources element to false.
If you want to override the system localizations that are shipped with EPiServer products, you will notice that the language files are no longer installed in the lang folder. They are now instead embedded in the assemblies but just as before you can override individual string by placing your own language XML in the lang folder. Of course you can include your localizations through any other LocalizationProvider and they will take precedence over the system localizations as long as the provider is registered before the system ones.
Last updated: Jul 09, 2014