Page 1 of 1

Language in Vboxmanage

Posted: 18. Sep 2023, 15:49
by grossmj
Hi,

I am with the GNS3 team, we integrates with VirtualBox and one of our users has reported this issue: https://github.com/GNS3/gns3-server/iss ... 1723076087

Basically, GNS3 relies on VBoxManage output for almost everything, in this issue we look for the entry 'API version' when executing "vboxmanage list systemproperties" however our user's VBoxManage output is in Russian, therefore GNS3 fails to match 'API version'...

I have tried to change the language in VirtualBox on my side but it seems it has no effect on VBoxManage (at least on Linux in a terminal). Is it possible to change the language for VBoxManage or is there a better programmatic way to control VirtualBox?

Thanks for your help.
Jeremy

Re: Language in Vboxmanage

Posted: 18. Sep 2023, 16:36
by scottgus1
grossmj wrote: 18. Sep 2023, 15:49 our user's VBoxManage output is in Russian
Could this be because the user's host OS language may be Russian? Or has the user changed the command prompt code page?

On a new Spanish account I made on a PC with Virtualbox 7.0.10 installed:
Windows desktop wording is all Spanish.
Virtualbox's main window is automatically showing in Spanish, and the Language preference in the File menu, Preferences, Language setting is Spanish automatically.
In the Command Prompt, Windows commands' help pages (the /?'s) and some command outputs (fc but not dir) come up in Spanish
'vboxmanage list systemproperties' is still in English.

If I change the main Virtualbox window's File menu, Preferences, Language to something Cyrillic-looking (I'm not certain which setting is Russian) The main Virtualbox window switches to the Cyrillic lettering. 'vboxmanage list systemproperties' in the Command Prompt remains in English.

I surmise that your Russian-using user has done something not usual with their host settings and/or Virtualbox.
If you can get the user to zip and post their "Virtualbox.xml" main configuration file, see https://www.virtualbox.org/manual/ch10. ... configdata we may be able t see is something was done in Virtualbox settings.

Re: Language in Vboxmanage

Posted: 18. Sep 2023, 17:18
by scottgus1
Perusing the manual for the word "language", I find there is a "VBoxManage setproperty language" command:
Specifies the user language used to translate API messages. Valid values are C, which means
no translation or language code in form either ll or ll_CC, where ll is language 2 letters
code in lower case and CC is country 2 letter code in upper case.
This may show in the Virtualbox.xml file.

Re: Language in Vboxmanage

Posted: 18. Sep 2023, 19:29
by fth0
A look into the VirtualBox 7.0.10 source code revealed that the availability of translations depends on the VirtualBox frontend: While the VirtualBox Manager supports many languages, the VBoxManage command only supports the Russian language (in addition to the non-translated English original, of course). The necessary language file is not installed in my VirtualBox installations from Oracle's packages, that's why I (and scottgus1 probably) weren't able to reproduce the Russian output. I don't know if some (perhaps Russian) Linux distributions add the necessary language file, or if the VirtualBox development snapshots generally do that.

In a Linux terminal, "LANG=fr VirtualBox &" starts the VirtualBox Manager in the French language, "LANG=en VirtualBox &" and "LANG=C VirtualBox &" start the VirtualBox Manager in the English language. Therefore, I'd suggest to try "LANG=C VBoxManage list systemproperties".

Re: Language in Vboxmanage

Posted: 19. Sep 2023, 12:37
by grossmj
"LANG=C VBoxManage list systemproperties" did not work for my user, "LANG=en VBoxManage list systemproperties" did though however I could not reproduce his original problem on my side, even after installing the ru_RU locale etc. so after some back and forth, it appears that the best way is just to use "VBoxManage setproperty language C" for no translation as mentioned in the VBoxManage documentation.

Thanks a lot for your help!

Re: Language in Vboxmanage

Posted: 19. Sep 2023, 13:15
by scottgus1
Great! Glad you're up and running.