Patrimoine culturel
Visites

   visiteurs

   visiteurs en ligne

Liens


bpapinou.gif

meric_graphisme.gif

Chez Jean-Mi

Chez Jean-Mi

divers - code drapeaux TRADUCTION et RECHERCHE google

2 solutions : dand le fichier hpage.inc ou dans la skin
Si vous insérez le code dans le fichier skin.inc cela évitera d'avoir à remettre le code à chaque mise à jour de guppy
1)code drapeaux de traduction: dans skin.inc dans le dossier de votre skin
après la balise$tabup = ""  (il peut y avoir du code entre les " dans votre skin)
ajoutez ce code qui ajoutera le contenu dans la balise$tabup


// début div drapeaux traduction dans skin.inc

       $tabup .= "<div style='width:100%'>
                  <div style= 'position:absolute;right:24px; top: 155px; z-index:100;'>
               
                 <a rel='nofollow'  onclick='window.open(\"http://www.google.com/translate?u=\"+encodeURIComponent(location.href)+\"&langpair=en%7Cfr&hl=en&ie=UTF8\"); return false;' title='Traduction anglais Français'>
                      <img height='16' border='0' width='24' style='cursor: pointer;' src='".CHEMIN." img/drapeaux/fr.gif'  alt='Traduction Anglais Français ' title='Traduction Anglais Français'/></a>
                 <a rel='nofollow'  onclick='window.open(\"http://www.google.com/translate?u=\"+encodeURIComponent(location.href)+\"&langpair=en%7Cel&hl=en&ie=UTF8\"); return false;' title='Traduction anglais Grec'>
                      <img height='16' border='0' width='24' style='cursor: pointer;' src='".CHEMIN." img/drapeaux/gr.gif'  alt='Traduction Anglais Grec ' title='Traduction Anglais Grec'/></a>
                  <a rel='nofollow'  onclick='window.open(\"http://www.google.com/translate?u=\"+encodeURIComponent(location.href)+\"&langpair=en%7Cpl&hl=en&ie=UTF8\"); return false;' title='Traduction anglais Polonais'>
                      <img height='16' border='0' width='24' style='cursor: pointer;' src='".CHEMIN." img/drapeaux/pl.gif'  alt='Traduction Anglais Polonais ' title='Traduction Anglais Polonais'/></a>
                  <a rel='nofollow'  onclick='window.open(\"http://www.google.com/translate?u=\"+encodeURIComponent(location.href)+\"&langpair=en%7Cro&hl=en&ie=UTF8\"); return false;' title='Traduction anglais Roumain'>
                      <img height='16' border='0' width='24' style='cursor: pointer;' src='".CHEMIN." img/drapeaux/ro.gif'  alt='Traduction Anglais Roumain ' title='Traduction Anglais Roumain'/></a>
                  <a rel='nofollow'  onclick='window.open(\"http://www.google.com/translate?u=\"+encodeURIComponent(location.href)+\"&langpair=en%7Ctr&hl=en&ie=UTF8\"); return false;' title='Traduction anglais Turc'>
                      <img height='16' border='0' width='24' style='cursor: pointer;' src='".CHEMIN." img/drapeaux/tr.gif'  alt='Traduction Anglais Turc ' title='Traduction Anglais Turc'/></a>
                  <a rel='nofollow'  onclick='window.open(\"http://www.google.com/translate?u=\"+encodeURIComponent(location.href)+\"&langpair=en%7Ces&hl=en&ie=UTF8\"); return false;' title='Traduction anglais Espagnol'>
                      <img height='16' border='0' width='24' style='cursor: pointer;' src='".CHEMIN." img/drapeaux/es.gif'  alt='Traduction Anglais Espagnol ' title='Traduction Anglais Espagnol'/></a>
                  </div>
                    </div>  ";
                 
         //  Fin div drapeaux traduction dans skin.inc

Vous placez des images de drapeaux en .gif dans img/drapeaux
Pour trouver le code d'autres couples de langues allez sur le site de traduction de google essayez d'autres couples et regarder l'adresse de la page html vous y verrez les codes à 2 lettresdes langues choisies.

2)code drapeaux de traduction: dans hpage.inc

dans le fichier inc/hpage.inc j'ai mis un div pour ces drapeaux dans le même div que le fenetre de recherche google.

repérez les lignes ci dessous appartenant à hpage.inc pour insérer le code

if ($menu_icon != "") {$page[9] = $sav_icon;} // restaure icons for center box
?>

<!-- début de code google translate et recherche google-->
<div style="width:100%">

<div style="float:right;height:16px;margin:6px 0;">
    <?php
if ($lng == 'en') {
?>
        <a rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Cfr&hl=en&ie=UTF8'); return false;" title="Traduction anglais Français ">
            <img height="16" border="0" width="24" top: 7px style="cursor: pointer;top: 7px" alt="Google-Traduction Anglais Français" src="img/drapeaux/fr.gif" title="Google-Traduction Anglais Français" /></a>
<a rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Cel&hl=en&ie=UTF8'); return false;" title="Traduction Anglais Grec"><img height="16" border="0" width="24" style="cursor: pointer;" alt="Translate English to Greek " src="img/drapeaux/gr.gif" title="Translate English to Greek" /></a>
    <a rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Cpl&hl=en&ie=UTF8'); return false;" title="Traduction Anglais Polonais"><img height="16" border="0" width="24" style="cursor: pointer;" alt="Translate English to Polish " src="img/drapeaux/pl.gif" title="Translate English to Polish" /></a>
    <a rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Cro&hl=en&ie=UTF8'); return false;" title="Traduction Anglais Roumain"><img height="16" border="0" width="24" style="cursor: pointer;" alt="Translate English to Romanian " src="img/drapeaux/ro.gif" title="Translate English to Romanian" /></a>
    <a rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Ctr&hl=en&ie=UTF8'); return false;" title="Traduction Anglais Turc"><img height="16" border="0" width="24" style="cursor: pointer;" alt="Translate English to Turkish " src="img/drapeaux/tr.gif" title="Translate English to Turkish" /></a>
    <a rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Ces&hl=en&ie=UTF8'); return false;" title="Traduction Anglais Espagnol"><img height="16" border="0" width="24" style="cursor: pointer;" alt="Translate English to Spanish " src="img/drapeaux/es.gif" title="Translate English to Spanish" /></a>
    <a rel="nofollow" onclick="window.open('http://www.google.com/translate?u='+encodeURIComponent(location.href)+'&langpair=en%7Cpt&hl=en&ie=UTF8'); return false;" title="Traduction Anglais Portugais"><img height="16" border="0" width="24" style="cursor: pointer;" alt="Translate English to Portuguese " src="img/drapeaux/pt.gif" title="Translate English to Portuguese" /></a>
    <?php
}
?>
    </div>
<!-- fin de code drapeaux google translate -->
<div align="center" style="width:590px; margin:0 auto;text-align:center; ">

<form action="" id="searchbox_007311187326267330385:1evitqej3do" onsubmit="return false;">
  <div>
    <input type="text" name="q" size="40"/>
    <input type="submit" value="Search in Mycomenius"/>
  </div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_007311187326267330385%3A1evitqej3do&amp;lang=en"></script>

<div id="results_007311187326267330385:1evitqej3do" style="display:none;">
  <div class="cse-closeResults">
    <a> Fermer</a>
  </div>
  <div class="cse-resultsContainer"></div>
</div>

<style type="text/css">
@import url(http://www.google.com/cse/api/overlay.css);
.cse-overlay { z-index:300; width:570px;}
</style>

<script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=ABQIAAAAZDoIW1CMRgES87ULstW6KhQYkGc0-09RTj_iHO3dvAccOVoauhTcgHvXBNbtbg0-IsBSlT4YZtICqg&amp;hl=en" type="text/javascript"></script>
<script src="http://www.google.com/cse/api/overlay.js" type="text/javascript"></script>
<script type="text/javascript">
function OnLoad() {
  new CSEOverlay("007311187326267330385:1evitqej3do",
                 document.getElementById("searchbox_007311187326267330385:1evitqej3do"),
                 document.getElementById("results_007311187326267330385:1evitqej3do"));
}
GSearch.setOnLoadCallback(OnLoad);
</script>
</div>
</div>
<!-- fin de code recherche google -->

<?php
echo '<div id="mainContent">'."\n";


Date de création : 13/04/2009 · 21:57
Dernière modification : 20/01/2010 · 18:16
Catégorie : divers
Page lue 5352 fois


Imprimer l'article Imprimer l'article

 
Films d'animation
Connexion...
 Liste des membres Membres : 37
membres 10 derniers membres :
alankoz    essai    Alain    michel84    chmol44    feraud    maritina    mido    Penanders    tebelo   

Votre pseudo :

Mot de passe :

[ Mot de passe perdu ? ]


[ Devenir membre ]


  Membre en ligne :
  Anonymes en ligne : 22

Total visites Total visites: 430090  

Record connectés :
Record connectés :Membres: 7

Le 17/12/2008 @ 21:40

Record connectés :Cumulé : 160

Le 03/09/2023 @ 10:51

^ Haut ^
haut de page
bas de page