<?php
/*
    CREATIVE COMMONS - Attribution-No Derivative Works 3.0 Germany:
    - You may not alter, transform, or build upon this work.
    - Dieses Werk darf nicht bearbeitet oder in anderer Weise verändert werden.
*/
$BrowserLanguage = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';
$BrowserLanguageShort = substr($BrowserLanguage, 0,2);
$language = getCurrentUserVar('UserLanguage');
if ($language == '') {
  switch ($BrowserLanguageShort) {
    case 'de': $language = 'deutsch'; break;
    default: $language = 'english'; }}
switch ($language) {
  case "deutsch": $LanguageCodeISO6391 = 'de'; break;
  default: $LanguageCodeISO6391 = 'en'; }
if (!is_file('languages/'.$language.'.php')) {
  echo '<span class="ErrorMessage">ERROR: Language file not found: languages/'.$language.'.php</span>';
  $language = 'english'; }
include('languages/'.$language.'.php');
?>
