We consider the general problem when local regularity implies the global one in the setting where local regularity means the existence of a square of certain length in every position of an infinite word. The square can occur as centered or to the left or to the right from each position. In each case there are three variants of the problem depending on whether the square is that of words, that of abelian words or, as an in between case, that of so called
-abelian words. The above nine variants of the problem are completely solved, and some open problems are addressed in the
-abelian case. Finally, an amazing unavoidability result for 2-abelian squares is obtained.