Refactoring the language handling in the application. PENDING: implement subdomain and query string libraries