aspnet / Mvc

[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
5.62k stars 2.14k forks source link

Multilingual in .net core #8763

Closed amh1979 closed 5 years ago

amh1979 commented 5 years ago

Is this a Bug or Feature request?:

discussion

Steps to reproduce (preferably a link to a GitHub repo with a repro project):

https://github.com/aspnet/Mvc/

Description of the problem:

Multilingual in .net core

Version of Microsoft.AspNetCore.Mvc

Is there any way to automatically use Culture of the current process? write JSON of datetime or Executor Razor page e.g.: Microsoft.AspNetCore.Mvc.Formatters.Json/JsonOutputFormatter.cs

mkArtakMSFT commented 5 years ago

Hi. It looks like this is a question about how to use ASP.NET Core. While we do our best to look through all the issues filed here, to get a faster response we suggest posting your questions to StackOverflow using the asp.net-core-mvc tag.

mkArtakMSFT commented 5 years ago

@ryanbrandenburg FYI

amh1979 commented 5 years ago

It's just a suggestion.

ryanbrandenburg commented 5 years ago

I don't really follow the suggestion. If it's that we should use CultureInfo.CurrentCulture to select our localization language then we already do, check out the documentation here.

If the question is something else please clarify. Snippets of code with current vs proposed results are particularly helpful for this kind of request.

amh1979 commented 5 years ago

Okay, I can only rewrite JsonOutputFormatter and not use the default JsonSerializerSettings