@cagov/ds-google-translate

1.0.2 • Public • Published

Google translate widget load on click

This custom element renders a link that when clicked places the google site translate widget into the element. This is setup this way because the google translate javascript is used rarely and slows down all page loads when loaded by default. This module uses a sessionStorage parameter to remember if the translate widget was activated and to load it automatically if it was previously.

This is used in the header of state sites like https://headless.cannabis.ca.gov

Dependents (0)

Package Sidebar

Install

npm i @cagov/ds-google-translate

Weekly Downloads

80

Version

1.0.2

License

ISC

Unpacked Size

4.7 kB

Total Files

6

Last publish

Collaborators

  • jbum
  • zakiyak
  • timothyshambra
  • xjensen
  • aaronhans
  • chacha-california
  • kkoryaka