Efficient and frictionless communication has always been an important concern for our company, Quera. In the past, we have had problems using various communication tools. But after finding Mattermost, we knew it was a perfect fit. Now, we use it extensively as our main team collaboration tool.
What led us to Mattermost?
Our team communicates in Persian, which is an RTL (right-to-left) language, so we needed RTL support. After a bit of research, we discovered that Mattermost has a great and powerful plugin ecosystem. We decided to write a plugin to add RTL support and share it with other people speaking RTL languages.
The result is published as an open source project on GitHub called Mattermost RTL.
RTL text needs to be displayed in a correct manner to be readable. It should be aligned from right to left. The more important problem, however, occurs when RTL text is mixed with LTR (left-to-right) text.
Without RTL support, if you write some English words within an RTL sentence, words appear in an unnatural order, making it very hard to read the sentence.
Here’s an example in Persian that demonstrates the problem:
We wanted to keep the plugin simple and minimal. There was no need to change the Mattermost layout (e.g., the sidebar or menus). Making the entire layout RTL is complicated, and not very necessary. The plugin fixes the problems described above in a message display box and message input box.
There are a few methods to fix text direction in an HTML element:
directionCSS attribute or
dirHTML attribute on that element to
ltrbased on the detected direction.
- Set the element’s
dirHTML attribute to
unicode-bidiCSS attribute to
We used the
unicode-bidi method, but soon found out, while this works perfectly for message display boxes, it has problems in the message input box. This made the second method, changing the HTML element
auto for input boxes specifically, the best option.
An example conversation after enabling the plugin:
Installation and Usage
Installation is easy and straightforward.
- Download the plugin file (ir.quera.mattermost-rtl-*.tar.gz) from the Releases page
- Upload to your Mattermost server via the System Console.
- Enable the plugin.
Currently, the plugin has no configuration options and starts working immediately after installation.
We’d love to hear from you
If you’re interested, check out our other plugin which makes RTL text on Mattermost even more readable by applying some UI tweaks.
Quera is a developer community that organizes programming-related events and provides products specially designed for developers and companies seeking talented developers. Its most important products are Quera College, which offers interactive and practice-based online programming courses, and Quera Careers, which tries to connect developers to their matching IT companies, and help companies by evaluating developers’ skills by online technical tests.