Support » Plugin: Explanatory Dictionary » Issue with lang

  • Hello,
    I try to have “Reset list” or “Synonyms:” translated in french.

    I have created a explanatory-dictionary-fr_FR.mo file and put this in wp-content/langauges/plugins.
    Then I add this in my functions.php.

    add_action( 'plugins_loaded', 'myplugin_load_textdomain' );
    /**
     * Load plugin textdomain.
     *
     * @since 1.0.0
     */
    function myplugin_load_textdomain() {
    	load_plugin_textdomain( 'explanatory-dictionary', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    }

    But I can’t manage to make the strings translated (even if I put the .mo file) in the languages folder of the plugin.

    Btw, could you update the public/views/explanatory-dictionary.php file?
    Erase the tag and put span, then make Synonyms translatable?

    <?php if( !empty( $entry->synonyms ) ) :?>
    			<span class="explanatory-dictionary-entry-synonyms"><small>- <?php echo __( 'Synonyms:', 'explanatory-dictionary' );?> <span class="synonyms"><?php echo $entry->synonyms; ?></span></small></span>
    		<?php endif;?>

    Best regards.

    https://wordpress.org/plugins/explanatory-dictionary/

  • The topic ‘Issue with lang’ is closed to new replies.