with post its kind of wierd happening...
but, here is modified code that will dosplay pictures (flags in my case)
or u can easy change it to have text links or anything.:
$lang_url = $site_sess->url($self_url, "&");
$lang_url = preg_replace("/[?|&]l=[^?|&]*/", "", $lang_url);
$lang_url = str_replace("&", "&", $lang_url);
$handle = opendir(ROOT_PATH."lang");
$lang_select = "";
while ($folder = @readdir($handle)) {
if (@is_dir(ROOT_PATH."lang/".$folder) && $folder != "." && $folder != "..") {
if ($folder != $config['language_dir']) {
$lang_select .= "<a class=\"lang\" href=\"".$lang_url.(preg_match("/\?/", $lang_url) ? "&" : "?")."l=".$folder."\"><img src=\"".TEMPLATE_PATH."/images/".$folder.".gif\" border=\"0\" alt=\"".$folder."\"></a> ";
}else{
$lang_select .= "<img src=\"".TEMPLATE_PATH."/images/".$folder."2.gif\" border=\"0\" alt=\"".$folder."\"> ";
}
}
}
>> the bold lines are images that will be displaed, the names of images are the same as language folders. then needs to be in
/templates/yourtemplate/images/ folder
>> the red letter is suffix for image name, its needed if u want use different picture for curent language picture, in my case I chosed print faded picture. u can delete it.
if u need nice animated pictures of flags, u can try
www.gifworks.com also there is u can edit pictures, without even download anything. I cut and resized flags that I use on my site using their pictures and editing tools.
thx, Jan, I would never could do this without your help!
[EDITED]
also, here is little change if u dont want " l= " for default language:
$lang_select .= "<a class=\"lang\" href=\"".$lang_url.(preg_match("/english/i",$folder) ? "" : ((preg_match("/\?/", $lang_url) ? "&" : "?")."l=".$folder))."\"><img src=\"".TEMPLATE_PATH."/images/".$folder.".gif\" border=\"0\" alt=\"".$folder."\"></a> ";