wireLangEntityEncode() function

Set entity encoding state for language translation function calls

The function affects behavior of future __(), _x() and _n() calls.

The following can be used for the $value argument:

  • true (bool): Entity encoding ON
  • false (bool): Entity encoding OFF
  • 1 (int): Entity encode only if not already
  • null (null): Entity encoding undefined

To get current entity encoding state, call this function with no arguments.

Available since version 3.0.154. Versions 3.0.125 to 3.0.153 can use __(true, 'entityEncode', $value);


// basic usage
$bool = wireLangEntityEncode();

// usage with all arguments
$bool = wireLangEntityEncode($value = '');


value (optional)bool, int, string, null

Return value

bool int string null

Functions methods and properties

API reference based on ProcessWire core version 3.0.200

Twitter updates

  • Stumbling upon a really nice ProcessWire-powered website, plus core updates including API improvements for ProcessWire forms— More
    9 September 2022
  • Useful new dot-and-bracket syntax options added for page.get() method— More
    2 September 2022
  • This week, in addition to the regular core updates, we have new versions of ProcessWire ProFields Table and ProFields Combo that add support for their own file and image types— More
    19 August 2022

Latest news

  • ProcessWire Weekly #437
    In the 437th issue of ProcessWire Weekly we're going to check out the latest core updates, forum highlights and online resources, and more. Read on!
    Weekly.pw / 24 September 2022
  • Multi-language field translation export/import
    In this post we cover the details of a new module that enables export and import capabilities for multi-language fields in ProcessWire.
    Blog / 5 August 2022
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer