The Weglot API allows for real-time translation of website content, simplifying the process of making a website multilingual. On Pipedream, you can use the Weglot API to craft workflows that automate translation tasks, manage language databases, or even synchronize content across different platforms. This API could be a game changer for businesses looking to globalize their online presence without the manual overhead.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
weglot: {
type: "app",
app: "weglot",
}
},
async run({steps, $}) {
const data = {
"l_from": `en`,
"l_to": `fr`,
"words": [
{"w":"This is a blue car", "t": 1},
{"w":"This is a black car", "t": 1}
],
"request_url": `https://www.test.com`,
}
return await axios($, {
method: "post",
url: `https://api.weglot.com/translate`,
headers: {
"Content-Type": `application/json`,
},
params: {
api_key: `${this.weglot.$auth.api_key}`,
},
data,
})
},
})
Automated Content Translation for New Posts: When a new blog post is published on your CMS (like WordPress), you could use Pipedream to trigger a workflow that automatically sends the content to Weglot for translation. The translated content can then be pushed back to your CMS, creating a multilingual post without any manual intervention.
Sync Product Descriptions Across Platforms: If you run an e-commerce site using Shopify, you could create a Pipedream workflow that monitors your product listings for changes. When a change is detected, the workflow sends the new or updated product descriptions to Weglot for translation, then updates the translated content on other marketplaces like eBay or Amazon.
Real-time Support Ticket Translation: Integrate Weglot with a customer support platform such as Zendesk through Pipedream. This workflow can translate incoming support tickets into your support team's preferred language and outgoing responses back into the customer's language, enabling seamless support for a global customer base.
Weglot uses API keys for authentication. When you connect your Weglot account, Pipedream securely stores the keys so you can easily authenticate to Weglot APIs in both code and no-code steps.
To retrieve your API Key,