Skip to content

Commit 71461a5

Browse files
committed
Refactor localization guide to enhance instructions for adding and removing locales in My Account and Console applications
1 parent 74bf330 commit 71461a5

File tree

1 file changed

+169
-17
lines changed

1 file changed

+169
-17
lines changed

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

Lines changed: 169 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,167 @@
55

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

8-
### Add a new locale
8+
### My Account
9+
10+
Configure localization for the My Account application.
11+
12+
#### Add a locale to My Account
13+
14+
To add a new language (e.g., Arabic - `ar-SA`) to My Account:
15+
16+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/myaccount/extensions/i18n/`.
17+
18+
2. Create a `meta.json` file with the following content:
19+
20+
```json
21+
{
22+
"ar-SA": {
23+
"enabled": true,
24+
"code": "ar-SA",
25+
"flag": "sa",
26+
"name": "Arabic (Saudi Arabia)",
27+
"namespaces": [
28+
"common",
29+
"myAccount",
30+
"extensions"
31+
],
32+
"paths": {
33+
"common": "extensions/i18n/ar-SA/portals/common.json",
34+
"myAccount": "extensions/i18n/ar-SA/portals/myAccount.json",
35+
"extensions": "extensions/i18n/ar-SA/portals/extensions.json"
36+
}
37+
}
38+
}
39+
```
40+
41+
3. Copy the `en-US` bundle from `<IS_HOME>/repository/deployment/server/webapps/myaccount/resources/i18n/`.
42+
43+
4. Rename the copied bundle to `ar-SA` and place it inside `<IS_HOME>/repository/deployment/server/webapps/myaccount/extensions/i18n/`.
44+
45+
5. Translate the content in the JSON files within the new language bundle.
46+
47+
6. The new language will now appear in the language switcher.
48+
49+
#### Remove a locale from My Account
50+
51+
You can remove language support using different options based on your requirements.
52+
53+
##### Remove from all places in My Account
54+
55+
To remove a language from language switcher, branding, email templates, and all other places:
56+
57+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/myaccount/extensions/i18n/`.
58+
59+
2. Create or update the `meta.json` file with the following content:
60+
61+
```json
62+
{
63+
"pt-PT": {
64+
"enabled": false
65+
}
66+
}
67+
```
68+
69+
##### Remove from language switcher only in My Account
70+
71+
To hide a language from the language switcher while keeping it available in other places:
72+
73+
1. Update the `meta.json` file with the following content:
74+
75+
```json
76+
{
77+
"pt-PT": {
78+
"enabled": true,
79+
"showOnLanguageSwitcher": false
80+
}
81+
}
82+
```
83+
84+
### Console
85+
86+
Configure localization for the Console application.
87+
88+
#### Add a locale to Console
89+
90+
To add a new language (e.g., Arabic - `ar-SA`) to Console:
91+
92+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/console/extensions/i18n/`.
93+
94+
2. Create a `meta.json` file with the following content:
95+
96+
```json
97+
{
98+
"ar-SA": {
99+
"enabled": true,
100+
"code": "ar-SA",
101+
"flag": "sa",
102+
"name": "Arabic (Saudi Arabia)",
103+
"namespaces": [
104+
"common",
105+
"console",
106+
"extensions"
107+
],
108+
"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"
112+
}
113+
}
114+
}
115+
```
116+
117+
3. Copy the `en-US` bundle from `<IS_HOME>/repository/deployment/server/webapps/console/resources/i18n/`.
118+
119+
4. Rename the copied bundle to `ar-SA` and place it inside `<IS_HOME>/repository/deployment/server/webapps/console/extensions/i18n/`.
120+
121+
5. Translate the content in the JSON files within the new language bundle.
122+
123+
6. The new language will now appear in the language switcher.
124+
125+
#### Remove a locale from Console
126+
127+
You can remove language support using different options based on your requirements.
128+
129+
##### Remove from all places in Console
130+
131+
To remove a language from language switcher, branding, email templates, and all other places:
132+
133+
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/console/extensions/i18n/`.
134+
135+
2. Create or update the `meta.json` file with the following content:
136+
137+
```json
138+
{
139+
"pt-PT": {
140+
"enabled": false
141+
}
142+
}
143+
```
144+
145+
##### Remove from language switcher only in Console
146+
147+
To hide a language from the language switcher while keeping it available in other places:
148+
149+
1. Update the `meta.json` file with the following content:
150+
151+
```json
152+
{
153+
"pt-PT": {
154+
"enabled": true,
155+
"showOnLanguageSwitcher": false
156+
}
157+
}
158+
```
159+
160+
### Authentication & Recovery endpoints
161+
162+
The authentication and recovery endpoints use traditional properties files for localization.
163+
164+
#### Add a locale to endpoints
9165

10166
Follow these steps to add a new language to your authentication and recovery endpoints:
11167

12-
#### Step 1: Create locale-specific resource files
168+
##### Step 1: Create locale-specific resource files
13169

14170
1. Navigate to the following directories based on the endpoint you want to configure:
15171

@@ -34,7 +190,7 @@ Follow these steps to add a new language to your authentication and recovery end
34190

35191
5. Save the file.
36192

37-
#### Step 2: Configure language options
193+
##### Step 2: Configure language options
38194

39195
1. Navigate to `<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/WEB-INF/classes/`.
40196

@@ -52,23 +208,19 @@ Follow these steps to add a new language to your authentication and recovery end
52208

53209
4. Save the file.
54210

55-
#### Step 3: Enable the locale in your browser
56-
57-
1. Go to your browser settings.
58-
59-
2. Add the language you configured above to your preferred languages list.
211+
##### Step 3: Test the configuration
60212

61-
#### Step 4: Test the configuration
213+
1. Go to your browser settings and add the language you configured above to your preferred languages list.
62214

63-
1. Restart the WSO2 Identity Server.
215+
2. Restart the WSO2 Identity Server.
64216

65-
2. Open a browser and navigate to the My Account portal URL.
217+
3. Open a browser and navigate to the My Account portal URL.
66218

67219
- For localhost: [https://localhost:9443/myaccount/](https://localhost:9443/myaccount/)
68220

69-
3. You should see the login screen displaying content in the configured language.
221+
4. You should see the login screen displaying content in the configured language.
70222

71-
### Remove a locale
223+
#### Remove a locale from endpoints
72224

73225
To remove a language from your endpoints:
74226

@@ -78,11 +230,11 @@ To remove a language from your endpoints:
78230

79231
3. Restart the server for changes to take effect.
80232

81-
## RTL & LTR support
233+
## Configure RTL & LTR support
82234

83-
WSO2 Identity Server supports both Right-to-Left (RTL) and Left-to-Right (LTR) text directions. This ensures that languages like Arabic, Hebrew, and Persian display correctly with proper layout and content flow.
235+
WSO2 Identity Server supports both Right-to-Left (RTL) and Left-to-Right (LTR) text directions for authentication and recovery endpoints.
84236

85-
### Configure LTR support
237+
### LTR (Left-to-Right)
86238

87239
LTR (Left-to-Right) is the **default text direction** for most languages. You don't need to explicitly configure LTR support.
88240

@@ -104,7 +256,7 @@ To ensure a language uses LTR direction:
104256

105257
3. Save the file and restart the server.
106258

107-
### Configure RTL support
259+
### RTL (Right-to-Left)
108260

109261
When you select an RTL language, the interface automatically adjusts text alignment and content flow to follow RTL formatting conventions.
110262

0 commit comments

Comments
 (0)