Monday, March 26, 2012

Multi Language Form

Hi,

I have a table in an MS SQL 2000 database that represents fields on a form.

CREATE TABLE [dbo].[TagData](
[FieldName] [nvarchar](255),
[UserID] [int] NOT NULL,
[Data] [nvarchar](255)
)

A requirement has come up where some of these fields must contain Hebrew, or any other unicode character, data and some of the fields will be English. How can I go about saving and retrieving this information.

The current solution is a legacy Classic ASP application and I suspect I am going to have to redo this in ASP.Net

Thanks,
Leon

Since the data type in the table is nvarchar, you can store any unicode values.

You select/insert into the table as normal way of inserting the data there will not be any difference in doing DML operations.

Sample insert statement is as follows:

INSERT INTO TagData values(N'Sample Field', 10, N'Sample Data'); --> please "N" is for specifying it as nvarchar.

When you want to display content in ASP.Net depending on the language setting, we have to use localization and Globalization concepts in ASP.Net

Following URL will provide you more info on the same in ASP.Net:

http://www.codeproject.com/useritems/localization.asp

|||

I found this link which helped a lot.

http://www.microsoft.com/globaldev/getWR/steps/wrg_codepage.mspx

sql

No comments:

Post a Comment