Project

General

Profile

1 1939 darkviper
<?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 1970 Luisehahne
 * @revision     $Revision$
30
 * @link         $HeadURL$
31
 * @lastmodified $Date$
32 1939 darkviper
 * @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 1945 darkviper
	function language_menu($sExtension = "auto")
39 1939 darkviper
	{
40
		global $wb;
41 1945 darkviper
		$sExtension = strtolower($sExtension);
42
		switch($sExtension)
43
		{
44
			case 'png':
45
			case 'svg':
46
				break;
47
			default:
48
				$sExtension = 'auto';
49
		}
50
51 1939 darkviper
		if ( $wb->page_id  < 1){ return false; }
52
		$oPageLang = new m_MultiLingual_Lib();
53 1945 darkviper
        $oPageLang->setExtension($sExtension);
54 1939 darkviper
		$sRetVal = $oPageLang->getLangMenu();
55
		return $sRetVal;
56
	}
57
}