Formatting text differently depending on the language

Hi there. I was volunteering to translate a mental health app into Chinese at some point and the i18n library the app used was a 1:1 mapping that separated some English words out to be bold. The problem was that the emphases were in the wrong spots for Chinese - the bold text needed to be elsewhere. Does Fluent handle cases like these? If I recall correctly, I think it did years ago, but I don’t know if the feature was removed.

Yes, text-level elements are valid in Fluent messages: https://github.com/projectfluent/fluent.js/wiki/DOM-Overlays#text-level-elements

This gives translators full control over word order and which text gets wrapped by the strong tags.

1 Like