【发布时间】:2014-04-30 19:50:45
【问题描述】:
我有 3 种产品风格,每种风格的调试和发布,我都成功地为每个风格赋予了独特的字符串和图标。现在我正在为本地化做准备,这需要为每种产品风味提供不同的字符串。这是我当前的文件夹/目录设置:
myApp/
src/
main/
res/
values/strings.xml
flav1Debug/
res/
values/strings.xml
flav1Release/
res/
values/strings.xml
flav2Debug/
res/
values/strings.xml
flav2Release/
res/
values/strings.xml
flav3Debug/
res/
values/strings.xml
flav3Release/
res/
values/strings.xml
每种产品风格都已经覆盖了默认的 strings.xml。现在我需要我的西班牙语和法语字符串来覆盖每种产品风味的默认字符串。这是我假设我的文件夹/目录设置需要的内容:
myApp/
src/
main/
res/
values/strings.xml
values-es/strings.xml
values-fr/strings.xml (repeated for each flavor below)
flav1Debug/
res/
values/strings.xml
flav1Release/
res/
values/strings.xml
flav2Debug/
res/
values/strings.xml
flav2Release/
res/
values/strings.xml
flav3Debug/
res/
values/strings.xml
flav3Release/
res/
values/strings.xml
有人可以证实我的假设吗? 然后我必须找到最简单的方法来测试它,而不会卡在手机上的外语上。
提前致谢, 德文
【问题讨论】:
标签: android localization gradle android-productflavors