Extending ILocalizationService
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
Answers
I wouldn't recommend going this route.
- What are your goals in offering dynamic (database) localizations of content? Are you localizing the administration UI or the website experience for visitors?
- Did you review our guide that covers using .NET's native
IStringLocalizer
? - 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.