Weglot
Weglot is a website translation platform that allows website content to be displayed in multiple languages. Weglot provides automatic translation and a language switcher that visitors can use to view translated versions of a website.
Key features include:
- Automatic translation of website content
- Language switcher for selecting available languages
- Support for multiple languages
- Script-based loading of translations across a website
- Visual editor for reviewing translated content
Weglot integrates with ShopWired by adding a to your theme to load translations and display a language switcher on your website.
Account creation
Account creation
Create an account on the Weglot website. Weglot provides a JavaScript snippet that can be added to your website to enable translations.
Theme installation
Theme installation
Use this method to install the Weglot JavaScript snippet so translations load on every page of your website.
An example of the Weglot JavaScript snippet is shown below:
<script type="text/javascript">
Weglot.initialize({
api_key: 'YOUR_API_KEY'
});
</script>
The code shown above is provided as an example only. You must copy the exact JavaScript snippet provided in your own Weglot account, as the script and any API key values will be unique to your website.
Add this code to your ShopWired theme’s master.twig file:
- Navigate to Website > Themes
- Select the
code editoroption for the theme you want to install it on - Open the
master.twigfile - Paste the Weglot JavaScript snippet just before the closing
</head>tag - Select
save changes
The Weglot language switcher will now appear on your website, and translated content will load automatically.
Recommendations
Recommendations
- Check that the language switcher appears correctly on desktop and mobile devices.
- Confirm the Weglot script is added above the closing
</head>tag in themaster.twigfile. - Ensure translated pages load correctly when switching languages.