sqlite - How to use multiple databases like multiple languages in android -


i have 2 database support 2 languages application.

i want change database when change language settings.

is possible?? how can this?

using ridcully solution, need add database name part, need add class extend.

this example library mentioned:

public class mydatabase extends sqliteassethelper {       private static final int database_version = 1;      public mydatabase(context context) {         // here comes magic:         string dbname = context.getstring(r.string.db_name);         super(context, dbname , null, database_version);     } } 

the other database class can be:

public class mydatabase2 extends sqliteassethelper {       private static final int database_version = 1;      public mydatabase(context context) {         // here comes magic:         string dbname = context.getstring(r.string.db_name_2);         super(context, dbname , null, database_version);     } } 

note: use sqliteassethelper, u need create database yourself, , put in assets/databases folder.

you can create sqlite database app sqlitebrowser


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -