Support » Plugin: Theme and plugin translation for Polylang (TTfP) » esc_html__ translate?

  • Loosie94


    Hi, is it possible to add the function “esc_html__” to the search function? I’m trying to translate Gravity Forms string, but they seem to use the function “esc_html__” for there labels in there plugin.

    This function is not includes in this plugin it seems.
    Is this possible? Or would this give issues?

    Thanks in advance!

    • This topic was modified 11 months ago by Loosie94.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcin Kazmierski


    @loosie94, function “esc_html__” should work with ttfp plugin.

    Please give me some example of code where there is a problem with translation.

    Plugin Author Marcin Kazmierski


    @loosie94 scanner in plugin searches for esc_html__ functions:

                // find wp functions: esc_html_e, esc_html, esc_html__, esc_attr, esc_attr_e, esc_attr__
                preg_match_all("/[\s=\(\.]+(esc_html|esc_attr)[_e]*[\s]*\([\s]*[\'](.*?)[\'][\s]*[,]*[\s]*[\']*(.*?)[\']*[\s]*\)/s", $content, $matches);
                if (!empty($matches[2])) {
                    $strings = array_merge($strings, $matches[2]);

    please confirm the problem with an example 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘esc_html__ translate?’ is closed to new replies.