Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old April 5th, 2006, 11:45 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
php multilanguage site

Hello,

Is there any tutorial for making a php multilanguage site? I have seen some pages using at end of url: ?lang=en

How they do it? Thanks

Reply With Quote
  #2  
Old April 6th, 2006, 03:25 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,720 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 20 m 53 sec
Reputation Power: 6
RE: php multilanguage site

Since there are so many possibilities (organization and technologies to use for example) when building a multilingual site - here are a few things to read that I highly suggest.

http://www.joelonsoftware.com/articles/Unicode.html
http://www.phparch.com/issuedata/articles/article_179.pdf

Reply With Quote
  #3  
Old April 6th, 2006, 10:34 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: php multilanguage site

Thanks very interesting.
But I don't know how make a site which I can change the language. The only I know is that I must create a file with all text of a language and the same for an other language. And then I include a file depending on languge each visitor select. How I do that? Is there any tutorial about this?

Reply With Quote
  #4  
Old April 6th, 2006, 09:52 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,720 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 20 m 53 sec
Reputation Power: 6
RE: php multilanguage site

The simplest way to do it (and the least scalable) is to make the site in various languages and place each in it's own directory. Then depending upon the language the user chooses have them go through that directory.

So main index -> choose language - link it to the languages index page in the lang directory. Make sure you have links between the various languages.

Ex:
www.domain.com/index.html <- choose lang
www.domain.com/en/index.html <- english main page
www.domain.com/jp/index.html <- japanese main page

If you want something more advanced check out gettext, and PEAR's Internationalization classes, or the IntSmarty templates.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > php multilanguage site


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway