<?php $lang=TGET('lang'); $return_path=TGET('return_path'); $lang_req=language_requested(); $return_path_info=parseURL($return_path); $return_path_info['path']=str_replace("/".$lang_req."/","/".$lang."/",$return_path_info['path']); set_user_language($lang); $url=$return_path_info['path'].($return_path_info['query']?'?'.$return_path_info['query']:'') .($return_path_info['fragment']?'#'.$return_path_info['fragment']:''); header("Location: ".$url); ?>