Starts in:
1 DAY
19 HRS
37 MIN
27 SEC
Starts in:
1 D
19 H
37 M
27 S
Open Closed

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


User avatar
0
shobhit created
  • 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 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

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

  • User Avatar
    0
    shobhit created

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

  • User Avatar
    0
    maliming created
    Support Team 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 created
    Support Team 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 created

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

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

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