Extending ILocalizationService

2025/09/16 5:38 PM

My understanding is that Resource strings are purely from files now, and that there's no longer an in-CMS set of localization strings.
I'd like to reimplement that, and I largely have it, except I'd like to override the built-in ILocalizationService - to use the built-in string first if it exists, but to access my secondary logic if it doesn't find a match in the files. The reason for overriding the ILocalizationService is so that I can use built-in logic like ResHelper.GetString to access those localized strings.

Is it possible to override ILocalizationService, or otherwise inject my logic in that pathway?


Environment

  • Xperience by Kentico version: 30.8.0
Tags:
Localization

Answers

2025/09/16 6:03 PM

I wouldn't recommend going this route.

  1. What are your goals in offering dynamic (database) localizations of content? Are you localizing the administration UI or the website experience for visitors?
  2. Did you review our guide that covers using .NET's native IStringLocalizer?
  3. If you need something more dynamic for the website experience, have you thought about using a content item (or set of them) to define localized content?

To response this discussion, you have to login first.