Welcome Guest, Not a member yet? Register   Sign In
Best approach to handle languages in an app
#1

[eluser]Bramme[/eluser]
Hi everyone

I'm building an app and want to be able to provide decent language support. To understand what it does: the app will contain 'forms', for every form, there's a database table with the same name and an entry in the forms table. E.g.: I want a news form, so I'll make a 'news' table in my database and add 'news' to the forms table. Now, the news display name will have to be translated correctly offcourse, depending on what language you select, I want it to say "News", "Nieuws", "Nouveaux"... I'll also have a fields table that stores all the fields there are in the news form. This way, I'll also be able to translate the field labels ("News title", "Nieuws titel"...) and store other information. This is the basic gist.

I've worked on an application before and it would just have 5 tablefields: name1, name2, name3, name4, name5... Depending on what language the user prefers, name1, 2... was displayed. This is offcourse very limiting, as it's virtually impossible to add a new language.

So I'm thinking I should put the translations in a separate table, but I'm wondering what the best approach is: one extra table per table (so I'd have forms_translations, field_translations...) or one giant table (translations). These are the two things I can think of, but there's problably other ways out.

Have you ever encountered this problem, how did you solve it? How would you solve it? Which of my two approaches would be best?

Thanks in advance for any advice!


Messages In This Thread
Best approach to handle languages in an app - by El Forum - 02-21-2012, 02:02 PM
Best approach to handle languages in an app - by El Forum - 02-21-2012, 03:08 PM
Best approach to handle languages in an app - by El Forum - 02-21-2012, 03:22 PM
Best approach to handle languages in an app - by El Forum - 02-21-2012, 03:46 PM
Best approach to handle languages in an app - by El Forum - 02-22-2012, 12:49 AM
Best approach to handle languages in an app - by El Forum - 02-22-2012, 01:23 AM
Best approach to handle languages in an app - by El Forum - 02-22-2012, 02:12 AM
Best approach to handle languages in an app - by El Forum - 02-23-2012, 06:45 AM
Best approach to handle languages in an app - by El Forum - 02-24-2012, 06:46 AM
Best approach to handle languages in an app - by El Forum - 03-06-2012, 12:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB