Starts in:
2 DAYS
10 HRS
51 MIN
27 SEC
Starts in:
2 D
10 H
51 M
27 S
Open Closed

Overriding localization text of Abp modules #857


User avatar
0
DanielAndreasen created

I have successfully edited the login page by following the steps discussed in this thread.

Now I wish to translate the text used in the account module for the login page. How do I do this properly?

Example: I want to define translations for "AreYouANewUser" and "OrLoginWith" in a new language.

Also how should I translate values related to validation?

  • ABP Framework version: v3.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): no (non-tiered)

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

    hi

    You can check these document first. https://docs.abp.io/en/abp/latest/Localization https://docs.abp.io/en/abp/latest/UI/Angular/Localization

  • User Avatar
    0
    DanielAndreasen created

    Hi, thank you for directing me to the documents.

    I have followed the steps to inherit from other resources for translation of the account module. However the translation to my language doesn't seem to work. Perhaps I have misunderstood something?

    HttpApiHostModule configuration:

    Resource setup:

    Notice that I have created a new Resource file in the "HttpApi.Host" project and not in the "Shared" project along with my other translation, because this module has references to the Account module. Is this correct?

    Translation:

    "RememberMe" text is not translated

  • User Avatar
    0
    Moyaoxiang created

    Hi DanielAndreasen , You should change @inject IHtmlLocalizer<AccountResource> L to @inject IHtmlLocalizer<WebResource> L.

  • User Avatar
    0
    DanielAndreasen created

    I should have mentioned that I was already doing that. Translation is not working even with injection of IHtmlLocalizer<WebResource> in the login razor page.

    I believe I have followed the steps described in the documentation. Perhaps we can solve this with a remote session?

  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    We have a sample to show how to expand localization.

    https://github.com/abpframework/abp-samples/tree/master/DocumentationSamples/ExtendLocalizationResource

    If you still can't solve the problem, you can share a project that reproduces the problem. You can use the CLI to create a free template project.

    liming.ma@volosoft.com

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

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