Localization

Strongly Localized EPiServer Categories

Initially strongly typed localization provider was not planned to be used everywhere in EPiServer, but localizing categories came as complimentary feature: [LocalizedResource(KeyPrefix = "/categories/")] public class Categories { [ResourceKey("category[@name=\"" + nameof(SampleCategory) + "\"]/description")] public static string SampleCategory => "Some Category !"; } Still there is lot of ceremony to get things right.. Sick and tired of generating proper resource keys for localizing EPiServer categories? Say no more. Localization provider gives you now (within latest version) possibility to decorate your class with attribute and necessary translations will be added automagically. Here is a…

Keep reading

Feedback Taken - EPiServer Localization Provider Updates

Listen to the audience. I was more than lucky to be on some local user groups to talk about strongly typed localization provider for EPiServer. Feedback from the audience is more likely to be provided than awaiting comments in blog posts. You have to listen to the audience, you really have to. They are your consumers, they know more about the context and projects where and how your library might be used. Over couple of last weeks I've been heads down busy with some of the feedback implementation. Here is…

Keep reading

Updates for DbLocalizationProvider - Foreign Resources

Blog post about latest updates for database localization provider project. Release mainly focuses on foreign affairs - foreign, hidden and referenced resources. Read further for more info. Foreign Resources Good friend and colleague of mine asked once: "How do I register localized resources for ValidationIssue enum from EPiServer Commerce assembly?" Short answer back then was - you can't. Until now. With latest database localization provider now you can tell provider to get familiar with so called foreign resources and include those in sync process as well - even they are…

Keep reading

DbLocalizationProvider step closer to front-end

Along with other smaller bug fixes, database-driven localization provider for EPiServer got closer to front-end. We joined forces together with my old pal and friend Arve Systad and made it possible to add translations to client side resources as well. Setup So setup for the client-side resource localization with help of DbLocalizationProvider plugin is more or less straight forward. You will need to install DbLocalizationProvider.EPiServer.JsResourceHandler package from EPiServer feed and add corresponding <script> include in your markup file to fetch translations from the server: <script…

Keep reading

Localization Provider - Import and Export (Merge)

It's been awhile since last update for DbLocalizationProvider for EPiServer. Anyway things been in my backlog. Period around New Year is not the most productive for me :) This blog post will describe some of the interesting stuff I've been lately busy with. Export & Import - View Diff Once upon a time I got sick of merging and importing new resources from staging environment (with adjusted translations by editors) into production database where on the other hand editors already made changes to existing resources. Up till now import process only…

Keep reading

Playing with Fire - Part 2, updates for DbLocalizationProvider for EPiServer

Story continues with fire and localization cases inside EPiServer sites. This time smaller update for database localization provider, but still - worth sharing. Support for Custom Attributes Currently database provider supports and understands just a few System.Attribute child classes: [LocalizedModel] - this is main marking attribute for making sure that provider resource sync process will pickup decorated class and scan resources there; [LocalizedResource] - this is similar as LocalizedModel, but makes sure that resources discovered at this class will take localized resource semantics. Read more here about differences; [ResourceKey]…

Keep reading

Playing with Fire - Localized EPiServer View Models

Recently released driven localization provider for EPiServer had main focus on more complex view models along the other smaller bug fixes and features. And specifically - there were few unsupported scenarios for the view models with base/parent class. Here is the list of all new features in v2.1. Extract Abstractions Until now, if I do need to decorate some of the resources that are located in some core area assembly - you need to reference DbLocalizationProvider library that had some undesired dependencies (for instance, why do I need…

Keep reading

EPiServer DbLocalizationProvider - fresh 2.0 is out!

Why? You might ask, but changes I guess is the only constant thing in this industry. DbLocalizationProvider is witnessing new version and some cool features covered in more details below. Also internally provider survived quite huge refactoring activities, while I was redesigning from central services and repositories to more granular command and queries. But that’s the story for another blog post. New Features in 2.0 Here goes the list of new features available in version 2.0. List is not sorted in any order. Translate System.Enum It's…

Keep reading

Db Localization Provider - Part 2: Configuration and Extensions

In this blog post we are going through some of the configuration options available for DbLocalizationProvider for EPiServer. You might be wondering what can and should be configurable for localization provider in the context of the EPiServer, but there are few things. Configuration Setup for Libraries Developing libraries as an author you always need to keep in mind your consuming projects and usage scenarios, need to think about how your library will be setup, used and extended if needed. I really liked Mark Seeman's blog posts about developing libraries and…

Keep reading

Db Localization Provider - Part 1: Resources and Models

Resources and Models This is first post about more details inside DbLocalizationProvider for EPiServer. In this post we will go through localization approach for arbitrary resources that can be used from the code to provide some message to the user or anywhere else where localization is required. Another type of localization target is model. By model we can assume any kind of class that is used to render a page, or collect posted back data from the user. Usually models are decorated with various data annotation attributes indicating underlying data…

Keep reading

EPiServer Database Localization Provider - Released!

Background Why on the Earth I would ever want to change my EPiServer localization system? EPiServer provides you with a way to organize localization resources using set of Xml files. Working on multi-lingual projects and seeing how support teams are struggling and bored with changing resource value - thought: there has to be space for improvement.. We don't need localization Lately I've been working more and more with international sites where single language is not the case at all. Localization is not needed - because we have only single language.…

Keep reading