Skip to content

Commit

Permalink
fix language getting
Browse files Browse the repository at this point in the history
  • Loading branch information
Apfelwurm committed Jan 11, 2023
1 parent cd29af7 commit 9fd4d90
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions NetEvent/Server/Extensions/DefaultCultureExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@ public static Task SetDefaultCulture(this WebApplication app)
{
using (var context = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>())
{
var organizationCulture = context.Set<SystemSettingValue>().Select(x => DtoMapper.Mapper.SystemSettingValueToSystemSettingValueDto(x)).ToList().Find(x => x.Key.Equals(SystemSettings.DataCultureInfo));

var organizationCulture = new SystemSettings.OrganizationData().Settings.Select(x => x.Key.Equals(SystemSettings.OrganizationData.DataCultureInfo)).ToString();;
if (organizationCulture == null)
{
return Task.CompletedTask;
}

var culture = organizationCulture.Value;

var cultureInfo = new CultureInfo(culture);
var cultureInfo = new CultureInfo(organizationCulture);
CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;
}
Expand Down

0 comments on commit 9fd4d90

Please sign in to comment.