I want to have an Android App with 2 languages: English and German. The app should be used by multiple users at the same device. Now I have a problem figuring out how to implement this. I know that basically I can/should the string resource files. However, there are 2 big drawbacks as why to I can't use them:
- I sometimes use the Strings from a Static context and you can't call those resources from a static context (without any 'hack')
- More importantly: I would like to write orders in a database and depending on the user's choice they should be displayed either in German or English. When I use String resources I can't do this because when e.g. a German user orders something it is being written as German into the database and when an English user wants to see the order in English it is not possible as it was only stored as a German string into the database (it is not only about orders, but also about other aspects where I need both German and English)
So my current workaround is to always have 2 versions of each of my 8 database tables. One in English and one in German. And every time I write something into the databases, I write it in the 2 database versions. Whenever something should be used from the database, I use an if-statement to ask for the currently used language and then make a database query either in the English or German tables.
Now my question is, whether you know a more convenient way of doing this or is this the way to go? Basically it is not difficult to impelement it like this. However, the coding effort is quite high as I always have to insert everything in 2 databases and always have to check at many positions the currently used language of the app an depending on that make database queries.
I'd appreciate every comment and suggestion from you and would be quite thankful for your help.