Commit 00acc1fb authored by Clint.Network's avatar Clint.Network

Trying to Fix ¤ Problem

parent fda768c3
......@@ -36,8 +36,6 @@ namespace Stratis.Guru.Controllers
{
var rqf = Request.HttpContext.Features.Get<IRequestCultureFeature>();
Console.WriteLine(JsonConvert.SerializeObject(rqf.RequestCulture.Culture.NumberFormat, Formatting.Indented));
double displayPrice = 0;
double last24Change = 0;
......
......@@ -29,6 +29,7 @@ namespace Stratis.Guru
public Startup(IConfiguration configuration)
{
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("en-US");
Configuration = configuration;
}
......@@ -98,17 +99,21 @@ namespace Stratis.Guru
var supportedCultures = new[]
{
new CultureInfo("en"),
new CultureInfo("en-US"),
new CultureInfo("en-GB"),
new CultureInfo("fr-FR"),
new CultureInfo("ru"),
new CultureInfo("it"),
new CultureInfo("de"),
new CultureInfo("cn")
new CultureInfo("ru-RU"),
new CultureInfo("it-IT"),
new CultureInfo("de-DE"),
new CultureInfo("cn-CN")
};
var defaultCulture = new RequestCulture("en-US");
defaultCulture.UICulture.NumberFormat.CurrencySymbol = "$";
app.UseRequestLocalization(new RequestLocalizationOptions
{
DefaultRequestCulture = new RequestCulture("en-US"),
DefaultRequestCulture = defaultCulture,
SupportedCultures = supportedCultures,
SupportedUICultures = supportedCultures
});
......
@using System.Globalization
@model Ticker
@model Ticker
@{
ViewBag.Title = "Online Stratis ($STRAT) price ticker";
}
......
@using Stratis.Guru
@using Stratis.Guru.Models
@using System.Globalization
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment