Forum Moderators: phranque

Message Too Old, No Replies

Multilanguage website

         

onetry

9:55 am on Nov 6, 2009 (gmt 0)

10+ Year Member



Hi,

I am planning to start a multilanguage website in PHP and I'm thinking about the best way to implement URLs and scripts.

Any (recent) help ?

Thanks.

bill

6:06 am on Nov 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



UTF-8 encoding can be good for most languages. That will allow a single encoding standard for your database. I tend to keep most of my URLs and scripts annotated in English. That makes it easier if future developers need to step in and change something system-wide.

onetry

8:22 am on Nov 9, 2009 (gmt 0)

10+ Year Member



Hi,

I am going with UTF-8 using mysql. It seems working for all languages.

Regarding the urls I think will go with these:

www.mysite.com --> en
www.mysite.com/cn --> cn
www.mysite.com/fr --> fr
...
(does www.mysite.com/en will make sense ?)

After, I'm trying to understand the best way to go for the user on the homepage:

1) if the first visit, I'll go with browser setting, then leave a cookie.
2) if the user has a cookie, I'll go with cookie preference
3) there will also be a language selector that will set the cookie language

What do you think about it ?

Thanks for help.

whoyouare

10:05 am on Nov 9, 2009 (gmt 0)

10+ Year Member



i think it can work...
www.mysite.com --> en
www.mysite.com/cn --> cn
www.mysite.com/fr --> fr

bill

11:44 am on Nov 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you were looking to capitalize on local SEO internationally I'd suggest:
  • example.com --> en
  • example.cn --> cn
  • example.fr --> fr
  • onetry

    12:32 pm on Nov 9, 2009 (gmt 0)

    10+ Year Member



    Hi Bill,

    I think your suggest is the best "ideal" way to go.

    Unfortunately some of them are already taken.