Skip to main content

Add google translate to your website templates easily.

Project description

Google Translate provides easy way to add google translate plugin in your django templates. If your project needs to have multiple languages and if you dont want to manage .po files then you can add this package to make your website available in multiple languages easily without any hassle.

https://i.ibb.co/TK59rCp/Annotation-2020-06-27-124837.jpg
Simple
https://i.ibb.co/pwC7SJn/Annotation-2020-06-27-124803.jpg
Vertical
https://i.ibb.co/YcxND7v/Annotation-2020-06-27-124821.jpg
Horizontal

Quick start

  1. Download the package:

    pip install django-google-translate
  2. Add “google_translate” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'google_translate',
    ]
  3. Load the translate tag in your template (ideally on base.html):

    {% load google_translate %}
  4. Add following template tag wherever you want to show translate button:

    {% google_translate %}
  5. You can also pass type and default language in the translate button type in the inclusion tag (OPTIONAL):

    {% google_translate type='vertical' language='en' %}

Available values for the type are “horizontal”, “vertical” and “simple” (default) and for language you can pass any ISO language code

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

django-google-translate-1.1.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file django-google-translate-1.1.tar.gz.

File metadata

  • Download URL: django-google-translate-1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for django-google-translate-1.1.tar.gz
Algorithm Hash digest
SHA256 139f4b2f6809789847543c1cb940374fa61d676506ecce0eab7919446cc9c0b6
MD5 4e91d823461823ba29d1b57670b2a781
BLAKE2b-256 292128b8ae377c99886e9aae6fc73dbe08bc8a745b945a52399e8f06b5d3b4c3

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