Lock transformation in local coordinate system
That's what the Transform Location locks are for, they lock the objects on the Global axis, the fact that you switch the Transformation Orientation from Global to Local won't change it.

If you want to constraint an object on its local axis, use a Limit Location constraint, switch the Convert to Local Space and choose on which axis you want it to be constrained.