-
Notifications
You must be signed in to change notification settings - Fork 29
How file path works
_ResourcePath _is the link where the application will fetch the location files. By default, the _ResourcePath _look by default to the bin folder. If you don't want to be dependant to the bin folder, you need to set IsAbsolutePath to true.
If UseBaseName is set to true, it will be searched for lingualization files by the following order - skipping the options below if any option before matches.
-
If you use a non-typed IStringLocalizer all files in the Resources-directory, including all subdirectories, will be used to find a localization. This can cause unpredictable behavior if the same key is used in multiple files.
-
If you use a typed localizer, the following applies - Namespace is the "short namespace" without the root namespace:
-
Nested classes will use the translation file of their parent class.
- If there is a folder named "Your/Namespace/And/Classname", all contents of this folder will be used.
- If there is a folder named "Your/Namespace" the folder will be searched for all json-files beginning with your classname.
- Otherwise there will be searched for a json-file starting with "Your.Namespace.And.Classname" in your Resources-folder.
- If there is any .shared.json file at base path, all the keys that do not exist in other files will be added.
- If you need a base shared files, just add a file named localization.shared.json in your ResourcesPath