Skip to content

Commit

Permalink
- gettext uses environment variable so don't use setlocale for windows.
Browse files Browse the repository at this point in the history
- Pass the OMEdit locale to omc.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12444 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Aug 7, 2012
1 parent 97db293 commit de00b3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OMEdit/OMEditGUI/OMCProxy.cpp
Expand Up @@ -243,9 +243,13 @@ bool OMCProxy::startServer()
objectRefFile.remove();

mObjectRefFile = objectRefFile.fileName();
// read the locale
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "openmodelica", "omedit");
QString language = settings.value("language").toString();
QString locale = language.isEmpty() ? QLocale::system().name() : language;
// Start the omc.exe
QStringList parameters;
parameters << QString("+c=").append(mName).append(fileIdentifier) << QString("+d=interactiveCorba");
parameters << QString("+c=").append(mName).append(fileIdentifier) << QString("+d=interactiveCorba") << QString("+locale=").append(locale);
QProcess *omcProcess = new QProcess();
QFile omcOutputFile;
#ifdef WIN32 // Win32
Expand Down

0 comments on commit de00b3d

Please sign in to comment.