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: $
|
30
|
* @link $HeadURL: $
|
31
|
* @lastmodified $Date: $
|
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
|
$sExtension = strtolower($sExtension);
|
42
|
switch($sExtension)
|
43
|
{
|
44
|
case 'png':
|
45
|
case 'svg':
|
46
|
break;
|
47
|
default:
|
48
|
$sExtension = 'auto';
|
49
|
}
|
50
|
|
51
|
if ( $wb->page_id < 1){ return false; }
|
52
|
$oPageLang = new m_MultiLingual_Lib();
|
53
|
$oPageLang->setExtension($sExtension);
|
54
|
$sRetVal = $oPageLang->getLangMenu();
|
55
|
return $sRetVal;
|
56
|
}
|
57
|
}
|