1
1
# Login Page Customization
2
2
3
- code-server allows you to customize the login page appearance and messages through a unified ` --custom-strings ` flag or legacy CLI arguments.
3
+ code-server allows you to customize the login page appearance and messages through the ` --i18n ` flag or legacy CLI arguments.
4
4
5
- ## Recommended Approach: Custom Strings
5
+ ## Recommended Approach: Internationalization
6
6
7
- The ` --custom-strings ` flag provides a scalable way to customize any UI text by leveraging the built-in internationalization system.
7
+ The ` --i18n ` flag provides a scalable way to customize any UI text by leveraging the built-in internationalization system.
8
8
9
9
### Using JSON File
10
10
@@ -27,13 +27,13 @@ Create a JSON file with your customizations:
27
27
```
28
28
29
29
``` bash
30
- code-server --custom-strings /path/to/custom-strings.json
30
+ code-server --i18n /path/to/custom-strings.json
31
31
```
32
32
33
33
### Using Inline JSON
34
34
35
35
``` bash
36
- code-server --custom-strings ' {"WELCOME": "Welcome to My Dev Portal", "LOGIN_TITLE": "Development Access", "SUBMIT": "SIGN IN"}'
36
+ code-server --i18n ' {"WELCOME": "Welcome to My Dev Portal", "LOGIN_TITLE": "Development Access", "SUBMIT": "SIGN IN"}'
37
37
```
38
38
39
39
### Configuration File
@@ -44,7 +44,7 @@ Add to your `~/.config/code-server/config.yaml`:
44
44
bind-addr : 127.0.0.1:8080
45
45
auth : password
46
46
password : your-password
47
- custom-strings : |
47
+ i18n : |
48
48
{
49
49
"WELCOME": "Welcome to {{app}} Development Portal",
50
50
"LOGIN_TITLE": "{{app}} Secure Access",
@@ -77,15 +77,15 @@ custom-strings: |
77
77
docker run -it --name code-server -p 127.0.0.1:8080:8080 \
78
78
-v "$PWD:/home/coder/project" \
79
79
-v "$PWD/custom-strings.json:/custom-strings.json" \
80
- codercom/code-server:latest --custom-strings /custom-strings.json
80
+ codercom/code-server:latest --i18n /custom-strings.json
81
81
` ` `
82
82
83
83
# ## Corporate Branding with Inline JSON
84
84
85
85
` ` ` bash
86
86
docker run -it --name code-server -p 127.0.0.1:8080:8080 \
87
87
-v "$PWD:/home/coder/project" \
88
- codercom/code-server:latest --custom-strings '{
88
+ codercom/code-server:latest --i18n '{
89
89
"WELCOME": "Welcome to ACME Corporation Development Portal",
90
90
"LOGIN_TITLE": "ACME Dev Portal Access",
91
91
"LOGIN_BELOW": "Enter your corporate credentials",
@@ -95,14 +95,14 @@ docker run -it --name code-server -p 127.0.0.1:8080:8080 \
95
95
}'
96
96
` ` `
97
97
98
- # # Using App Name with Custom Strings
98
+ # # Using App Name with Internationalization
99
99
100
- The `--app-name` flag works perfectly with `--custom-strings ` to provide the `{{app}}` placeholder functionality :
100
+ The `--app-name` flag works perfectly with `--i18n ` to provide the `{{app}}` placeholder functionality :
101
101
102
102
` ` ` bash
103
103
code-server \
104
104
--app-name "Dev Portal" \
105
- --custom-strings '{"WELCOME": "Welcome to {{app}} environment"}'
105
+ --i18n '{"WELCOME": "Welcome to {{app}} environment"}'
106
106
` ` `
107
107
108
108
This approach allows you to :
@@ -116,7 +116,7 @@ This approach allows you to:
116
116
` ` ` bash
117
117
code-server \
118
118
--app-name "ACME Development Platform" \
119
- --custom-strings '{
119
+ --i18n '{
120
120
"WELCOME": "Welcome to {{app}}",
121
121
"LOGIN_TITLE": "{{app}} Access Portal",
122
122
"LOGIN_BELOW": "Please authenticate to access {{app}}"
@@ -127,7 +127,7 @@ code-server \
127
127
` ` ` bash
128
128
code-server \
129
129
--app-name "Mon Portail" \
130
- --custom-strings '{
130
+ --i18n '{
131
131
"WELCOME": "Bienvenue sur {{app}}",
132
132
"LOGIN_TITLE": "Connexion à {{app}}",
133
133
"SUBMIT": "SE CONNECTER"
@@ -136,7 +136,7 @@ code-server \
136
136
137
137
# # Legacy Flag Migration
138
138
139
- The `--welcome-text` flag is deprecated. Migrate to `--custom-strings ` :
139
+ The `--welcome-text` flag is deprecated. Migrate to `--i18n ` :
140
140
141
141
**Old:**
142
142
` ` ` bash
@@ -145,7 +145,7 @@ code-server --welcome-text "Welcome to development"
145
145
146
146
**New:**
147
147
` ` ` bash
148
- code-server --custom-strings '{"WELCOME": "Welcome to development"}'
148
+ code-server --i18n '{"WELCOME": "Welcome to development"}'
149
149
` ` `
150
150
151
151
# # Benefits of Custom Strings
@@ -164,10 +164,10 @@ Create different JSON files for different languages:
164
164
165
165
` ` ` bash
166
166
# English
167
- code-server --custom-strings /config/strings-en.json
167
+ code-server --i18n /config/strings-en.json
168
168
169
169
# Spanish
170
- code-server --custom-strings /config/strings-es.json --locale es
170
+ code-server --i18n /config/strings-es.json --locale es
171
171
` ` `
172
172
173
173
# ## Dynamic Customization
@@ -184,5 +184,5 @@ cat > /tmp/strings.json << EOF
184
184
}
185
185
EOF
186
186
187
- code-server --custom-strings /tmp/strings.json
187
+ code-server --i18n /tmp/strings.json
188
188
` ` `
0 commit comments