The system language is the preset language. After the SIM card is inserted, the system language is changed according to the SIM card, by default, the language of the SIM card inserted for the first time after the flash is set to the default language. (If the sim mcc can be found in the built-in mcc table,) if the user does not manually set the language in Settings, in the future, the system language will always be the default language (the SIM card language for the first time). Even if the card is inserted into other countries, the system language will not change. If you manually set the language in Settings, in the future, the system language will be the set language. No matter what card is inserted, the system language will not change and the language will be set manually for the user.2. Modify the default language
1. Cancel the self-adaptive SIM card Language
Public static void updateMccMncConfiguration (Context context, String mccmnc)
MccTable. java (frameworksase elephonyjavacomandroidinternal elephony)
If (mcc! = 0 ){
SetTimezoneFromMccIfNeeded (context, mcc );
SetLocaleFromMccIfNeeded(Context, mcc );
SetWifiCountryCodeFromMcc (context, mcc );
}
Each time the plug-in card is started, when the sim is ready, the system will use the updateMccMncConfiguration function, which callsThe setLocaleFromMccIfNeeded function updates the system language based on mcc. You can set whether to call this function to determine whether to switch the language based on sim.
2. You are required to switch the language based on the SIM card each time.
Public static void setSystemLocale (Context context, String language, String country)
......
Config. userSetLocale = false;
Config. simSetLocale = true;
......
Am. updateConfiguration (config );
The SIM card is inserted at the first boot. If the corresponding language is found based on mcc, the system will save the current SIM card language information. In the future, the system will insert SIM cards in any language, the system language is not switched Based on the sim.The simSetLocale parameter determines whether to save this information. If you set it to false, You can implement adaptive adaptation for each plug-in card (except for manual language setting ).