@manhng

Welcome to my blog!

Globalization, Localization, Internationalization and Multi languages

June 19, 2019 09:06

Globalization, Localization, Internationalization and Multi languages (edit)

ASP.NET Globalization and Localization

https://docs.microsoft.com/en-us/previous-versions/c6zyy3s9(v=vs.140)

https://afana.me/archive/2013/11/01/aspnet-mvc-internationalization-store-strings-in-database-or-xml.aspx/

http://www.imaginativeuniversal.com/blog/2008/08/21/asp-net-ajax-script-globalization-without-the-scriptmanager/

<system.web>

   <globalization uiCulture=auto culture=auto />

</system.web>

https://www.codeproject.com/Articles/80083/Detecting-User-Regional-Settings-In-The-Web-Browse

https://www.hanselman.com/blog/GlobalizationInternationalizationAndLocalizationInASPNETMVC3JavaScriptAndJQueryPart1.aspx

Language Preference Dialog preferring French

https://forums.asp.net/t/2013469.aspx?How+can+i+format+a+number+in+javascript+according+to+cultureInfo+

var x = 111111111.111111111;
var
numFormatted = x.toLocaleString(navigator.language);
var numFormatted2 = x.toLocaleString('hihihi');
var numFormatted3 = x.toLocaleString();
var dt = new Date(9999, 11, 31, 23, 30, 45);
var
dtFormatted = dt.toLocaleString(navigator.language);
var dtFormatted2 = dt.toLocaleString('hihihi');
var dtFormatted3 = dt.toLocaleString();

If the toLocaleString() and localeFormat() functions don't work, you might try considering a plug-in like globalize.js, which is designed to handle implementing globalization features like you are referring to. 

I would highly recommend using a library for something like this, as it will likely be more well-tested and reliable than an attempt and manually splitting your values for every culture that you need to target.

 

Categories

Recent posts