Back to Plugin Settings Guides

This guide applies to:

  • Basic Edition
  • Plus Edition
  • Pro Edition
  • Business Edition

Introduction

The default text in the booking calendar is for general booking purposes. But, sometimes it’s necessary to change default text, including headers and titles, to make more sense to your customers and business.

This guide explains the three methods you can use to change the default text in the booking calendar:

  • Using the Translate Words plugin: This is a simple, lightweight plugin for those that want to customize a couple of phrases.
  • Using the Loco Translate plugin: This is a good option for those that want to get involved with their custom translations and don’t want to use our WordPress translation system.
  • No plugin: Adding to your theme’s functions.php file

What This is Useful For

  • Change the name and email address field label in the booking form
  • Say something other than, “What type of appointment are you booking?”
  • Translation not in the proper form.

This guide will only allow you to customize the default phrasing provided with our plugin already. If you have created custom fields and would like to edit them, follow this guide on editing Custom Fields. You can even customize these fields in your preferred language.


Translate Words Plugin

Translate Words is a free plugin that allows you to translate the original plugin text, theme text, and translations that have been created. To get started, install and activate the Translate Words plugin.

You can use this method to quickly change:

  • Headings
    • “What type of appointment are you booking?”
    • “Select a Date”
    • “Select a time”
    • “You are booking”
  • Time headers
    • Night
    • Morning
    • Afternoon
    • Evening
  • Default fields
    • Name
    • Email
  • “Book This Appointment” button

Adding Words to Translate

After activating, all you have to do is go through the booking process and determine which phrases you would like to change.

For example, I want to change the “Select a date” heading to “Choose a date.”

First, you’ll go to to your WordPress Dashboard, click on Settings, and then Translate Words.

After clicking into Translate Words, you’ll add the phrases:

  • “Select a date” under the “Current” column
  • “Choose a date” under the “New” column

Click Add Translation and then Save.

The phrases that are inputted into the “Current” column are not case sensitive. The phrases that are put into the “New” column is what will be displayed in the plugin, so make sure you type this column correctly!

This is the default phrase.
This is the updated phrase.

And that’s it! The phrase you wanted to translate in the plugin should now display your new phrase.

If you are using other plugins that have the same default phrases, it will change the phrases in all plugins. If you only want to edit the phrase in SSA, we recommend using Loco Translate instead.


Loco Translate Plugin

Loco Translate is a free plugin to edit built in plugin field labels. Install and activate the Loco Translate plugin.

Create a New Language Profile

After activating Loco Translate, look for the Loco Translate heading on the bottom left side of your WordPress Dashboard.

Click on it, and then choose “Plugins”

You should see a full list of all the plugins installed on your site. Click Simply Schedule Appointments, and then click New Language.

The next screen will show two steps.

On the first step, choose the language that you currently use on your WordPress site. On the second step, choose System. When you’re ready, click Start Translating.

Start Translating

After creating the new language profile, you can now start translating!

The top half of the screen displays a list of all the different phrases in Simply Schedule Appointments. You can use the filter section to search for the phrase you want to change.

Let’s say we want to change the default “Name” field to display as “Please enter your full legal name”. We can follow these steps to change the field label:

  1. Use the filter to search for “Name”.
  2. Click on the field label “Name”.
  3. Towards the bottom of the screen, you will see an area for the translated text. Enter the new phrase here.
  4. Click Save.
How to use Loco Translate to translate a phrase.

Check the Simply Schedule Appointments booking form to make sure that it’s working:

The confirmation screen after the saved translation.

And that’s it! You can repeat the steps above for any other built-in labels you’d like to change.


No Plugin: Adding to the functions.php File

If you’re comfortable with adding PHP code to your functions.php file (or a custom plugin), this code should help you achieve the same thing as LocoTranslate without adding the performance overhead of another plugin:

add_filter( 'gettext', 'customize_ssa_button_text', 100, 3 );

function customize_ssa_button_text( $translated_text, $text, $domain ) 
{
    if ( $domain !== 'simply-schedule-appointments' ) 
    {
        return $translated_text;
    }

    // Replace only OLD_TEXT
    if ( $text === 'OLD_TEXT' ) {
        return 'NEW_TEXT';
    }

    return $translated_text;
}

Just make sure to make the proper replacements in this bit of code, for example:

if ( $text === 'There are no available appointment times.' ) {
    return 'Sorry, there are no appointments at this time. Check again Monday morning :)';
}

Replacing all instances of a word

If you want to replace a word across the entire plugin you could use the following snippet. Keep in mind that str_replace is case-sensitive, so ‘Appointment’ and ‘appointment’ are different.

$translated_text = str_replace('EXISTING_WORD', 'NEW_WORD', $translated_text);

//For example, if I want to replace all instances of 'Appointment' with 'Meeting', I'd have to write something like -
$translated_text = str_replace('appointment', 'meeting', $translated_text);
$translated_text = str_replace('Appointment', 'Meeting', $translated_text);

So, if you were replacing phrases and also wanted to replace all the instances of a word, your snippet would look like this:

add_filter( 'gettext', 'customize_ssa_button_text', 100, 3 );

function customize_ssa_button_text( $translated_text, $text, $domain ) 
{
    if ( $domain !== 'simply-schedule-appointments' ) 
    {
        return $translated_text;
    }

    // Replace only OLD_TEXT
    if ( $text === 'OLD_TEXT' ) {
        return 'NEW_TEXT';
    }

    // Replace all instances of EXISTING_WORD
    $translated_text = str_replace('EXISTING_WORD', 'NEW_WORD', $translated_text);

    return $translated_text;
} 

Accessing the functions.php File

In your WordPress Dashboard, go to Appearance > Theme Editor. On the right-side, you should see a sidebar with files. Select the functions.php file.

Scroll all the way to the bottom and paste in the above code, making sure you’ve properly replaced the old text and new text fields.

Click Update File and that should be it!

Updating my functions.php file to replace a line of text in my booking calendar

Using the Code Snippets Plugin: Adding PHP

Another alternative is to use the PHP code from the above section and enter it into the free Code Snippets plugin instead of the functions.php file. This is a lightweight option that will also be useful in case you need to add other custom code to your site.

After you install and activate the plugin, go to Snippets > Add New and enter the PHP from above into the Code editor.

Leave the “Run snippet everywhere” button selected. And, don’t forget to enter a Title and Description to help you remember what the code does. When you’re done click Save Changes and Activate.

Adding PHP snippets using the Code Snippets plugin


Still stuck?

File a support ticket with our five-star support team to get more help.

File a ticket

  • Please provide any information that will be helpful in helping you get your issue fixed. What have you tried already? What results did you expect? What did you get instead?
  • This field is for validation purposes and should be left unchanged.

Related Guides