Skip to content

Commit 1b8f4e2

Browse files
committed
Add per room spell check language MSC
1 parent c8b9fe5 commit 1b8f4e2

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# MSC3225: Per Room Spellcheck Language
2+
3+
It is common for people on the Internet to talk in more than one language. English will probably be
4+
the most used one, but for many it is not their mother tongue and they will use the latter as well.
5+
6+
Clients can offer spell checking functionality, but in order to provide helpful suggestions they need
7+
to know which language the user is currently writing in. When spell checking is available, the language
8+
can usually be selected e.g. via the right click menu, but it becomes tedious when one switches back and
9+
forth between two or more of them.
10+
11+
This proposal aims at providing users with a way to set a language per room, so that switching between
12+
conversations held in different languages automatically switches to the appropriate dictionary.
13+
14+
15+
## Proposal
16+
17+
Clients offering spell checking should default their dictionary to the system language. They should offer
18+
a way to change it and when the user sets a specific language, then they should store the language code
19+
as `m.input_language` account data for the room where it was set. Language codes must be
20+
[RFC3066](https://datatracker.ietf.org/doc/html/rfc3066) compliant.
21+
22+
23+
## Alternatives
24+
25+
The language could be defined as a room property: a room administrator could set it once and then every
26+
member would get it for free. However, not everyone in a given room necessarily talks in the same language
27+
(or even language variant, e.g. en_US vs en_GB) and there would need to be a way for users to override the
28+
room property. This MSC could be used as a mechanism to do said override, if such a room property were ever
29+
defined. Adding a room property requires more work and thought, and can be done in another MSC. It is thus
30+
considered out of scope for this one.
31+
32+
The feature can also work without actually adding it to the Matrix specification. There is indeed already
33+
one existing implementation (see [Unstable prefix](#unstable-prefix) below). Standardising the account data
34+
type though has the benefit that it is not client specific anymore, and the setting can be more easily reused
35+
by any number of clients.
36+
37+
38+
## Unstable prefix
39+
40+
Fractal already successfully offers this proposed feature. It stores the language code under the
41+
`org.gnome.fractal.language` account data type. This was released on the stable channel as part of
42+
Fractal 4.4 on August 7th 2020.

0 commit comments

Comments
 (0)