11# Login Page Customization
22
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.
44
5- ## Recommended Approach: Custom Strings
5+ ## Recommended Approach: Internationalization
66
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.
88
99### Using JSON File
1010
@@ -27,13 +27,13 @@ Create a JSON file with your customizations:
2727```
2828
2929``` bash
30- code-server --custom-strings /path/to/custom-strings.json
30+ code-server --i18n /path/to/custom-strings.json
3131```
3232
3333### Using Inline JSON
3434
3535``` 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"}'
3737```
3838
3939### Configuration File
@@ -44,7 +44,7 @@ Add to your `~/.config/code-server/config.yaml`:
4444bind-addr : 127.0.0.1:8080
4545auth : password
4646password : your-password
47- custom-strings : |
47+ i18n : |
4848 {
4949 "WELCOME": "Welcome to {{app}} Development Portal",
5050 "LOGIN_TITLE": "{{app}} Secure Access",
@@ -77,15 +77,15 @@ custom-strings: |
7777docker run -it --name code-server -p 127.0.0.1:8080:8080 \
7878 -v "$PWD:/home/coder/project" \
7979 -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
8181` ` `
8282
8383# ## Corporate Branding with Inline JSON
8484
8585` ` ` bash
8686docker run -it --name code-server -p 127.0.0.1:8080:8080 \
8787 -v "$PWD:/home/coder/project" \
88- codercom/code-server:latest --custom-strings '{
88+ codercom/code-server:latest --i18n '{
8989 "WELCOME": "Welcome to ACME Corporation Development Portal",
9090 "LOGIN_TITLE": "ACME Dev Portal Access",
9191 "LOGIN_BELOW": "Enter your corporate credentials",
@@ -95,14 +95,14 @@ docker run -it --name code-server -p 127.0.0.1:8080:8080 \
9595 }'
9696` ` `
9797
98- # # Using App Name with Custom Strings
98+ # # Using App Name with Internationalization
9999
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 :
101101
102102` ` ` bash
103103code-server \
104104 --app-name "Dev Portal" \
105- --custom-strings '{"WELCOME": "Welcome to {{app}} environment"}'
105+ --i18n '{"WELCOME": "Welcome to {{app}} environment"}'
106106` ` `
107107
108108This approach allows you to :
@@ -116,7 +116,7 @@ This approach allows you to:
116116` ` ` bash
117117code-server \
118118 --app-name "ACME Development Platform" \
119- --custom-strings '{
119+ --i18n '{
120120 "WELCOME": "Welcome to {{app}}",
121121 "LOGIN_TITLE": "{{app}} Access Portal",
122122 "LOGIN_BELOW": "Please authenticate to access {{app}}"
@@ -127,7 +127,7 @@ code-server \
127127` ` ` bash
128128code-server \
129129 --app-name "Mon Portail" \
130- --custom-strings '{
130+ --i18n '{
131131 "WELCOME": "Bienvenue sur {{app}}",
132132 "LOGIN_TITLE": "Connexion à {{app}}",
133133 "SUBMIT": "SE CONNECTER"
@@ -136,7 +136,7 @@ code-server \
136136
137137# # Legacy Flag Migration
138138
139- The `--welcome-text` flag is deprecated. Migrate to `--custom-strings ` :
139+ The `--welcome-text` flag is deprecated. Migrate to `--i18n ` :
140140
141141**Old:**
142142` ` ` bash
@@ -145,7 +145,7 @@ code-server --welcome-text "Welcome to development"
145145
146146**New:**
147147` ` ` bash
148- code-server --custom-strings '{"WELCOME": "Welcome to development"}'
148+ code-server --i18n '{"WELCOME": "Welcome to development"}'
149149` ` `
150150
151151# # Benefits of Custom Strings
@@ -164,10 +164,10 @@ Create different JSON files for different languages:
164164
165165` ` ` bash
166166# English
167- code-server --custom-strings /config/strings-en.json
167+ code-server --i18n /config/strings-en.json
168168
169169# Spanish
170- code-server --custom-strings /config/strings-es.json --locale es
170+ code-server --i18n /config/strings-es.json --locale es
171171` ` `
172172
173173# ## Dynamic Customization
@@ -184,5 +184,5 @@ cat > /tmp/strings.json << EOF
184184}
185185EOF
186186
187- code-server --custom-strings /tmp/strings.json
187+ code-server --i18n /tmp/strings.json
188188` ` `
0 commit comments