Skip to content

Commit 8632c60

Browse files
committed
Enhance localization guide by adding detailed instructions for configuring text direction and adding locales for authentication, recovery, and accounts endpoints
1 parent 3a8339a commit 8632c60

File tree

1 file changed

+102
-160
lines changed

1 file changed

+102
-160
lines changed

en/identity-server/next/docs/guides/branding/localization.md

Lines changed: 102 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,86 @@ You can add or remove language support to customize the user interface for diffe
77

88
{% raw %}
99

10+
### Authentication, Recovery & Accounts endpoints {#add-remove-locales-in-authentication-recovery-accounts-endpoints}
11+
12+
{% endraw %}
13+
14+
Configure localization for authentication, recovery, and accounts endpoints using traditional properties files.
15+
16+
#### Add a locale to endpoints
17+
18+
Follow these steps to add a new language to your authentication, recovery, and accounts endpoints:
19+
20+
##### Step 1: Create locale-specific resource files
21+
22+
1. Navigate to the following directories based on the endpoint you want to configure:
23+
24+
- **Authentication endpoint**: `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/org/wso2/carbon/identity/application/authentication/endpoint/i18n/`
25+
- **Recovery endpoint**: `<IS_HOME>/repository/deployment/server/webapps/accountrecoveryendpoint/WEB-INF/classes/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/`
26+
- **Accounts endpoint**: `<IS_HOME>/repository/deployment/server/webapps/accounts/WEB-INF/classes/org/wso2/carbon/identity/application/authentication/endpoint/i18n/`
27+
28+
2. Duplicate the `Resources.properties` file in the same location.
29+
30+
3. Rename the duplicated file with the required locale suffix:
31+
- For British English: `Resources_en_GB.properties`
32+
- For French (Standard): `Resources_fr.properties`
33+
34+
!!! note
35+
36+
Refer to [Web browser language identification codes](https://www.localeplanet.com/icu/){target="_blank"} for more information on locale suffixes.
37+
38+
4. Update the values for each key in the new file:
39+
40+
```properties
41+
login=<Value in the required locale>
42+
```
43+
44+
5. Save the file.
45+
46+
##### Step 2: Configure language options
47+
48+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`.
49+
50+
2. Open the `LanguageOptions.properties` file.
51+
52+
3. Add information about the new language in the following format:
53+
54+
```properties
55+
<language switcher name>=<language code>,<language name>,<text direction>
56+
```
57+
58+
!!! note
59+
60+
The `<text direction>` parameter is optional. The default text direction is "ltr" (Left-to-Right).
61+
62+
4. Save the file.
63+
64+
##### Step 3: Test the configuration
65+
66+
1. Go to your browser settings and add the language you configured above to your preferred languages list.
67+
68+
2. Restart the WSO2 Identity Server.
69+
70+
3. Open a browser and navigate to test the endpoints:
71+
72+
- **Authentication**: [https://localhost:9443/myaccount/](https://localhost:9443/myaccount/) (triggers login screen)
73+
- **Recovery**: [https://localhost:9443/accountrecovery/](https://localhost:9443/accountrecovery/)
74+
- **Accounts**: [https://localhost:9443/accounts/](https://localhost:9443/accounts/)
75+
76+
4. You should see the screens displaying content in the configured language.
77+
78+
#### Remove a locale from endpoints
79+
80+
To remove a language from your authentication, recovery, and accounts endpoints:
81+
82+
1. Delete the corresponding `Resources_<locale>.properties` files from authentication, recovery, and accounts endpoint directories.
83+
84+
2. Remove the language entry from the `LanguageOptions.properties` file.
85+
86+
3. Restart the server for changes to take effect.
87+
88+
{% raw %}
89+
1090
### My Account {#add-remove-locales-in-myaccount}
1191

1292
{% endraw %}
@@ -165,89 +245,51 @@ To hide a language from the language switcher while keeping it available in othe
165245
}
166246
```
167247

168-
{% raw %}
169-
170-
### Authentication, Recovery & Accounts endpoints {#add-remove-locales-in-authentication-recovery-accounts-endpoints}
171-
172-
{% endraw %}
248+
## Configure Text Direction (RTL & LTR)
173249

174-
Configure localization for authentication, recovery, and accounts endpoints using traditional properties files.
250+
WSO2 Identity Server supports both Right-to-Left (RTL) and Left-to-Right (LTR) text directions. **LTR is the default text direction** for most languages and doesn't require explicit configuration. RTL languages like Arabic, Hebrew, and Persian automatically adjust the interface layout and content flow when configured properly.
175251
176-
#### Add a locale to endpoints
252+
!!! Note
177253
178-
Follow these steps to add a new language to your authentication, recovery, and accounts endpoints:
254+
The text direction is not currently configurable for the **Console**.
179255
180-
##### Step 1: Create locale-specific resource files
256+
{% raw %}
181257
182-
1. Navigate to the following directories based on the endpoint you want to configure:
258+
### Authentication, Recovery & Accounts endpoints {#configure-text-direction-in-authentication-recovery-accounts-endpoints}
183259
184-
- **Authentication endpoint**: `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/org/wso2/carbon/identity/application/authentication/endpoint/i18n/`
185-
- **Recovery endpoint**: `<IS_HOME>/repository/deployment/server/webapps/accountrecoveryendpoint/WEB-INF/classes/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/`
186-
- **Accounts endpoint**: `<IS_HOME>/repository/deployment/server/webapps/accounts/WEB-INF/classes/org/wso2/carbon/identity/application/authentication/endpoint/i18n/`
260+
{% endraw %}
187261
188-
2. Duplicate the `Resources.properties` file in the same location.
262+
To configure text direction for authentication, recovery, and accounts endpoints:
189263
190-
3. Rename the duplicated file with the required locale suffix:
191-
- For British English: `Resources_en_GB.properties`
192-
- For French (Standard): `Resources_fr.properties`
264+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`.
193265
194-
!!! note
266+
2. Open the `LanguageOptions.properties` file.
195267
196-
Refer to [Web browser language identification codes](https://www.localeplanet.com/icu/){target="_blank"} for more information on locale suffixes.
268+
3. Configure the language entry based on text direction:
197269
198-
4. Update the values for each key in the new file:
270+
**For LTR languages (default):**
199271
200272
```properties
201-
login=<Value in the required locale>
273+
lang.switch.en_US=en,English,ltr
202274
```
203275
204-
5. Save the file.
205-
206-
##### Step 2: Configure language options
207-
208-
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`.
209-
210-
2. Open the `LanguageOptions.properties` file.
211-
212-
3. Add information about the new language in the following format:
276+
or simply (LTR is assumed if not specified):
213277
214278
```properties
215-
<language switcher name>=<language code>,<language name>,<text direction>
279+
lang.switch.en_US=en,English
216280
```
217281
218-
!!! note
219-
220-
The `<text direction>` parameter is optional. The default text direction is "ltr" (Left-to-Right).
221-
222-
4. Save the file.
223-
224-
##### Step 3: Test the configuration
225-
226-
1. Go to your browser settings and add the language you configured above to your preferred languages list.
227-
228-
2. Restart the WSO2 Identity Server.
229-
230-
3. Open a browser and navigate to test the endpoints:
231-
232-
- **Authentication**: [https://localhost:9443/myaccount/](https://localhost:9443/myaccount/) (triggers login screen)
233-
- **Recovery**: [https://localhost:9443/accountrecovery/](https://localhost:9443/accountrecovery/)
234-
- **Accounts**: [https://localhost:9443/accounts/](https://localhost:9443/accounts/)
235-
236-
4. You should see the screens displaying content in the configured language.
237-
238-
#### Remove a locale from endpoints
239-
240-
To remove a language from your authentication, recovery, and accounts endpoints:
241-
242-
1. Delete the corresponding `Resources_<locale>.properties` files from authentication, recovery, and accounts endpoint directories.
282+
**For RTL languages:**
243283
244-
2. Remove the language entry from the `LanguageOptions.properties` file.
284+
```properties
285+
lang.switch.ar_AE=ar,Arabic - العربية,rtl
286+
```
245287
246-
3. Restart the server for changes to take effect.
288+
4. Save the file and restart the server for changes to take effect.
247289
248-
## Configure Text Direction (RTL & LTR)
290+
!!! tip
249291
250-
WSO2 Identity Server supports both Right-to-Left (RTL) and Left-to-Right (LTR) text directions. **LTR is the default text direction** for most languages and doesn't require explicit configuration. RTL languages like Arabic, Hebrew, and Persian automatically adjust the interface layout and content flow when configured properly.
292+
The RTL/LTR configuration applies to all three endpoints (authentication, recovery, and accounts) since they share the same `LanguageOptions.properties` file.
251293
252294
{% raw %}
253295
@@ -310,103 +352,3 @@ To configure text direction for languages in My Account:
310352
```
311353
312354
3. Save the file and restart the server for changes to take effect.
313-
314-
{% raw %}
315-
316-
### Console {#configure-text-direction-in-console}
317-
318-
{% endraw %}
319-
320-
To configure text direction for languages in Console:
321-
322-
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/console/extensions/i18n/`.
323-
324-
2. Update your `meta.json` file to include the `direction` property:
325-
326-
**For LTR languages (default):**
327-
328-
```json
329-
{
330-
"en-US": {
331-
"enabled": true,
332-
"code": "en-US",
333-
"flag": "us",
334-
"name": "English (United States)",
335-
"direction": "ltr",
336-
"namespaces": [
337-
"applications",
338-
"users",
339-
...rest of the namespaces
340-
],
341-
"paths": {
342-
"applications": "extensions/i18n/ar-SA/portals/applications.json",
343-
"users": "extensions/i18n/ar-SA/portals/users.json",
344-
...rest of the paths
345-
}
346-
}
347-
}
348-
```
349-
350-
**For RTL languages:**
351-
352-
```json
353-
{
354-
"ar-SA": {
355-
"enabled": true,
356-
"code": "ar-SA",
357-
"flag": "sa",
358-
"name": "Arabic (Saudi Arabia)",
359-
"direction": "rtl",
360-
"namespaces": [
361-
"applications",
362-
"users",
363-
...rest of the namespaces
364-
],
365-
"paths": {
366-
"applications": "extensions/i18n/ar-SA/portals/applications.json",
367-
"users": "extensions/i18n/ar-SA/portals/users.json",
368-
...rest of the paths
369-
}
370-
}
371-
}
372-
```
373-
374-
3. Save the file and restart the server for changes to take effect.
375-
376-
{% raw %}
377-
378-
### Authentication, Recovery & Accounts endpoints {#configure-text-direction-in-authentication-recovery-accounts-endpoints}
379-
380-
{% endraw %}
381-
382-
To configure text direction for authentication, recovery, and accounts endpoints:
383-
384-
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`.
385-
386-
2. Open the `LanguageOptions.properties` file.
387-
388-
3. Configure the language entry based on text direction:
389-
390-
**For LTR languages (default):**
391-
392-
```properties
393-
lang.switch.en_US=en,English,ltr
394-
```
395-
396-
or simply (LTR is assumed if not specified):
397-
398-
```properties
399-
lang.switch.en_US=en,English
400-
```
401-
402-
**For RTL languages:**
403-
404-
```properties
405-
lang.switch.ar_AE=ar,Arabic - العربية,rtl
406-
```
407-
408-
4. Save the file and restart the server for changes to take effect.
409-
410-
!!! tip
411-
412-
The RTL/LTR configuration applies to all three endpoints (authentication, recovery, and accounts) since they share the same `LanguageOptions.properties` file.

0 commit comments

Comments
 (0)