Diophantine approximation generalized