Closed mwillems1994 closed 3 years ago
Not with the default providers, the default json file backend expects a structure like locales/{language-code}/{namespace}.json
but you can easily implement your own backend - inspired by the default josn backend - which handles your custom structure. also if you want to do custom namespace resolving from the string localizer generic context - you should be able to easily implement a custom one for your scenario which uses the typeof(T) information to automatically retrieve the translation namespace from the .net namespace.
I was wondering how and if i can split up language files. For an example i would like to have the following folder structure: locales/Controllers/Home/en.json locales/Models/Home/en.json locales/Services/Home/en.json
Is that possible? The default localisation .net Core offers, tries to guess where the localisations files are based on the path of the actual cs file. Unfortunately i am unable to figure out how it works with this library.