Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Translate Action #110

Open
extratone opened this issue Mar 8, 2023 · 1 comment
Open

Google Translate Action #110

extratone opened this issue Mar 8, 2023 · 1 comment
Assignees
Labels
configuration documentation Improvements or additions to documentation

Comments

@extratone
Copy link
Owner

extratone commented Mar 8, 2023

Google Translate Action

Updated 03082023-105614


Resources

googletranslate://?sl=en&tl=tr&text=hello%20world

  • sl = source language
  • tl = translation language
  • text = the thing you want to translate

Update: I found that setting sl=auto sets the source language to "Detect Language", and that the language values are ISO 639 codes. This discussion has some other potentially useful parameters.

googletranslate://?sl=auto&tl=en&text=[selection]


Description

Send the selected text to the Google Translate app via URL scheme.

Directory Description

Google Translate Icon

Send the selected text to Google Translate for iOS/iPadOS via its URL scheme. If no text is selected, the entire draft contents will be passed.

By default, this action is configured to auto-detect the source (input) language and translate it into English. Using ISO-639 codes (as mentioned in the documentation below,) you should be able to customize this action for your own use.

If you have questions, please do reach out via this Action's Issue on my Drafts-specific GitHub Repository or by any other means.

Documentation

The only available documentation (that I could find, anyway) for the Google Translate app's URL scheme is in the form of this Stack Overflow answer, copied below.

  • sl = source language
  • tl = translation language
  • text = the thing you want to translate

Update: I found that setting sl=auto sets the source language to "Detect Language", and that the language values are ISO 639 codes. This discussion has some other potentially useful parameters.

googletranslate://?sl=auto&tl=en&text=[selection]


ISO-639

<script src="https://gist.github.com/extratone/bfb24503647d0a90a878202efb6501e9.js"></script>
@extratone extratone added documentation Improvements or additions to documentation configuration labels Mar 8, 2023
@extratone extratone self-assigned this Mar 8, 2023
extratone added a commit that referenced this issue Mar 8, 2023
@extratone extratone moved this from Contemplating to Maintaining in Drafts Action Development Mar 8, 2023
@extratone
Copy link
Owner Author

Video Demo

Upload.from.GitHub.for.iOS.MOV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration documentation Improvements or additions to documentation
Projects
Status: Maintaining
Development

No branches or pull requests

1 participant