Reputation: 567
I have a .txt file in android that I want to read. I first stored it in a raw directory but now I want this file in many languages and android to read the good file according to the language of the device. Do you know where and how I should store this file?
Upvotes: 0
Views: 66
Reputation: 1006564
Store your default text file — that you want to use if nothing else matches — in res/raw/
as you are now.
Store translations of the file to other languages in peer directories (e.g., Spanish in res/raw-es/
).
This is how string resources work in res/values-.../
directories. You are simply applying the technique to text files in res/raw-.../
directories.
Upvotes: 2