diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs index be7ae0ad95..56dd7de5c0 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs @@ -104,14 +104,11 @@ namespace Volo.Docs.Pages.Documents.Project private bool IsDocumentCultureDifferentThanCurrent() { - var currentCulture = CultureInfo.CurrentCulture; - CultureInfo newCulture; - try { - newCulture = CultureInfo.GetCultureInfo(LanguageCode); + var newCulture = CultureInfo.GetCultureInfo(LanguageCode); - return currentCulture.Name != newCulture.Name; + return CultureInfo.CurrentCulture.Name != newCulture.Name; } catch (CultureNotFoundException) {