user3657381
user3657381

Reputation: 17

How to Localise android drawable resources?

I am trying to localise an app I wrote for french, german, spanish, and polish. For all strings I have achieved this by adding folders: values-de, values-fr, values-es and values-pl and translating the strings.xml in each folder into the respective languages. I am having trouble doing this with the images I am using, I have a tab host layout that displays an image for each tab. I have tried adding into resources the following folders: drawable-de-hdpi, drawbale-fr-hdpi, drawable-pl-hdpi, drawabel-es-hdpi(done for each pixed density respectively), and putting the correct images corresponding to the countries in each. However when I change the phone settings to French for example the strings translate fine on the app, but the images remain in the english setting.

Please note the possible previous solution @PedroHawk linked I had already tried and did not work for me thanks!

Upvotes: 1

Views: 2617

Answers (1)

Binu Jayaram
Binu Jayaram

Reputation: 131

  • Use for placing Spanish drawables - drawable-es-rES-hdpi
  • Use for placing German drawables - drawable-de-rDE-hdpi
  • Use for placing French drawables - drawable-fr-rFR-hdpi
  • Use for placing Polish drawables - drawable-pl-rPL-hdpi

You can create different density-wise folders in similar way. Goodluck!

Upvotes: 5

Related Questions