Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Angular app localization #7539


User avatar
0
peopleteq created

Hi,

I use modular system of abp. Each module has own localization source (xml file). As I found Angular app uses one localization source with name predefined in const variable AppConsts.localization.defaultLocalizationSourceName. Is it possible to specify different localization source name for different modules on angular app?


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @peopleteq

    Yes, but it is not implemented by default. You can use https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/shared/common/pipes/localize.pipe.ts#L24 and define the "defaul localization source name" for each module as you want.

  • User Avatar
    0
    peopleteq created

    Hi @ismcagdas

    Thanks a lot for help!

  • User Avatar
    0
    AidanCostcoAU created

    @peopleteq How did you end up handling this? I have a similar issue.

  • User Avatar
    0
    andmattia created

    Hi @peopleteq

    I think the only way is create your custom pipe (based on orignal) because the second args is varibale array or use a special notation to identify when first element off args is localization key (es. '##') so in this way you can add an if and call l or ls function