Javascript

On this page, we describe all the functions exposed by the Weglot JS library

Getting started

Let's include Weglot's client code into your site and get started with translations.

  1. Go to your Weglot dashboard (https://dashboard.weglot.com/) , start a new project. Depending on the technology you chose, you will integrate Weglot using the Javascript library.

  2. Edit your HTML file, and right before the</head>tag, append the code that is shown to you. It should look like:

<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
<script>
Weglot.initialize({
api_key: 'YOUR_API_KEY'
});
</script>

Make sure you replace YOUR_API_KEYwith the API key you got in the step one.