How to force commandline output in English

Output of Commandline tools, like Duplicati.CommandLine.exe, is translated automatically to the language of the host operating system (if available). For example, on a Dutch Windows 10 PC, the output of the command Duplicati.CommandLine.exe help advanced will be in Dutch.

Sometimes I would like to get the output in English (when updating the documentation). I guess this should be possible using the --force-locale commandline option, but output stays Dutch with every value I try.

Does anybody know what’s the correct syntax for this option? I tried DuplicatiCommandLine.exe help advanced --force-locale=en and DuplicatiCommandLine.exe help advanced --force-locale=English, but output stays Dutch.

Are you using the Duplicati base (install) version or an updated (as in updates folder) version?

If it’s an updated version, I’m wondering if there’s an issue including the parameter in the pass-along call from base-to-update.

I’m getting an error (with on Ubuntu) if I don’t include the “advanced” parameter - does that happen to you as well?
Duplicati.CommandLine.exe help --force-locale=en

Tried both.
Also, I’ve copied the contents of the Zip version to C:\Program Files\Duplicati, but whatever I try, commandline output stays Dutch.
I guess I’m using an incorrect syntax, but it’s not documented very well how to use the --force-locale option:

By default, your system locale and culture settings will be used. In some cases you may prefer to run with another locale, for example to get messages in another language. This option can be used to set the locale. Supply a blank string to choose the "Invariant Culture".

I guess --force-locale accepts a number of values (like en or Engelish), but this isn’t documented anywhere.

It’s not a great answer, but my guess is anybody poking around with locale would already know about locales.

That being said, I believe Duplicati is just using the standard LCID string codes. On Linux these can be listed with a command like cat /usr/share/i18n/SUPPORTED but on Windows I don’t think that’s an option.

This web page lists a bunch (Language Codes - Sorted by) in which case you’d probably want to use “en-us”. But in my test with “es-es” (traditional Spanish) it didn’t seem to make a difference.

Sorry I don’t have any better info for you.

The only thing I want is getting output of Duplicati.CommandLine.exe in English. Whatever I try, output on any PC with a Dutch version of Windows stays Dutch.

I guess that option --force-locale can change output language to English (or any other supported language), but which syntax to use isn’t documented anywhere.

These commands don’t work, output keeps being in Dutch:

Duplicati.CommandLine.exe help advanced --force-locale=en
Duplicati.CommandLine.exe help advanced --force-locale=en-us
Duplicati.CommandLine.exe help advanced --force-locale=en-uk
Duplicati.CommandLine.exe help advanced --force-locale=English
Duplicati.CommandLine.exe help advanced --force-locale="English"
Duplicati.CommandLine.exe help advanced --force-locale="English (en, English)"
and many other variants

An example of how to use the --force-locale switch definately would help.

It is using the .Net locale syntax, so the correct way should be:

But simpler versions, like en should also work. And yes, we should document it…

Call is here:

And it leads to this constructor:

The actual values supported depends on the operating system. Also, setting this property only changes the current thread’s locale, but the OS may return error messages in whatever language it is currently running.

Thanks for the explaination.
If this is the correct syntax, then I guess I’ve found a bug!

On a Dutch Windows 10 system, without --force-locale option:

Same, --force-locale=en-us added:

As you can see, nothing changed to the output. First lines are English (untranslated), help text for all advanced options is still Dutch.

Just as a test, if you change the localization in your shell environment does it work as expected?

Already tried that, no joy:

As this problem still occurs, I’ve created a bug report on GitHub.