Custom Resource Provider
By Ziya Mollamahmut
Resource providers are responsible for doing read/write operations for the resource files.
Extending source types
XLocalizer has built-in support for .resx, .xml file types. Additionally it has support for DB with EF (requires
You can use any custom file/db type for storing localized strings by implementing
File based sources
IXResourceProvider interface for file based types (e.g.: json, csv, ...etc.) or
IDbResourceProvider interface for DB sources.
A good sample is the built-in
XmlResourceProvider. All you have to do after implementing your custom provider is to register it in startup:
You can have a look at the
EFDbResourceProvider, it has been built with EF support, but you can create your own DB resource provider by implementing
IDbResourceProvider and registering it in startup: