I have many complex structured html + text in my Rails application and don’t know how to translate these in a maintainable way. Whats the best way to approach this.
Consider this haml html block:
%h3.grey
You can set your profile so that:
%h4
%ol
%li
Some line blabla
%li
Other users cannot find you
%li
Your profile appears as if it's deleted
.clear
Or
.clear
%br
- I dont want to use language partials it would clutter up and is terrible on partial change
- rather not use 1 string translations to translate the above block
What would be a easy, maintainable way to translate the above? Any thoughts suggestions welcome would love to hear how others have tackled this, thx !
You can use translation of the whole block with included html tags – in this case you have to add “_html” suffix to translation variable. Don’t sure it works with haml.
But for me the best way is to use translations for each string.