Wbstie help

Associate
Joined
9 Nov 2003
Posts
1,138
Location
Peterborough
Iam in the process of making a website and i need to have t in two languages, i have no idea how to do this though??

Any help would be greatful

Phil
 
If you have no idea, you should probably be getting somebody else to do it who does have an idea. :)

But here is how it might be done;

All your content should be in a MySQL database, in which you have two copies of each table (One in each language), then simply use a variable in PHP to switch between one language or the other, depending on user preference, which can be set via a link on the website.

This way, you can also get PHP to call a different stylesheet if one of the two language requires different padding/margin values. Like Arabic which reads right to left or Chinese which is difficult to read in smaller font sizes due to the strokes being squashed.

Phil.
 
Last edited:
if i were you, i'd make the website twice. then have a welcome page where the user can select their language, this then forwards them to www.yoursite.com/english or www.yoursite.com/outerfrenchmongolian depending on their language.

you lot are all trying to be too clever about it!! :p

ofc, as an extension, i'd save a cookie to remember the user's selected language so they didnt have to choose next time, and i'd have all my content in a database and have a php $_GET variable choosing language depending on preference. but both ways work just fine :)
 
I agree with Sic.

But thats if the website is a realtivley small site. If you are going to have large numbers of pages then it might be a bit of a nightmare.

Just ensure to follow best practice, seperate your design from content as much as possible- or as much as is sensible and you will find this easy.

Justin
 
Sic said:
if i were you, i'd make the website twice. then have a welcome page where the user can select their language, this then forwards them to www.yoursite.com/english or www.yoursite.com/outerfrenchmongolian depending on their language.

this is the easiest way and least cumbersome.

maybe for a stack of content the MySQL route makes sense ... but for 20pages or so .. just another version would be fine and simple
 
OvertoneBliss said:
I was born this way lol

PHP lol

Don't mock me, hippy. :) lol

Phil. lol

lol. but dont forget if someone doesn't know PHP, it makes it somewhat more difficult to build a website in it.

lol
 
Sic said:
lol. but dont forget if someone doesn't know PHP, it makes it somewhat more difficult to build a website in it.

lol

And to be honest i am not too hot with PHP lol
 
Back
Top Bottom