Overriding core phrases (in English)

There was a post in the old forum about overriding core text in English and since I figured out an “easy” way to do this, I figured I would post it here. There is a desire in our organization to customize some of the English messaging within the CMS. For example, instead of the message “Submit to Workflow”, we wanted it to say “Submit for Approval”. To do this, here is what I did:

  1. From the command line, run bin/concrete5 c5:config set concrete.misc.enable_translate_locale_base_locale true
  2. Create a messages.po file in \application\languages\en_US\LC_MESSAGES\ (create folders if they don’t exist)
  3. Enter translations in the following format:
    msgid “Submit to Workflow”
    msgstr “Submit for Approval”

(separate additional translations by line breaks)

  1. Download and install poedit
  2. Open messages.po in poedit and click compile to MO. Save the mo file in the same folder above
  3. Clear the cache in the CMS (System & Settings → Optimization → Clear cache)

As a result, anywhere in the CMS where a t(‘Submit to Workflow’) tag is being used, the text displayed for the end user will be ‘Submit for Approval’.

I hope this helps someone else who has a similar need!


TBH, for this particular example, I’d love it if the core team were to replace Submit to WorkFlow with Submit for Approval…

Thank you for sharing.

Thanks very much for sharing! Actually this looks almost exactly what I tried in the beginning and could never get to work, but it seems where I went slightly wrong is I had manually added misc => enable_translate_locale_base_locale => true into application/config/concrete.php — when I ran your command it added production.concrete.php, and with it in that file now it works. :smiley: