graham23s Posted August 12, 2007 Share Posted August 12, 2007 Hi Guys, i have done a site ok, but someone was asking about multi language support (i know id need to translate every word into another language) but what would be the best way about it put the english word and the forein words in a constants file? cheers Graham Quote Link to comment https://forums.phpfreaks.com/topic/64568-making-a-site-with-multi-languages/ Share on other sites More sharing options...
NArc0t1c Posted August 12, 2007 Share Posted August 12, 2007 You should try array's to do this. That is the best way I have found yet. I don't know where to get these language packs though, sorry. Quote Link to comment https://forums.phpfreaks.com/topic/64568-making-a-site-with-multi-languages/#findComment-321860 Share on other sites More sharing options...
Fadion Posted August 12, 2007 Share Posted August 12, 2007 U should consider site lang and articles lang. The site langs may be in different files, each of them having the same variables or arrays and depending on the user's choice, u include the specific lang file ex: eng.lang.php $lang['title'] = 'This is my site'; $lang['desc'] = 'My site is good'; In that way u can have the other languages. About articles then, if ure using databases, u may have another table with the same columns as the english table. Finding out wich language is set may be done with sessions (or cookies if u want to remember what the user's last lang was) and depending on the session value, u include the right lang file and select the right db tables. Guess its clear, but if not ask again. Quote Link to comment https://forums.phpfreaks.com/topic/64568-making-a-site-with-multi-languages/#findComment-321960 Share on other sites More sharing options...
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.