@@ -35,10 +35,10 @@ LocalComponents.Page {
3535 {
3636 var detectedLang = "";
3737 // try to detect the language+country from the SIM card
38− if (simManager0.present && simManager0.preferredLanguages.length > 0) {
39− detectedLang = simManager0.preferredLanguages[0] + "_" + LocalePlugin.mccToCountryCode(simManager0.mobileCountryCode);
40− } else if (simManager1.present && simManager1.preferredLanguages.length > 0) {
41− detectedLang = simManager1.preferredLanguages[0] + "_" + LocalePlugin.mccToCountryCode(simManager1.mobileCountryCode);
38+ if (root.simManager0.present && root.simManager0.preferredLanguages.length > 0) {
39+ detectedLang = root.simManager0.preferredLanguages[0] + "_" + LocalePlugin.mccToCountryCode(root.simManager0.mobileCountryCode);
40+ } else if (root.simManager1.present && root.simManager1.preferredLanguages.length > 0) {
41+ detectedLang = root.simManager1.preferredLanguages[0] + "_" + LocalePlugin.mccToCountryCode(root.simManager1.mobileCountryCode);
4242 } else if (plugin.currentLanguage != -1) {
4343 detectedLang = plugin.languageCodes[plugin.currentLanguage].split(".")[0]; // remove the encoding part, after dot (en_US.utf8 -> en_US)
4444 } else {
@@ -161,7 +161,7 @@ LocalComponents.Page {
161161 i18n.language = plugin.languageCodes[plugin.currentLanguage]; // re-notify of change after above call (for qlocale change)
162162 root.countryCode = plugin.languageCodes[plugin.currentLanguage].split('_')[1].split('.')[0]; // extract the country code, save it for the timezone page
163163
164− if (simManager0.present || simManager1.present || root.seenSIMPage) // go to next page
164+ if (root.simManager0.present || root.simManager1.present || root.seenSIMPage) // go to next page
165165 pageStack.next();
166166 else
167167 pageStack.load(Qt.resolvedUrl("sim.qml")); // show the SIM page