I am working on an android project where have to store some data in the local DB (Room). One of the functionality which I have to provide is to store the data in the local DB in different languages, for example if I have information for food, this information has to be stored in English, German, French and so on.
The structure of my DB is something like that:
@Entity(tableName = "food")
public class Food{
}
@Entity(tableName = "food_fr")
public class FoodFr{
}
@Entity(tableName = "food_de")
public class FoodDe{
}
My question is how I can have these three different tables (on different languages) with same columns and the @Dao object return one common (parent) object for all of them?
I am not really sure that is possible at all, but if someone has a solution for that case, please help.
Thanks in advance :)