Index: trunk/src/VBox/Frontends/VirtualBox4/include/QIDialogButtonBox.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/QIDialogButtonBox.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/QIDialogButtonBox.h	(revision 9056)
@@ -24,12 +24,14 @@
 #define __QIDialogButtonBox_h__
 
+#include "QIWithRetranslateUI.h"
+
 /* Qt includes */
 #include <QDialogButtonBox>
 
-class QIDialogButtonBox: public QDialogButtonBox
+class QIDialogButtonBox: public QIWithRetranslateUI<QDialogButtonBox>
 {
 public:
-    QIDialogButtonBox (QWidget *aParent = 0) :QDialogButtonBox (aParent) {}
-    QIDialogButtonBox (Qt::Orientation aOrientation, QWidget *aParent = 0) :QDialogButtonBox (aOrientation, aParent) {}
+    QIDialogButtonBox (QWidget *aParent = 0) :QIWithRetranslateUI<QDialogButtonBox> (aParent) {}
+    QIDialogButtonBox (Qt::Orientation aOrientation, QWidget *aParent = 0) :QIWithRetranslateUI<QDialogButtonBox> (aParent) { setOrientation (aOrientation); }
     QIDialogButtonBox (StandardButtons aButtons, Qt::Orientation aOrientation = Qt::Horizontal, QWidget *aParent = 0);
 
@@ -40,5 +42,5 @@
 
 protected:
-    virtual void changeEvent (QEvent *aEvent);
+
     void retranslateUi();
 };
Index: trunk/src/VBox/Frontends/VirtualBox4/include/QIWithRetranslateUI.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/QIWithRetranslateUI.h	(revision 9056)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/QIWithRetranslateUI.h	(revision 9056)
@@ -0,0 +1,88 @@
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * Declarations of utility classes and functions
+ * VirtualBox Qt extensions: QIWithRetranslateUI class declaration
+ */
+
+/*
+ * Copyright (C) 2008 Sun Microsystems, Inc.
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+#ifndef __QIWithRetranslateUI_h
+#define __QIWithRetranslateUI_h
+
+/* Qt includes */
+#include <QObject>
+#include <QEvent>
+
+template <class Base>
+class QIWithRetranslateUI: public Base
+{
+public:
+
+    QIWithRetranslateUI (QWidget *aParent = 0) : Base (aParent) {}
+
+protected:
+
+    virtual void changeEvent (QEvent *aEvent)
+    {
+        Base::changeEvent (aEvent);
+        switch (aEvent->type())
+        {
+            case QEvent::LanguageChange:
+            {
+                retranslateUi();
+                aEvent->accept();
+                break;
+            }
+            default: 
+                break;
+        }
+    }
+
+    virtual void retranslateUi() = 0;
+};
+
+template <class Base>
+class QIWithRetranslateUI2: public Base
+{
+public:
+
+    QIWithRetranslateUI2 (QWidget *aParent = 0, Qt::WindowFlags aFlags = 0) : Base (aParent, aFlags) {}
+    
+protected:
+
+    virtual void changeEvent (QEvent *aEvent)
+    {
+        Base::changeEvent (aEvent);
+        switch (aEvent->type())
+        {
+            case QEvent::LanguageChange:
+            {
+                retranslateUi();
+                aEvent->accept();
+                break;
+            }
+            default: 
+                break;
+        }
+    }
+
+    virtual void retranslateUi() = 0;
+};
+
+#endif /* __QIWithRetranslateUI_h */
+
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxCloseVMDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxCloseVMDlg.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxCloseVMDlg.h	(revision 9056)
@@ -24,14 +24,20 @@
 #define __VBoxCloseVMDlg_h__
 
-#include <VBoxCloseVMDlg.gen.h>
-#include <QIDialog.h>
+#include "VBoxCloseVMDlg.gen.h"
+#include "QIWithRetranslateUI.h"
+#include "QIDialog.h"
 
-class VBoxCloseVMDlg : public QIDialog, public Ui::VBoxCloseVMDlg
+class VBoxCloseVMDlg : public QIWithRetranslateUI2<QIDialog>,
+                       public Ui::VBoxCloseVMDlg
 {
-    Q_OBJECT
+    Q_OBJECT;
 
 public:
 
     VBoxCloseVMDlg (QWidget *aParent);
+
+protected:
+
+    void retranslateUi();
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h	(revision 9056)
@@ -25,4 +25,5 @@
 
 #include "COMDefs.h"
+#include "QIWithRetranslateUI.h"
 
 /* Qt includes */
@@ -54,7 +55,7 @@
 class VBoxSwitchMenu;
 
-class VBoxConsoleWnd : public QMainWindow
+class VBoxConsoleWnd : public QIWithRetranslateUI2<QMainWindow>
 {
-    Q_OBJECT
+    Q_OBJECT;
 
 public:
@@ -97,5 +98,4 @@
 #endif
 
-    virtual void changeEvent (QEvent *aEvent);
     void retranslateUi();
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDefs.h	(revision 9056)
@@ -150,4 +150,5 @@
         ShowWindowEventType,
 #endif
+        ChangeGUILanguageEventType,
     };
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDownloaderWgt.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDownloaderWgt.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDownloaderWgt.h	(revision 9056)
@@ -25,4 +25,5 @@
 
 #include "HappyHttp.h"
+#include "QIWithRetranslateUI.h"
 
 /* Qt includes */
@@ -46,7 +47,7 @@
  *  into the VM console status bar.
  */
-class VBoxDownloaderWgt : public QWidget
+class VBoxDownloaderWgt : public QIWithRetranslateUI<QWidget>
 {
-    Q_OBJECT
+    Q_OBJECT;
 
 public:
@@ -59,5 +60,5 @@
 
 protected:
-    virtual void changeEvent (QEvent *aEvent);
+
     void retranslateUi();
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h	(revision 9056)
@@ -137,4 +137,15 @@
 
     const bool mCanShow;
+};
+
+class VBoxChangeGUILanguageEvent : public QEvent
+{
+public:
+    VBoxChangeGUILanguageEvent (QString aLangId)
+        : QEvent ((QEvent::Type) VBoxDefs::ChangeGUILanguageEventType)
+        , mLangId (aLangId)
+        {}
+
+    const QString mLangId;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h	(revision 9056)
@@ -26,4 +26,5 @@
 #include "COMDefs.h"
 
+#include "QIWithRetranslateUI.h"
 #include "VBoxGlobal.h"
 
@@ -44,7 +45,7 @@
 class QUuid;
 
-class VBoxSelectorWnd: public QMainWindow
+class VBoxSelectorWnd: public QIWithRetranslateUI2<QMainWindow>
 {
-    Q_OBJECT
+    Q_OBJECT;
 
 public:
@@ -85,5 +86,4 @@
     bool event (QEvent *e);
 
-    virtual void changeEvent (QEvent *aEvent);
     void retranslateUi();
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSnapshotDetailsDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSnapshotDetailsDlg.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSnapshotDetailsDlg.h	(revision 9056)
@@ -24,8 +24,10 @@
 #define __VBoxSnapshotDetailsDlg_h__
 
-#include <VBoxSnapshotDetailsDlg.gen.h>
-#include <COMDefs.h>
+#include "VBoxSnapshotDetailsDlg.gen.h"
+#include "QIWithRetranslateUI.h"
+#include "COMDefs.h"
 
-class VBoxSnapshotDetailsDlg : public QDialog, public Ui::VBoxSnapshotDetailsDlg
+class VBoxSnapshotDetailsDlg : public QIWithRetranslateUI<QDialog>,
+                               public Ui::VBoxSnapshotDetailsDlg
 {
     Q_OBJECT;
@@ -37,4 +39,8 @@
     void getFromSnapshot (const CSnapshot &aSnapshot);
     void putBackToSnapshot();
+
+protected:
+
+    void retranslateUi();
 
 private slots:
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSnapshotsWgt.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSnapshotsWgt.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSnapshotsWgt.h	(revision 9056)
@@ -24,8 +24,10 @@
 #define __VBoxSnapshotsWgt_h__
 
-#include <VBoxSnapshotsWgt.gen.h>
-#include <VBoxGlobal.h>
+#include "VBoxSnapshotsWgt.gen.h"
+#include "VBoxGlobal.h"
+#include "QIWithRetranslateUI.h"
+
+/* Qt includes */
 #include <QUuid>
-#include <COMDefs.h>
 
 class SnapshotWgtItem;
@@ -33,5 +35,6 @@
 class QMenu;
 
-class VBoxSnapshotsWgt : public QWidget, public Ui::VBoxSnapshotsWgt
+class VBoxSnapshotsWgt : public QIWithRetranslateUI<QWidget>,
+                         public Ui::VBoxSnapshotsWgt
 {
     Q_OBJECT;
@@ -43,6 +46,6 @@
     void setMachine (const CMachine &aMachine);
 
+protected:
 
-    virtual void changeEvent (QEvent *aEvent);
     void retranslateUi();
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMInformationDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMInformationDlg.h	(revision 9053)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMInformationDlg.h	(revision 9056)
@@ -24,14 +24,16 @@
 #define __VBoxVMInformationDlg_h__
 
-#include <VBoxVMInformationDlg.gen.h>
-#include <QIAbstractDialog.h>
-#include <COMDefs.h>
+#include "VBoxVMInformationDlg.gen.h"
+#include "QIAbstractDialog.h"
+#include "COMDefs.h"
+#include "QIWithRetranslateUI.h"
 
 class VBoxConsoleView;
 class QTimer;
 
-class VBoxVMInformationDlg : public QIAbstractDialog, public Ui::VBoxVMInformationDlg
+class VBoxVMInformationDlg : public QIWithRetranslateUI2<QIAbstractDialog>,
+                             public Ui::VBoxVMInformationDlg
 {
-    Q_OBJECT
+    Q_OBJECT;
 
 public:
@@ -51,5 +53,4 @@
 protected:
 
-    virtual void changeEvent (QEvent *aEvent);
     void retranslateUi();
 
