Reputation: 3950
I have simple database - one table with 6 collumns. 3 of them i want have in two languages.
Is it possible to do it automatically ? Like add language prefix to collumn and it will choose language(_EN,_PL) that user use ? It will work ?
I must have everything in one database, because I copy it to users device.
I can' t find information about it, thanks for help.
Upvotes: 2
Views: 1582
Reputation: 48871
No, that isn't how SQLite DBs work even with Android's localization features. You can do it with strings.xml
(for example) by creating...
/res/values/strings.xml
/res/values-pl/strings.xml
...and so on but databases and queries work on absolute column names.
The best way of doing this I can think of is to identify the local language and simply use the abbreviation as a suffix or prefix when building queries etc.
Upvotes: 1