Changing the terminology used in Craft CMS

Com­ing to Craft CMS, one of the first things you notice is it’s inter­est­ing choice of words for describ­ing things in the CMS. Such as…

A developer can quickly piece togeth­er what they mean by intu­ition or by check­ing the doc­u­ment­a­tion. How­ever for your cli­ents, who may or may not be tech­nic­ally savy, it can be a huge bar­ri­er to get­ting to grips with your CMS.

So to com­bat this, Craft allows you to trans­late it’s default vocab­u­lary to one that you believe your cli­ent will understand.

Craft 2 #

As the guys at Mijingo describe in this great video, in Craft 2 you first cre­ate the dir­ect­ory craft/translations/ and cre­ate a php file which matches your loc­ale. For example, if I’m cre­at­ing a web­site for a UK com­pany I will cre­ate the file craft/translations/en_gb.php. This file just returns a string-to-string asso­ci­at­ive array that maps default CMS strings to new ones.

Craft 3 #

In Craft 3, things are a little bit dif­fer­ent. You still cre­ate the craft/translations/ dir­ect­ory, but instead of cre­at­ing an en_gb.php file, you cre­ate sub­folders that are named after the trans­la­tion loc­ale with an app.php file inside, e.g. craft/translations/en-GB/app.php. Note that the names of loc­ales are a bit dif­fer­ent in Craft 3, so instead of en_gb it would be en-GB. You can double the exact format by going to Settings > Sites in your CMS admin settings.

So we’ve cre­ated craft/translations/en-GB/app.php, now we add our string-to-string array that maps old strings to new ones.

Entries to Con­tent #

A com­mon word that causes con­fu­sion in Craft is Entries, the area of the CMS where you edit what’s shown on the front-end of your site. I tend to prefer the word Con­tent, because it’s the kind of lan­guage that cli­ents talk in. To change Entries/Entry to Con­tent across the CMS, you have to add slightly dif­fer­ent things depend­ing on what Craft ver­sion you’re using. This is because of the dif­fer­ent text used between versions.

For Craft 2, add the fol­low­ing to craft/translations/en_gb.php:

<?php

return array(
    'Add an entry' => 'Add content',
    'All entries' => 'All content',
    'Are you sure you want to delete the selected entries?' => 'Are you sure you want to delete the selected content?',
    'Are you sure you want to delete this entry?' => 'Are you sure you want to delete this content?',
    'Are you sure you want to delete “{name}” and all entries that use it?' => 'Are you sure you want to delete “{name}” and all content that uses it?',
    'Are you sure you want to delete “{name}” and all its entries?' => 'Are you sure you want to delete “{name}” and all its content?',
    'Couldn’t delete entry.' => 'Couldn’t delete content.',
    'Couldn’t revert entry to past version.' => 'Couldn’t revert content to past version.',
    'Couldn’t save entry type.' => 'Couldn’t save content type.',
    'Couldn’t save entry.' => 'Couldn’t save content.',
    'Create a new child entry' => 'Create new child content',
    'Create a new entry' => 'Create new content',
    'Create a new {section} entry type' => 'Create a new {section} content type',
    'Create entries' => 'Create content',
    'Default Entry Status' => 'Default Content Status',
    'Delete entries' => 'Delete content',
    'Delete other authors’ entries' => 'Delete other authors’ content',
    'Edit entries' => 'Edit content',
    'Edit entry' => 'Edit content',
    'Edit entry type' => 'Edit content type',
    'Edit entry types ({count})' => 'Edit content types ({count})',
    'Edit other authors’ entries' => 'Edit other authors’ content',
    'Enable versioning for entries in this section?' => 'Enable versioning for content in this section?',
    'Entries' => 'Content',
    'Entries deleted.' => 'Content deleted.',
    'Entries in this section have their own URLs' => 'Content in this section have their own URLs',
    'Entry deleted.' => 'Content deleted.',
    'Entry reverted to past version.' => 'Content reverted to past version.',
    'Entry saved.' => 'Content saved.',
    'Entry Template' => 'Content Template',
    'Entry Type' => 'Content Type',
    'Entry type saved.' => 'Content type saved.',
    'Entry Types' => 'Content Types',
    'Entry URL Format' => 'Content URL Format',
    'How you’ll refer to this entry type in the templates.' => 'How you’ll refer to this content type in the templates.',
    'Link to an entry' => 'Link to content',
    'New entry' => 'New content',
    'Nested Entries' => 'Nested Content',
    'New entry type' => 'New content type',
    'New {section} content' => 'New {section} content',
    'No entries exist yet.' => 'No content exists yet.',
    'No entry exists with the ID “{id}”.' => 'No content exists with the ID “{id}”.',
    'No entry type exists with the ID “{id}”.' => 'No content type exists with the ID “{id}”.',
    'No entry types are available for this entry.' => 'No content types are available for this content.',
    'No entry types exist for this section.' => 'No content types exist for this section.',
    'Post a new {section} entry' => 'Post new {section} content',
    'Publish live changes for other authors’ entries' => 'Publish live changes for other authors’ content',
    'Recent Entries' => 'Recent Content',
    'Recent {section} Entries' => 'Recent {section} Content',
    'Resaving {section} entries' => 'Resaving {section} Content',
    'Revert entry to this version' => 'Revert content to this version',
    'Save as a new entry' => 'Save as new content',
    'Section and entry locale targeting' => 'Section and content locale targeting',
    'The template to use when an entry’s URL is requested.' => 'The template to use when a piece of content’s URL is requested.',
    'The template to use when the entry’s URL is requested.' => 'The template to use when a piece of content’s URL is requested.',
    'Top-Level Entries' => 'Top-Level Content',
    'View entry' => 'View content',
    'What the auto-generated entry titles should look like. You can include tags that output entry properties, such as {ex}.' => 'What the auto-generated entry titles should look like. You can include tags that output content properties, such as {ex}.',
    'What the entry URI should be.' => 'What the content URI should be.',
    'What the entry URLs should look like. You can include tags that output entry properties, such as {ex1} or {ex2}.' => 'What the content URLs should look like. You can include tags that output content properties, such as {ex1} or {ex2}.',
    'What this entry type will be called in the CP.' => 'What this content type will be called in the CP.',
    'Which locales should entries in this section target?' => 'Which locales should content in this section target?',
    'Which section do you want to publish entries to?' => 'Which section do you want to publish content to?',
    'Which section do you want to pull recent entries from?' => 'Which section do you want to pull recent content from?',
    'Which type of entries do you want to publish?' => 'Which type of content do you want to publish?',
    '{section} Entry Types' => '{section} Content Types',
);

For Craft 3, add the fol­low­ing to craft/translations/en-GB/app.php:

<?php

return [
    'All entries' => 'All content',
    'Are you sure you want to delete the selected entries?' => 'Are you sure you want to delete the selected content?',
    'Are you sure you want to delete “{name}” and all entries that use it?' => 'Are you sure you want to delete “{name}” and all content that use it?',
    'Are you sure you want to delete “{name}” and all its entries?' => 'Are you sure you want to delete “{name}” and all its content?',
    'Create entries' => 'Create content',
    'Delete entries' => 'Delete content',
    'Delete other authors’ entries' => 'Delete other authors’ content',
    'Edit entries' => 'Edit content',
    'Edit other authors’ entries' => 'Edit other authors’ content',
    'Enable versioning for entries in this section?' => 'Enable versioning for content in this section?',
    'Entries' => 'Content',
    'Entries deleted.' => 'Content deleted.',
    'No entries exist yet.' => 'No content exist yet.',
    'Publish live changes for other authors’ entries' => 'Publish live changes for other authors’ content',
    'Recent Entries' => 'Recent Content',
    'Recent {section} Entries' => 'Recent {section} Content',
    'Resaving {section} entries' => 'Resaving {section} content',
    'Which section do you want to publish entries to?' => 'Which section do you want to publish content to?',
    'Which section do you want to pull recent entries from?' => 'Which section do you want to pull recent content from?',
    'Which type of entries do you want to publish?' => 'Which type of content do you want to publish?',
    'Leave blank if entries don’t have URLs' => 'Leave blank if content doesn’t have URLs',
    'Resaving {type} entries' => 'Resaving {type} content',
    'Add an entry' => 'Add content',
    'Are you sure you want to delete this entry?' => 'Are you sure you want to delete this content?',
    'Couldn’t delete entry.' => 'Couldn’t delete content.',
    'Couldn’t revert entry to past version.' => 'Couldn’t revert content to past version.',
    'Couldn’t save entry type.' => 'Couldn’t save content type.',
    'Couldn’t save entry.' => 'Couldn’t save content.',
    'Create a new child entry' => 'Create new child content',
    'Create a new entry' => 'Create new content',
    'Create a new {section} entry type' => 'Create a new {section} content type',
    'Edit entry' => 'Edit content',
    'Edit entry type' => 'Edit content type',
    'Edit entry types ({count})' => 'Edit content types ({count})',
    'Entry Type' => 'Content Type',
    'Entry Types' => 'Content Types',
    'Entry deleted.' => 'Content deleted.',
    'Entry reverted to past version.' => 'Content reverted to past version.',
    'Entry saved.' => 'Content saved.',
    'Entry type saved.' => 'Content type saved.',
    'How you’ll refer to this entry type in the templates.' => 'How you’ll refer to this content type in the templates.',
    'Link to an entry' => 'Link to content',
    'No entry types exist for this section.' => 'No content types exist for this section.',
    'Post a new {section} entry' => 'Post new {section} content',
    'Revert entry to this version' => 'Revert content to this version',
    'Save as a new entry' => 'Save as new content',
    'View entry' => 'View content',
    'What the auto-generated entry titles should look like. You can include tags that output entry properties, such as {ex}.' => 'What the auto-generated content titles should look like. You can include tags that output content properties, such as {ex}.',
    'What the entry URI should be.' => 'What the content URI should be.',
    'What this entry type will be called in the CP.' => 'What this content type will be called in the CP.',
    '{section} Entry Types' => '{section} Content Types',
    'Entry' => 'Content',
    'New {section} entry' => 'New {section} content',
    'New entry' => 'New content',
    'New entry type' => 'New content type',
    'Entry URI Format' => 'Content URI Format',
    'Which template should be loaded when an entry’s URL is requested.' => 'Which template should be loaded when content’s URL is requested.',
    'What entry URIs should look like for the site.' => 'What content URIs should look like for the site.'
];

Now if you go to your CMS in a new win­dow, you should see that all the copy refer­ring to Entries and Entry magic­ally changes to Con­tent.

Yay Craft!

To see what oth­er text is avail­able to change, for Craft 2 open your pro­ject and have a look in craft/app/translations/, for Craft 3 have a look at the Craft Git­Hub.