Swapping out all references to $lang for gettext calls.

Comprehensive changes to all code files, including the pot, po and mo files
in /languages.
Minor fixes - swapping quotes for double quotes to prevent spurious
variable substitution
Minor fixes.