How to Translate Joomla's Contact Form
- Written by Alex Smirnov Alex Smirnov
- Category: Joomla How To Joomla How To
- Published: 22 March 2018 22 March 2018
Now take a look at how you can translate Joomla's extensions.
In this tutorial, you are going to learn how to create a contact form that is available in both English and French.
The process is going to be very similar to the one that we used in previous posts on how to translate Joomla content. Here's the process we're going to use:
- Organize categories for the contact forms.
- Create the contact forms, and associate them.
- Create the menu links, and associate them.
Multilingual Contact Form Categories
Let's see how that process works for contact forms:
- In the admin area of your site, go to "Components", and then to "Contacts":
- Click the "Categories" link in the left-hand menu:
We do have a choice to make with categories:
- If you don't have a lot of contact forms, then you can leave it as "Uncategorised" and put both English and French contacts in that category.
- If you have many contact forms, then it is probably best to create separate categories.
In this example, we're going to leave the default "Uncategorised" category alone and use it for all our contact forms. If you don't have an "Uncategorized" category, create it now.
Multilingual Contact Forms
- Click "Contacts" in the left-hand menu:
- Click on the title of the existing contact form:
- Enter your name in the Name field:
- Choose English (en-GB) for the Language option.
- Click on "Save & Close".
- Now, we have an English version of the contact form:
- Let's click the "New" button and create a French version of the contact form:
- Enter the French version of your name, if there is one. There is no special version of my name in French, so I will enter Igor Mihaljko again:
- Choose French (FR) for the Language option:
- Put your email address in the Email field:
- Click on "Save" button to apply your changes:
- After saving, click on the "Associations" tab:
- Click on the "Select" button and associate this French version of the contact form with the English version:
- Click on "Save & Close" to apply your changes.
- You will see that those two contact forms are now related:
Multilingual Menu Links to Contact Forms
- Go to "Menus", and then "Main Menu (en-GB)".
- Click on the "Add New Menu Item" link:
- Set the title of the menu item to "Contact Me":
- Click on "Select" for the "Menu Item Type" option:
- Choose "Contacts" and then "Single Contact" item from the selection window:
- Choose the English version of your contact form:
- Under the "Language" option, choose "English (en-GB)":
- Click on the "Save & Close" button to finish.
- In the "Main Menu (en-GB)", you can see the new menu item is linked to the English version of our Contact form:
- Now let's go to the "Main Menu (fr-FR)":
- Click on the "New" button:
- For the "Menu Title", put in the French title "Contactez moi":
- For the menu item type, choose "Contacts" and then "Single Contact":
- Choose the French version of your contact form that you set up earlier:
- Under the "Language" option, choose "French (FR)":
- Click on the "Save" button.
- Click on the "Associations" tab.
- Click the "Select" button:
- Associate the French version of your menu item to the English version of the menu item:
- Click "Save & Close":
- Go to the front of your site. You will now have an English version of the "Contact Me" menu link:
- Click on the French flag and you will see the French version of the contact form. Since we uploaded the French language pack for Joomla, all of the default text is already translated into the French language.
- Introduction to Joomla Multilingual Sites
- 3 Different Approaches to Multilingual Joomla Sites
- Installing a New Multilingual Joomla Site
- What are Multilingual Associations in Joomla?
- Beginners Guide to Translating Joomla's Menus
- How to Create a Multilingual Joomla Blog
- How to Create a Multi-Lingual Sitemap with OSMap
This same process will work for all of the default Joomla extensions. They will all have these multilingual capabilities.
Later on in this blog, we are going to show you how to translate non-core extensions and templates. We are going to concentrate on cleaning up what we see in front of us.
We are going to translate those last little items that haven't yet been fully translated into both English and French.
Would you like to learn more about Multilingual Joomla? Join the Joomlashack Everything Club and instantly download the "Multilingual Joomla Explained" book by Igor Muhaljko and Steve Burge.