In chapter 385 Lucci states
You learn the name of the fruit when you gain its power
- so why did Luffy not learn the name of the Human-Human Fruit, Model: Nika after eating it?
- or did he mean you name the fruit yourself after learning of its abilities?
They have devil fruits cataloged in a devil fruit book but often times the power/name does not have a picture of the fruit prior to being eaten. So basically once they find out what powers they have they can match it to an existing fruit. The book of devil fruits is how Sanji knew about the Suke Suke no Mi prior to interacting with Absolom.