From b6f92a02f744839d81a1ed0d284930ebefa6a2c2 Mon Sep 17 00:00:00 2001
From: Alex Goris
Date: Sat, 7 Oct 2023 02:17:38 +0200
Subject: [PATCH] chore: More culture debugging stuff
---
Web/Pages/Public/About.razor | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Web/Pages/Public/About.razor b/Web/Pages/Public/About.razor
index 0847a75f..0358bf90 100644
--- a/Web/Pages/Public/About.razor
+++ b/Web/Pages/Public/About.razor
@@ -32,6 +32,16 @@
Culture info
+
+Available cultures:
+
+Amount test: @TestAmount.ToString("C", Culture)
+
Current UI culture: @CultureInfo.CurrentUICulture.DisplayName
Amount test: @TestAmount.ToString("C", CultureInfo.CurrentUICulture)
@@ -40,6 +50,8 @@
private IEnumerable claims = Enumerable.Empty();
private decimal TestAmount = 123.56M;
+ private CultureInfo[] _supportedCultures = Array.Empty();
+ private CultureInfo Culture { get; set; }
private string _version
{
@@ -66,5 +78,11 @@
{
authMessage = "The user is NOT authenticated.";
}
+
+ _supportedCultures = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures)
+ .Where(cul => !string.IsNullOrEmpty(cul.Name))
+ .ToArray();
+
+ Culture = CultureInfo.CurrentUICulture;
}
}
\ No newline at end of file