The -lang argument gets captured by pywikibot before it reaches erfgoedbot. As a result we have had to rely on the lang = pywikibot.Site().language() hack.
We have attempted to address this before (patch, revert) but the above mentioned pywikibot capture mechanism meant this approach failed.
A fairly easy solution would be to rename -lang to -langcode then largely reuse the patch above. This change would however also require that we update all of the shell scripts, documentation, usage prompts, and readmes. We would also have to look over any cron jobs and the docker settings to make sure these are not affected.
The main benefit is that we become freed from pywikibot assumptions about which site we are working on (when harvesting we make an explicit connection) making e.g. testing less sensitive to the presence of a user-config and to changes in pywikibots default config.