get_languages() and detect_language() now use AJAX endpoints, modified test case for get_languages to suit a more generic profile