How to translate theme content using site language?

Make sure to load the translations using the load_theme_textdomain function, and supposed your translations is located in the library/translations folder, then you can add the code below in you functions.php file.

// let's get this party started
add_action( 'after_setup_theme', 'translations');
function translations() {
  // let's get language support going, if you need it
  load_theme_textdomain( 'text_domain', get_template_directory() . '/library/translations' );
}