I want to change a few words in the CP (Craft 3). What's the best way to do it, without being overwritten by a Craft update if possible...?

I was thinking about creating my own language file, but can't find the complete method to do so, and it might still be affected by an update? Any ideas?


Just create translations/en/app.php directory of your Craft installation with the following content (replace en with the desired language code):

<?php return [
    'Settings' => '🔧 Params',

Craft updates won't touch it.

  • oh great, ok. Do I have to add all the variables in my file or which language is the failover if the variable doesn't exist? Also how can I name my language to make available in the languages dropdown list for the admin user? – Martin288 Mar 9 at 19:56
  • You don't have to list all strings in your file. Craft will happily fall back to using the default ones, defined in translations/<lang_code>/app.php (where <lang_code>) is the language code of the language chosen by the current user. I'm pretty sure you cannot create new locale though. You have to stick to the one Craft already knows. See for the list of existing locales github.com/craftcms/cms/blob/develop/src/translations – nstCactus Mar 9 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.