Yes, that should work as a taxonomy term in Drupal 8 is a fieldable entity. You should be able to use this method without alterations. Maybe apart from not using the condition if(strpos($name,'field')===0
Angebot innerhalb von 24 Stunden
Ob ein großes kommerzielles System, oder eine kleine Business Seite, wir schicken ein Angebot ab innerhalb von 24 Stunden nachdem Sie diese Taste drücken: Angebot anfordern
Yes, that should work as a taxonomy term in Drupal 8 is a fieldable entity. You should be able to use this method without alterations. Maybe apart from not using the condition if (strpos($name, 'field') === 0