Open Closed

Language Conflict #4580


User avatar
0
chandler.valle created

Hi there, I have a language conflict on ABP. If I add a new language, for example, Canadian English. Then change some words to Canadian English only. The ABP always gets from American English and ignores Canadian English, even if I set Canadian English as a default language.

Check the video below for further information: https://youtu.be/zaQp-jDJK54

Thank you.


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I will check it.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    https://github.com/abpframework/abp/pull/9170#issuecomment-850250509

    This is a known issue, creating RequestLocalizationOptions for each request is unacceptable, It can cause huge performance problems。

    After you add a new language, you need to re-run the application.

    If you really need it, you can change the lifecycle of the service:

    context.Services.RemoveAll(x => x.ServiceType == typeof(IAbpRequestLocalizationOptionsProvider));
        context.Services.AddScoped<IAbpRequestLocalizationOptionsProvider,DefaultAbpRequestLocalizationOptionsProvider>();
    
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11