Bug 1024887 - Move language related code to a separate module r=eragon

https://bugzilla.mozilla.org/show_bug.cgi?id=1024887