Skip to content

Commit dbc4bb0

Browse files
committed
Refactor localization guide to enhance clarity on adding/removing locales and configuring text direction for My Account and Console applications
1 parent 71461a5 commit dbc4bb0

File tree

1 file changed

+158
-31
lines changed

1 file changed

+158
-31
lines changed

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

Lines changed: 158 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55

66
You can add or remove language support to customize the user interface for different regions and languages.
77

8-
### My Account
8+
{% raw %}
9+
10+
### My Account {#add-remove-locales-in-myaccount}
11+
12+
{% endraw %}
913

1014
Configure localization for the My Account application.
1115

@@ -81,7 +85,11 @@ To hide a language from the language switcher while keeping it available in othe
8185
}
8286
```
8387

84-
### Console
88+
{% raw %}
89+
90+
### Console {#add-remove-locales-in-console}
91+
92+
{% endraw %}
8593

8694
Configure localization for the Console application.
8795

@@ -101,14 +109,14 @@ To add a new language (e.g., Arabic - `ar-SA`) to Console:
101109
"flag": "sa",
102110
"name": "Arabic (Saudi Arabia)",
103111
"namespaces": [
104-
"common",
105-
"console",
106-
"extensions"
112+
"applications",
113+
"users",
114+
...rest of the namespaces
107115
],
108116
"paths": {
109-
"common": "extensions/i18n/ar-SA/portals/common.json",
110-
"console": "extensions/i18n/ar-SA/portals/console.json",
111-
"extensions": "extensions/i18n/ar-SA/portals/extensions.json"
117+
"applications": "extensions/i18n/ar-SA/portals/applications.json",
118+
"users": "extensions/i18n/ar-SA/portals/users.json",
119+
...rest of the paths
112120
}
113121
}
114122
}
@@ -157,7 +165,11 @@ To hide a language from the language switcher while keeping it available in othe
157165
}
158166
```
159167

160-
### Authentication & Recovery endpoints
168+
{% raw %}
169+
170+
### Authentication & Recovery endpoints {#add-remove-locales-in-authentication-recovery-endpoints}
171+
172+
{% endraw %}
161173

162174
The authentication and recovery endpoints use traditional properties files for localization.
163175

@@ -230,53 +242,168 @@ To remove a language from your endpoints:
230242

231243
3. Restart the server for changes to take effect.
232244

233-
## Configure RTL & LTR support
245+
## Configure Text Direction (RTL & LTR)
234246

235-
WSO2 Identity Server supports both Right-to-Left (RTL) and Left-to-Right (LTR) text directions for authentication and recovery endpoints.
247+
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.
236248

237-
### LTR (Left-to-Right)
249+
{% raw %}
238250

239-
LTR (Left-to-Right) is the **default text direction** for most languages. You don't need to explicitly configure LTR support.
251+
### My Account {#configure-text-direction-in-myaccount}
240252

241-
To ensure a language uses LTR direction:
253+
{% endraw %}
242254

243-
1. Open the `LanguageOptions.properties` file.
255+
To configure text direction for languages in My Account:
244256

245-
2. Add the language entry without the `rtl` suffix, or explicitly specify `ltr`:
257+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/myaccount/extensions/i18n/`.
246258

247-
```properties
248-
lang.switch.en_US=en,English,ltr
259+
2. Update your `meta.json` file to include the `direction` property:
260+
261+
**For LTR languages (default):**
262+
263+
```json
264+
{
265+
"en-US": {
266+
"enabled": true,
267+
"code": "en-US",
268+
"flag": "us",
269+
"name": "English (United States)",
270+
"direction": "ltr",
271+
"namespaces": [
272+
"common",
273+
"myAccount",
274+
"extensions"
275+
],
276+
"paths": {
277+
"common": "extensions/i18n/en-US/portals/common.json",
278+
"myAccount": "extensions/i18n/en-US/portals/myAccount.json",
279+
"extensions": "extensions/i18n/en-US/portals/extensions.json"
280+
}
281+
}
282+
}
249283
```
250284

251-
or simply:
285+
**For RTL languages:**
252286

253-
```properties
254-
lang.switch.en_US=en,English
287+
```json
288+
{
289+
"ar-SA": {
290+
"enabled": true,
291+
"code": "ar-SA",
292+
"flag": "sa",
293+
"name": "Arabic (Saudi Arabia)",
294+
"direction": "rtl",
295+
"namespaces": [
296+
"common",
297+
"myAccount",
298+
"extensions"
299+
],
300+
"paths": {
301+
"common": "extensions/i18n/ar-SA/portals/common.json",
302+
"myAccount": "extensions/i18n/ar-SA/portals/myAccount.json",
303+
"extensions": "extensions/i18n/ar-SA/portals/extensions.json"
304+
}
305+
}
306+
}
255307
```
256308

257-
3. Save the file and restart the server.
309+
3. Save the file and restart the server for changes to take effect.
258310

259-
### RTL (Right-to-Left)
311+
{% raw %}
260312

261-
When you select an RTL language, the interface automatically adjusts text alignment and content flow to follow RTL formatting conventions.
313+
### Console {#configure-text-direction-in-console}
262314

263-
To enable RTL support for a specific language:
315+
{% endraw %}
264316

265-
1. Navigate to the following directory based on the endpoint you want to configure:
317+
To configure text direction for languages in Console:
266318

267-
- **Authentication endpoint**: `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`
268-
- **Recovery endpoint**: `<IS_HOME>/repository/deployment/server/webapps/accountrecoveryendpoint/WEB-INF/classes/`
319+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/console/extensions/i18n/`.
320+
321+
2. Update your `meta.json` file to include the `direction` property:
322+
323+
**For LTR languages (default):**
324+
325+
```json
326+
{
327+
"en-US": {
328+
"enabled": true,
329+
"code": "en-US",
330+
"flag": "us",
331+
"name": "English (United States)",
332+
"direction": "ltr",
333+
"namespaces": [
334+
"applications",
335+
"users",
336+
...rest of the namespaces
337+
],
338+
"paths": {
339+
"applications": "extensions/i18n/ar-SA/portals/applications.json",
340+
"users": "extensions/i18n/ar-SA/portals/users.json",
341+
...rest of the paths
342+
}
343+
}
344+
}
345+
```
346+
347+
**For RTL languages:**
348+
349+
```json
350+
{
351+
"ar-SA": {
352+
"enabled": true,
353+
"code": "ar-SA",
354+
"flag": "sa",
355+
"name": "Arabic (Saudi Arabia)",
356+
"direction": "rtl",
357+
"namespaces": [
358+
"applications",
359+
"users",
360+
...rest of the namespaces
361+
],
362+
"paths": {
363+
"applications": "extensions/i18n/ar-SA/portals/applications.json",
364+
"users": "extensions/i18n/ar-SA/portals/users.json",
365+
...rest of the paths
366+
}
367+
}
368+
}
369+
```
370+
371+
3. Save the file and restart the server for changes to take effect.
372+
373+
{% raw %}
374+
375+
### Authentication & Recovery endpoints {#configure-text-direction-in-authentication-recovery-endpoints}
376+
377+
{% endraw %}
378+
379+
To configure text direction for authentication and recovery endpoints:
380+
381+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`.
269382

270383
2. Open the `LanguageOptions.properties` file.
271384

272-
3. Add the `,rtl` suffix to the language entry. For example, to enable RTL for Arabic:
385+
3. Configure the language entry based on text direction:
386+
387+
**For LTR languages (default):**
388+
389+
```properties
390+
lang.switch.en_US=en,English,ltr
391+
```
392+
393+
or simply (LTR is assumed if not specified):
394+
395+
```properties
396+
lang.switch.en_US=en,English
397+
```
398+
399+
**For RTL languages:**
273400

274401
```properties
275402
lang.switch.ar_AE=ar,Arabic - العربية,rtl
276403
```
277404

278-
4. Save the file and restart the server for the changes to take effect.
405+
4. Save the file and restart the server for changes to take effect.
279406

280407
!!! tip
281408

282-
The RTL/LTR configuration applies to both authentication and recovery endpoints when you update the `LanguageOptions.properties` file in the authentication endpoint directory.
409+
The RTL/LTR configuration for authentication and recovery endpoints applies to both applications when you update the `LanguageOptions.properties` file in the authentication endpoint directory.

0 commit comments

Comments
 (0)