Custom locale in Android

2019-07-18 04:00发布

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?

2条回答
萌系小妹纸
2楼-- · 2019-07-18 04:37

I am answering my own question :-).

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

查看更多
我想做一个坏孩纸
3楼-- · 2019-07-18 04:43

For Slovakia - Slovak location you have to create folder

res/values-sk-rSK

Working in Android 2.3 and >

查看更多
登录 后发表回答