Print Page | Close Window

2 language site

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=6790
Printed Date: 28 March 2026 at 4:07am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: 2 language site
Posted By: Boecky
Subject: 2 language site
Date Posted: 28 October 2003 at 2:24pm
Does someone has experience here with making a site in 2 languages? I don't mean vb or c# but choose a language on a site like English or Dutch for example. I'm thinking already a couple of days about it, but can't find a good solution.

Put 2 languages seperated in a database doesn't look a good way to do. And I also thought to use strings and look in a cookie wich language and on this way choose the correct string for get the data. Like engData for English and nlData for Dutch or something. Hmmm I really don't know

Some suggestions are welcome.



Replies:
Posted By: Diep-Vriezer
Date Posted: 28 October 2003 at 3:13pm

You'll have to enter the data somehow, since you can't really make good dutch-english translations. Maybe a .ini file with a text string at every line? Or a database?

The thing I hate to do is to put all the information at one page, because it is very confusing (sometimes). So you can create a class, like Content.vb, and make a function wich puts the content in the page. If this sounds difficult, it really isn't that hard.

Then, in the Form_Load sub on your aspx page, just call the class, and it will fill out the page, based on data in the querystring (Default.aspx?lang=en) or (Default.aspx?en).



-------------
Gone..


Posted By: Mart
Date Posted: 28 October 2003 at 3:14pm

I would make a language file (like on most webwiz apps) with simple translations like

Dim sorrytext

sorrytext="desole"

for french etc.

mart.



Posted By: Diep-Vriezer
Date Posted: 28 October 2003 at 3:16pm

Yup, that is done by making a class I guess, or a module, since I still don't understand the difference.. Problem is when you have a large website. Then that file gets pretty messed up.



-------------
Gone..


Posted By: Boecky
Date Posted: 29 October 2003 at 1:56pm
yes, these things will be good for the menus and the 'sentences' on your site. Now one more thing, how I can put lots of text in 2 languages. I'm thinking to make a database with for example the colums: id, text_eng, text_nl. And with text_eng the translation of text_nl. When I do a query id=1&lang=text_nl it will show the Dutch text and when i do id=1&lang=text_eng it will show the text in English. Is this the way they do it? I'm just try to find a good solution for it...before I'll start to develop on it.


Posted By: Diep-Vriezer
Date Posted: 29 October 2003 at 2:23pm

Be sure to not directly load the lang into the query. Hackers like that kinda stuff. Use something like lang=1 and lang=2.



-------------
Gone..


Posted By: Diep-Vriezer
Date Posted: 29 October 2003 at 2:23pm
BTW Yup. that is the way.

-------------
Gone..


Posted By: Boecky
Date Posted: 29 October 2003 at 2:35pm

Getting more clear now



Posted By: The WizeGuy
Date Posted: 30 October 2003 at 7:06am

Check this article out: http://www.dotnetbips.com/displayarticle.aspx?id=218 - http://www.dotnetbips.com/displayarticle.aspx?id=218

this is the third part so read from part 1 .... explaining how to build multi-lingual sites.

cya,
/PatrikB



Posted By: Boecky
Date Posted: 30 October 2003 at 1:28pm

Interesting site! And not only for what I asked
Gonna read it now...



Posted By: Bluefrog
Date Posted: 03 November 2003 at 8:39am

I programmed http://maven3d.com - http://maven3d.com as a multilingual site. It can handle 137 languages but only has 3.

I've programmed other sites as multilingual, but they had different purposes and architectures. http://maven3d.com - http://maven3d.com is a better example of how to do things right.

Behind it, there's a CMS to input everything into a database. Pages are then published to the right subdirectory, e.g. /en/, /ko/, /ja/.

I use server variables to find the http_accept_language and then redirect based on that. English is the default.

It works very well and you can even switch languages seamlessly (almost).

The site is really based on the ISO639 standard which all broswers use.

INI files or includes and cookies are a poor way to work things unless you are trying to maintain an application INTERFACE. i.e. The 'non-content' things are the ones that change.

The reason I say cookies are poor is because you can't control them reliably. You DO have control over the HTTP protocol though.

 



-------------
http://renegademinds.com/" rel="nofollow - Renegade Minds - Guitar Software http://renegademinds.com/Default.aspx?tabid=65" rel="nofollow - Slow Down Music


Posted By: Diep-Vriezer
Date Posted: 03 November 2003 at 9:55am

I tried to build a secure site wich has all the client auth stuff at the server. This is almost impossible, since you can only get the IP of the user, wich could be a gateway or a DNS server or whatever.

That way, you'll have to use cookies to store somesort of ID wich holds the (encrypted) information at the server. But again, all the cookies are crackable, so I used the Rijndael 256 encryption (See topic: Cryptography) to encrypt all the data in the cookies 3 times. That must be secure. I also use SSL certificates, just to be sure. I still want a site were you can authentificate with SmartCard devices... That would be great and secure, since you can just give the people you trust a card, and nobody else.. wow.. But I'm going quite offtopic, so I'll just stop..



-------------
Gone..



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net