vieux
vieux

Reputation: 24407

Use the same resources for multiple locales

I have to translate an app in hebrew.

All my unlocalized ressources (drawable, values, etc) are for english. Hebrew is 'he', so I have some folders like drawable-he, values-he but could be 'iw' on some phones.

Is there a way to force 'iw' phones to use the 'he' folders ? For now the only solution I found is to duplicate all my resources folders with -iw, but my app became bigger obviously.

Any idea ?

Upvotes: 0

Views: 918

Answers (2)

kindergarten
kindergarten

Reputation: 11

Aliases works only with strings and drawable, not with raw, but the raw data usualy is big, so alias do not solve the problem.

Another solution is to put Hebrew data in default folders, and english data in values-en, drawable-en, raw-en folders, so duplication will be eliminated, but this way all other languages that was not defined explicitly will see Hebrew instead of English.

Upvotes: 1

Mullins
Mullins

Reputation: 2364

The solution is alias resources. You still need a separate folder for each locale but you do not need to duplicate resources.

See http://developer.android.com/guide/topics/resources/providing-resources.html#AliasResources

Upvotes: 1

Related Questions