Forum Moderators: coopster

Message Too Old, No Replies

Multi-language site with PHP

Multi language, PHP

         

galahad2

2:27 pm on Nov 23, 2009 (gmt 0)

10+ Year Member



Hi, we've been asked to create a site for a client which needs to be not only in English but also French, German, Spanish and (worst of all) Russian.

In basic terms, how easy is to create various subsites with these languages? We want to have a simple option on the home page with images of the country flags- users can click on the flag of their choice and the site reloads in their chosen language.

I'm guessing we should have subdomains set up ideally, e.g en.oursite, fr.oursite and so on.

And I would think the client would need to provide the content in all the various languages? I don't trust online translation software and if the language is even slightly wrong then the message can be badly wrong.

So how easily can this be done and how would you go about doing this?

aprendelo

5:06 pm on Nov 23, 2009 (gmt 0)

10+ Year Member



I suggest to you to use Drupal (http://drupal.org) with I18 module (http://drupal.org/project/i18n), you can configure this subsites as subdomains or as url ex:
mydomain.com/es
mydomain.com/fr
mydomain.com/en

galahad2

7:44 pm on Nov 23, 2009 (gmt 0)

10+ Year Member



Any non-CMS method that you know of? (as the client has requested maintenance from us rather than CMS)

aprendelo

8:52 am on Nov 24, 2009 (gmt 0)

10+ Year Member



Well, if you dont want to use a CMS, you can duplicate the site for each language-subdomain ... But I think that if you are going to maintenance the site, your bet is a CMS. Try to explain it to the client.

coopster

2:57 pm on Dec 5, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You may also consider reviewing an Apache installation/configuration. Grab a copy of the distribution and peel apart the httpd.conf file. Pay particular attention to their manual and how they handle the multi language interface.

StoutFiles

6:28 pm on Dec 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not hard. Pass the country as a GET variable and do an if/else loop at the beginning of every page to check what language it should be in, then output data for that language.