Magento 2 AI Review TranslatorMagento 2 AI Review Translator
Live Demo
Buy Now
Support
Live Demo
Buy Now
Support
  • Getting Started

    • Introduction
    • Key Features
    • How It Works
  • Installation

    • Requirements
    • Install the Module
    • Install the AI Packages
    • Enable & Compile
    • Verify the Installation
    • Content Security Policy
    • Translating the Interface
  • Setup

    • Enable the Module
    • Activate Your Licence
    • Select an LLM Provider
    • Validate & Load Models
    • First Translation
  • Configuration

    • Overview
    • General Settings
    • Limits & Timeouts
    • Store Views & Languages
    • Admin Menu
    • Access Control
  • LLM Providers

    • Provider Overview
    • How Validation Works
    • Choosing a Model
    • Switching Providers
  • Ollama (Self-Hosted)

    • Install Ollama
    • Connect to Magento
    • Timeouts & Batch Size
    • Troubleshooting
  • Translating Reviews

    • Translation Basics
    • What Is Sent to the Model
    • Fallback Behaviour
    • Automatic Translation
    • The Queue Consumer
    • Running the Consumer
    • Bulk CLI Command
    • Batch Size
    • CLI Output & Exit Codes
  • Storefront

    • On the Storefront
    • The Toggle
    • Styling
  • Developers

    • GraphQL API
    • Querying from Code
    • Data Model
    • Useful SQL
  • Help

    • Setup Problems
    • Translation Problems
    • Queue Problems
    • Storefront Problems
    • FAQ

Styling the Storefront

What the module ships

FileLoaded on
view/frontend/web/css/reviewStyle.cssProduct page review block
view/frontend/web/css/list.cssReview list page
view/frontend/web/js/reviews.jsProduct page review container
view/frontend/web/js/list.jsReview list page
view/frontend/web/js/aiReviews.jsThe toggle behaviour

Overriding the CSS

Copy the file into your theme, keeping the module path:

app/design/frontend/<Vendor>/<theme>/Webkul_AIReviewTranslator/web/css/reviewStyle.css

Then re-deploy:

php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Useful hooks

The toggle markup exposes stable ids and classes:

SelectorElement
.reviewTitleThe visible review title
.reviewContentOriginalThe visible review body
.orignalReviewThe "Show Orignal Review" link
.translatedReviewThe "Show Translated Review" link
#orignalReviewTitle<reviewId>Original title container
#translatedReviewTitle<reviewId>Translated title container
#orignalReviewDesc<reviewId>Original body container
#translatedReviewDesc<reviewId>Translated body container

Styling the two links to look like buttons, or moving them above the review body, needs only CSS against .orignalReview and .translatedReview.

Do not hide a container with display: none in CSS

The toggle sets display inline on those containers. A stylesheet rule fights it and the switch stops working. Use visibility or restyle the wrapper instead.

Hyvä

The templates target the Luma structure — a Hyvä theme needs them ported. Raise a customisation request at webkul.uvdesk.com.

Removing the toggle entirely

To show only the translated text with no link, hide both links in your theme CSS:

.orignalReview,
.translatedReview {
    display: none;
}

The translated version is what renders by default, so the review still reads correctly.

Prev
The Toggle