0

A module I maintain is introducing the ability to customize some messaging that is output to users on the site. Up until now, that messaging has been hard-coded and output using the TranslatableMarkup class. I'm now allowing these strings to be customized in configuration.

Is it still appropriate to just dump whatever the configured string is into the TranslateMarkup class? It seems like I should not do that.

I found this old core issue that seems to be related to what I'm discussing, but there's no clear conclusion on what to do.

2
  • "I'm now allowing these strings to be customized in configuration." - Module settings or configuration entities? The latter allow translations via the GUI (Configuration translation), if you defined the strings as type 'label' within the schema file(s). Mar 17, 2019 at 15:18
  • @MarioSteinitz Ah, perfect. Yes, thru config entity. Thank you. If you post that as an answer I'll accept it.
    – Brian
    Mar 17, 2019 at 16:54

0

Browse other questions tagged or ask your own question.