WordPress.org

Ready to get started?Download WordPress

Forums

Easy Digital Downloads
[resolved] Translations with qTranslate plugin (35 posts)

  1. Ayek
    Member
    Posted 2 years ago #

    Hi
    Translations works on body contents and titles of each EDD entry, but there is an issue with all other EDD places, which (should) get texts from .MO files.
    While added some number of translations, Only one translation from them is available but not default - English.

    http://wordpress.org/extend/plugins/easy-digital-downloads/

  2. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Did you modify the translation file, or are you trying to use one of the ones already available? If so, which language?

  3. Ayek
    Member
    Posted 2 years ago #

    I've just tested this on a completely new WordPress installation (only EDD & qTranslate plugged in).
    My revised conclusions are as follows:

    1. Switching between translations works always in the body and title of each EDD entry, independently of the settings.
    2. Translating dysfunction occurs in all the texts, which should be retrieved from a .MO file.
    3. Adding a language in qTranslate, adequate for the available in EDD resources, does not change anything in retrieving translations (and tried a lot of them).
    4. When I add my newly created .MO files (based on default.po or any other .PO file in EDD /languages/ directory), then works only one language from these newly created. Other languages, even English are not loaded. New custom .MO files don't help.
    5. Point No. 4 is true on condition that it's not Russian. I can't call out this lang at all.
  4. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    I think there is some confusion on how the languages work.

    Are you setting the site wide language, or only setting the language of the content / title of a download (through qTranslate)?

    The included language files will display all text used in the plugin (but not the title or content) in the selected language, but in order for this to happen, you must set the site wide language.

    What did you name your .mo file?

  5. Ayek
    Member
    Posted 2 years ago #

    I use translations in accordance with the principles both of solutions:

    • gettext catalogs (PO/MO files)
    • qTranslate plugin

    All translations are working properly, except EDD gettexts...
    [themes: WP Twenty Ten / Twenty Eleven]

    I have translated several plugins into Polish (my native) using PO/MO files, and I run a big website with qTranslate (on a wide variety of add-ons and other plugins), Russian included :) so, I think, I can use it :)

    Please, would you perform testing with qTranslate yourself?

  6. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    First, I can tell you that EDD is doing all of it's internationalization correctly. I have quite a few users using the plugin in languages other than English. I have also done a test on changing the WordPress language via the wp-config.php file and everything (the entire EDD dashboard) translated just fine.

    I've just tested EDD + qTranslate and am having trouble getting the EDD strings to translate, though I'm not sure why.

    Matt (the other developer) and I are going to look into it and see if we can find why it's not translating through qTranslate.

    If you're able to change your wp-config.php, then follow the directions here: http://codex.wordpress.org/Installing_WordPress_in_Your_Language

  7. Ayek
    Member
    Posted 2 years ago #

    That's right! It's OK until you use only one language, defined in wp-config.php

    EDD does not respect switching of locales.

    So, it's not the fault of qTranslate, just EDD should be prepared for multilingual websites.

  8. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    No, that is incorrect. EDD DOES support switching of locale. I have just tested it and everything works perfectly fine.

    Please read through this thread on the qTranslate forums: http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=4&t=1538

  9. Ayek
    Member
    Posted 2 years ago #

    How many langs to switch between?
    Could you paste a link, please.

  10. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    What do you mean? How many languages do I have to switch between on my site? How many languages does EDD include?

  11. Ayek
    Member
    Posted 2 years ago #

    Yes, how many languages do you have to switch between on your site?

    Maybe I'm drawing too far-reaching conclusions, but what em I to think if every plugin on my website respects locale, but not EDD?

  12. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    4-5. I tested it with several.

    Can you tell me a couple of your other plugins? Also, what language are you trying to show it in?

  13. Ayek
    Member
    Posted 2 years ago #

    I asked the first, please, show me your multilingual website with EDD & qTranslate :)

  14. Ayek
    Member
    Posted 2 years ago #

    My (selected) plugins that support locale:

    • cforms
    • NextGEN Gallery
    • Pie Register
    • WP-Table Reloaded

    If I change wp-config.php, then even Russian is shown correctly, but in EDD places remains as the only! :)

  15. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Is some of the text in EDD translated to Russian correctly, just not all?

  16. Ayek
    Member
    Posted 2 years ago #

    Yes, gettext catalog contains only chosen phrases.
    /if that's what you meant

  17. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Oh, that explains everything. That just means that the Russian translation is incomplete. WordPress will load the translations for any text that has been translated, but if the text does not have a translation, the default (English) will be loaded instead.

  18. Ayek
    Member
    Posted 2 years ago #

    I can recognize what phrases should be translated! :)

    If global WPLANG is set on Russian gettext works, otherwise does not.

    gettext function does not require full catalog, and every empty phrase stays default, right?

  19. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    That'd be great. Just open the appropriate .po file, make the changes (might need to update the catalog from the default.po file). Once you've done that, it'd be awesome if you could submit them to Github as a pull request.

    Correct, gettext does not require a full catalog.

  20. Ayek
    Member
    Posted 2 years ago #

    mordauk, I'm going to finish my Polish (.PO) translation, and I'd be glad to share it widely.

    But the problem still remains...

    You wrote a few posts above:

    I've just tested EDD + qTranslate and am having trouble getting the EDD strings to translate, though I'm not sure why.

    Matt (the other developer) and I are going to look into it and see if we can find why it's not translating through qTranslate.

    Do you keep the investigation?

  21. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    We are going to be working on it, but do not have a solution immediately.

  22. Ayek
    Member
    Posted 2 years ago #

    However, your words bring hope :)

  23. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    We have quite a few higher priority items, so I'd expect at least a week or two for this.

  24. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    We've found the problem and it will be fixed in the next release, which should be available within a few days.

  25. Ayek
    Member
    Posted 2 years ago #

    Resolved! Congratulations! :)

  26. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Excellent :)

  27. Ayek
    Member
    Posted 2 years ago #

    not completely...
    Purchase receipt email (body and subject) - How to apply language-dependent texts?
    Neither <!--ru:--><!--:--> nor [ru:] tags work now.

  28. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    I'm not familiar with with qTranslate to know what those tags do. Are they for detecting the user's language and then showing the appropriately translated text?

  29. Ayek
    Member
    Posted 2 years ago #

    qTranslate tags >> language fields or any other locale-dependent code

  30. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Try adding this to your functions.php (or custom plugin):

    pw_edd_add_content_filter_to_email($email) {
    	return apply_filters('the_content', $email);
    }
    add_filter('edd_purchase_receipt', 'pw_edd_add_content_filter_to_email', 100);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic