Separate language generation from outputPage

Helps with readability - outputPage function is extremely long
Also helps with extensions of SkinTemplate that override outputPage
(for example skin in MobileFrontend)

See related change id: I04b625c8d76bb6a061e3201847bf97185c6b7a29

Change-Id: I4a49e704f6fe72c74ecb9103fb081aed93a86de7