Base solution for your next web application
Open Closed

Best way to get CultureInfo of user #7601


User avatar
0
tom.ohle created

On the server side, I would like to send emails to users based on their CultureInfo setting stored.

I cannot use CultureInfo.CurrentCulture because I don't want the CultureInfo information for the current logged in user. I want it for another user.

It appears that if a user chooses a language that is different from default the entry will display in the AbpSettings table. However, what would be the best way programmatically to retrieve this data in the Asp.Net Core project?


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

    I suggest you use the ISettingManager to read the settings.

    https://aspnetboilerplate.com/Pages/Documents/Setting-Management#getting-setting-values