Skip to main content

mkdocs-google-translate

Build Status GitHub latest commit PyPi MIT license codecov

A mkdocs plugin to add relative paths to Google Translate queries

img.png

Install using pip install mkdocs-google-translate

Usage

Activate the plugin in mkdocs.yml by adding the following lines, replace the values of _x_tr_sl and _x_tr_tl to match your site:

extra:
  alternate:
      # Original Language
    - name: English
      lang: 'en'
      link: '%GT_RELATIVE_URL%'  # For relative urls back to original language
      # Extra languages
    - name: Norsk
      lang: 'no'
      link: 'https://translate.goog/?_x_tr_sl=en&_x_tr_tl=no'
      # _x_tr_sl = source language
      # _x_tr_tl = translation language

plugins:
  - search
  - google-translate:
      url: example.com  # optional (required for local testing)

Note: If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set, but now you have to enable it explicitly.

Incompatabilities

This plugin is somewhat incompatible with the mkdocs feature navigation.instant, due to the fact that the page heading never changes with the feature enabled.

Metadata

Release files for mkdocs-google-translate 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-google-translate 1.3.1
File Size Uploaded Provenance Actions
mkdocs_google_translate-1.3.1.tar.gz 4.9 kB Without provenance Details for mkdocs_google_translate-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-google-translate 1.3.1
File Interpreter ABI Platform Actions
mkdocs_google_translate-1.3.1-py3-none-any.whl Python 3 none any Details for mkdocs_google_translate-1.3.1-py3-none-any.whl

Total release size: 9.9 kB

Release files / mkdocs_google_translate-1.3.1.tar.gz

Download URL mkdocs_google_translate-1.3.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
188e935d94154547e4eabc08096f75ae13788d9ea8bbd0940ba9156a935f7c52
BLAKE2b-256 checksum
How to use checksums
3727db9b2dfb7e83c01482275b0bc4ea18a3b1fe228baac3c5ae36331f4b0995
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / mkdocs_google_translate-1.3.1-py3-none-any.whl

Download URL mkdocs_google_translate-1.3.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92cfb823513afec6401f21014e5b3a248343335d53173d59abf6ea8f0ea54f86
BLAKE2b-256 checksum
How to use checksums
d5a61dd2c5372297aa4dc0fa874d9951358a15e798fc03352302592d8cfb44a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for mkdocs-google-translate 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page