Keep message language and numeric formatting unchanged.
Use Japanese locale rules only for month names, weekday names, and date/time formats.
Which variable should be set?
LC_TIME controls date and time formatting, including month and weekday names.
Detailed explanation
LC_TIME=ja_JP.UTF-8Correct. LC_TIME changes date and time localization.
LC_MESSAGES=ja_JP.UTF-8Incorrect. LC_MESSAGES controls program messages.
LC_NUMERIC=ja_JP.UTF-8Incorrect. LC_NUMERIC controls numeric formatting.
LC_COLLATE=ja_JP.UTF-8Incorrect. LC_COLLATE controls collation and sorting.
Try it yourself
An example you can run in a temporary verification environment.
LC_TIME=C date '+%A %B'Expected result
英語の曜日名と月名Key points
- LC_TIME is date/time
- LC_MESSAGES is messages
- Change one category
Notes
- Environment: POSIX date / 子プロセス環境だけ変更
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Locale category
A setting that controls language, numeric formatting, collation, or date display.
Character encoding
A mapping between characters and the bytes used to represent them.
Timezone
A rule set that converts timestamps for a region or display context.