Open Closed

Overriding Localized Text from Identity Module #2692


User avatar
0
balessi75 created

Abp Commercial 5.1.3 / Blazor Server / EF

Hi, We've added the following to the ConfigureServices method of our Domain.Shared project:

Within the Domain.Shared/Localization/Extensions we have our en.json file set as an embedded resource. In the localization file we are attempting to override the Feature:TwoFactor localization value from the Identity Module. At runtime, however, we don't see the modified label.

We also tried putting the above code in the ConfigureServices method of our Application.Contracts project.

Any guidance is greatly appreciated.


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    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
    balessi75 created

    hi

    https://community.abp.io/posts/how-to-override-localization-strings-of-depending-modules-ba1oy03l https://github.com/abpframework/abp-samples/tree/master/DocumentationSamples/ExtendLocalizationResource

    Hi @maliming,

    We've followed the community article and still can't seem to find were we are going wrong.

    For the Feature:TwoFactor localization, should we be adding the virtualized json file from the Domain.Shared project's ConfigureServices method? Also, is it correct to be using the IdentityResource when adding the localized json file?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

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

  • User Avatar
    0
    balessi75 created

    I was using the wrong localization key.

    Instead of: "Feature:TwoFactor": "Two Factor"

    I needed: "DisplayName:Abp.Identity.TwoFactorBehaviour": "Two Factor"

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09