Custom locale in Android

主宰稳场 提交于 2019-12-10 22:55:06

问题


the Android phones in Slovakia have a custom locale - en_SK and cs_SK. Language is either Czech or English, location is Slovakia. Now I would like to have strings that target these locales. The default approach is to create a folder "values-CountryCode", for Czech Republic it's values-cs.

But I get a build error if I add a folder name values-en_SK or values-cs_SK: "invalid resource directory name"

What to do?


回答1:


I am answering my own question :-).

It's values-en-rSK, -r is Region.




回答2:


For Slovakia - Slovak location you have to create folder

res/values-sk-rSK

Working in Android 2.3 and >



来源:https://stackoverflow.com/questions/3950224/custom-locale-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!