Characterizations of periods of multidimensional shifts