website view lib/lang.php @ rev 1344

Resize balinor logo to 120px
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jan 22 23:02:15 2021 +0100 (17 months ago)
parents 3e72d53a3056
children
line source
1 <?php
3 $addr = str_replace('.php', '', $_SERVER['REQUEST_URI']);
4 $addr = str_replace('index', '', $addr);
6 $addr = explode('/', $addr);
7 $cur = $addr[1];
8 $page = '';
9 if (!empty($addr[2]))
10 $page = $addr[2];
11 if (!empty($addr[3]))
12 $page = $addr[3];
14 echo "<!-- " . $_SERVER['REQUEST_URI'] . " : " . $cur . " : " . $page . " -->\n";
16 $native = array ("bs"=>"Bosanski", "da"=>"Dansk", "de"=>"Deutsch", "en"=>"English", "es"=>"Español", "fr"=>"Français", "id"=>"Indonesian", "it"=>"Italiano", "pt"=>"Português", "ru"=>"Русский", "cn"=>"中文", "ja"=>"日本語");
18 switch($page)
19 {
20 case "mailing-list":
21 $url = "/LANG/mailing-list.php";
22 $lang = "cn da de en es fr id it ja pt ru";
23 break;
24 case "support":
25 $url = "/LANG/support.php";
26 $lang = "de en fr ja pt";
27 break;
28 case "search":
29 $url = "/LANG/search.php";
30 $lang = "cn da de en es fr ja pt ru";
31 break;
32 case "about":
33 $url = "/LANG/about/";
34 $lang = "bs cn da de en es fr ja pt ru";
35 break;
36 case "artwork":
37 $url = "/LANG/artwork/";
38 $lang = "cn da de en es fr ja pt ru";
39 break;
40 case "events":
41 $url = "/LANG/about/events.php";
42 $lang = "fr";
43 break;
44 case "screenshots":
45 $url = "/LANG/artwork/screenshots.php";
46 $lang = "cn da de en fr ja pt ru";
47 break;
48 case "asso":
49 $url = "/LANG/asso/";
50 $lang = "de en es fr pt ru bs da";
51 break;
52 case "statutes":
53 $url = "/LANG/asso/statutes.php";
54 $lang = "en pt";
55 break;
56 case "devel":
57 $url = "/LANG/devel/";
58 $lang = "da de en es fr id it pt ru";
59 break;
60 case "forge":
61 $url = "/LANG/devel/forge.php";
62 $lang = "da de en es fr pt ru";
63 break;
64 case "doc":
65 $url = "/LANG/doc/";
66 $lang = "cn de en es fr it pt ru";
67 break;
68 case "get":
69 $url = "/LANG/get/";
70 $lang = "bs cn da de en es fr it pt ru";
71 break;
72 case "flavors":
73 $url = "/LANG/get/flavors.php";
74 $lang = "cn da de en fr pt ru";
75 break;
76 case "news":
77 $url = "/LANG/news/";
78 $lang = "de en es fr pt ru";
79 break;
80 case "2007":
81 $url = "/LANG/news/2007.php";
82 $lang = "en fr ru";
83 break;
84 case "2008":
85 $url = "/LANG/news/2008.php";
86 $lang = "en es fr pt ru";
87 break;
88 case "2009":
89 $url = "/LANG/news/2009.php";
90 $lang = "en es fr pt ru";
91 break;
92 case "2010":
93 $url = "/LANG/news/2010.php";
94 $lang = "en fr pt ru";
95 break;
96 case "2011":
97 $url = "/LANG/news/2011.php";
98 $lang = "en fr ru";
99 break;
100 case "2012":
101 $url = "/LANG/news/2012.php";
102 $lang = "en fr ru";
103 break;
104 case "2013":
105 $url = "/LANG/news/2013.php";
106 $lang = "en";
107 break;
108 case "packages":
109 $url = "/LANG/packages/";
110 $lang = "cn da de en es fr it ja pt ru";
111 break;
112 case "sponsor":
113 $url = "/LANG/sponsor/";
114 $lang = "bs de en ja pt ru fr";
115 break;
116 default:
117 $url = "/LANG/";
118 $lang = "bs cn da de en es fr id it ja pt ru";
119 break;
120 }
122 echo "<!-- Languages -->\n<div id='lang'>\n" .
123 " <a class='flag' href='/i18n.php'>&#9873;</a>\n";
125 foreach($native as $short=>$long)
126 {
127 if ($cur==$short)
128 echo " <strong>$long</strong>\n";
129 elseif (strpos($lang, $short) === false)
130 echo " <span>$long</span>\n";
131 else
132 echo ' <a href="'.str_replace('LANG', $short, $url).'">'.$long."</a>\n";
133 }
134 echo "</div>\n";
136 ?>