Translatable::disable_locale_filter
Disables automatic locale filtering in {@link augmentSQL()}. This can be re-enabled using {@link enable_locale_filter()}.
Note that all places that disable the locale filter should generally re-enable it before returning from that block of code (function, etc). This is made easier by using the following pattern: <code> $enabled = Translatable::disable_locale_filter(); // do some work here Translatable::enable_locale_filter($enabled); return $whateverYouNeedTO; </code> By using this pattern, the call to enable the filter will not re-enable it if it was not enabled initially. That will keep code that called your function from breaking if it had already disabled the locale filter since it will not expect calling your function to change the global state by re-enabling the filter.
Signature
public function disable_locale_filter()
Returns
- boolean
- true if the locale filter was enabled, false if it was not