1
|
<?php
|
2
|
/**
|
3
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
4
|
*
|
5
|
* This program is free software: you can redistribute it and/or modify
|
6
|
* it under the terms of the GNU General Public License as published by
|
7
|
* the Free Software Foundation, either version 3 of the License, or
|
8
|
* (at your option) any later version.
|
9
|
*
|
10
|
* This program is distributed in the hope that it will be useful,
|
11
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
* GNU General Public License for more details.
|
14
|
*
|
15
|
* You should have received a copy of the GNU General Public License
|
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
*/
|
18
|
|
19
|
/**
|
20
|
* include.php
|
21
|
*
|
22
|
* @category Modules
|
23
|
* @package Modules_MultiLingual
|
24
|
* @author Werner v.d.Decken <wkl@isteam.de>
|
25
|
* @author Dietmar Wöllbrink <dietmar.woellbrink@websiteBaker.org>
|
26
|
* @copyright Werner v.d.Decken <wkl@isteam.de>
|
27
|
* @license http://www.gnu.org/licenses/gpl.html GPL License
|
28
|
* @version 0.0.1
|
29
|
* @revision $Revision: 2070 $
|
30
|
* @link $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/MultiLingual/include.php $
|
31
|
* @lastmodified $Date: 2014-01-03 02:21:42 +0100 (Fri, 03 Jan 2014) $
|
32
|
* @since File available since 09.01.2013
|
33
|
* @description provides a flexible posibility for changeing to a translated page
|
34
|
*/
|
35
|
|
36
|
if(!function_exists('language_menu'))
|
37
|
{
|
38
|
function language_menu($sExtension = "auto")
|
39
|
{
|
40
|
global $wb;
|
41
|
$oReg = WbAdaptor::getInstance();
|
42
|
if(!$oReg->PageLanguages) {return false;}
|
43
|
$sExtension = strtolower($sExtension);
|
44
|
switch($sExtension)
|
45
|
{
|
46
|
case 'png':
|
47
|
case 'svg':
|
48
|
break;
|
49
|
default:
|
50
|
$sExtension = 'auto';
|
51
|
}
|
52
|
|
53
|
if ( ($wb->page_id < 1) ){ return false; }
|
54
|
$oPageLang = new m_MultiLingual_Lib();
|
55
|
$oPageLang->setExtension($sExtension);
|
56
|
$sRetVal = $oPageLang->getLangMenu();
|
57
|
return $sRetVal;
|
58
|
}
|
59
|
}
|