From 573d6bbf11b1c2b455c1b132566903177c362dac Mon Sep 17 00:00:00 2001 From: savindi7 Date: Wed, 8 Jan 2025 12:56:39 +0530 Subject: [PATCH] Fix spacing and add localization example --- .../src/main/resources/LanguageOptions.properties | 1 + .../src/main/webapp/includes/header.jsp | 5 ++++- .../src/main/resources/LanguageOptions.properties | 1 + .../apps/recovery-portal/src/main/webapp/includes/header.jsp | 5 ++++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/identity-apps-core/apps/authentication-portal/src/main/resources/LanguageOptions.properties b/identity-apps-core/apps/authentication-portal/src/main/resources/LanguageOptions.properties index e4e7fd5235a..274cf7cc18c 100644 --- a/identity-apps-core/apps/authentication-portal/src/main/resources/LanguageOptions.properties +++ b/identity-apps-core/apps/authentication-portal/src/main/resources/LanguageOptions.properties @@ -21,6 +21,7 @@ # This file contains the language switcher configurations # The format of the file is =,,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 diff --git a/identity-apps-core/apps/authentication-portal/src/main/webapp/includes/header.jsp b/identity-apps-core/apps/authentication-portal/src/main/webapp/includes/header.jsp index 69598b8ad78..501e5502c17 100644 --- a/identity-apps-core/apps/authentication-portal/src/main/webapp/includes/header.jsp +++ b/identity-apps-core/apps/authentication-portal/src/main/webapp/includes/header.jsp @@ -41,6 +41,7 @@ for (Cookie cookie : userCookies) { if ("ui_lang".equals(cookie.getName())) { language = cookie.getValue(); + break; } } @@ -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; } } @@ -163,6 +165,7 @@