Skip to content

Commit a2cfc31

Browse files
committed
chore: 支持语言自动设置
1 parent 36a418c commit a2cfc31

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/BootstrapBlazor.Markdown/Components/Markdown/Markdown.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Website: https://www.blazor.zone or https://argozhang.github.io/
44

55
using Microsoft.AspNetCore.Components;
6+
using System.Globalization;
67
using System.Reflection.Metadata;
78

89
namespace BootstrapBlazor.Components;
@@ -97,7 +98,7 @@ protected override void OnInitialized()
9798

9899
Option.PreviewStyle = PreviewStyle.ToDescriptionString();
99100
Option.InitialEditType = InitialEditType.ToDescriptionString();
100-
Option.Language = Language;
101+
Option.Language = Language ?? CultureInfo.CurrentUICulture.Name;
101102
Option.Placeholder = Placeholder;
102103
Option.Height = $"{Height}px";
103104
Option.MinHeight = $"{MinHeight}px";

0 commit comments

Comments
 (0)