Skip to content

Commit

Permalink
Read the language from OMEdit settings file.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Sep 21, 2016
1 parent 2afbff6 commit b85aba4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OMNotebook/OMNotebookGUI/omcinteractiveenvironment.cpp
Expand Up @@ -106,6 +106,11 @@ namespace IAEX
symbolTable_ = st;
threadData_->plotClassPointer = 0;
threadData_->plotCB = 0;
// set the language by reading the OMEdit settings file.
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "openmodelica", "omedit");
QLocale settingsLocale = QLocale(settings.value("language").toString());
settingsLocale = settingsLocale.name() == "C" ? settings.value("language").toLocale() : settingsLocale;
evalExpression(QString("setCommandLineOptions(\"+locale=" + settingsLocale.name() + "\")"));
#ifdef WIN32
evalExpression(QString("getInstallationDirectoryPath()"));
QString result = getResult();
Expand Down

0 comments on commit b85aba4

Please sign in to comment.