Limit Login Attempts
Translation not showing: Must-Use Plugins (4 posts)

  1. topherhota
    Posted 3 years ago #

    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 limit-login-attempts-hu_HU.mo 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!


  2. topherhota
    Posted 3 years ago #

  3. topherhota
    Posted 3 years ago #

    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

  4. CliffAscent
    Posted 3 years ago #

    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__)));

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Limit Login Attempts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic