multilingual website design

Associate
Joined
14 Apr 2003
Posts
1,101
Hi,

What is the best way to design a multilingual website?

Currently I have two directories:

en/ for english
esp/ for spanish

I dont have a /index.html page so i automatically redirect all users to /en/index.html.

They can change to and from Spanish by a link at the top of each page.

As this is my first multilingual webpage I didn't really design it too well. I am just wondering if this is the best way to go about it or are there fancier ways? (I know ASP.NET has some language stuff built in but this is with PHP). Also I am concerned about the effects that the redirect may have on SEO.
 
The multi-language web applications I have worked on (English and Japanese) have used translate tokens. All the information is stored in a database and you call the information using a token (i.e translate(product_line)) and its goes off to the database and depending on the locale specified in the user session it will bring back either the English or the Japanese (or whatever language). This is good as it provide complete data abstraction.

So the table would be like

Token (as Primary Key), English, Japanese, ....other languages, Comments, Description.

Someone may have a better way however.


Thank-you. It sounds like a lot of work to convert it, however, I can clearly see the benefits when it comes to adding new pages etc...
 
I might have a bash at doing 1 page to see how easy it is, but I don't have much spare time - it doesn't need doing it was just something i found interesting.

How would I start off then? :p
 
nah thats great thanks. I do have MySQL but they dont hve phpmyadmin, no worries I'll just do it by hand. Is there a way to select the language by the language they use on their machine?? Or do they have to select?
 
Hi,

I've started designing my database for this site. I was wondering how you deal with paragraphs. Say I want two paragraphs on a page - are these two different tokens? What if you want a link? Is that a token? I think I'm going to have to have more fields...
 
ok, i realise now that it isn't as simple as I first thought..

I'm trying to kill two birds with one stone and allow them (the clients) to create and change pages without having to pester me. However, this is going to be slightly tricky as soon as they require anything other than text :p

I might just make a basic system that they can do limited stuff to i.e. edit what is already there... I suppose it will only be useful for a latest news page.
 
yeah i have a feeling thats the way its heading.

While you're here... you mentioned i had to set my database to utf8, which i have done, but im still getting question marks all over the shop.

I have tried the following as well - which apparently helps:

SET NAMES 'utf8';

just after ive selected the database and before i run a query.
 
the website. I have other accented characters rendering fine - its just the stuff coming back from the database.

In phpMyAdmin the characters are displaying fine... its frustrating but im getting on with other things as well.
 
Back
Top Bottom