views:

35

answers:

2

I have to translate a web application written in asp.net / javascript with a lot of html/javascript code created in the codebehind, which approach could be the best to translate it, or make it multilanguage support?

+1  A: 

Move all the text into a resource file, then extend the resource file by an additional language.

Then have someone check the presentation in the other language and discover what a pain in the butt supporting applications in multiple languages is.

Beth
This is exactly what we do... all strings in separate files... runtime language determined by browser/user preference.
NinjaCat
A: 

We've created a database to save all our translations. You can find a translation by keyword (this can be the English word or something else).

Something like this:

Keyword       English          Dutch       French
welcome       welcome          welkom      bonjour
assign_user   Assign a user    ...         ...

In our web application, we've created a class which needs the keyword and the current language, queries the database and returns the translated word. Our web application also uses a lot of JavaScript and this hasn't been a problem; it's very flexible.

thomasvdb
Each time you add a language you add a column to the table?
NinjaCat
We never had to add a language since we use this database but when needed we would indeed add a new column to the table.
thomasvdb