A.
anwered by: canteau
Rohloff Speedhubs are compatible with e-bikes.
Unless the bike uses certain models of the Bosch mid drive motor, you may not be able to use the Rohloff e14 shifter, but the standard shifter will work.
Like a standard bike, You will need to set the gearing up to match your wheel size, Rohloff has a chart here:
https://www.rohloff.de/fileadmin/user_upload/Entfaltungstabelle_Speedhub_Solofahrer_13_14_15_16_17_18_19_21_Primaer_1_9_de_en_fr.pdf