• Hi, I would like to have default translations in my theme

    that involves redefining location of languages folder in functions.php (because I only want to do this for a specific theme)

    I have tried a few hours but can’t find the solution

    anybody can figure this out ? here is what I have tried:

    add_action('wp_loaded', 'my_theme_setup', 0);
    function my_theme_setup(){
        load_theme_textdomain('default', get_template_directory() . '/languages/');
       // echo get_template_directory() . '/languages';
     define( 'WP_LANG_DIR',  get_template_directory() . '/languages/' );
    
    }

  • The topic ‘translating default mo file’ is closed to new replies.