Jan 14, 2012 at 12:38pm PST by Mike Pearl
A client of ours recently asked me to change the Joomla's response when a visitor submits a message on the Contact Us form. By default Joomla replies, "Thank you for your email." The client simply wanted to add, "We'll contact you soon." Fortunately, Joomla! now supports language overrides, making this a very simple process.
In the Joomla! 1.5 days, you'd have to hack the Contacts language file. The problem with that is you run the risk of losing your changes any time you do an update on Joomla! Now, things are bit simpler... Joomla now supports something called Language Overrides. Overrides give us the ability to change any standard wording without worrying about losing the changes during updates.
It's pretty straightforward using Joomla's Language Edit Overrides. To get there:
Now that we're here, we have to find the language string. The easiest way to do it is to search for the text that we want to change. In this case, "Thank you for your email."
At the bottom, Joomla shows the Search Results box, and tells us that the language constant is
COM_CONTACT_EMAIL_THANKS. Now let's change it.
COM_CONTACT_EMAIL_THANKSand Joomla will fill in the boxes on the left with the current values.
Thank you for your email. We'll contact you soon.
Joomla now shows the language constant and replacement Text, as well as the language tag. Clear your cache, and Joomla will show our new override text when visitors submit a form.
If you're a bit more technical, or have a large number of overrides to create you can edit the language override file directly. Use whatever File Manager your webhost offers through their control panel. Or, if you're a geek like me, jump to the Linux command line and edit the file with nano or vi.
Here's how it's done:
Thank you for your email.
[joomla root]\language\overrides\en-GB.override.ini. You can substitute any country and language code you need, but the file name will always be xx-XX.override.ini.
COM_CONTACT_EMAIL_THANKS="Thank you for your email - we'll contact you shortly."
Save the language override file and voila, the contact us form returns the new phrase. Nice and easy in Joomla 1.6/1.7/2.5!