Will Posted September 22, 2007 Posted September 22, 2007 I'm thinking of making the entire site into other languages, I have people who can translate it. I was thinking either copy all the files into a different folder with all the text a different language or have a database for languages and have a code for every text and every page it searches the database for that code. Which method do you people think is faster? I would prefer the second but I'm thinking it will be too slow. Quote
hamster01 Posted September 22, 2007 Posted September 22, 2007 Re: Game in Different Languages. Mysql with this would be pointless. Rather check how things like phpbb and smf do it, language packs. Quote
Decepti0n Posted September 22, 2007 Posted September 22, 2007 Re: Game in Different Languages. Have language files, like en.lang.php Inside, something like $lang['help'] = 'Help'; $lang['register_info'] = 'Register with us to do whatever.'; Translate that page, and include the one that corresponds to their language. I did it on a few new projects, but it takes a LOT of time to add new text into it, especially since while making new pages, i had to do things like: echo '<h1>'.$l->register_info.'</h1>'; then had to add that text into the file. It takes a lot longer but it usually has its obvious benefits Quote
Will Posted September 22, 2007 Author Posted September 22, 2007 Re: Game in Different Languages. Hmm. The php file idea sounds good. I thought of the Database so I could have a panel for my translators to translate phrases without me doing it. Quote
hamster01 Posted September 22, 2007 Posted September 22, 2007 Re: Game in Different Languages. Have language files, like en.lang.php Inside, something like $lang['help'] = 'Help'; $lang['register_info'] = 'Register with us to do whatever.'; Translate that page, and include the one that corresponds to their language. I did it on a few new projects, but it takes a LOT of time to add new text into it, especially since while making new pages, i had to do things like: echo '<h1>'.$l->register_info.'</h1>'; then had to add that text into the file. It takes a lot longer but it usually has its obvious benefits Or, $lang = array( 'af' => array( 'reg' => 'registreer', 'bye' => 'baai'), 'en' => array( 'reg' => 'register', 'bye' => 'bye')); Then to use it, you would use. echo $lang['af']['reg']; ps. decepti0n, thanks for the new bbc, and your avatar is not very good. ): Quote
UCC Posted September 22, 2007 Posted September 22, 2007 Re: Game in Different Languages. I have really wanted to make a spanish language version of 2.0 but modifying every single page in my game is not something I am inclined to do. There is just sooo much text to modify Quote
Decepti0n Posted September 22, 2007 Posted September 22, 2007 Re: Game in Different Languages. Theres no point in using multi-dimensional arrays and will, you should be able to just loop through it all, if you have descriptive enough titles in the array foreach ($lang as $key => $val) { echo $key . ': <input type="text" value="'.$val.'" />'; } well, thats an idea, then they'll have a form to just change everything Quote
hamster01 Posted September 22, 2007 Posted September 22, 2007 Re: Game in Different Languages. Theres no point in using multi-dimensional arrays and will, you should be able to just loop through it all, if you have descriptive enough titles in the array foreach ($lang as $key => $val) { echo $key . ': <input type="text" value="'.$val.'" />'; } well, thats an idea, then they'll have a form to just change everything And why is that? Edit: Oh now I see.. so i'm slow, so what. d: Quote
SaMz Posted September 22, 2007 Posted September 22, 2007 Re: Game in Different Languages. it is a very good idea to make a game in a different language. if there was a change language mod it would be awesome and people will be paying alot of $$$. Quote
Jesse60905 Posted January 30, 2008 Posted January 30, 2008 Re: Game in Different Languages. I have an idea on how to do this fairly easily... Ima keep it to myself... TGFG = Thank God For Google XD Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.