diff --git a/admin/cli/upgrade.php b/admin/cli/upgrade.php
index <HASH>..<HASH> 100644
--- a/admin/cli/upgrade.php
+++ b/admin/cli/upgrade.php
@@ -49,13 +49,21 @@ list($options, $unrecognized) = cli_get_params(
     array(
         'non-interactive'   => false,
         'allow-unstable'    => false,
-        'help'              => false
+        'help'              => false,
+        'lang'              => 'en'
     ),
     array(
         'h' => 'help'
     )
 );
 
+global $SESSION;
+if ($options['lang']) {
+    $SESSION->lang = $options['lang'];
+} else {
+    $SESSION->lang = 'en';
+}
+
 $interactive = empty($options['non-interactive']);
 
 if ($unrecognized) {
@@ -74,6 +82,7 @@ Options:
 --non-interactive     No interactive questions or confirmations
 --allow-unstable      Upgrade even if the version is not marked as stable yet,
                       required in non-interactive mode.
+--lang=CODE           Set preferred language for CLI output, during upgrade process (default:en).
 -h, --help            Print out this help
 
 Example:
MDL-<I> upgrade: Option to display CLI upgrade messages in English