• I have a custom plugin running on a site using qtranslate-x. I’m passing all display strings through the WP translation function __() and those strings are using the language tags like this: [:en].

    On the frontend it’s no problem, everything is translated, but in the admin, the strings are untranslated. This was working when I was using the original qtranslate, but qtranslate-x doesn’t translate those strings in the admin.

    What do I need to do differently to get qtranslate-x to translate those strings in the admin?

    https://www.ads-software.com/plugins/qtranslate-x/

Viewing 5 replies - 31 through 35 (of 35 total)
  • Plugin Author John Clause

    (@johnclause)

    @ariakan: plugin “Types” should now work better since 3.4, the latest. Could you confirm?

    Just a delayed feedback…
    So, the new Integration options (classes and json conf) worked great for me on simpler projects. I still have issues setting them up to work with my shopping cart. One problem is for example when sending a shipping confirmation email. This happens on the admin side, since it’s triggered by the store manager, but since it’s generated on the server (rather than the browser) it’s not possible to use language buttons. Similar when generating an invoice, which in my case is set up in a way that language buttons are not an option. Anyway, I am just moving the gettext filter from the frontend file to the qtranslatex-core file after every update, so I can keep using __() in the admin for the time being. In the future, I will probably rework those parts of the shopping cart, so that they can be used with language buttons (rather than depend on the current language of the backend,as they do now).

    Hello
    I have found Great solution to enable Translating with _e() AND __() in admin area using Qtranslate X
    add this code to one of your plugins pages, or just small new plugin for this function if you donot have one
    /*================ QTRANS X ADMIN FILTERS TO ENABLE __ && _E=========*/
    function myqtranxf_add_admin_filters(){
    if(is_admin()){
    // Hooks (execution time critical filters)
    add_filter(‘gettext’, ‘qtranxf_gettext’,0);
    add_filter(‘gettext_with_context’, ‘qtranxf_gettext_with_context’,0);
    add_filter(‘ngettext’, ‘qtranxf_ngettext’,0);
    }
    }
    myqtranxf_add_admin_filters();

    it worked with me well, i hope you too

    This is pretty much what I’m doing so far as well, but is definitely not the most elegant solution ??

Viewing 5 replies - 31 through 35 (of 35 total)
  • The topic ‘plugin strings in admin not translated’ is closed to new replies.