Only generate a locale url if the object has a translation.

I've extracted the shared localisation methods into their own module.
If we start nesting models deeply this behaviour may need to become
more sophisticated in order to detect which object needs to be
localised.