View Full Version : How do I select languages?
June 14th, 2006, 11:42 PM
I have created two new language files for Simplied and Traditional Chinese but cannot find any way for the user to select a language.
I am using ppClassifieds with vbPortal and vBulletin. I have the same two versions of Chinese working with vbPortal and vBulletin (not all translation done yet) and users can select the language they want but I cannot see how they can do it in ppClassifieds.
Any advice would be appreciated. (I am a raw beginner with PHP)
June 15th, 2006, 01:46 AM
I see by the similar threads after I poseted this that ppClassifieds does not have any way for users to select languages. I should have checked this before I chose ppClassifieds and did 3 months work so now I have to find a solution.
I am too inexperienced with PHP to do it myself. I see that changing the variable $pplang in config-inc changes the language so I guess what I need is a drop down menu for users to select a language which changes the value of $pplang then puts it in a cookie so when the user comes back it selects their chosen language.
Actually I need help on making a drop down menu that will do this and at the same time duplicate the language drop down menus in vBulletin and vbPortal. They currently both work fine but the user has to change each one separately.
If anyone with some expertise would like to do this and earn some $ please contact me.
(I will copy this post to Mods)
June 15th, 2006, 02:08 AM
I would also be interested in such a hack, as my forum runs bilingual, my photopost will not be able. Same with me, didn't check it out before...
June 15th, 2006, 07:33 AM
I found a partial answer that works for vBulletin and ppClassifieds. I guess it will work the same for Photopost.
Replace $pplang = "english"; in the Classifieds config-inc.php file with
if ($languageid == '1')
$pplang = 'english';
else if ($languageid == '2')
$pplang = 'simp_chinese';
else $pplang = 'english';
Change the numbers for the vBulletin Language ID numbers and change the language names for your corressponding laguages.
June 15th, 2006, 09:22 AM
All Photopost products are global settings for languages and classifieds itself is only packed with english.
June 15th, 2006, 10:16 AM
Yep, I have already had the english.php language file translated into Chinese and the above code works perfectly except in my case I have three languages.
I now have English, Simplified Chinese and Traditional Chinese.
June 15th, 2006, 10:39 AM
add a new elseif clause
June 15th, 2006, 10:48 AM
Thanks, Yes that is what I did.
The next, and hopefully final, challenge with the languages is to get vbPortal to switch together with vBulletin and ppClssifieds.
June 18th, 2006, 10:44 AM
Let me see whether I can build thai.php in a similar way. ;)
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.