Comment ajouter ConveyThis à n'importe quel site Web avec JavaScript ?

Add ConveyThis to any website with one line of code. It works with any platform or custom-built site that lets you edit its HTML.

Want to see how your site reads in another language first? Preview it with the free Traducteur de sites Web, no account needed.

Step 1. Create your account

Créer un compte ConveyThis gratuit and confirm your email. If you already have an account, log in to your tableau de bord ConveyThis.

Step 2. Add your website

  1. Accédez à Domaines in the left menu and click Ajouter un domaine. The Add a website setup opens.
  2. Technology: choose your platform. For a custom site or a platform that is not on the list, keep Autre (Javascript). Cliquez Suivant.
  3. Domain & languages: enter your Domaine du site Web (for example example.com), choose your website’s current language and the languages to translate into. Click Suivant.
  4. Structure de l'URL: choose how the address of a translated page looks. If you’re not sure, keep the first option. You can change it later in Settings. Click Suivant.

Step 3. Add the code to your website

Le Installer step shows your code. It already contains your API key.

  1. Cliquez sur Copier.
  2. Paste the code into your website, juste avant la fermeture </body> tag. You add it once, in the theme or template that all your pages use. On a website builder, use the Custom code ou Footer code setting. The code then works on every page, including pages you add later.
  3. Publish or save your website.

If your website is made of separate HTML files with no shared template, add the code to each file.

Can I put the code in the <head> instead? Yes. The switcher and the translations work the same, because ConveyThis starts translating only after the page has loaded. We suggest </body> because there the code doesn’t hold up the display of your page while it loads. If your website builder only has a field for header code, use it. Add the code only once.

The code looks like this, with your own key:

<!-- ConveyThis Script Start -->
<script src="//cdn.conveythis.com/javascript/conveythis.js?api_key=pub_xxxxxxxx"></script>
<!-- ConveyThis Script End -->

Step 4. Check that it works

Sur le Domains page, cliquez sur Consultez mon site maintenant on your website’s card. As soon as the code is found, translation starts.

The card of a website that is not installed yet, with the Finish setting up panel: copy the code, paste it before the closing body tag, and the Check my site now button

Open your website: the language switcher appears in the bottom right corner. If it doesn’t, clear the cache of your website or CDN and reload. See Pourquoi mon site Web n'est-il pas encore activé ?

Quelle est la prochaine étape ?

  • Change the look and position of the switcher, the URL structure and other options in your website’s Paramètres in the dashboard.
  • Edit translations with the Text Editor or Visual Editor. See Comment éditer mes traductions ?