What do you mean with "How to translate custom datatye class attribute?"
Are you talking about the default string for the datatype?
If so it is not supported out of the box, datatypes will need to use serialized_data_text ( see also helper attributes: data_text_i18n & data_text_i18n_list ) I think this was added in 4.4.