Weglot Integration

This Frappe application provides seamless integration with Weglot, a powerful translation solution that enables you to make your Frappe website multilingual in minutes without any coding.

Install Weglot Integration

bench get-app https://github.com/bvisible/weglot_integration

Add the Frappe Gems badge to your README

Maintain Weglot Integration? Paste this into your README:

[![Listed on Frappe Gems](https://frappegems.com/api/method/frappe_gems.seo.badge?app=bvisible%2Fweglot_integration)](https://frappegems.com/gems/apps/bvisible/weglot_integration)

About Weglot Integration

Weglot Integration for Frappe Framework

Weglot

This Frappe application provides seamless integration with Weglot, a powerful translation solution that enables you to make your Frappe website multilingual in minutes without any coding.

Features

  • One-click integration of Weglot translation service
  • Secure API key storage with encryption
  • Simple settings interface in the Frappe desk
  • No code changes required for your website

What is Weglot?

Weglot is a translation solution that helps you make your website multilingual. It automatically detects and translates your website content, while giving you full control over the translations. Weglot's main features include:

  • 100+ available languages
  • Automatic detection of all your website content
  • Machine translation with the option for manual editing
  • Visual editor for translations in context
  • Language switcher that adapts to your website design
  • SEO-optimized translations that follow Google's best practices

Installation

Prerequisites

  • Frappe Framework v14 or later
  • A Weglot account and API key (get yours at Weglot)

Setup

  1. Install the app using the Frappe bench:
bench get-app weglot_integration https://github.com/neoffice/weglot_integration
bench --site your_site install-app weglot_integration
  1. After installation, restart your bench:
bench restart

Configuration

  1. Navigate to "Weglot Settings" in your Frappe desk (you can search for it in the awesomebar)
  2. Enable the integration by checking "Enable Weglot"
  3. Enter your Weglot API key (available in your Weglot dashboard)
  4. Save the settings

That's it! Weglot is now integrated with your website. A language switcher should appear on your website automatically.

How It Works

This integration works by:

  1. Securely storing your Weglot API key in the Frappe database with encryption
  2. Injecting the Weglot JavaScript code into the `` section of your website pages
  3. Initializing Weglot with your API key
  4. Weglot then detects and translates your content on the fly

The implementation uses Frappe's hooks system to include the Weglot JavaScript library and an initialization script that fetches your settings from a secure API endpoint.

Technical Details

The application consists of:

  • A custom DocType "Weglot Settings" for storing configuration
  • A server-side API to securely expose settings to the client
  • JavaScript initialization code
  • Hooks for including scripts on website pages

The code flow:

  1. When a page loads, the Weglot JavaScript library is included
  2. Our initialization script makes an API call to fetch settings
  3. If Weglot is enabled, it's initialized with your API key
  4. Weglot then handles the rest, detecting and translating your content

Advanced Configuration

For advanced configuration of Weglot (like specifying languages, excluding pages, etc.), please refer to the Weglot Documentation.

You can customize the Weglot initialization by editing the weglot_init.js file located in weglot_integration/public/js/.

Support

If you encounter any issues with the integration, please:

  1. Check that your Weglot API key is correct
  2. Ensure the integration is enabled in Weglot Settings
  3. Check the browser console for any JavaScript errors
  4. File an issue on the GitHub repository

For issues related to Weglot service itself, please contact Weglot Support.

License

This project is licensed under the MIT License.

Credits

Developed by Neoffice Team.

Weglot is a registered trademark of Weglot SAS.

Related Integrations apps for Frappe & ERPNext

  • Insights — Open Source Business Intelligence Tool
  • Raven — Simple, open source team messaging platform
  • Frappe Whatsapp — WhatsApp cloud integration for frappe
  • Frappe Assistant Core — Infrastructure that connects LLMs to ERPNext. Frappe Assistant Core works with the Model Context Protocol (MCP) to expose ERPNext functionality to any compatible Language Model
  • Biometric Attendance Sync Tool — A simple tool for syncing Biometric Attendance data with your ERPNext server
  • Frappe React Sdk — React hooks for Frappe
  • Frappe Js Sdk — TypeScript/JavaScript library for Frappe REST API
  • Mcp — Frappe MCP allows Frappe apps to function as MCP servers