-
I am trying to use Abp Localization functions. Here is the design: base Localization module:[DependsOn(typeof(AbpLocalizationModule))]
public class LocalizationBaseModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<LocalizationBaseModule>("Test.LocalizationBase");
});
Configure<AbpLocalizationOptions>(options =>
{
//Define a new localization resource
options.Resources
.Add<LocalizationBaseResource>("en-US")
.AddVirtualJson("/Resources/Localization");
});
}
} extended Localization module:[DependsOn(typeof(LocalizationBaseModule))]
public class MyLocalizationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<MyLocalizationModule>("Test.MyLocalization");
});
Configure<AbpLocalizationOptions>(options =>
{
//Define a new localization resource
options.Resources
.Add<MyLocalizationResource>("en-US")
.AddVirtualJson("/Resources/Localization")
.AddBaseTypes(typeof(LocalizationBaseResource));
});
}
} I tried once I use following in MyLocalizationModule, it will NOT load localization resources from LocalizationBaseResource. if I remove it, it will not load resource from MyLocalizationResource. options.FileSets.AddEmbedded<MyLocalizationModule>("Test.MyLocalization") What is the best practice to using Abp.Localization in this case? My requirement is:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
in addition, I am using abp framework as a wpf application. |
Beta Was this translation helpful? Give feedback.
-
hi We have a related article. https://community.abp.io/posts/how-to-override-localization-strings-of-depending-modules-ba1oy03l |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
hi
We have a related article.
https://community.abp.io/posts/how-to-override-localization-strings-of-depending-modules-ba1oy03l