abdelhadi-h
11/2/2017 - 7:06 PM

WP - Translate theme

<?php 
//Load our translation
// Text domaine : twentyseventeen
//Follow code for Parent theme (get_template_directory())
add_action( 'after_setup_theme', 'my_theme_setup' );
function my_theme_setup(){
    load_theme_textdomain( 'twentyseventeen', get_template_directory() . '/languages' );
}

//Follow code for Child theme (get_stylesheet_directory())
add_action( 'after_setup_theme', 'my_theme_setup' );
function my_theme_setup(){
    load_theme_textdomain( 'twentyseventeen', get_stylesheet_directory() . '/languages' );
}