Drupal Powered Pages

https://content.boston.gov/

There are a few things that needs to happen here.

  1. Select the "Formatted Text Blocks" from the list of component library available in Drupal. Make sure to set the "text format" to "JSON Friendly". See image below:

Drupal Text Editor - One Column Text
  1. Add the following code to editor:

Don't forget to go to Weglot Dashboard and grab the api_key to include in the Weglot.initialize function below.

  1. Add CSS style to overwrite the current "Translation" text and/or link on the website.

  1. Add Javascript to fix window position of translation link/dropdown on the page:

Last updated

Was this helpful?