Search code examples
javaandroidkotlinlocalizationgoogle-play

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.


Solution

  • 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