Hello. Is there any way how I can update the "Current user did not login to the application" error message from ABP? I couldn't find this option anywhere in the code. Thanks.
Best regards, Martin
6 Answer(s)
-
0
Hi,
You need to follow the document below;
https://aspnetboilerplate.com/Pages/Documents/Localization#extending-localization-sources
-
0
Hello ismcagdas. I followed mentioned document but unfortunately I was not able to make it work.
This is - I guess - the essential part:
Configuration.Localization.Sources.Extensions.Add( new LocalizationSourceExtensionInfo("AbpWeb", new XmlEmbeddedFileLocalizationDictionaryProvider( Assembly.GetExecutingAssembly(), "MyCompany.MyProject.Localization.Sources" ) ) );
- I want to override this error message: "You have been logged out. Click ok to log in again". I can find it in the Abp.dll so I assume the AbpWeb should be replaced by Abp
- I store the new translation in the same file as any other translations, so I replaced "MyCompany.MyProject.Localization.Sources" by "Adel.Portal.Localization.Portal"
- Since this exception is raised by the Application module I put this code into the PortalApplicationModule PreInitialize method
I tried a few more things but the above mentiones seems to me the most logical :o).
What am I missing?
Thanks, Martin.
-
0
@xmarwin
Could you share the code you have added to overide it ?
-
0
I have added this:
Configuration.Localization.Sources.Extensions.Add( new LocalizationSourceExtensionInfo("Abp", new XmlEmbeddedFileLocalizationDictionaryProvider( Assembly.GetExecutingAssembly(), "Adel.Portal.Localization.Portal" ) ) );
to the PortalApplicationModule.PreInitialize() and added new row to the Portal.xml in Adel.Portal.Core project.
Best regards, Martin
-
0
@xmarwin
You should add a new file named Abp.xml and mark it as embedded resource.
-
0
@ismcagdas. Thanks, that did the trick. It's actually the other way round then I thought.
The code has to be indeed added to Core, not the Application project.
Thanks again for your help.
Best regards, Martin.