mirror of https://github.com/abpframework/abp.git
Browse Source
Add lang-utils.js for managing language selection and RTL support (Blazor)pull/9877/head
committed by
GitHub
7 changed files with 17 additions and 28 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,17 +0,0 @@ |
|||||
( |
|
||||
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"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
)(); |
|
||||
Loading…
Reference in new issue