Hi, All!
How can I to force Arduino-Cli to use "en" locale (not OS Locale)?
package i18n
// Init initializes the i18n module, setting the locale according to this order of preference:
// 1. Locale specified via the function call
// 2. OS Locale
// 3. en (default)
If you are using the YAML format of the default arduino-cli.yaml file, you would open it in a text editor and add this line:
locale: en
Environment variable
This is convenient if you only want to set the locale temporarily, but it might also be a good option to set it persistently in a manner that would affect Arduino CLI universally on your system (in case you have multiple Arduino CLI configuration files that might be active at different times).
The environment variable configuration system is documented here:
Thank you very much, Per!
arduino-cli.yaml method works fine!
Is the way to do it something like in this example
"arduino-cli config set logging.level trace" ?
"arduino-cli config set locale en" says "Settings key doesn't exist"
Yeah, I meant to mention that but I forgot by the time I made the post. Unfortunately it seems the support for the locale key is missing from the arduino-cli config commands.
I also ran into this. I put it on my "to do" list to try to work on or at least submit a report, but I haven't found the time yet. At the time we still hadn't actually done the localization because we were still working on getting the internationalization infrastructure in place to make that possible so there really wasn't any need to control the locale. But now that initiative is well along and proper support for the configuration is essential.