From 59041f875b2c4d2ac19614f7ed37ef8e3f8407bb Mon Sep 17 00:00:00 2001 From: Afra Hussaindeen Date: Sun, 9 Jun 2024 15:09:58 +0530 Subject: [PATCH 1/4] Add instructions to configure localization for authentication and recovery endpoints --- .../next/docs/guides/branding/localization.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/en/identity-server/next/docs/guides/branding/localization.md b/en/identity-server/next/docs/guides/branding/localization.md index 72fe706472..ffcc3dfcec 100644 --- a/en/identity-server/next/docs/guides/branding/localization.md +++ b/en/identity-server/next/docs/guides/branding/localization.md @@ -1,2 +1,43 @@ {% set product_url_format = "https://localhost:9443" %} {% include "../../../../../includes/guides/branding/localization.md" %} + +## Configuring Localization for Authentication Endpoints + +WSO2 Identity Server provides internationalization support for the web apps (such as the authentication endpoint which is in `/repository/deployment/server/webapps/` directory). The following steps describe how you can configure this: + +1. Navigate to `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/org/wso2/carbon/identity/application/authentication/endpoint/i18n/` + +2. Take a copy of the `Resources.properties` file to the same location, rename it with the required locale suffix as follows: + - For British English: `Resources_en_GB.properties` + - For French (Standard): `Resources_fr.properties` + + Refer to [Web browser language identification codes](https://www.localeplanet.com/icu/) for more information on required locale suffixes. + +3. Update values while keeping the keys as follows: + ``` + login= + ``` + +4. Save the file. + +5. Next, navigate to `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/` and open the `LanguageOptions.properties` file. + +6. Add the new language in the following format & save the file. + ``` + =,` + ``` + +7. Go to the browser setting and add the language you configured above. + +8. Restart the server. To try out, do the following: + 1. Open up a browser. + 2. Type the My Account portal URL. (If you are running the server in your localhost, the URL is: [https://localhost:9443/myaccount/](https://localhost:9443/myaccount/)). You will see the login screen having the contents in the configured language. + +## Configuring Localization for Recovery Endpoints + +Similarly, you can enable localization for `accountrecoveryendpoint` by applying the same steps 1 through 8 in the previous section, starting with the following location: + +`/repository/deployment/server/webapps/accountrecoveryendpoint/WEB-INF/classes/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/`. + +Additionally, update the LanguageOptions.properties file located at: `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/LanguageOptions.properties` file to include the new language options. + From 471e7f9d3297e0f68a6c015d38c9c20ad00b3f7c Mon Sep 17 00:00:00 2001 From: Afra Hussaindeen <47135592+AfraHussaindeen@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:43:18 +0530 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Himesh Siriwardana --- .../next/docs/guides/branding/localization.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/en/identity-server/next/docs/guides/branding/localization.md b/en/identity-server/next/docs/guides/branding/localization.md index ffcc3dfcec..1afcde7a7a 100644 --- a/en/identity-server/next/docs/guides/branding/localization.md +++ b/en/identity-server/next/docs/guides/branding/localization.md @@ -3,31 +3,31 @@ ## Configuring Localization for Authentication Endpoints -WSO2 Identity Server provides internationalization support for the web apps (such as the authentication endpoint which is in `/repository/deployment/server/webapps/` directory). The following steps describe how you can configure this: +WSO2 Identity Server provides internationalization support for its web applications (such as the authentication endpoint located in the `/repository/deployment/server/webapps/` directory). The following steps describe how you can configure this: 1. Navigate to `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/org/wso2/carbon/identity/application/authentication/endpoint/i18n/` -2. Take a copy of the `Resources.properties` file to the same location, rename it with the required locale suffix as follows: +2. Duplicate the `Resources.properties` file in the same location and rename it with the required locale suffix as follows: - For British English: `Resources_en_GB.properties` - For French (Standard): `Resources_fr.properties` - Refer to [Web browser language identification codes](https://www.localeplanet.com/icu/) for more information on required locale suffixes. + Refer to [Web browser language identification codes](https://www.localeplanet.com/icu/) for more information on locale suffixes. -3. Update values while keeping the keys as follows: +3. Update the values for each key as follows: ``` login= ``` 4. Save the file. -5. Next, navigate to `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/` and open the `LanguageOptions.properties` file. +5. Navigate to `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/` and open the `LanguageOptions.properties` file. -6. Add the new language in the following format & save the file. +6. Add information about the new language in the following format & save the file. ``` =,` ``` -7. Go to the browser setting and add the language you configured above. +7. Go to the browser settings and add the language you configured above. 8. Restart the server. To try out, do the following: 1. Open up a browser. @@ -35,9 +35,9 @@ WSO2 Identity Server provides internationalization support for the web apps (suc ## Configuring Localization for Recovery Endpoints -Similarly, you can enable localization for `accountrecoveryendpoint` by applying the same steps 1 through 8 in the previous section, starting with the following location: +You can enable localization for `accountrecoveryendpoint` by applying the same steps 1 through 8 in the previous section, for the following location: `/repository/deployment/server/webapps/accountrecoveryendpoint/WEB-INF/classes/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/`. -Additionally, update the LanguageOptions.properties file located at: `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/LanguageOptions.properties` file to include the new language options. +Update the LanguageOptions.properties file located at: `/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/LanguageOptions.properties` to include the new language options. From f19b439fa787342811d64d78805bef3ed36bf2bd Mon Sep 17 00:00:00 2001 From: Himesh Siriwardana Date: Fri, 14 Jun 2024 10:21:08 +0530 Subject: [PATCH 3/4] Update en/identity-server/next/docs/guides/branding/localization.md --- en/identity-server/next/docs/guides/branding/localization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/identity-server/next/docs/guides/branding/localization.md b/en/identity-server/next/docs/guides/branding/localization.md index 1afcde7a7a..03fdeb6937 100644 --- a/en/identity-server/next/docs/guides/branding/localization.md +++ b/en/identity-server/next/docs/guides/branding/localization.md @@ -1,7 +1,7 @@ {% set product_url_format = "https://localhost:9443" %} {% include "../../../../../includes/guides/branding/localization.md" %} -## Configuring Localization for Authentication Endpoints +## Configuring localization for authentication endpoints WSO2 Identity Server provides internationalization support for its web applications (such as the authentication endpoint located in the `/repository/deployment/server/webapps/` directory). The following steps describe how you can configure this: From 3965b9d19bb56fec003fa94a42dd629de63950b2 Mon Sep 17 00:00:00 2001 From: Himesh Siriwardana Date: Fri, 14 Jun 2024 10:21:14 +0530 Subject: [PATCH 4/4] Update en/identity-server/next/docs/guides/branding/localization.md --- en/identity-server/next/docs/guides/branding/localization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/identity-server/next/docs/guides/branding/localization.md b/en/identity-server/next/docs/guides/branding/localization.md index 03fdeb6937..fed3fd6a75 100644 --- a/en/identity-server/next/docs/guides/branding/localization.md +++ b/en/identity-server/next/docs/guides/branding/localization.md @@ -33,7 +33,7 @@ WSO2 Identity Server provides internationalization support for its web applicati 1. Open up a browser. 2. Type the My Account portal URL. (If you are running the server in your localhost, the URL is: [https://localhost:9443/myaccount/](https://localhost:9443/myaccount/)). You will see the login screen having the contents in the configured language. -## Configuring Localization for Recovery Endpoints +## Configuring localization for recovery endpoints You can enable localization for `accountrecoveryendpoint` by applying the same steps 1 through 8 in the previous section, for the following location: