translation_exists($lang, false)) { $lang = 'en'; } $SESSION->lang = $lang; $langmapping = array('cs'=>'cz', 'pt_br'=>'pt-br'); // fix non-standard lang names if (array_key_exists($lang, $langmapping)) { $lang = $langmapping[$lang]; } if (!file_exists("$CFG->dirroot/lib/dragmath/applet/lang/$lang.xml")) { $lang = 'en'; } @header('Content-Type: text/html; charset=utf-8'); ?>