  [Abridged] We present a new approach to investigate the content and spatial
distribution of dust in structurally unresolved star-forming galaxies from the
observed dependence of integrated spectral properties on galaxy inclination. We
develop an innovative combination of generic models of radiative transfer (RT)
in dusty media with a prescription for the spectral evolution of galaxies, via
the association of different geometric components of galaxies with stars in
different age ranges. We show that a wide range of RT models all predict a
quasi-universal relation between slope of the attenuation curve at any
wavelength and V-band attenuation optical depth in the diffuse interstellar
medium (ISM), at all galaxy inclinations. This relation predicts steeper
(shallower) dust attenuation curves than both the Calzetti and MW curves at
small (large) attenuation optical depths, which implies that geometry and
orientation effects have a stronger influence on the shape of the attenuation
curve than changes in the optical properties of dust grains. We use our
combined RT and spectral evolution model to interpret the observed dependence
of the H\alpha/H\beta\ ratio and ugrizYJH attenuation curve on inclination in a
sample of ~23 000 nearby star-forming galaxies. From a Bayesian MCMC fit, we
measure the central face-on B-band optical depth of this sample to be
tau_B\perp~1.8\pm0.2. We also quantify the enhanced optical depth towards newly
formed stars in their birth clouds, finding this to be significantly larger in
galaxies with bulges than in disc-dominated galaxies, while tau_B\perp is
roughly similar in both cases. Finally, we show that neglecting the effect of
geometry and orientation on attenuation can severely bias the interpretation of
galaxy spectral energy distributions, as the impact on broadband colours can
reach up to 0.3-0.4 mag at optical wavelengths and 0.1 mag at near-infrared
ones.
