Make sure you put your function inside after_setup_theme
action hook
add_action( 'after_setup_theme', 'load_translation' );
function load_translation() {
if( is_dir( get_stylesheet_directory() . '/languages' ) ) {
load_theme_textdomain('adifier', get_stylesheet_directory() . '/languages');
} else {
load_theme_textdomain('adifier', get_template_directory() . '/languages');
}
Also, you have to make sure your theme domain is matched with the translated file.
For an easier method, I’d recommend you to use Loco Translate
, with that plugin you can translate for themes nor plugins directly from wp-admin