Index: /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 92402)
+++ /trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk	(revision 92403)
@@ -124,5 +124,57 @@
  	$(PATH_ROOT)/src/VBox/Main/src-all/QMTranslatorImpl.cpp \
  	$(PATH_ROOT)/src/VBox/Main/src-all/GlobalStatusConversion.cpp
-endif
+
+# define qt5 tools for translation
+ USES += qt5
+
+ VBOX_PATH_VBOXMANAGE_SRC := $(PATH_SUB_CURRENT)
+ include $(PATH_SUB_CURRENT)/nls/ApprovedLanguages.kmk
+
+ PROGRAMS += VBoxManageNls
+ VBoxManageNls_TEMPLATE = VBoxNLS
+ VBoxManageNls_QT_TRANSLATIONS = $(addsuffix .ts,$(addprefix $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_,$(VBOX_APPROVED_VBOXMANAGE_LANGUAGES)))
+ VBoxManageNls_VBOX_ALL_NLS_SOURCES = $(wildcard \
+	$(VBOX_PATH_VBOXMANAGE_SRC)/*.h\
+	$(VBOX_PATH_VBOXMANAGE_SRC)/*.cpp )
+
+ updatenls:: makeallnls $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_en.ts
+
+ makeallnls:: $(VBoxManageNls_VBOX_ALL_NLS_SOURCES)
+	$(call MSG_L1,lupdate all languages (nls/*.ts))
+	$(QUIET)$(TOOL_QT5_LUPDATE) \
+		$^ \
+		-ts \
+		$(filter-out nls/VBoxManageNls_en.ts, $(VBoxManageNls_QT_TRANSLATIONS)) \
+		$(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_xx_YY.ts
+
+# fake-main-nls:
+#	$(foreach file, $(VBoxManageNls_QT_TRANSLATIONS) \
+#	,$(NLTAB)$(SED) -i \
+#       	-e '/<source>.*<\/source>/h' \
+#       	-e '/<source>.*<\/source>/p' \
+#       	-e '/<translation type="unfinished"><\/translation>/{' \
+#       		-e 'x' \
+#       		-e 's/<source>\(.*\)<\/source>/<translation type="unfinished">$(notdir $(file)): \1<\/translation>/' \
+#       	-e '}' \
+#		$(file) )
+
+
+# Create the English translation file. This is something special cause it will
+# contain the plural forms only.
+ $(VBOX_PATH_VBOXMANAGE_SRC)/nls/VBoxManageNls_en.ts: $(VBoxManageNls_VBOX_ALL_NLS_SOURCES)
+	$(call MSG_L1,lupdate $@)
+	$(QUIET)$(TOOL_QT5_LUPDATE) \
+		$^ \
+		-ts \
+		"$@"
+	$(QUIET)$(SED) -n -i \
+		-e '/<context>/,/<\/context>/!p' \
+		-e '/<context>/h'  \
+		-e '/<name>/H' \
+		-e '/<message numerus="yes">/,/<\/message>/H' \
+		-e '/<\/context>/{H;x;/<message/p}' \
+		"$@"
+
+endif # VBOX_WITH_VBOXMANAGE_NLS
 
 
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 92402)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 92403)
@@ -32,4 +32,9 @@
 #endif /* !VBOX_ONLY_DOCS */
 
+#ifdef VBOX_WITH_VBOXMANAGE_NLS
+# include <VBox/com/AutoLock.h>
+# include <VBox/com/listeners.h>
+#endif
+
 #include <VBox/version.h>
 
@@ -40,4 +45,5 @@
 #include <iprt/getopt.h>
 #include <iprt/initterm.h>
+#include <iprt/log.h>
 #include <iprt/path.h>
 #include <iprt/stream.h>
@@ -85,4 +91,84 @@
 DECLARE_TRANSLATION_CONTEXT(VBoxManage);
 
+#ifdef VBOX_WITH_VBOXMANAGE_NLS
+/* listener class for language updates */
+class VBoxEventListener
+{
+public:
+    VBoxEventListener()
+    {}
+
+
+    HRESULT init(void *)
+    {
+        return S_OK;
+    }
+
+    HRESULT init()
+    {
+        return S_OK;
+    }
+
+    void uninit()
+    {
+    }
+
+    virtual ~VBoxEventListener()
+    {
+    }
+
+    STDMETHOD(HandleEvent)(VBoxEventType_T aType, IEvent *aEvent)
+    {
+        switch(aType)
+        {
+            case VBoxEventType_OnLanguageChanged:
+            {
+                /*
+                 * Proceed with uttmost care as we might be racing com::Shutdown()
+                 * and have the ground open up beneath us.
+                 */
+                LogFunc(("VBoxEventType_OnLanguageChanged\n"));
+                VirtualBoxTranslator *pTranslator = VirtualBoxTranslator::tryInstance();
+                if (pTranslator)
+                {
+                    ComPtr<ILanguageChangedEvent> pEvent = aEvent;
+                    Assert(pEvent);
+
+                    /* This call may fail if we're racing COM shutdown. */
+                    com::Bstr bstrLanguageId;
+                    HRESULT hrc = pEvent->COMGETTER(LanguageId)(bstrLanguageId.asOutParam());
+                    if (SUCCEEDED(hrc))
+                    {
+                        try
+                        {
+                            com::Utf8Str strLanguageId(bstrLanguageId);
+                            LogFunc(("New language ID: %s\n", strLanguageId.c_str()));
+                            pTranslator->i_loadLanguage(strLanguageId.c_str());
+                        }
+                        catch (std::bad_alloc &)
+                        {
+                            LogFunc(("Caught bad_alloc"));
+                        }
+                    }
+                    else
+                        LogFunc(("Failed to get new language ID: %Rhrc\n", hrc));
+
+                    pTranslator->release();
+                }
+                break;
+            }
+
+            default:
+              AssertFailed();
+        }
+
+        return S_OK;
+    }
+};
+
+typedef ListenerImpl<VBoxEventListener> VBoxEventListenerImpl;
+
+VBOX_LISTENER_DECLARE(VBoxEventListenerImpl)
+#endif /* !VBOX_WITH_VBOXMANAGE_NLS */
 
 /*********************************************************************************************************************************
@@ -444,4 +530,34 @@
 #endif
 
+#ifdef VBOX_WITH_VBOXMANAGE_NLS
+    ComPtr<IEventListener> pEventListener;
+    PTRCOMPONENT          pTrComponent = NULL;
+    util::InitAutoLockSystem();
+    VirtualBoxTranslator *pTranslator = VirtualBoxTranslator::instance();
+    if (pTranslator != NULL)
+    {
+        char szNlsPath[RTPATH_MAX];
+        vrc = RTPathAppPrivateNoArch(szNlsPath, sizeof(szNlsPath));
+        if (RT_SUCCESS(vrc))
+            vrc = RTPathAppend(szNlsPath, sizeof(szNlsPath), "nls" RTPATH_SLASH_STR "VBoxManageNls");
+
+        if (RT_SUCCESS(vrc))
+        {
+            vrc = pTranslator->registerTranslation(szNlsPath, true, &pTrComponent);
+            if (RT_SUCCESS(vrc))
+            {
+                vrc = pTranslator->i_loadLanguage(NULL);
+                if (RT_FAILURE(vrc))
+                    LogRelFunc(("Load language failed: %Rrc\n", vrc));
+            }
+            else
+                LogRelFunc(("Register translation failed: %Rrc\n", vrc));
+        }
+        else
+            LogRelFunc(("Path constructing failed: %Rrc\n", vrc));
+
+    }
+#endif
+
     for (int i = 1; i < argc || argc <= iCmd; i++)
     {
@@ -644,4 +760,34 @@
         if (SUCCEEDED(hrc))
         {
+#ifdef VBOX_WITH_VBOXMANAGE_NLS
+            if (pTranslator != NULL)
+            {
+                HRESULT hrc1 = pTranslator->loadLanguage(virtualBox);
+                if (FAILED(hrc1))
+                {
+                    /* Just log and ignore the language error */
+                    LogRel(("Failed to load API language, %Rhrc", hrc1));
+                }
+                /* VirtualBox language events registration. */
+                ComPtr<IEventSource> pES;
+                hrc1 = virtualBox->COMGETTER(EventSource)(pES.asOutParam());
+                if (SUCCEEDED(hrc1))
+                {
+                    ComObjPtr<VBoxEventListenerImpl> listener;
+                    listener.createObject();
+                    listener->init(new VBoxEventListener());
+                    pEventListener = listener;
+                    com::SafeArray<VBoxEventType_T> eventTypes;
+                    eventTypes.push_back(VBoxEventType_OnLanguageChanged);
+                    hrc1 = pES->RegisterListener(pEventListener, ComSafeArrayAsInParam(eventTypes), true);
+                    if (FAILED(hrc1))
+                    {
+                        pEventListener.setNull();
+                        LogRel(("Failed to register event listener, %Rhrc", hrc1));
+                    }
+                }
+            }
+#endif
+
             ComPtr<ISession> session;
             hrc = session.createInprocObject(CLSID_Session);
@@ -696,4 +842,19 @@
         }
 
+#ifdef VBOX_WITH_VBOXMANAGE_NLS
+        /* VirtualBox event callback unregistration. */
+        if (pEventListener.isNotNull())
+        {
+            ComPtr<IEventSource> pES;
+            HRESULT hrc1 = virtualBox->COMGETTER(EventSource)(pES.asOutParam());
+            if (pES.isNotNull())
+            {
+                hrc1 = pES->UnregisterListener(pEventListener);
+                if (FAILED(hrc1))
+                    LogRel(("Failed to unregister listener, %Rhrc", hrc1));
+            }
+            pEventListener.setNull();
+        }
+#endif
         /*
          * Terminate COM, make sure the virtualBox object has been released.
@@ -715,4 +876,13 @@
     }
 
+#ifdef VBOX_WITH_VBOXMANAGE_NLS
+    if (pTranslator != NULL)
+    {
+        pTranslator->release();
+        pTranslator = NULL;
+        pTrComponent = NULL;
+    }
+#endif
+
     if (papszResponseFileArgs)
     {
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 92402)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 92403)
@@ -2931,4 +2931,5 @@
                 SHOW_UTF8_STRING("GuestAdditionsVersion", GuestCtrl::tr("Additions version:"), szValue);
             }
+        }
 #endif
 
Index: /trunk/src/VBox/Main/glue/AutoLock.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/AutoLock.cpp	(revision 92402)
+++ /trunk/src/VBox/Main/glue/AutoLock.cpp	(revision 92403)
@@ -87,5 +87,6 @@
         { LOCKCLASS_OTHEROBJECT,        "10-OTHEROBJECT" },
         { LOCKCLASS_PROGRESSLIST,       "11-PROGRESSLIST" },
-        { LOCKCLASS_OBJECTSTATE,        "12-OBJECTSTATE" }
+        { LOCKCLASS_OBJECTSTATE,        "12-OBJECTSTATE" },
+        { LOCKCLASS_TRANSLATOR,         "13-TRANSLATOR" }
     };
 
Index: /trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp	(revision 92402)
+++ /trunk/src/VBox/Main/src-client/VirtualBoxClientImpl.cpp	(revision 92403)
@@ -131,5 +131,5 @@
 typedef ListenerImpl<VBoxEventListener> VBoxEventListenerImpl;
 
-VBOX_LISTENER_DECLARE(VBoxTrEventListenerImpl)
+VBOX_LISTENER_DECLARE(VBoxEventListenerImpl)
 
 #endif /* VBOX_WITH_MAIN_NLS */
