Using translatable strings in custom code component

Hi there,

what is the best approach to pass some (1) simple string or (2) rich content to a custom component using prop metadata with option to translate it?