How to Find Any Language Constant in Joomla

joomla language constants

Have you had problems customizing or translating the text on your Joomla site?

This tutorial is for those cases when you can't find the language constant, which are the key for language overrides.

Our previous tutorial explains how you can translate or customize language strings. This tutorial will explain what to do if that tutorial isn't enough.

In this example, I want to change the text for "Phone" from the user profile page:

joomla language constants
  • First, I will try the change that text the easy way by going to Extensions > Language(s) > Overrides > New.
  • When I search for "Phone", I didn't find a positive result. I can find the constant for "Phone:" from the Contact component but not from the User profile plugin, which is what I need.
joomla language constants

Step #2. Rename the language folder

Let's try a manual way to find the language constants.

  • Change the name for the "languages" folder to "languages-something":
joomla language constants
  • Refresh your public site and see what's the language constant is. In the example above, all the language constants were displayed, except the ones from the User profile plugin. This means that the language files for this extension probably is located in another place.
joomla language constants
  • Restore the folder name to "languages" again.

Step #3. Rename the language folder from administrator

Let's check the /language/ folder in the administrator area.

  • Go to the /administrator/ folder
  • Change the name for the "languages" folder to "languages-something".
  • Refresh your public site and see what's the language constant is. In this example, we finally found the constant:
joomla language constants

 

  • Change the folder name to "languages" again.

Step #4. Create the language override

  • Copy the language constant from previous step. In my case: PLG_USER_PROFILE_FIELD_PHONE_LABEL.
  • Go to Extensions > Language(s) > Overrides > New.
  • Paste in the language constant.
  • Set a custom value.
joomla language constants
  • Save when you’re done.

Step #5. Check the end result

  • Double-check in the frontend that the language override is working:
joomla language constants