/* Only list locales with available translations, the locales are of format xx_YY.UTF-8,
if xx and yy are the same code it's the main locale for the language and we keep it,
we also list locales which have translations installed from langpacks */
QStringList installedTranslations(QDir("/usr/share/locale-langpack").
entryList(QDir::Dirs | QDir::NoDotAndDotDot));
QString localeCode(languageLocale.localeName.split(".")[0]);
if (localeCode.split("_")[0] != localeCode.split("_")[1].toLower()) {
if (installedTranslations.indexOf(localeCode) == -1)
continue;
}