- one per language plus an unlabelled else-fallback that was * reached whenever $selectedLang was not en/hu/no (and which referenced * $currentPageUrlArray before it was defined). Here there is one nav and one * label table, so the fallback cannot drift from the real branches. */ $labels = array( 'en' => array( 'home' => 'Home', 'about' => 'About US', 'treatments' => 'Treatments', 'prices' => 'Prices', 'hours' => 'Opening Hours', 'contact' => 'Contact', 'book' => 'BOOK TIME', ), 'no' => array( 'home' => 'Forside', 'about' => 'Om oss', 'treatments' => 'Behandlinger', 'prices' => 'Priser', 'hours' => 'Åpningstider', 'contact' => 'Kontakt', 'book' => 'BESTILL TIME', ), 'hu' => array( 'home' => 'Kezdőlap', 'about' => 'Rólunk', 'treatments' => 'Szolgáltatások', 'prices' => 'Árlista', 'hours' => 'Nyitvatartás', 'contact' => 'Kapcsolat', 'book' => 'IDŐPONTFOGLALÁS', ), ); $lang = vertical_lang(isset($selectedLang) ? $selectedLang : 'en'); $t = $labels[$lang]; // Language switcher: rebuild the current URL with a different language segment. // Segment 1 is the language, 2 and 3 are the page path. $currentPageUrlArray = explode('/', $_SERVER['REQUEST_URI']); $currentPageUrlArray += array(1 => '', 2 => '', 3 => ''); ?>