kamakiri language
Usage
kamakiri language [en|ja]
With no argument it reports the language in force. With en or ja it saves that preference. It needs no credential and sends no request.
$ kamakiri language
Language: English (saved preference)
Change it with `kamakiri language en` or `kamakiri language ja`.
$ kamakiri language
言語: 日本語(保存された設定)
言語は `kamakiri language en` または `kamakiri language ja` で変更できます。
The parentheses name what decided: the saved preference, the environment variable that did (KAMAKIRI_LANG, LC_ALL, LC_MESSAGES or LANG), or default when no locale variable has a value. They are tried in this order: KAMAKIRI_LANG when it is exactly en or ja, then the saved preference, then the first of LC_ALL, LC_MESSAGES and LANG that has a value, where a value starting with ja selects Japanese and anything else English. With none of them, the client speaks English.
Saving a preference
The confirmation prints in the language in force afterwards.
$ kamakiri language en
Language set to English.
$ kamakiri language ja
言語を日本語に設定しました。
The preference goes into settings.json in the config directory and applies to every later command on the machine. While KAMAKIRI_LANG holds en or ja, that variable still decides: the preference is saved, and a second line says it applies once the variable is unset.
What is refused
Any value other than en or ja is refused, and changes nothing.
$ kamakiri language fr
unsupported language "fr"; use `en` or `ja`
$ kamakiri language fr
"fr" はサポートされていない言語です。`en` または `ja` を指定してください
So is more than one argument.
$ kamakiri language en ja
usage: kamakiri language [en|ja]
$ kamakiri language en ja
使い方: kamakiri language [en|ja]
Exit status
- 0. The language was reported, or the preference was saved.
- 1. The value is not
enorja; there is more than one argument; the preference could not be written.