Happened to many users, may be happened to you as well. You translated a language file in your theme or plugin, but you lost that file when an update came. Your hours of work, lost! That’s why WordPress has a hidden feature just for that.
WordPress loads the language files based on the plugin language scheme. Some prefers to put their language files in the
languages folder, or some in
lang folder. It’s the plugin authors personal preference. But either way, if WordPress doesn’t find the current language in that plugins/themes folder, it searches on the
/wp-content/languages/plugins folder. Note that, it’s the
languages folder in the
If you have
wpuf textdomain in a plugin, it’ll search for
wp-content/languages/plugins/wpuf-LOCALE_CODE.mo file. Similarly for themes,
So if you are translating a theme or plugin and you don’t want to lose the changes when an update comes, place them on the global languages folder. The better approach would be to contact the plugin or theme author and place them in the plugin/theme officially.