How WordPress knows where to find locale files?

Plugins and themes pull the translation files manually from (mostly) their directory. There are 2 different functions which handle this:

For plugins : load_plugin_textdomain()

For themes: load_theme_textdomain()

The syntax would be something like this, mostly hooked into init or plugins_loaded action hook:

load_plugin_textdomain( 'text-domain', get_template_directory() . '/some-directory' );

OR:

load_plugin_textdomain( 'text-domain', false, basename(dirname(__FILE__)).'/some-directory');

Look for that in your plugin’s php file. After translation, you should paste move the translation file into that directory, and name it as follows, according to codex:

The .mo file should be named based on the domain followed by a dash,
and then the locale exactly. For example, the locale for German is
‘de_DE’, and the locale for Danish is ‘da_DK’. If your plugin’s text
domain is “my-plugin” the Danish .mo and.po files should be named
“my-plugin-da_DK.mo” and “my-plugin-da_DK.po” Call this function in
your plugin as early as the init action.