NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page languages

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 02-20-2004, 08:03 AM THREAD STARTER               #1 (permalink)
New Member
Join Date: Feb 2004
Posts: 2
Krizz is an unknown quantity at this point
 



languages


Hi
it is maybe a noob question but I've never done this before. I need to build a site in 4 different languages. I want them to choose on the mainpage to choose which language they prefer and than they can continue in that language.
Can anyone help me with the most effecient way please?
thx for your time
Krizz is offline  
Old 02-20-2004, 08:18 AM   #2 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
as far as i know there is no functions in php/mysql/asp that can do this

there was a thread about this a couple of months ago do a quick search and see what was said there
adam_uk is offline  
Old 02-20-2004, 12:48 PM   #3 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



I think I would just build the first site with one language, then take and transform that site to use the next language etc.. Then possibly just have each site in it's own directory and on the main page have a little drop down to select your preferred language which would take you to the correct index page for the language selected.
deadserious is offline  
Old 02-20-2004, 01:27 PM   #4 (permalink)
Credit Card Service Pro
 
Wanda's Avatar
Join Date: May 2003
Location: Missouri
Posts: 4,430
Wanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud ofWanda has much to be proud of
 



what language needs do you have..
what countries translation do you need?
Wanda is offline  
Old 02-21-2004, 02:36 AM THREAD STARTER               #5 (permalink)
New Member
Join Date: Feb 2004
Posts: 2
Krizz is an unknown quantity at this point
 



I need the site in english,dutch,german and french.
I've heard that it shouldn't make much problems in asp but I do not know anything of that and I'm not planning to build the site 4 times.
Krizz is offline  
Old 02-21-2004, 07:01 PM   #6 (permalink)
Senior Member
Join Date: Aug 2002
Posts: 1,255
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
 



Oh sorry, I thought you meant four different programming languages, lol dunno what I was thinking.

But I think I would still do it the same way with building the four separate sites with different languages and having each language in separarte directories. Then you could even auto detect the visitors browsers default language and redirect them to the appropriate file.

What you're wanting to do with four separate languages and one set of files I think would require you to make a language file with variables for each word you're going to be using on your website.

lang[web design]=Web Design

lang[web design]=El Diseño de la telaraña
????: NamePros.com http://www.namepros.com/programming/21250-languages.html

That's just an example, but you'd need one for each word in each language. It may be best to make these in four separate files, one for each language.

Then you would have to set cookies or something like that when they select their language so it can remember which words to use. So you'd have to have something like if language = french then include your french language file else if language = spanish then include your spanish language file and in your code each word would need to be printed as a variable such as lang[web design] which would print the correct word based on the file you included.
deadserious is offline  
Old 02-23-2004, 06:49 AM   #7 (permalink)
NamePros Member
Join Date: Dec 2003
Location: GB, WI
Posts: 69
blouis is an unknown quantity at this point
 



most effecient way would be to do it in flash, with ASP, PHP and all the other stuff you still have to send a request back to the server and all that stuff. with flash you can just send it all at once so theres no re-load time thats the most effecient way but, its kinda hard to do.
__________________
Bryan Louis
-Xeplin Development-
http://www.xeplindevelopment.com
-Personal-
http://www.bryanlouis.net
blouis is offline  
Old 02-23-2004, 12:25 PM   #8 (permalink)
RyanPrice.ca - Developer
Join Date: Dec 2003
Posts: 1,328
Jeanco is a jewel in the roughJeanco is a jewel in the roughJeanco is a jewel in the rough
 



You could keep a mySQL database with each page stored 4 times as a different column. For example:

File Name - index.html
English - <code for english>
French - <code for french>
Spanish - <code for spanish>

Then when the user selects their language you can send a cookie or start a session on the server with that data saved. All it is from there is a simple if statement on each page.
__________________
Ryan Price - Webmaster
www.HostDurham.com - For Hosting | www.jeanco.ca - For Webdesign
Jeanco is offline  
Old 02-23-2004, 05:32 PM   #9 (permalink)
Account Closed
Join Date: Feb 2004
Location: Bothell, Wa
Posts: 237
Zero-Life is an unknown quantity at this point
 



what i think would work the best is this.

if (IE){
document.write("<LINK REL=STYLESHEET HREF=\"/lwsd/css/ie_style.css\" TYPE=\"text/css\">");
}else if (Mac){
document.write("<LINK REL=STYLESHEET HREF=\"/lwsd/css/mac_style.css\" TYPE=\"text/css\">");
}else if (NS){
document.write("<LINK REL=STYLESHEET HREF=\"/lwsd/css/ns_style.css\" TYPE=\"text/css\">");
????: NamePros.com http://www.namepros.com/showthread.php?t=21250
}else{
document.write("<LINK REL=STYLESHEET HREF=\"/lwsd/css/ns_style.css\" TYPE=\"text/css\">");

That's a php script in the head section from my districts site.
I'm thinking you can do that like this

if (spanish){ include 'spanish.php' }

Not very good with php, so wouldn't know if that's right.
Zero-Life is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:15 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger