How can I create a service that returns different JSON files based on the user's language? #28973
Unanswered
nikas-belogolov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ASP.NET Core Get different JSON data from an injected service based on the user's language
Render nested JSON data to razor page based on the user language (asp.net core razor pages)
What I need is something like this:
The example above if I were using SharedLocalizer:
The second example works only with .resx files and doesn't work with nesting.
What I'm basically trying to achieve is to get localized JSON data from a service based on the user's language. (Something similar to the SharedLocalizationService)
This is my startup.cs configuration:
This is my JSON file:
Beta Was this translation helpful? Give feedback.
All reactions