How to perform bilingual spell checking at the same time

I am writing a bilingual Chinese-English document and encountered a problem.

If I set the spell check to Chinese, then it cannot check English words, as shown below.

#set text(lang:"ch")

asdfasdfasdf

However, if I set the language to English, then all Chinese characters will be considered spelling errors.

#set text(lang:"en")

这是一段没有问题的文字。

This is a piece of text without *ANY* problems.

Is there a solution? If not, can it be implemented in the near future?

You should open an issue about this: https://github.com/typst/webapp-issues/issues/new?template=feature.yml.

So that means the Typst app doesn’t have bilingual checking.

It seems that using a VPN to log in to GitHub is necessary :frowning: .

I didn’t really have any issues, but there is an article about this: Censorship of GitHub - Wikipedia.

For a document mixed with Chinese and English, adding a function to all the English parts is tedious and annoying.

Fortunately, because Chinese is very different from English, I can write like this.

#set text(lang:"en") 
#show regex("[一-龥]"): set text(lang: "ch")

What I want to say is that writing it this way will not have any effect, including writing it like this.

#set text(lang:"en") 
#show regex("[一-龥]"): it => text(lang: "ch")[#it]

I think the right language code for chinese is zh by the way, even if that’s not important for the main issue here.

2 Likes

As also mentioned in the GitHub issue, this only happens to not work in combination with regex show rules. In principle, spellcheck respects your text language set rules (as long as the text ends up in the document).

1 Like

For future reference, this is the issue.