Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Language change is working before uploading to Google Play Store but not after uploading to play store . Why?

  • In My Application There are two language.
  • If I download application from device which has English as default language.Then it is not changing to Chinese strings.xml (zh) .
  • If I change my device language to Chinese and download the application then it is working fine and changing to both languages.Maybe because we have English language in our default strings.xml file.

Maybe because google play store doesn't let user download resource file which it thinks user will not need.

Can anyone help me? Thanks.

like image 352
Parth Lotia Avatar asked Feb 23 '19 09:02

Parth Lotia


People also ask

Why I Cannot change my country in Play Store?

The apps, games, and other content in the Store can vary by country. You must wait 12 months after initially creating a payments profile before you can change your Play country. You can only change your Play country once per year. If you change your country, you won't be able to change it back for one year.

Why is my Play Store in a different language?

Unfortunately, there is no designated feature to switch from one language to another in Google Play. The default language setting for Google Play is the system language of your Android device. We can therefore only change the language by changing the system language first.

How do I force Google Play to change the country?

Open the Play Store app on your Android device. Tap your profile picture at the top-right of the screen, then choose Settings. Select General, followed by Account and device preferences. Under the Country and profiles section, you'll see your name alongside your current Play Store country.


Video Answer


2 Answers

The problem is that you're using .aab file to publish app on play store . Which removes localization files based on the user's phone settings when it's been installing .

To solve that you need to put this lines in your build.gradle file and try uploading again

android {    //... removed for brevity   bundle {       language {        enableSplit = false      }    } } 

Link to refer

like image 94
Vrushi Patel Avatar answered Sep 21 '22 15:09

Vrushi Patel


As @Vrushi Patel said, this is related to Android App Bundles. To fix this you have to edit the android.bundle block in your base module’s build.gradle as shown below as mentioned in the official documentation:

android { // When building Android App Bundles, the splits block is ignored. splits {...}  // Instead, use the bundle block to control which types of configuration APKs // you want your app bundle to support. bundle {     language {         // Specifies that the app bundle should not support         // configuration APKs for language resources. These         // resources are instead packaged with each base and         // dynamic feature APK.         enableSplit = false     }     density {         // This property is set to true by default.         enableSplit = true     }     abi {         // This property is set to true by default.         enableSplit = true     } } } 
like image 36
blade Avatar answered Sep 24 '22 15:09

blade