Using the Fourier expansion method in the low-frequency limit we develop an effective-medium theory for two-dimensional (2D) periodic composites. We give a rigorous proof that, in this limit, a periodic medium behaves like a homogeneous one and we derive compact analytical formulas for the effective dielectric constants of a 2D photonic crystal, i.e., a periodic arrangement of infinite cylinders. These formulas are very general, namely the Bravais lattice, the cross-sectional form of cylinders, their filling fractions, and the dielectric constants are all arbitrary. So is the direction of propagation of the Bloch wave---out of plane in general, with special attention paid to the limiting cases of propagation in the plane of periodicity and parallel to the cylinders. In the latter case we report a behavior that is qualitatively different from that encountered in natural crystals and in 3D photonic crystals. Namely, for propagation along the cylinder axes, the wave fronts are not plane but rippled, with the distribution of the ripples following the pattern of the 2D Bravais lattice. We also demonstrate that the other long-wavelength optical properties can be described by means of the index ellipsoid. This allows us to apply the classification used in the optics of natural crystals (``crystal optics'') to photonic crystals. Namely, we characterize the photonic crystal entirely in terms of its three ``principal'' dielectric constants. One of these is associated with the direction parallel to the cylinders, and is given simply by the spatially averaged dielectric constant. For the two in-plane principal dielectric constants we derive three representations that are equivalent in principle, however, give rise to different rates of numerical convergence, depending on whether the dielectric constant or its reciprocal have been expanded in a Fourier series (respectively, $``\ensuremath{\varepsilon}$ representation'' and ``\ensuremath{\eta} representation''). Numerical results are given for a uniaxial (biaxial) photonic crystal with square (rectangular) lattice and circular cylinders. We conclude that for dielectric cylinders in air the \ensuremath{\eta} representation leads to much better convergence than the $\ensuremath{\varepsilon}$ representation. The opposite holds for air cylinders in a dielectric. The accuracy is checked by applying Keller's theorems to conjugate structures.