Support » Plugin: Limit Login Attempts » [Plugin: Limit Login Attempts] Translation not showing: Must-Use Plugins

  • I am experiencing an issue whereby the default (English) text is loaded for a site in Hungarian. The proper translation files are in place.

    Troubleshooting attempts:
    1) Thought the translation file may have worked if moved to /wp-content/languages, so I moved and limit-login-attempts-hu_HU.po to the /wp-content/languages/ directory. This had no effect.
    2) On the outside chance it was a permissions issue, I changed the ownership from nobody:nogroup to www-data:www-data. This, also, had no effect.

    I suspect the fact that this is a “Must-Use” plugin may be the culprit; since the folder is a bit different. (/wp-content/mu-plugins/ vs /wp-content/plugins/).

    Please advise!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The following DIFF shows a fix (for the must-use). This should be wrapped in an if-test to see if the plugin is loaded from plugins or mu-plugins, though. Again, please advise.

    < load_muplugin_textdomain(‘limit-login-attempts’, dirname(plugin_basename(__FILE__)));

    > load_plugin_textdomain(‘limit-login-attempts’, false
    > , dirname(plugin_basename(__FILE__)));
    < <p>dirname(plugin_basename(__FILE__)) Is Currently: <?php echo dirname(plugin_basename(__FILE__)); ?></p>
    < ?>

    > ?>
    \ No newline at end of file

    Change the lines starting at 97 from;

    load_plugin_textdomain('limit-login-attempts', false, dirname(plugin_basename(__FILE__)));

    to be the following;

    /* If in the mu-plugins directory, load_muplugins_textdomain for internationalization. */
    if ( dirname(plugin_dir_path(__FILE__)) == WPMU_PLUGIN_DIR ) {
    	load_muplugin_textdomain('limit-login-attempts', dirname(plugin_basename(__FILE__)));
    /* If in normal plugins directory, load_plugins_textdomain for internationalization. */
    else {
    	load_plugin_textdomain('limit-login-attempts', false, dirname(plugin_basename(__FILE__)));
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Limit Login Attempts] Translation not showing: Must-Use Plugins’ is closed to new replies.