JS-JTEXT-001

Joomla.JText._()

Joomla.JText (JavaScript)

The JS language object was renamed. Joomla.JText is legacy.

Joomla.JText._()Joomla.Text._() + Text::script() in PHP

Dies at Joomla 5 → 6J3: Works nativelyJ4: Changed behaviourJ6: Changed behaviourBC plugin: not applicableMechanical renameJavaScript

What you will see

  • Cannot read properties of undefined (reading '_')
  • Joomla.JText is undefined

Symptoms people search

JS alert shows the language key · frontend strings not translated

Replace this code

Swap Joomla.JText._() for Joomla.Text._() + Text::script() in PHP.

Joomla 3

Remove or stop calling this

alert(Joomla.JText._('COM_LMS_SAVED'));

Joomla 4 / 6

Use this instead

alert(Joomla.Text._('COM_LMS_SAVED'));
// PHP: Text::script('COM_LMS_SAVED');

How to fix it

  1. 1Replace Joomla.JText with Joomla.Text.
  2. 2Push strings with Text::script() in PHP.

Also known as

Joomla.JText · Joomla.Text · Text::script

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.