Jump to content

Language selection using flags


gr2

Recommended Posts

feel free to use the images from my site at : http://ipwebgroup.com

 

here is the code

 

<a href="?language=English"><img src="templates/{$template}/images/gb.jpg" title="English" alt="English" width="31" height="21" border="0" /></a>
<a href="?language=Greek"><img src="templates/{$template}/images/gr.jpg" title="Ελληνικά" alt="Ελληνικά" width="31" height="21" border="0" /></a>
<a href="?language=Italian"><img src="templates/{$template}/images/it.jpg" title="Italiano" alt="Italiano" width="31" height="21" border="0" /></a>
<a href="?language=German"><img src="templates/{$template}/images/de.jpg" title="Deutsch" alt="Deutsch" width="31" height="21" border="0" /></a>
<a href="?language=French"><img src="templates/{$template}/images/fr.jpg" title="Français" alt="Français" width="31" height="21" border="0" /></a>
<a href="?language=Spanish"><img src="templates/{$template}/images/es.jpg" title="Español" alt="Español" width="31" height="21" border="0" /></a>
<a href="?language=Dutch"><img src="templates/{$template}/images/nl.jpg" title="Nederlands" alt="Nederlands" width="31" height="21" border="0" /></a>
<a href="?language=Danish"><img src="templates/{$template}/images/dk.jpg" title="Dansk" alt="Dansk" width="31" height="21" border="0" /></a>
<a href="?language=Swedish"><img src="templates/{$template}/images/se.jpg" title="Svenska" alt="Svenska" width="31" height="21" border="0" /></a>
<a href="?language=Norwegian"><img src="templates/{$template}/images/no.jpg" title="Norsk" alt="Norsk" width="31" height="21" border="0" /></a>
<a href="?language=Turkish"><img src="templates/{$template}/images/tr.jpg" title="Türkçe" alt="Türkçe" width="31" height="21" border="0" /></a>
<a href="?language=Portuguese-pt"><img src="templates/{$template}/images/pt.jpg" title="Português " alt="Português " width="31" height="21" border="0" /></a>
<a href="?language=Portuguese-br"><img src="templates/{$template}/images/br.jpg" title="Português do Brasileiro" alt="Português do Brasileiro" width="31" height="21" border="0" /></a>

 

alt tags for ie

title tags for ff

 

feedback would be nice, thanks.

enjoy.

Edited by gr2
Link to comment
Share on other sites

<a href="{$smarty.server.PHP_SELF}?language=English"><img src="templates/{$template}/images/gb.jpg" title="English" alt="English" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Greek"><img src="templates/{$template}/images/gr.jpg" title="Ελληνικά" alt="Ελληνικά" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Italian"><img src="templates/{$template}/images/it.jpg" title="Italiano" alt="Italiano" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=German"><img src="templates/{$template}/images/de.jpg" title="Deutsch" alt="Deutsch" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=French"><img src="templates/{$template}/images/fr.jpg" title="Français" alt="Français" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Spanish"><img src="templates/{$template}/images/es.jpg" title="Español" alt="Español" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Dutch"><img src="templates/{$template}/images/nl.jpg" title="Nederlands" alt="Nederlands" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Danish"><img src="templates/{$template}/images/dk.jpg" title="Dansk" alt="Dansk" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Swedish"><img src="templates/{$template}/images/se.jpg" title="Svenska" alt="Svenska" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Norwegian"><img src="templates/{$template}/images/no.jpg" title="Norsk" alt="Norsk" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Turkish"><img src="templates/{$template}/images/tr.jpg" title="Türkçe" alt="Türkçe" width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Portuguese-pt"><img src="templates/{$template}/images/pt.jpg" title="Português " alt="Português " width="31" height="21" border="0" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Portuguese-br"><img src="templates/{$template}/images/br.jpg" title="Português do Brasileiro" alt="Português do Brasileiro" width="31" height="21" border="0" /></a>

Link to comment
Share on other sites

basically, it would be according to your page design and where you would like it to be displayed.

 

in your case, your installation at

WHMCS URL

http://whyoneearthwouldIdothat.com/noway

 

pm me your installation url and ill have a look

 

or

 

just place it in a <div>paste code here</div> tag after the <body> tag in your header.tpl that is located in your chosen template folder.

 

thank you for your feedback.

Link to comment
Share on other sites

PS. no need to change the flag images unless one feels they must. instead, change the values from the code.

 

ex.

<img src="templates.... width="24" height="16" border="0" />

 

so it fits your style and size.

 

original image size is 51x41, i use 24x16 for my interface.

 

full download including images here:

 

http://ipwebgroup.com/downloads.php?action=displaycat&catid=4

Edited by gr2
Link to comment
Share on other sites

  • 1 month later...

hello,

 

some way this work selecting different templates for example if you have for English template portal-English and other template for Spanish Portal-Spanish

 

when the client select English this automatic select portal-English template when click in Spanish automatic select Portal-Spanish

 

this way you can have different images for each languages

Link to comment
Share on other sites

  • 7 months later...

Hi,

 

Thanks for your contributions. We can get the current php page name, say cart.php via {$smarty.server.PHP_SELF}. But for case like cart.php?a=add&domain=transfer, how can we get it and append "&language=English" to it,.i.e.

cart.php?a=add&domain=transfer&language=English.

 

Thank you in advance.

Link to comment
Share on other sites

  • 2 months later...
  • 6 months later...
  • 2 months later...
  • 1 year later...
  • 4 months later...
  • 1 year later...
  • 6 years later...
On 7/14/2009 at 1:27 PM, spaceman said:

so is ok.

 


	<a href="{$smarty.server.PHP_SELF}?language=German"><img src="templates/{$template}/images/flagen/flag_de.gif" alt="German" border="0" class="correct-png" style="margin-top: 4px;" /></a>
 

It's good solution but doesn't work for "Announcement" page. When you read some article in english and try change language for example, to Azerbaijani you get back to homepage.

Edited by Tengri
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated