Easily translate your Strapi content into 100+ languages. With one-click, this free plugin translates your Strapi collections into 100+ languages using Google Cloud Translate.
Easily translate your Strapi content into 100+ languages.
With one-click, this free plugin translates your Strapi collections into 100+ languages using Google Cloud Translate. It supports multiple translation strategies including Text, HTML, String and Skip. In addition, you can specify Glossaries, such as brand name, that should not get translated.
Google Cloud Translate makes your content multilingual with fast, dynamic machine translation.
Why should you bother translating your content? Well, there are several reasons for you to translate your content:
Strapi is the leading open-source headless Content Management System. It’s 100% JavaScript, fully customizable and developer-first.
Translator plugin enables you to translate your Strapi content into 100+ languages.
Setting up the plugin is super easy and can be completed within 10 minutes.
.env
file.translate
.Following are the supported translation strategies:
The requirements to install the Translator plugin is the same as those to install Strapi.
Please refer to the official Strapi installation requirement doc here: Installation Requirements.
Minimum environment requirements
>=14.x.x <=18.x.x
>=6.x.x
We are following the official Node.js releases timelines.
Supported Strapi versions:
The Translator plugin is designed for Strapi v4.x. It won't work with Strapi v3.x.
Use npm to install this plugin within your Strapi project.
Refer to this doc to install npm
npm i strapi
After successful installation please add the below enviornment variables in .env
files
STRAPI_BACKEND_URL=http://localhost:1337
STRAPI_GOOGLE_TRANSLATE_API_TOKEN=your strapi api token
GOOGLE_TRANSLATE_JSON={"type":"service_account","project_id":"your project_id","private_key_id":"your private key id","private_key":"-----BEGIN PRIVATE KEY-----\your private key\n-----END PRIVATE KEY-----\n","client_email": "your client email","client_id": "your client id","auth_uri": "your auth uri","token_uri": "your token uri","auth_provider_x509_cert_url": "your provider secret","client_x509_cert_url": "your client"}
Please make sure to add your Google Service Account JSON in a single sentence as shown above.
Also to create Strapi api token, Go to Settingd > API Tokens > Create new Api Tokens > Enter API name, Select Token duration
Unlimited
, Select Token typeFull Access
> Save > Copy the API Token and Add in your.env
file.
After adding enviornment variables .env
files, goto Config > plugins.js
> Add the following code snippet.
1module.exports = ({ env }) => ({
2
3 "strapi-google-translator": {
4 enabled: true,
5 config: {
6 backendUrl: env("STRAPI_BACKEND_URL"),
7 apiToken: env("STRAPI_GOOGLE_TRANSLATE_API_TOKEN"),
8 googleJson: env("GOOGLE_TRANSLATE_JSON"),
9 },
10 },
11});
Afterwards, you would need to build a fresh package that includes the Translator plugin. For it, please execute the commands below:
# with npm (option 1)
$ npm run build
$ npm run develop
# with npx (option 2)
$ npx strapi build
$ npx strapi develop
The Translator plugin should appear in the Plugins section of the Strapi sidebar after you run the app again.
You can easily configure the Stripe Translator plugin.
setting -> Translator -> Configuration
.Copyright © 2021 AsyncWeb Technology
npm install strapi-google-translator
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.