Commit 47a14cd5 authored by jcfr's avatar jcfr

ENH: Load translation only if "Internationalization" is enabled

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21575 3bd1e089-480b-0410-8dfb-8563597acbee
parent cae1efae
......@@ -286,8 +286,11 @@ void qSlicerCoreApplicationPrivate::init()
#endif
// We load the language selected for the application
q->loadLanguage();
if (q->userSettings()->value("Internationalization/Enabled").toBool())
{
// We load the language selected for the application
qSlicerCoreApplication::loadLanguage();
}
}
//-----------------------------------------------------------------------------
......
......@@ -70,11 +70,14 @@ void qSlicerSettingsGeneralPanelPrivate::init()
this->LanguageLabel->setVisible(internationalizationEnabled);
this->LanguageComboBox->setVisible(internationalizationEnabled);
/// Default values
this->LanguageComboBox->setDefaultLanguage("en");
/// set the directory where all the translations files are.
this->LanguageComboBox->setDirectory(
QString(Slicer_QM_OUTPUT_DIRS).split(";").at(0));
if (internationalizationEnabled)
{
/// Default values
this->LanguageComboBox->setDefaultLanguage("en");
/// set the directory where all the translations files are.
this->LanguageComboBox->setDirectory(
QString(Slicer_QM_OUTPUT_DIRS).split(";").at(0));
}
QObject::connect(this->FontButton, SIGNAL(currentFontChanged(QFont)),
q, SLOT(onFontChanged(QFont)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment