Otvoriť Uzavreté

how to get the current user selected lanage in API #5003


User avatar
0
shobhit vytvorené
  • ABP Framework version: v4.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

How we can get the user selected lanage from UI in API.


6 odpoveď(e)/dí
  • User Avatar
    0
    maliming vytvorené
    Tím podpory Fullstack Developer

    hi

    It's setting. https://docs.abp.io/en/abp/latest/UI/Angular/Settings

  • User Avatar
    0
    shobhit vytvorené

    Hello @maliming, This is angular sample. i have to get value in C# api. Please help.

  • User Avatar
    0
    maliming vytvorené
    Tím podpory Fullstack Developer

    hi

    var defaultLanguage = await settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage);

    https://docs.abp.io/en/abp/latest/Settings#reading-the-setting-values

  • User Avatar
    0
    maliming vytvorené
    Tím podpory Fullstack Developer

    There is no API to get this. You can create your own, or just get a setting from javascript.

    https://docs.abp.io/en/abp/latest/UI/AspNetCore/JavaScript-API/Settings

  • User Avatar
    0
    shobhit vytvorené

    Thanks @maliming. Will check and revert back to you.

  • User Avatar
    0
    maliming vytvorené
    Tím podpory Fullstack Developer

    : )

Made with ❤️ on ABP v8.2.0-preview Updated on marca 25, 2024, 15:11