Mattermost, Inc.

Filter posts - show translated text based on locale

I’m working on a multilingual channel feature where users of different locales can post messages on the same channel and view the message in their native locale. My first crack at this was using an outgoing webhook to translate the original post, and return the post with all the translations that are currently supported. I’ve attached a picture of this below.

20%20PM

For my next step, I want to filter the post to display the translation in only the language of the user’s locale, along with the original post. I’ve had some difficulties in implementing this particular feature, although I think it should be fairly straight forward. Could anyone point me in the right direction on how this can be accomplished, or make suggestions on how this idea could be better implemented.

Thanks!

1 Like

Why don’t you use a plugin for this instead? perhaps you can use this as an example and starting point https://github.com/mattermost/mattermost-plugin-github