diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html index aab3b87b3f..ce819dfbdb 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html @@ -14,16 +14,17 @@ -
-
-
-
+
+
+
+
+
-
- + + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/main.js b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/main.js new file mode 100644 index 0000000000..a1f62022d8 --- /dev/null +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/main.js @@ -0,0 +1,17 @@ +( + function () { + var isRtl = JSON.parse(localStorage.getItem("Abp.IsRtl")); + var htmlTag = document.getElementsByTagName("html")[0]; + + if (htmlTag) { + var selectedLanguage = localStorage.getItem("Abp.SelectedLanguage"); + if (selectedLanguage) { + htmlTag.setAttribute("lang", selectedLanguage); + } + + if (isRtl) { + htmlTag.setAttribute("dir", "rtl"); + } + } + } +)(); \ No newline at end of file