- ABP Framework version: v5.1.4
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
We want to update localization Files (e.g. en.json) during runtime (e.g. when application is restarted).
Documentation (https://docs.abp.io/en/abp/latest/Localization) says
"JSON files are embedded into the assembly using AbpVirtualFileSystemOptions (see virtual file system)."
Configure<AbpLocalizationOptions>(options =>
{
//Define a new localization resource (MyProjectName)
options.Resources
.Add<MyProjectName>("en")
.AddVirtualJson("/Localization/MyProjectName");
});
And on https://docs.abp.io/en/abp/latest/Virtual-File-System:
"Physical files always override the virtual files. That means if you put a file under the /wwwroot/my-folder/my-file.css, it will override the file in the same location of the virtual file system. So, you need to know the file paths defined in the modules to override them."
Now when I put a file there, e.g. /wwwroot/Localization/MyProjectName/en.json, it does not overwrite the localization text. I also tried /Localization/MyProjectName/en.json, which also does not work.
So my question is, how is it possible to update whole localization JSON files during runtime?
Updating single texts via UI Administration->Language Management does not solve the issue, as we have hundreds of texts
Thank you in advance!
3 Answer(s)
-
0
hi
The JSON files compiled into assembly DLL so it doesn't work.
-
0
So there is no way to make it work?
Often localization JSONs in projects are made to be changeable during runtime, so I thought maybe ABP has something like this.
-
0
So there is no way to make it work?
I'm afraid yes