If you want to override some loco translate strings, you might have noticed a warning stating that changes to the file might be lost after wordpress/plugin/template update.
Let’s see how to avoid losing all your customization during the next update.
In Loco Translate select the plugins/theme/etc that you want to customize.
Hover over the the language you want to make changes to and click on copy.
Note that system, on the right end of the picture above indicates that this is a system file and prone to be overwritten during the next update.
Once you have clicked on copy you are brought to a screen to set a new language. Well, good news, it doesn’t have to be a new language at all and you can create a copy of a file for an existing language. Let’s have a look at the settings.
1- Choose the target language, in our case this is the one of the file we copied.
2- For the location, the most sensible is the custom location. System and Author might be subject to changes from update.
3- For the templates option use the “Just copy English source strings” option and changes just what you need, the rest will fallback safely on the string in the original file. If you have already make your change directly in the original then you can choose the first option.
Once you are all set, click on start translating.
If you need to edit your custom copy. Click on “Languages” in the Loco Translate menu. Choose the languagefor which you have created the copy you want to modify. You will see all templates available under WordPress Core , Plugins and Themes for this language. Look for the name of the plugin or theme you have modified. The original file will be listed as system and your copy will be listed as custom. Click on edit.