The system settings page
Erya's entire configuration screen, and it has two entries.
| Key | What it does |
|---|---|
| F2 | Opens system settings |
| ↑ ↓ | Moves between “Key bindings” and “Interface language”. The selected row is highlighted and marked ▶. |
| ← → | Changes the value, wrapping at the ends. |
| E | Opens the keymap editor (see 4.1.4) |
| Enter | Applies and returns to editing |
| Esc | Cancels; nothing changes |
The status bar shows the combination currently selected (profile │ language), so you can check before pressing Enter.
What it applies to, and when
The moment you press Enter, every tab changes.
- The message row confirms: “Applied settings: Erya Classic / English”.
- Every open tab is affected at once; nothing has to be reopened.
- The hint bar, status bar, and F1 help switch to the new language and the new keys immediately.
System settings apply to this run only; Erya writes nothing to any configuration file. The next start is back to the defaults. To make a choice permanent:
- Key bindings → the platform default path, or ERYA_KEYMAP (see 4.1.7).
- Interface language → the ERYA_LANG environment variable (see 4.2.4).
How the interface language is chosen
Four environment variables are consulted in order; the first with a value wins.
Setting ERYA_LANG
For changing Erya alone, without touching your system locale.
| Command | Result |
|---|---|
| ERYA_LANG=en erya report.txt | English, this once |
| ERYA_LANG=ja erya | Japanese |
| ERYA_LANG=zh-TW erya | Traditional Chinese |
| ERYA_LANG=zh-CN erya | Simplified Chinese |
| erya --languages | Lists the languages actually present, one per line as “codeTabname” |
To make it permanent, add export ERYA_LANG=en to ~/.zshrc or ~/.bashrc; on Windows, add it to your user environment variables.
Its first column is exactly what goes into ERYA_LANG, and languages you added yourself appear there too (see 4.2.6).
Where the translations live
Four languages are compiled in; the locales/ directory overrides and extends them.
Built in (inside the executable)
Traditional Chinese, Simplified Chinese, English, Japanese. Delete locales/ entirely and these four still work.
On disk (override and extend)
Read from locales/ by default; point ERYA_LOCALES_DIR elsewhere if you prefer.
A translation on disk with the same code takes precedence over the built-in one, so you can also use it to reword a few strings.
The file structure is straightforward:
| Section | Contents |
|---|---|
| [language] | code (what ERYA_LANG uses) and name (shown by --languages and in system settings) |
| [messages] | Every message on screen. Some contain placeholders such as {name} or {count}, which must be kept. |
| [key_help] | The one-line description of each action in F1 help. |
Adding your own language
Copy a file, change two fields, translate. No Rust involved.
- Copy an existing translation, for example cp locales/en.toml locales/fr.toml.
- Edit [language]: code = "fr", name = "Français".
- Translate [messages] and [key_help], keeping every {} placeholder.
- Check it: erya --languages should list fr Français.
- Use it: ERYA_LANG=fr erya, or pick it from the F2 list.
A partial translation works: anything missing falls back to Traditional Chinese (see 4.2.7). Translate the few dozen strings you see most often and fill in the rest later.
The fallback for missing strings
Always Traditional Chinese; never a blank.
- A key missing from your translation → the Traditional Chinese string.
- A key missing from Traditional Chinese as well (which should not happen) → the key name itself, e.g. clipboard_empty.
- A language code that does not exist → the whole interface in Traditional Chinese.
Erya is an editor written for CJK documents; Traditional Chinese is its native language and everything else is translated from it. So a line of Chinese appearing in an otherwise English interface almost always means an untranslated string.
Common problems
Six situations around settings and languages.
| Symptom | Cause and fix |
|---|---|
| The setting reverted after a restart | System settings apply to one run. Use an environment variable or config file (4.2.2). |
| The interface is in the wrong language | Check the order: ERYA_LANG, LC_ALL, LC_MESSAGES, LANG (4.2.3). |
| ERYA_LANG seems ignored | The code is misspelled, and an unknown code falls back. Check with --languages (4.2.4). |
| Your translation is not in the list | The file is not in the directory Erya reads. Set ERYA_LOCALES_DIR (4.2.5). |
| Chinese appears among English messages | Those strings are untranslated and fell back (4.2.7). |
| A message contains a literal {name} | A placeholder was renamed or removed during translation. Restore the original {} name (4.2.5). |