Quotes Collection
[Bug] "Next quote" never translated (4 posts)

  1. nemo.vrusso
    Posted 5 years ago #

    Hello, there is a tiny bug regarding the translation of particular string: "Next quote".

    Since you have

    $quotescollection_next_quote = __('Next quote', 'quotes-collection').' »';

    at the very top of your plugin, you call the __ function before the init hook is actually invoked. Therefore, at that point the dictionaries haven't been loaded yet, and the string "Next quote" doesn't get translated.

    To fix it, I changed the line above to a simple

    $quotescollection_next_quote = NULL;

    Then I added this

    global $quotescollection_next_quote;
    $quotescollection_next_quote = __('Next quote', 'quotes-collection').' »';

    right after

    load_plugin_textdomain('quotes-collection', 'wp-content/plugins/quotes-collection/languages/');

    I should have probably filed a bug somewhere and proposed a decent patch, but I am in kinda rush :)



  2. Lucker
    Posted 5 years ago #

    I did a bit easier: just replaced "Next quote" in the quotes collection.php to the local language text and switched encoding in the file to UTF-8. That's it! Just replace file on the host.


  3. S.K
    Posted 5 years ago #


    Should it not be saves as "UTF-8 without BOM"?


    Is there any other way of achieving it?



  4. Srini G
    Plugin Author

    Posted 5 years ago #

    This is fixed in v1.4.3. Here's the changes if anybody is interested.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Quotes Collection
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic