Made detection more robust added options for default language and region