Page 1 of 1

multilanguage

Posted: Sat Dec 17, 2011 1:37 pm
by Sebastian
Hiho
Question: what would you say, as people experienced in this subject, is the best way to do this (multilanguage)?
There is a few ways of doing that but i dont know which one is the best.
It would be for simple mmorpg game in php.
I was thinking about just making another "copy" of website for different languages but than what about stuff in DB? so i would make another fields for each array with translations in different languages ('englishname', 'spanisname'...)and i would have to add something in each file that would say something like $language='english'. Finally if i query for something it would be ..'$languagename'...if it makes any sense :)
Sorry if its stupid question but im new in php ;) and i dont want to spend hours of coding and have to change 70% of it to add something new :P

regards
Sebastian

Re: multilanguage

Posted: Sat Dec 17, 2011 10:28 pm
by Jackolantern
This is called "internationalization", and I think if you search with that term you will find lots more resources. You could use a light-weight framework such as CodeIgniter, which has nice internationalization support.

Making 2+ versions of the website is a very, very bad idea! Then every time you want to make an update, you must remember to do it correctly on each website. The typical (and correct) way to do it is to have language files which are dynamically loaded into the webpage depending on which language is selected, and that is where internationalization plugins and frameworks come in handy!

Re: multilanguage

Posted: Sun Dec 18, 2011 2:19 am
by Torniquet