Últimas notícias:
5

Seleção de idiomas usando bandeiras dos países

Em vez de usar aquele caixa de seleção do whmcs onde o usuário pode escolher o idioma, que tal usar algo mais visual, como ícones das bandeiras dos países? É bem simples!

Abra o arquivo footer.tpl do template que você estiver usando. Por exemplo, se você estiver usando o template Portal, você o achará em /templates/Portal/footer.pl.

Procure por:

[html]{if $langchange}<div align="right">{$setlanguage}</div><br />{/if}[/html]

E substitua por:

[html]{if $langchange}
<a href="{$smarty.server.PHP_SELF}?language=English"><img src="images/flags/us.gif" title="English" alt="English" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Greek"><img src="images/flags/gr.gif" title="&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;?" alt="&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;?" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Italian"><img src="images/flags/it.gif" title="Italiano" alt="Italiano" /></a>
<a href="{$smarty.server.PHP_SELF}?language=German"><img src="images/flags/de.gif" title="Deutsch" alt="Deutsch" /></a>
<a href="{$smarty.server.PHP_SELF}?language=French"><img src="images/flags/fr.gif" title="Fran&ccedil;ais" alt="Fran&ccedil;ais" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Spanish"><img src="images/flags/es.gif" title="Espa&ntilde;ol" alt="Espa&ntilde;ol" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Dutch"><img src="images/flags/nl.gif" title="Nederlands" alt="Nederlands" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Danish"><img src="images/flags/dk.gif" title="Dansk" alt="Dansk" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Swedish"><img src="images/flags/se.gif" title="Svenska" alt="Svenska" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Norwegian"><img src="images/flags/no.gif" title="Norsk" alt="Norsk" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Turkish"><img src="images/flags/tr.gif" title="T&uuml;rk&ccedil;e" alt="T&uuml;rk&ccedil;e" /></a>
<a href="{$smarty.server.PHP_SELF}?language=Portuguese-pt"><img src="images/flags/pt.gif" title="Portugu&ecirc;s " alt="Portugu&ecirc;s " /></a>
<a href="{$smarty.server.PHP_SELF}?language=Portuguese-br"><img src="images/flags/br.gif" title="Portugu&ecirc;s do Brasil" alt="Portugu&ecirc;s do Brasil" /></a>
{/if}[/html]

Depois, baixe os ícones das bandeiras: Bandeiras WHMCS (55) e os envie para a raiz do WHMCS, de modo que os ícones estejam em /images/flags. Você pode alterar se desejar, mas não esqueça de editar os caminhos no código.

Lembre que se estiver dentro das tags {if $langchange} {/if}, ele só mostrará as imagens se você tiver configurado o seu whmcs para permitir que o usuário altere o idioma padrão (Setup > General Settings > Aba Localisation ). Você pode remover estas tags, se desejar.

Eis um exemplo de como vai ficar o seu whmcs.

Dica da comunidade do WHMCS

  • http://mcguyver.myopenid.com/ McGuyver

    Mais um excelente post do Portal do Host!!! Parabéns Angélica pelo trabalho maravilhoso e por sua dedicação!
    Que Deus a ilumine sempre! ;-)

  • Jamis Henrique

    Um ótimo post, creio que irá ajudar muitas pessoas :)

  • IgorCroft

    Execelente, já fiz a integração!

  • Anderson

    Realizei a integração ficou muito bom.

  • http://www.facebook.com/people/Host-Sagrado-Soluções-Web/100002229099144 Host Sagrado Soluções Web

    Caraca Angel WHMCS .br….. Parabens ai angel!

© 2012 Portal do Host. Direitos reservados. XHTML / CSS Válidos.
Leia o post anterior:
bankruptcy-and-foreclosure-2-shutterstock_34544605-1
Por que você está operando no vermelho?

É impressionante a quantidade de posts no fórum e de emails que chegam com o mesmo assunto: "tenho um host,...

Fechar