Open Closed

Issue at overriding Localization strings of AccountModule #4442


User avatar
0
Dina created
  • 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)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    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

  • User Avatar
    0
    Dina created

    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 !!

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Have you tried posting ExtendLocalizationResource? You can also publish to a local folder for testing.

  • User Avatar
    0
    Dina created

    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

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi Dina

    Can you share a simple project? liming.ma@volosoft.com

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19