Return -1 from as_app_get_language() if the language is not found

Also clarify what '0' means in a few places.