factored out locale-query so that i18n fork is no longer needed