• itPro

    (@ai1dro0knotbot)


    Hi,
    I’m bulding ajax theme and ran into small issue:
    I send JS request, intercept it with action hook on backend side, generate html content to send, but when I translate it, it comes in default language.
    How can I force translation to my current language?

    add_action('jx_x25dataflow', function($jx) {
    $page = get_page($pageID);
    $ret = __($page->post_content);
    });

    https://ww.wp.xz.cn/plugins/qtranslate-x/

The topic ‘Forced language in functions.php’ is closed to new replies.