When trying to run the /enchant command on an unsupported item, the output message is commands.enchant.failed.incompatible. It mentions the item ID of the item held in hand and says "%s cannot support that enchantment". When running the same on a server, the item ID is not translated, it's displayed in the original EN/US version.
Forward resolving to MC-170355