How to localize SQL Server 2005 data to display in asp.net website
Can you please let me know how I can fetch the data from Sql Server 2005 Database in multiple different languages and display them in the ASP.NET application?
I am creating asp.net web site for global users with mulitple language support using .resx resource files and by changing the CurrentCulture and UICulture of asp.net page to the selected language by the user from the HomePage using System.Globalization and System.Threading namespaces
So far I have managed to display the User Interface on the page in different languages as I am fetching the control caption text message/images from the resource files but how can I display the data that 开发者_开发问答fetched by the application inside asp.net page controls from sql server 2005 database similarly how to make the user filled the data on registration or anyother form in the selected language.
Can you please let me know
The simplest way (for static data) is to grab English data and translate it via standard resource files (treat English data as keys and read text from resource files).
Other option is to create Localization table with primary key based on string identifier and Culture identifier (i.e. 1033, 1036, etc.), containing translated texts and get translated data with appropriate query (this would require joining...).
The real problem could be dynamic (entered by users) data if you have it. You would need to rely on DB table like mentioned above, but you would need to create an interface in your application to allow content translation...
精彩评论