Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Default language at start up #4660


User avatar
0
BobIngham created

dotnet Core, Angular, v5.1.0 I copy ProjectName.Core\Localization\ProjectName\ProjectName.xml and paste to ProjectName.Core\Localization\ProjectName\ProjectName-en-GB.xml and change the localization dictionary to en-GB at the head:

<localizationDictionary culture="en-GB">

I open ProjectName.EntityFrameworkCore\Migrations\Seed\Host\DefaultLanguagesCreator.cs and add the following line to the list of ApplicationLanguages:

new ApplicationLanguage(tenantId, "en-GB", "English", "famfamfam-flags england"),

I open ProjectName.EntityFrameworkCore\Migrations\Seed\Host\DefaultSettingsCreator.cs and modify the default language:

AddSettingIfNotExists(LocalizationSettingNames.DefaultLanguage, "en-GB");

I run the project and sign in as host and get the following: [attachment=0:fy2tp2gv]DefaultLanguages.PNG[/attachment:fy2tp2gv]

What am I doing wrong?


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

    Are you using an empty database? AddSettingIfNotExists only adds, not changes.