moved language logic into rootscope