Prevent deletion of languages files with theme and plugins update

Updated: February 7, 2020

If you are creating translations on your own, or you are editing translations provided by us in AIT Languages plugin, you have probably stored your translation files directly in folder of theme ./wp-content/themes/themeName/ait-theme/languages/ or plugin ./wp-content/plugins/pluginName/languages

In both cases mentioned above you will lost your translations with theme or plugin update, because update will delete folder of theme or plugin and replace it with new folder where are stored default theme files.

Where should be stored translations files safely to prevent their deletion?

  • Theme translation file save in child theme folder: ./wp-content/themes/ChildThemeName/ait-theme/languages/de_DE.mo
  • Plugins translation files save in general WordPress Languages folder: ./wp-content/languages/plugins/
    – name of .mo file must include the name of plugin, if plugin is installed in folder ./wp-content/plugins/my-plugin, translation file name would be for example my-plugin-de_DE.mo.
close

If you are going to edit po file and change translations over FTP, download po file to your computer and edit file locally, because generated mo file is not uploaded to your server automatically with saved po file!

Author: Ivan Hudak

Support Manager