Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

Browser AI Comments adds AI-powered helpers directly to Drupal’s comment system, using capabilities available in modern Chrome browsers. It lets site visitors translate comments (while writing or while reading) and helps moderators and communities by warning commenters about potentially toxic language before they post.

Features

  • In-comment translation
    • Translate the current comment while writing.
    • Translate a published comment while viewing.
    • Uses Chrome’s experimental Web AI APIs: LanguageDetector and Translator.
  • Toxicity / harmful language warnings while typing
    • Detects potentially toxic or hateful language as users type.
    • Runs client-side using Transformers.js in a Web Worker (keeps the UI responsive).
    • Uses the Xenova/toxic-bert model for classification.
  • Optional submit protection
    • Can disable the comment submit button when toxic content is detected (configurable).

Post-Installation

After enabling the module, configure it from the admin UI and then use it in any place Drupal comments are available.

  1. Go to Admin > Configuration > Content authoring > Browser AI Comments.
  2. Select which toxicity labels should be flagged and set a threshold value.
  3. Customize the warning message shown to commenters.
  4. Optionally enable the setting to disable the submit button while toxic content is detected.

What you’ll see after setup:

  • On comment forms: toxicity warnings can appear live while typing.
  • On comment display pages: a Translate action is available for published comments (browser support required).

Additional Requirements

  • Drupal 11
  • Google Chrome Dev/Canary with experimental Web AI features enabled
  • Secure context: HTTPS or localhost
  • Network access (first run): required to download the toxicity model the first time it runs

Notes: Translation relies on Chrome Web AI APIs (Translator, LanguageDetector). Toxicity detection does not require window.ai.

  • Transformers.js (used for toxicity detection in a Web Worker)
  • Xenova/toxic-bert model (used for toxicity classification)

If your site uses advanced moderation workflows, pairing with Drupal’s moderation tools (core/workflow setups) can complement the warnings, but this module primarily focuses on front-end assistance at comment time.

Similar projects

This module is different from typical server-side translation or moderation modules because it runs AI features in the browser (client-side) using Chrome’s experimental Web AI APIs and an in-browser toxicity model. That means:

  • No server-side translation service is required for the translation feature (but browser support is required).
  • Toxicity detection runs locally in the user’s browser via a Worker, instead of needing a remote API.

How it works

  • Translation uses the LanguageDetector and Translator APIs as shown in the Chrome Web AI playground.
  • Toxicity detection runs Transformers.js inside a Web Worker using the Xenova/toxic-bert model (inspired by toxic review demos).

Chrome setup

  1. Enable AI-related flags in chrome://flags (flag names change frequently).
  2. Restart Chrome and allow any required model downloads.
  3. Confirm the APIs exist in DevTools: Translator and LanguageDetector.

Usage

  1. Enable the module.
  2. Open a comment form or view a published comment.
  3. Use the Translate button or review toxicity warnings while typing.

Activity

Total releases
2
First release
Jan 2026
Latest release
3 months ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Jan 15, 2026
1.0.x-dev Dev Jan 15, 2026