1

Im creating a application that´s talking to the user, I want to support English to. I know how to do so with strings. But i dont know how to do it with sound, is it just do create a new folder called raw-eng? Then put the English sounds in there?

I have tried to create this folder but can´t get it to work when i change the language to English on my phone.

I have tried to search on devleoper.android.com but could not find a answer.. mabey you guys here could explain how to do this.

user3356636
  • 115
  • 1
  • 11

2 Answers2

1

You can use workaround. Add to string resources names of files. And load string by id. String will contain name of localized sound.
Edit
Look at this post. I thought that you tried to use raw and this is impossible :)

Community
  • 1
  • 1
x90
  • 2,140
  • 15
  • 25
0

You can put your files to assets folder to different folders names, for example, sound_en, sound_ru, sound_fr. To select current folder you can use

String currentLanguage = Locale.getDefault().getLanguage();

or add folder name as string to res/valuse/strings (as X90 told in previous answer)

Natali
  • 2,934
  • 4
  • 39
  • 53