guess the extension and set appropriate language string