Skip to content

Commit

Permalink
Merge pull request #4952 from wso2/rtl-support-docs
Browse files Browse the repository at this point in the history
Add documentation for RTL support
  • Loading branch information
himeshsiriwardana authored Jan 8, 2025
2 parents 447c93c + bf02212 commit 583c819
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions en/identity-server/next/docs/guides/branding/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ WSO2 Identity Server provides internationalization support for its web applicati
- 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 locale suffixes.
!!! note

Refer to [Web browser language identification codes](https://www.localeplanet.com/icu/){target="_blank"} for more information on locale suffixes.

3. Update the values for each key as follows:
```
Expand All @@ -24,9 +26,14 @@ WSO2 Identity Server provides internationalization support for its web applicati

6. Add information about the new language in the following format & save the file.
```
<language switcher name>=<language code>,<language name>`
<language switcher name>=<language code>,<language name>,<text direction>`
```

!!! note

- `<text direction>` is optional.
- The default text direction is set to "ltr" (Left-to-Right). To enable support for Right-to-Left (RTL) languages, refer to the documentation on [Right-to-Left (RTL) Language Support]({{base_path}}/guides/branding/localization/#right-to-left-rtl-language-support) for detailed instructions.

7. Go to the browser settings and add the language you configured above.

8. Restart the server. To try out, do the following:
Expand All @@ -35,9 +42,31 @@ WSO2 Identity Server provides internationalization support for its web applicati

## 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:
You can enable localization for `accountrecoveryendpoint` by applying the same steps 1 through 8 in the previous [section](#configuring-localization-for-authentication-endpoints), for the following location:

`<IS_HOME>/repository/deployment/server/webapps/accountrecoveryendpoint/WEB-INF/classes/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/`.

Update the LanguageOptions.properties file located at: `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/LanguageOptions.properties` to include the new language options.

## Right-to-Left (RTL) Language Support

{{product_name}} supports Right-to-Left (RTL) languages like Arabic, Hebrew, and Persian, ensuring login and recovery screens dynamically adjust their layout and text direction for a seamless user experience. When an RTL language is selected, the interface, including text alignment and content flow, automatically mirrors to follow RTL formatting conventions.

If you need to enable Right-to-Left (RTL) support for a language in authentication and recovery endpoints, follow these steps:

1. Navigate to the following directory based on the endpoint you want to configure:

- Authentication endpoint: `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`
- Recovery endpoint: `<IS_HOME>/repository/deployment/server/webapps/accountrecoveryendpoint/WEB-INF/classes/`

2. Open the `LanguageOptions.properties` file.

3. Add the ,rtl suffix to the language entry in the file. For example, to enable RTL for Arabic, update the entry as follows:

```text
lang.switch.ar_AR=ar,Arabic - العربية,rtl
```
4. Save the file and restart the server for the changes to take effect.
This will apply RTL formatting for the specified language across authentication and recovery endpoints.

0 comments on commit 583c819

Please sign in to comment.