We develop an algebraic framework for studying translation surfaces. We
study the Sah--Arnoux--Fathi-invariant and the collection of directions in
which it vanishes. We show that these directions are described by a number
field which we call the periodic direction field. We study the
$J$-invariant of a translation surface, introduced by Kenyon and Smillie
and used by Calta. We relate the $J$-invariant to the periodic direction
field. For every number field $K\subset\ \mathbb R$ we show that there is a
translation surface for which the periodic direction field is $K$. We study
automorphism groups associated to a translation surface and relate them to
the $J$-invariant. We relate the existence of decompositions of translation
surfaces into squares with the total reality of the periodic direction
field.