Open Closed

Current language selected for user i.e. Localization #1893


User avatar
0
lalitChougule created
  • ABP Framework version: v4.3.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no / yes
  • Exception message and stack trace: N.A
  • Steps to reproduce the issue:" N.A

How to get selected language for a logged in user i.e. english, chinese etc. at application service level

"tr" "pt-BR" "en" "zh-Hans" "sl"

and where is it stored in db ? i.e.which table ?


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

    hi

    You can directly use CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture.

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-5.0#localization-middleware

    The defaultLanguage is store in settings.

    var defaultLanguage = await settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage);
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 19, 2024, 12:56