Skip to content

Commit

Permalink
Fix spacing and add localization example
Browse files Browse the repository at this point in the history
  • Loading branch information
savindi7 committed Jan 8, 2025
1 parent 0d0db77 commit 573d6bb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# This file contains the language switcher configurations
# The format of the file is <language switcher name>=<language code>,<language name>,text direction(rtl/ltr)
# The default text direction is set to "ltr".
# Example: lang.switch.ar_AR=ar,Arabic - العربية,rtl
lang.switch.en_US=us,English - United States
lang.switch.fr_FR=fr,Français - France
lang.switch.es_ES=es,Español - España
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
for (Cookie cookie : userCookies) {
if ("ui_lang".equals(cookie.getName())) {
language = cookie.getValue();
break;
}
}
Expand Down Expand Up @@ -88,9 +89,10 @@
String[] fileNames = themeDir.list();
String themeFileName = "";
for(String file: fileNames) {
for (String file: fileNames) {
if (file.endsWith(themeSuffix + ".min.css")) {
themeFileName = file;
break;
}
}
Expand Down Expand Up @@ -163,6 +165,7 @@

<script type="text/javascript">
const direction = "<%= direction %>";
if (direction) {
document.documentElement.setAttribute("dir", direction);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# This file contains the language switcher configurations
# The format of the file is <language switcher name>=<language code>,<language name>,text direction(rtl/ltr)
# The default text direction is set to "ltr".
# Example: lang.switch.ar_AR=ar,Arabic - العربية,rtl
lang.switch.en_US=us,English - United States
lang.switch.fr_FR=fr,Français - France
lang.switch.es_ES=es,Español - España
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
for (Cookie cookie : userCookies) {
if ("ui_lang".equals(cookie.getName())) {
language = cookie.getValue();
break;
}
}
Expand Down Expand Up @@ -89,9 +90,10 @@
String[] fileNames = themeDir.list();
String themeFileName = "";
for(String file: fileNames) {
for (String file: fileNames) {
if (file.endsWith(themeSuffix + ".min.css")) {
themeFileName = file;
break;
}
}
Expand Down Expand Up @@ -151,6 +153,7 @@

<script type="text/javascript">
const direction = "<%= direction %>";
if (direction) {
document.documentElement.setAttribute("dir", direction);
}
Expand Down

0 comments on commit 573d6bb

Please sign in to comment.