C
C#16mo ago
Denis

❔ Is it possible to log for the user (not dev) with localization?

Given that a multi-lingual app exists And it is currently configured to some language When something is logged via ILogger Then the log message is written in the configured language Is this possible? If so, how?
6 Replies
mtreit
mtreit16mo ago
You would need to load the log message template from localized resource files.
Angius
Angius16mo ago
Why though? Log in English Logs are for developers, not end users
Denis
DenisOP16mo ago
Indeed you are correct. I suppose I've used the incorrect term... the logging I'm interested in is supposed to be read by the user. E.g., an engineer needs to read a report (logging) of some running process and operate some machine based on said report
mtreit
mtreit16mo ago
I think the answer is you just get the localized strings like in any other localized application.
mtreit
mtreit16mo ago
Provide localized resources for languages and cultures in an ASP.NE...
Learn how to provide localized resources for localizing content of an ASP.NET Core app into different languages and cultures.
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?