Most WordPress users want to replace their theme’s default footer text with their own. However, credentials are hard coded into themes so your translation plugin will not provide you the option to input a translation for those text strings, making your site look unprofessional and that you don’t really care about your international users.
There is a way around this to ensure the information at the bottom of the page will display in the right language. This post will show you two ways to add a multilingual footer to your Genesis child theme.
First Method – replace the footer section with a widget area
If you want to modify your footer straight from your dashboard this is the method to choose. In this example I use the free Polylang translation plugin.
Paste this code into your functions.php file:
On the description line, replace childtheme with your child theme’s name.
Next, add the widget’s class in style.css and adjust its visual appearance
When all is said and done, open your dashboard, go to your new widget and add a text box with your own footer credentials. Go to Languages > Strings Translations and the text box content will appear in the list of strings to be translated. Input your translations and your website will now display its footer in the correct language.
However, since the footer rarely need changes you may not want unnecessary clutter in your widget section. If this is your case the second method is for you.
Second Method – add language selection parameters to your footer
With this method you set your footer’s text with a code variable instead of your translation plugin.
Paste this into your functions.php file:
Change fr-FR and en-US to the languages of your choice. In this example there are two languages. Add another if statement before return $creds for each extra language you need :
And now your footer’s language will match the rest of your website. Have fun with your translations!
Prefer not to tweak your website yourself?
Subscribe to my monthly WordPress Maintenance Plan – let me take care of your site – while you take care of your business. You’ll make more money focusing on your core business than trying to become a WordPress Expert. A Maintenance Plan means NO surprises just a great site bringing you clients and business month after month.