Skip to main content

A translator for Json info

Project description

The Translator

Why this plugin

When you create a multi language website, it's very long to translate all your sentences.

With json_translator, you can translate a json file to many languages.

The plugin will create the json file in according to the language you want to translate.

google-cloud-translate==3.8.4 google-auth==1.35.0 google-api-core==2.8.0 protobuf==3.19.5

Pre required

To use json_translator plugin you have to create a Google Cloud account.

See : https://cloud.google.com

Please verify in your apis dashboard that cloud translation API service is enable.

In the cloud translation service, go to your credentials.

Please create a service account.

You will have a googlekey.json file which is required to use the API.

How use it

To use the plugin please write the command line

json_translator [options]

You have to use some options.

Google file (Required)

json_translator -c googlekey.json
json_translator --credentials googlekey.json

Used to set the Google credentials.

File to translate (Required)

json_translator -i myFile.json
json_translator --input myFile.json

Used to set the file to translate.

Destination (Required)

json_translator -o myFile.json
json_translator --output myFile.json

Used to set the file to translate.

Language Source (Optional)

json_translator -f en
json_translator --from en

Used to set the source language. By default, value is FR (French).

Language(s) result (Optional)

json_translator -l de,it,en
json_translator --languages de,it,en

List available languages

json_translator -a

Examples

json_translator -c googlekey.json -i fr.json -o ./myPath/ -l en,de,ko,it,es

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

translator_json-1.0.9.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

translator_json-1.0.9-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file translator_json-1.0.9.tar.gz.

File metadata

  • Download URL: translator_json-1.0.9.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/6.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.8.17

File hashes

Hashes for translator_json-1.0.9.tar.gz
Algorithm Hash digest
SHA256 bf58cdd166f0647fcf08f3d81e86d8a659ab45f9737fc0e27ebfd4d853bfb300
MD5 f93ca02b0b03c016ae699464a496ff43
BLAKE2b-256 765000eb3af2b7df8cacc93c4c3f82417a994266198909d7ffeb0741dcafe8b3

See more details on using hashes here.

File details

Details for the file translator_json-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: translator_json-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/6.8.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.8.17

File hashes

Hashes for translator_json-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c02b2af5c7d75639a73339375fc06691f7f1c22ca9a8e79fed336a46de934a7d
MD5 8251e2bb02f5dda40888d5baceecaa40
BLAKE2b-256 d1abce3902817855750271f51397cd9a7fc18addd06eb2200b8fa4c1c7286a10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page