Commit 192dcd6d authored by Ludovic Fauvet's avatar Ludovic Fauvet

Add option for language auto-detection.

parent c7c53909
......@@ -195,7 +195,7 @@ MainWindow::initVlmcPreferences()
CREATE_MENU_SHORTCUT( "keyboard/importmedia", "Ctrl+I", "Import media", "Open the import window", actionImport );
CREATE_MENU_SHORTCUT( "keyboard/renderproject", "Ctrl+R", "Render the project", "Render the project to a file", actionRender );
VLMC_CREATE_PREFERENCE_LANGUAGE( "general/VLMCLang", "en_US", "Langage", "The VLMC's UI language" );
VLMC_CREATE_PREFERENCE_LANGUAGE( "general/VLMCLang", "default", "Langage", "The VLMC's UI language" );
SettingsManager::getInstance()->watchValue( "general/VLMCLang",
LanguageHelper::getInstance(),
SLOT( languageChanged( const QVariant& ) ),
......
......@@ -66,10 +66,15 @@ LanguageWidget::LanguageWidget( SettingValue *s, QWidget *parent /*= NULL*/ ) :
QLocale::languageToString( locale.language() ),
QLocale::countryToString( locale.country() ) ), countryCode );
}
m_list->addItem( "English (UnitedStates)", "en_US" );
// Add the built-in us_US locale.
m_list->addItem( "English (UnitedStates)", "en_US" );
// Sort the combobox
m_list->model()->sort( 0 );
// Add the system default option (auto-detection of the locale)
m_list->insertItem( 0, "System Locale (autodetect)", "default" );
QString lang = VLMC_GET_STRING( "general/VLMCLang" );
int idx = m_list->findData( lang );
if ( idx != -1 )
......
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