Translation doesn't work

Hi,

I translated the plugin but I still see it only in English.
Yes, all necessary files created and placed in the languages-directory.
Yes, language of the blog set to German

Thanks for your help!

Bests
Thorsten

  • Tee
    • The Crimson Coder

    Yes and yes.

    I tried to copy the following code from another plugin with the result that I can see my German translation but I see some ugly "\"

    if ( defined( 'WPMU_PLUGIN_DIR' ) && file_exists( WPMU_PLUGIN_DIR . '/wpmu-dev-seo.php' ) ) {
    	load_muplugin_textdomain( 'wds',  dirname( plugin_basename( __FILE__ ) ) . '/wds-files/languages' );
    } else {
    	load_plugin_textdomain( 'wds', false, dirname( plugin_basename( __FILE__ ) ) .  '/wds-files/languages' );
    }

  • Tee
    • The Crimson Coder

    OK, the ugly \'s are a wrong translation like "</p>\n\\t\\t

      \n\\t\\t\\t
    • <b>"
      So bottom line, if you use above code for this plugin, translation is working fine :slight_smile:

      Could you use it for next update so I don't have to take care myself?

      Cheers
      Thorsten

  • Tee
    • The Crimson Coder

    The original code was

    if ( defined( 'WPMU_PLUGIN_DIR' ) && file_exists( WPMU_PLUGIN_DIR . '/wpmu-dev-seo.php' ) ) {
    	load_muplugin_textdomain( 'wds', 'wds-files/languages' );
    } else {
    	load_plugin_textdomain( 'wds', false, WDS_PLUGIN_DIR . 'wds-files/languages' );
    }'

    new is

    if ( defined( 'WPMU_PLUGIN_DIR' ) && file_exists( WPMU_PLUGIN_DIR . '/wpmu-dev-seo.php' ) ) {
    	load_muplugin_textdomain( 'wds',  <strong>dirname( plugin_basename( __FILE__ ) ) . </strong>'/wds-files/languages' );
    } else {
    	load_plugin_textdomain( 'wds', false, <strong>dirname( plugin_basename( __FILE__ ) ) .  </strong>'/wds-files/languages' );
    }
  • Tee
    • The Crimson Coder

    Sorry was meant to bold the important part!

    if ( defined( 'WPMU_PLUGIN_DIR' ) && file_exists( WPMU_PLUGIN_DIR . '/wpmu-dev-seo.php' ) ) {
    load_muplugin_textdomain( 'wds',
    dirname( plugin_basename( __FILE__ ) ) . '/wds-files/languages' );
    } else {
    load_plugin_textdomain( 'wds', false, dirname( plugin_basename( __FILE__ ) ) . '/wds-files/languages' );
    }

  • Tee
    • The Crimson Coder

    Pls also make translatable:

    Paste in the IDs, slugs or titles for the post/pages you wish to exclude and separate them by commas

    Paste in the keywords you wish to exclude and separate them by commas

    Paste in the extra keywords you want to automaticaly link. Use comma to seperate keywords and add target url at the end. Use a new line for new url and set of keywords.
    Example:
    WPMU DEV, plugins, themes, https://premium.wpmudev.org/
    WordPress News, https://premium.wpmudev.org/blog/

    Thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.