![]() |
Language flags
Hi,
is it possible to insert flags for languages instead of drop menu? Thank you |
Re: Language flags
Yes, that is basic html code. Replace the language drop down code with the flag graphics and setup a link on each one for exactly the same link that you get when you select your language now.
|
Re: Language flags
Yes buddy - it is possible...
Use code in place of the drop-down box (delete the code that activates the drop down box)... and hard code it into the template instead. In skin1/head.tpl Find the following lines (and delete / replace them):- <td><select name="sl" onchange="javascript: this.form.submit();"> {section name=ai loop=$all_languages} <option value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected="selected"{/if}>{$all_languages[ai].language}</option> {/section} </select></td> Below is example of code which shows US Flag and German Flag... replace the deleted code above with this. <td> <a href="home.php?sl=US" title="{$lng.lbl_text_for_flag_us_alt}"><img src="{$Images}/folder_name_you_put_flags_into/flag_US.gif" border="0" width="24" height="16" alt="{$lng.lbl_text_for_flag_us_alt}" /> <a href="home.php?sl=DE" title="{$lng.lbl_text_for_flag_de_alt}"><img src="{$Images}/folder_name_you_put_flags_into/flag_DE.gif" border="0" width="24" height="16" alt="{$lng.lbl_text_for_flag_de_alt}" /> </td> Then put a GIF photo file called "flag_US.gif" and one called "flag_DE.gif" into your images folder i.e. "Images/folder_name_you_put_flags_into/" (e.g. Images/flags/) If you want alt text to appear, then under X-Cart Admin languages, add the language tag "lbl_text_for_flag_us_alt" and put in the text you want to appear (e.g. "USA - click here to change to USA English). Note that this was a flag for USA English and Germany (German) - to make one for another language, change all the US and DE seen above to ES (Spanish) or FR (France) etc. - you can keep adding to the code to add more flags. Hope this helps - cheers, Asiaplay |
Re: Language flags
Simply great!
Thanks a lot, it's perfect! :D/ |
Re: Language flags
:) - happy worked as you wanted... cheers, Asiaplay
|
Re: Language flags
To bad didnt work as i wish.
|
Re: Language flags
1 Attachment(s)
Please see attached international icons set - it's completely free. Hope you'll find it suitable :-)
|
Re: Language flags
Thanks!
|
All times are GMT -8. The time now is 07:08 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.