  We discuss a particular lattice discretization of abelian gauge theories in
arbitrary dimensions. The construction is based on gauging the center symmetry
of a non-compact abelian gauge theory, which results in a Villain type action.
We show that this construction has several benefits over the conventional
$U(1)$ lattice gauge theory construction, such as electric-magnetic duality,
natural coupling of the theory to magnetically charged matter in four
dimensions, complete control over the monopoles and their charges in three
dimensions and a natural $\theta$-term in two dimensions. Moreover we show that
for bosonic matter our formulation can be mapped to a worldline/worldsheet
representation where the complex action problem is solved. We illustrate our
construction by explicit dualizations of the $CP(N\!-\!1)$ and the gauge Higgs
model in $2d$ with a $\theta$ term, as well as the gauge Higgs model in $3d$
with constrained monopole charges. These models are of importance in low
dimensional anti-ferromagnets. Further we perform a natural construction of the
$\theta$-term in four dimensional gauge theories, and demonstrate the Witten
effect which endows magnetic matter with a fractional electric charge. We
extend this discussion to $PSU(N)=SU(N)/\mathbb Z_N$ non-abelian gauge theories
and the construction of discrete $\theta$-terms on a cubic lattice.
