Skip to content

Commit ca12a25

Browse files
strickvlclaude
andcommitted
docs: consolidate i18n documentation in guide.md
Replace login-specific customization.md with generic internationalization section in guide.md. This approach is more maintainable, reduces file sprawl, points to source files as truth, and encourages community contributions. Removes repetitive examples that could get out of sync. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent fd6ca51 commit ca12a25

File tree

2 files changed

+32
-189
lines changed

2 files changed

+32
-189
lines changed

docs/customization.md

Lines changed: 0 additions & 188 deletions
This file was deleted.

docs/guide.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,35 @@ through the proxy without authentication, use `--skip-auth-preflight`.
461461

462462
## Internationalization and customization
463463

464-
You can customize some of code-server's strings for either internationalization or customization purposes. See our [customization guide](./customization.md).
464+
code-server allows you to provide a language file or JSON to configure certain strings. This can be used for both internationalization and customization.
465+
466+
For example:
467+
468+
```shell
469+
code-server --i18n /custom-strings.json
470+
code-server --i18n '{"WELCOME": "{{app}} ログイン"}'
471+
```
472+
473+
Or this can be done in the config file:
474+
475+
```yaml
476+
i18n: |
477+
{
478+
"WELCOME": "Welcome to the {{app}} Development Portal"
479+
}
480+
```
481+
482+
You can combine this with the `--locale` flag to configure language support for both code-server and VS Code in cases where code-server has no support but VS Code does. If you are using this for internationalization, please consider sending us a pull request to contribute it to `src/node/i18n/locales`.
483+
484+
### Available keys and placeholders
485+
486+
Refer to [../src/node/i18n/locales/en.json](../src/node/i18n/locales/en.json) for a full list of the available keys for translations. Note that the only placeholders supported for each key are the ones used in the default string.
487+
488+
The `--app-name` flag controls the `{{app}}` placeholder in templates. If you want to change the name, you can either:
489+
490+
1. Set `--app-name` (potentially alongside `--i18n`)
491+
2. Use `--i18n` and hardcode the name in your strings
492+
493+
### Legacy flag
494+
495+
The `--welcome-text` flag is now deprecated. Use the `WELCOME` key instead.

0 commit comments

Comments
 (0)