Salome HOME
Support both 5.5 and 5.6 version of ParaView
[modules/gui.git] / src / SUIT / SUIT_ResourceMgr.cxx
index 92a64e7ab089d13c7642ba4978cc5235a0d18a69..0c98e4a2dc1daed5bf62a1461ef715677a13598b 100755 (executable)
@@ -179,3 +179,21 @@ long SUIT_ResourceMgr::userFileId( const QString& ) const
 {
   return -1;
 }
+
+/*!
+  \brief Specify default language for the application.
+*/
+QString SUIT_ResourceMgr::defaultLanguage() const
+{
+  QStringList arguments;
+  QString language;
+  if ( SUIT_Session::session() ) arguments = SUIT_Session::session()->arguments();
+  // Try language, given in arguments
+  for (int i = 1; i < arguments.count(); i++) {
+    QRegExp rx ("--language=(.+)");
+    if ( rx.indexIn( arguments[i] ) >= 0 && rx.captureCount() > 0 ) {
+      language = rx.cap(1);
+    }
+  }
+  return language;
+}