@alper, OK no problem
I have a similar issue after I migrate to 4.3.
I migrate from 4.21 to 4.3, then I did notice that when I regenerate entities of my solution, it was creating index and FK to my navigation properties. As it is a good improvement I wanted to regenerate all entities. It works well for all my entites except the one which have Navigation properties "AppUserId".
I see this line added on MyProjectDbContextModelCreatingExtensions, into builder.Entity<MyExistingEntity>
b.HasOne<AppUser>().WithMany().HasForeignKey(x => x.AppUserId);
This line was not generate on version 4.21 and the entity generation was working well.
I just try and fixed my issue yes.
Thanks a lot
Helo,
I am actually working with Lan.
I changed as you said but it does not work, I changed it from host admin account.
When I run the application and go to login page (Angular) it is still english, once login, it remain english.
Yes, I was wondering. However they do not mention if it is when running the app or the generated migration script or when the are "building" the entity (which generate the migration script
Following your links I tried:
https://support.abp.io/QA/Questions/1280/The-property-'OrganizationUnitExtraProperties'-could-not-be-mapped-because I added b.ConfigureExtraProperties(); b.ConfigureByConvention(); //This one was already on the code In the method OnModelCreating, into builder.Entity<AppUser> It does not work. I am not 100% sure if I should add this on AppUer or on myEntity. I can not add ConfigureExtraProperties on myEntity, forst because it does not exists for my entity, plus ConfigureMyApp is regenerated when rebuild my entity, so i can not do changes on it
https://support.abp.io/QA/Questions/1271/Add-relation-between-AbpUser-to-My-Table I added builder.ConfigureIdentityPro(); Into ConfigureMyProject method, I then added it into OnModelCreating as it was not working Not working neither
https://github.com/abpframework/abp/issues/8019 About this, not sure I am concerned as I have error even before my migration file get generated.
I will keep doing some tests through information I get from your links though, but I would appreciate some more help as I am not sure to find out the issue.
Thanks
Any update about it?
Is there anyone here to reply please? This is a big issue for us and after 1 week we do not have any answer or explanation...
To be sure that the issue is not from changes from our project I created a new project, the default language is English. I then logged as host admin and put default language to Spanish. I then closed the application, restarted the project and open a browser in Incognito mode but still have the language in Spanish. Do ABP look at computer language or anything? We need to move in production
Thanks. I nee some explanation about this "default language", here is what I did test:
We have one solution in english and in Finnish, by default, whatever it is English or Finnish default, this happen:
So, if I understand, the ABP language is defined by: First, the browser language Second the operation system
I then create a new solution, "disable" the english language, and put Spanish by default.But whn I run the solution, my application is in english, and I can not change th language. On this case it should not take the default language from ABP which is Spanish?
First, I would like to understand on how th default language works. Second, I would like to know if there is any way to make a language by default, whatever is the OS or browser language.
Thanks for your help
I am not sure to understand your explanation about the last line of code, I think the language is already stored on cookies. If I open the app, select the language I want then close the browser, then open again, it will remember it and not take language from the OS or browser setting, so I guess it takes it from the cookie already.
I just tried by adding lines of code you did mention in:
ConfigureServices method from MyProjectApplicationModule.cs
ConfigureLocalization method from MyProjectHttpApiHostModule.cs
ConfigureLocalization method from MyProjectHttpApiModule.cs
ConfigureServices method from MyProjectDomainModule.cs
I changed in all project, just in case. But I did not see any difference on anything about the language management.
What we need, if possible is:
My colleague did previously and put something similar to your code suggestion in startup.cs, it was taking the default languge at opening, but then we were not able to change the language anymore.
Thanks for your help
It is what my colleague did before, similar code, he added this into startup.cs but it was not running well.
app.UseAbpRequestLocalization(options =>
{
var acceptLanguageHeaderRequestCultureProvider = options.RequestCultureProviders
.OfType<AcceptLanguageHeaderRequestCultureProvider>()
.FirstOrDefault();
if (acceptLanguageHeaderRequestCultureProvider != null)
{
options.RequestCultureProviders.Remove(acceptLanguageHeaderRequestCultureProvider);
}
});
I tried adding lines you mentionned on into MyProjectHttpApiHostModule.cs, OnApplicationInitialization method but it behave not correctly, the language selected is fine now (on the menu), but the text is in spanish and can not be changed:
When I open the app from incognito, it will then open in Spanish (Default Language). If I open the app in another browser with English previously saved in cache/cookies for this application, it will open with the English language selected, but the text will be is Spanish. And in both cases, when I try to change the language from the menu, it will remain in Spanish...