multilanguage

C++, C#, Java, PHP, ect...
Post Reply
Sebastian
Posts: 31
Joined: Sun Dec 11, 2011 8:21 pm

multilanguage

Post 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
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: multilanguage

Post 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!
The indelible lord of tl;dr
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: multilanguage

Post by Torniquet »

New Site Coming Soon! Stay tuned :D
Post Reply

Return to “Coding”