Play 商店如何识别应用程序的语言?

How does the Play Store recognize the languages of the app?

我目前正在开发一个有多个客户的应用程序,我们使用构建服务器构建我们的 apk。我们的一些客户有西班牙语翻译,其他客户有俄语等

我想知道 Google Play 如何检测哪些语言是应用程序的一部分。是否与:

values-es

文件夹中没有任何内容

values-es\strings.xml

其中有 0 个或多个文件?

我们不想向用户显示该应用程序有西班牙语版本,而实际上并没有。

在 GooglePlay 上发布您的应用时,您必须决定

which countries and territories you want to distribute to

--> Determine Country Distribution

在运行时,

Android automatically selects and loads the resources that best match the device.

--> Resource-Switching in Android

所以请确保绝对每个字符串都有一个默认版本 res/values/strings.xml 为了避免应用崩溃
并可选择为其他语言添加 folders/resource_files, 例如values-es/strings.xml

如果一个字符串不需要翻译(例如 'OK' 在许多语言中),您不必在相应的附加文件夹中提供版本。