Dick Lucas
Dick Lucas

Reputation: 12639

Localize resources based on region only

I understand how to localize assets based on language and region. As per this post: Localization and drawables

For example, to target the French speakers in Canada, I would name my folder: drawable-fr-rCA-hdpi

But what if I only want to target devices that are set to the Canada locale, without worrying about language, would I simply do drawable-rCA-hdpi? I have not found any documentation on this and would appreciate any help.

Upvotes: 0

Views: 740

Answers (2)

EJK
EJK

Reputation: 12527

See http://developer.android.com/guide/topics/resources/providing-resources.html, table 2. Region cannot stand alone. You must specify either language or language+region.

Upvotes: 2

Phantômaxx
Phantômaxx

Reputation: 38098

I don't think you can.
Either set language or language+region, but not region only.

In your case, you can duplicate the resources in drawable-en-rCA-hdpi and drawable-fr-rCA-hdpi

Upvotes: 1

Related Questions