diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Localization/Extensions/ClaimsPrincipleExtensions.cs b/src/OrchardCore.Modules/OrchardCore.Users/Localization/Extensions/ClaimsPrincipleExtensions.cs new file mode 100644 index 00000000000..0282cf17e44 --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.Users/Localization/Extensions/ClaimsPrincipleExtensions.cs @@ -0,0 +1,9 @@ +using OrchardCore.Users.Localization.Providers; + +namespace System.Security.Claims; + +public static class ClaimsPrincipleExtensions +{ + public static string GetCulture(this ClaimsPrincipal principal) + => principal.FindFirstValue(UserLocalizationClaimsProvider.CultureClaimType); +}