10
votes

I am working on the project which support multiple locale (Languages). The app is supporting multiple languages by installing directly it from the Android studio or build app with the Android studio. But when we build the app through the travis, only english language is supported. I have tried by changing multiple supported languages from the phone but it is not working.

What I want to Achieve?

I want to support multiple locale (Languages) which languages string.xml are already available into the project. App build through the travis should support other languages than English when user change the language of the phone.

Note: For this, code and steps to reproduce is not required.

Please let me know if anyone have idea regarding this issue, Thanks.

Code requested in comments:

buildVariant Code:

buildTypes {
    betaUAT {
        debuggable true
        versionNameSuffix "-BETA-UAT"
        applicationIdSuffix "uat"
        buildConfigField "boolean", "DEVELOPER_MODE", "false"
        buildConfigField "boolean", "EXTRA_LOGGING", "true"
        buildConfigField "String", "ENV", "\"UAT\""

        signingConfig signingConfigs.demo
    }
}

Command:

appcenter distribute release -f "$APK_FILE" -g "$GROUP_NAME" -r "$RELEASE_NOTES" --app "$OWNER_NAME/$APP_NAME"
1
Can you provide snippets of the buildVariant from app build.gradle and also the command used to build the app on travis?Subhrajyoti Sen
@SubhrajyotiSen buildTypes { betaUAT { debuggable true versionNameSuffix "-BETA-UAT" applicationIdSuffix "uat" buildConfigField "boolean", "DEVELOPER_MODE", "false" buildConfigField "boolean", "EXTRA_LOGGING", "true" buildConfigField "String", "ENV", "\"UAT\"" signingConfig signingConfigs.demo } } Command: appcenter distribute release -f "$APK_FILE" -g "$GROUP_NAME" -r "$RELEASE_NOTES" --app "$OWNER_NAME/$APP_NAME"SANAT
@SANAT It's very hard to read the code in the comment; in spite of your Note, these lines will be very useful if you edit them in your question.Adinia
@Adinia Updated the question with the details.SANAT
I am not sure if this can help, but I read this article long ago. Not sure if it can fix your problem but better something then nothing: medium.com/glucosio-project/…SlothCoding

1 Answers

-1
votes

Sorry, I don't know if I understand it right: your main problem is to make the application support internationalization Internationalization can actually be achieved through modification string.xml It can be achieved. First, create multiple values folders in the: app / res directory, and name them according to the language of different countries you want, such as "values-zh-rHK" in Hong Kong, China and "values-de" in Germany. Take a look at this blog for a more detailed description of how to internationalize Android studio https://www.cnblogs.com/robotpaul/p/12677971.html