views:

47

answers:

3

I am working on a web forms application that needs to support multiple languages based on a user's preference. Here are some considerations to keep in mind about the needed solution:

I want to avoid using resource files to store the different text translations because I'd like the ability to change them without having to recompile and deploy the application.

Also the translations ideally need to be adminstratable.

It seems its a considerable amount of effort to add this support to an existing application. Any suggestions would be appreciated. Thanks.

+2  A: 

You'll need languge tables for each supported language. You may need to start with an "en" table as your base language for the app.

Then you can add tables for en-gb, en-us and if required you can even go brand specific using custom cultures like en-gb-MyApp1, en-gb-myApp2

Make extensive use of caching and write a custom resource provider.

Simon Hazelton
+3  A: 

Rick Strahl has and awesome solution that is free for personal use, src available here via SVN:

West Wind Web & Ajax Toolkit for ASP.NET

Data Driven Localization Resource Provider
Database driven Localization lets you store resources in a SQL Server database.

  • Interactive Web based Resource Adminstration provides a live Web based adminstration for that can edit and update resources while the app is running

  • Resource Editing Control associates icons with each localizable control and allows jumping directly to the administration form with the current resource id and locale selected.

  • Resx Import and Export lets you import existing Resx resources, interactively edit them with the data driven provider, then export them back out as Resx resources.

  • Localization Utilities like a JavaScript Resource Handler, functions to embed localized script values and much more.

rick schott
A: 

I blogged about my design of an E-commerce store where products, pages etc. are stored in database, and saved in multiple languages by storing column data in XML format.

MartinHN