Google translate

GT doen’t seem to work with Observable notebooks, actually only comments are translated. I don’t know if there is much to do about this. Maybe other translation tools or extensions, which i am not aware of, could help?

I’d find useful for people who’d like to write their notebooks in their own language (german, italian, russian, whatever) to be able to do so, and get easily read by others as well. After all, notebooks in german or french would confirm that Observable can be used in the real world, and for the general public, everywhere!

The actual notebook lives inside an iframe, and apparently Google Translate cannot be applied to iframes.

A workaround would be to:

  1. Generate the notebook’s embed code via the option “Runtime with Javascript”
  2. Create a github gist and paste the embed code into a gist file, set “.html” as the file’s extension.
  3. Access the gist file via githack.
  4. Open the url given by githack, then translate that page.

Example of a translatable notebook URL:
https://gistcdn.githack.com/mootari/7750cc0fa2e0308f6d7e5bb5b9c8dff1/raw/9221b7c1690901a0788727cc26e849b7d1eb2ef6/index.html

2 Likes

Thank you for the reply and the workaround!