A plugin to add relative links to Google Translate queries
Project description
mkdocs-google-translate
Add relative paths to Google Translate queries.
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:
- name: English
lang: 'en'
link: ''
- 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 thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set, but now you have to enable it explicitly.
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
Built Distribution
Close
Hashes for mkdocs-google-translate-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d55d97b6ce08881f2ddf2ea5020d53e4afbdb395a34a1e62a3eb5fc29d245d0 |
|
MD5 | 2745a48298492d4c263010e7bfbbd742 |
|
BLAKE2b-256 | 412a61b32fa27b9700946e42269529ce657672982309396c30d823efbdfc388a |
Close
Hashes for mkdocs_google_translate-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57448d91b1976a460db9a2c593550197797f740591c406582f2eb33e544482d7 |
|
MD5 | dee15e78bad726861c9e0ba65bcb011e |
|
BLAKE2b-256 | 1650c4eda99730a821ad5e10ab9c09342699c4e80ceea5369f48819c56dcf5e1 |