Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Language flags

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-22-2008, 01:32 AM
 
buddy buddy is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 97
 

Default Language flags

Hi,
is it possible to insert flags for languages instead of drop menu?

Thank you
__________________
Buddy

X-Cart DB Version: 4.4.2 GOLD
Reply With Quote
  #2  
Old 01-22-2008, 04:27 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default 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.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 01-22-2008, 05:40 AM
 
Asiaplay Asiaplay is offline
 

X-Wizard
  
Join Date: Oct 2005
Posts: 1,242
 

Default 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
__________________
X-Cart Gold version 4.1.9
(plus built in X-Cart bugs!)
Reply With Quote

The following user thanks Asiaplay for this useful post:
vasilis (09-24-2010)
  #4  
Old 01-22-2008, 06:09 AM
 
buddy buddy is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 97
 

Default Re: Language flags

Simply great!

Thanks a lot, it's perfect!

__________________
Buddy

X-Cart DB Version: 4.4.2 GOLD
Reply With Quote
  #5  
Old 01-22-2008, 07:36 AM
 
Asiaplay Asiaplay is offline
 

X-Wizard
  
Join Date: Oct 2005
Posts: 1,242
 

Default Re: Language flags

- happy worked as you wanted... cheers, Asiaplay
__________________
X-Cart Gold version 4.1.9
(plus built in X-Cart bugs!)
Reply With Quote
  #6  
Old 01-22-2008, 07:28 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

Senior Member
  
Join Date: Nov 2007
Location: Australia
Posts: 118
 

Default Re: Language flags

To bad didnt work as i wish.
__________________
Pedro
digitalnotions.i2u.shop
shop.modestclassy.com.au4.1.9 X-Cart
X-Cart
Business 5.3.6.0
Multi-vendor 5.3.6.0


Reply With Quote
  #7  
Old 01-23-2008, 05:29 AM
  Cyril Golub's Avatar 
Cyril Golub Cyril Golub is offline
 

Member
  
Join Date: Sep 2007
Posts: 24
 

Exclamation Re: Language flags

Please see attached international icons set - it's completely free. Hope you'll find it suitable
Attached Files
File Type: zip famfamfam_flag_icons.zip (291.6 KB, 229 views)
__________________
Regards,
Cyril Golub

X-Cart Skins Store
- twenty two different skins available;
- X-Cart 4.3 compatible versions are coming soon!
Reply With Quote
  #8  
Old 01-23-2008, 05:35 AM
 
sales@webosusa.com sales@webosusa.com is offline
 

Senior Member
  
Join Date: Nov 2007
Location: Australia
Posts: 118
 

Default Re: Language flags

Thanks!
__________________
Pedro
digitalnotions.i2u.shop
shop.modestclassy.com.au4.1.9 X-Cart
X-Cart
Business 5.3.6.0
Multi-vendor 5.3.6.0


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:15 AM.

   

 
X-Cart forums © 2001-2020