Added new patch for D7.22, patching locale() instead of t().
Need to check for function exists each time, because of potential early invokation.