Ashish Wadatkar
Ashish Wadatkar

Reputation: 427

Android Multilanguage App

I am having Database file .db , In which all data is available in English. I want to make Multi language support App in Android By using database.

Can any one help me by giving some examples.?

Upvotes: 0

Views: 1080

Answers (1)

DArkO
DArkO

Reputation: 16120

I can reccomend this:

What are best practices for multi-language database design?

Schema for a multilanguage database

So in my experience i think the best way about this is doing one table which will contain the major info that wont be localized and then create seperate tables for each of the languages you want to support for the localized columns.

But you will definitely need some kind of code design for handling this depending on your locale rather than writing queries for each language.

Like have a method that will pre-process the SQL statement adding the join statements with the different tables depending on the locale.

haven't really done something like this on android but rather on a backend implementation.

However most of the android feature a fairly small database with just a couple of columns so even having a single table with columns like description_en description_it etc... can do the job if you need to localize in a small amount of languages and small amounts of columns, then process the sql to append the locale if a specific column name is detected in the query.

My suggestion is still having multiple tables and having a good design because maintaining databases in android apps is not a simple tasks due to them being distributed across devices, os versions etc..

A good design will mean spending more time initially but do less work on maintenance.

Upvotes: 1

Related Questions