473,503 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to display in any lanaguae

hi,
Guys.....
I am Making A website....in asp
Now my data is stored in Sql Server....
What i want is to display the Data as per Languaue the user selects..

The data stored in sql server is english

if the user selects French in asp site the data from the backend should be

displayed in FRench...

or based on ip address and location automatically the Data....sholud be

Displayed according to The REgional...settings..
ie guy logging on from japan sholud see data in japanense..
can this be done or what?
Please help me out...
regds,
Navin Mahindroo
Jul 19 '05 #1
2 1809
You will have to store the interpreted strings for each language in you
database.
when a user come to your site make the asp code deciede what are they are
from using IP address
(probabally earier to let then select a link on the home page so you know
you definatly have this right language..)
and then deciede which field to show, maybe using a case statement in your
sql server statement.

eg
create table tblGreeting
(
Greeting Id int identity(1,1),
NZMessage nvarchar(1000),
USMessage nvarchar(1000),
AustMessage nvarchar(1000),
JPNMessage nvarchar(1000)
)

insert into tblGreeting
(
'Welcome to my site -- why not visit NZ',
'Hello to you all in the Good old USA',
'G'day mate,' -- this is a long enough message for most of them :)
'don't know any japenese -- sorry..'
)

seriously,

maybe you will wnat to use PK and FK for the relationship and you can only
put about 8000 bytes of data on page in sql server.

HTH

martin.

"Navin" <na******@rediffmail.com> wrote in message
news:5d**************************@posting.google.c om...
hi,
Guys.....
I am Making A website....in asp
Now my data is stored in Sql Server....
What i want is to display the Data as per Languaue the user selects..

The data stored in sql server is english

if the user selects French in asp site the data from the backend should be

displayed in FRench...

or based on ip address and location automatically the Data....sholud be

Displayed according to The REgional...settings..
ie guy logging on from japan sholud see data in japanense..
can this be done or what?
Please help me out...
regds,
Navin Mahindroo

Jul 19 '05 #2
If you are considering developing a multi-language Web site, perhaps
have a file called something like translate.asp (which contains a
function call TranslateIt()) included in each page. Thus toward the top
of a regular Web page you might have the following:
<!--#include file="translate.asp"-->

And on Web pages wherever regular text is used, use the function from
translate.asp instead.

So for a button that says "Close" in English and something with the same
meaning in other languages the button might look like this:
<input type="submit" name="btnClose" value="<%= TranslateIt("Close")
%>">

And there could be a session variable called Language that is set
somewhere:
Session("Language") = "German"

And here is the TranslateIt() function in the translate.asp include
file:

Function TranslateIt(pstrStatement)
Select Case Session("Language")
Case "English"
Select Case pstrStatement
Case "Close"
TranslateIt = "Close"
Case "Open"
TranslateIt = "Open"
End Select
Case "German"
Select Case pstrStatement
Case "Close"
TranslateIt = "Ende"
Case "Open"
TranslateIt = "Offen"
End Select
End Select
End Function

Thus the above Close button would say Ende because Session("Language")
is set to be German.

Perhaps a similar concept is used at Google where on the main screen one
can click on Preferences and change the interface language to be
something other than what you're used to. Just for fun Google even lets
you change it to be Elmer Fudd which is located in the listbox between
Dutch and English. With the interface language set to Elmer Fudd the
"Google Search" button now says "Google Seawch" and the "I'm Feeling
Lucky" button now says "I'm Feewing Wucky."

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2147
by: StepH | last post by:
Hi, I'm building a little application, which the goal is to: 1./ Collect data via Serial line and or via a file (for playback). 2./ Display these data as graph, oscilloscope, ... How manage...
1
2663
by: FrankBooth | last post by:
Hello, I have a list of names, and when I click ona name I want the extar info to show and then I want to clcik and hide it again. I have the following HTML which works perfectly if I use one...
23
3124
by: Mat | last post by:
<div id="container"> <div id="main"> <div id="header"> <p class="Address">123 Fake Street, </p> <p class="City">Crazy City, </p> <p class="Province">Ontario </p> <p class="PostalCode">H0H...
3
10229
by: shreddie | last post by:
Could anyone assist with the following problem? I'm using JavaScript to hide/show table rows depending on the option selected in radio buttons. The script works fine in IE but in Firefox the...
1
3544
by: Tristan Miller | last post by:
Greetings. I am trying to write a function which toggles the display of a certain class of <div> elements in an HTML page. The CSS file initially sets some classes to "display: none", and...
7
6047
by: Stefan Finzel | last post by:
Hi, is there a way to change the display property on Windows Mobile 2003 SE Mobile/Pocket Internet Explorer? See following example. Please note: visibilty property has the same problem. Is...
0
1885
by: Ferry Boender | last post by:
Hi, I'm relatively new to Xlib programming, and I ran into a little problem. I'm trying to insert keypress events into a X window. The following code works: ...
1
9011
by: RonY | last post by:
I have a dropdown which calls SetTimePeriod method on change the selection. In the JS function, I reset the field style.display based on what the selection is. This works fine with IE but not working...
15
3126
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.