From 331157a72fdd39cd9365fc3f9497d98a5fab2452 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Thu, 7 Nov 2024 12:02:17 -0800 Subject: [PATCH] Fix build --- .../Values/CultureValue.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs b/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs index d429b3a29e8..70ab899ec22 100644 --- a/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs +++ b/src/OrchardCore/OrchardCore.DisplayManagement.Liquid/Values/CultureValue.cs @@ -26,7 +26,7 @@ public override bool Equals(FluidValue other) public override object ToObjectValue() => ToStringValue(); - public override string ToStringValue() => _culture.Name; + public override string ToStringValue() => CultureInfo.CurrentUICulture.Name; #pragma warning disable CS0672 // Member overrides obsolete member public override void WriteTo(TextWriter writer, TextEncoder encoder, CultureInfo cultureInfo) @@ -34,7 +34,7 @@ public override void WriteTo(TextWriter writer, TextEncoder encoder, CultureInfo => writer.Write(ToStringValue()); public async override ValueTask WriteToAsync(TextWriter writer, TextEncoder encoder, CultureInfo cultureInfo) - => await writer.WriteAsync(ToStringValue()); + => await writer.WriteAsync(CultureInfo.CurrentUICulture.Name); protected override FluidValue GetValue(string name, TemplateContext context) => name switch