PDA

View Full Version : Custom PHP page - language ?


greggus
05-12-2010, 12:40 PM
Hi,

I use the tutorial (https://vborg.vbsupport.ru/showthread.php?t=228928) to make my own php page. It works fine. However, i need a way to know which language is selected on this custom page. Any idea ?

Regards

UPDATE :
NVM i found how to do it :

// Set up user's chosen language
if ($vbulletin->GPC['langid'] AND !empty($vbulletin->languagecache["{$vbulletin->GPC['langid']}"]['userselect'])) {
$languageid =& $vbulletin->GPC['langid'];
} else if ($vbulletin->GPC[COOKIE_PREFIX . 'languageid'] AND !empty($vbulletin->languagecache[$vbulletin->GPC[COOKIE_PREFIX . 'languageid']]['userselect'])) {
$languageid = $vbulletin->GPC[COOKIE_PREFIX . 'languageid'];
} else {
$languageid = 0;
}