vSpher CLI not working with Non-english language vCenter

Here vCenter installed on French locale system.

My vSphere cli is installed on English language machine.

Getting output in French language.

Is there any way we can convert output to english ?

0 Kudos
2 Replies

You should be able to use setLocale() from the SessionManager object to set the specific localization strings for output (never tried it myself, however).

The problem is the CLI commands do not have this hook built-in.  What you may need to do is write a small script to establish the session with a sessionfile and then call setLocale(). Then you should be able to call other CLI scripts using that session file and get the localization strings you prefer.

Again, not tested, so I'd be curious if this works, but try the following:

# Initialize and save a vSphere API session cookie to file; save_session is part of the Perl SDK download

perl --savesessionfile <location> --server <server>

# Call a setLocale() script; is the custom locale script

perl --sessionfile= <location> --locale=en

# Call CLI script utilities using --sessionfile; see the CLI documentation for the session file usage notes


A simple script would be:


use strict;

use warnings;

my %opts = (

     locale => {

          type => ":s",

          required => 1,

          default => 'en',







my ($session_manager, $locale);

$locale = Opts::get_option('locale');

$session_manager = Vim::get_view(mo_ref => Vim::get_service_content()->{'sessionManager'});

$session_manager->setLocale(locale => $locale);


If you are writing your own Perl SDK scripts, then you can just add the locale call in the script and avoid the session file usage.  For the pre-made CLI tools from the SDK vicfg-*, etc, you probably need the steps above.  I didn't see anything in to support locale parameters globally for the API CLI tools.

If you give it a try, let me know if you hit any bugs in the logic -- might be something easily fixed.

Reuben Stump | | @ReubenStump
0 Kudos


It working , Thanks.

my $serviceContent    = Vim::get_service_content();

my $sessionManager    = Vim::get_view( mo_ref => $serviceContent->sessionManager );

$sessionManager->SetLocale(locale => "en_US");

my $serviceContent= Vim::get_service_content();


my $sessionManager= Vim::get_view( mo_ref => $serviceContent->sessionManager );


$sessionManager->SetLocale(locale => "en_US");

0 Kudos