- ABP Framework version: v7.0.0-rc3
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
Hi,
We have some issues with our abp project One of them is when overriding the Account module localization with a new localization json files
The localized texts values are shown correctly ONLY at development mode, but when we deploy the version to the server, the localization is not working
the used code at openIdDict authentication project
`Configure(options => { options.FileSets.AddEmbedded();
if (hostingEnvironment.IsDevelopment())
{
options.FileSets.ReplaceEmbeddedByPhysical<EquipmentSharingAuthServerModule>(hostingEnvironment.ContentRootPath);
}
});`
Configure<AbpLocalizationOptions>(options => { options.Resources .Add<EquipmentAuthResource>("en-US") .AddVirtualJson("/Localization/EquipmentAuth") .AddBaseTypes(typeof(AccountResource)); //Inherit from an existing resource });
Is there anything missing to make the localization works properly on the server?
Waiting for your response
5 Answer(s)
-
0
hi
You can check this sample
https://community.abp.io/posts/how-to-override-localization-strings-of-depending-modules-ba1oy03l https://github.com/abpframework/abp-samples/tree/master/DocumentationSamples/ExtendLocalizationResource
-
0
hi,
We've followed the community article and still can't seem to find where we are going wrong.
The localization works normally at the development side but when we publish at the production, the localization does not work !!
-
0
Have you tried posting
ExtendLocalizationResource
? You can also publish to a local folder for testing. -
0
when we add this code the localization works normally on the development environment and does not work on the deployment one
if (hostingEnvironment.IsDevelopment()) { options.FileSets.ReplaceEmbeddedByPhysical<EquipmentSharingAuthServerModule>(hostingEnvironment.ContentRootPath); }
and when it is removed, the localization does not work for either development or deployment
-
0
hi Dina
Can you share a simple project? liming.ma@volosoft.com