Back to blog
Six languages, and yours everywhere in LIA
Technical4 min read

Six languages, and yours everywhere in LIA

The problem

A personal assistant speaks to you in many places: in the chat, on a card asking you to confirm sending an email, in the message that verifies your address, in a notification, on the radio. All it takes is one sentence left in English in the middle of a screen in Italian for everything else to seem less reliable.

And a language isn't just words. In French, you put a space before a colon; in Chinese, punctuation has its own width. When you look for a setting, you use your own words, not the screen's.

What I wanted

I wanted LIA to be complete in six languages: French, English, German, Spanish, Italian and Simplified Chinese. Complete means that every text exists in all six, and that the language used is always yours, including when LIA writes to you without you having asked for anything.

How it works

For the interface, LIA first looks at the page's address, then at the language you chose, saved in your profile, then at your browser's language on your first visit, and failing all that, French. The assistant's answers follow your interface's language. When LIA asks you for a confirmation, it also understands your answer in your language: “yes”, “no” or “send it to Marie instead”.

Outside the chat, the rule is the same. A verification email, a notification or a scheduled message goes out in your account's declared language. When no language is specified, LIA uses the one declared where you became known, your browser or your account. No language is hard-coded as a default value in the middle of the code.

  • Every text in all six languages. An automatic check verifies that no text is missing in any language, on screen as well as in the messages the server sends. A forgotten key blocks the change before it gets into the code.
  • Punctuation follows the reader. Between a label and its value, LIA uses your language's punctuation: a non-breaking space before the colon in French, a full-width colon in Chinese.
  • Search with your own words. Each settings section carries, on top of its translated title, a list of synonyms written language by language. Accents and capitals are ignored: “theme” finds “Thème”. Chinese, which doesn't separate its words with spaces, is searched as a sequence of characters.
  • A single version of the instructions. The instructions the model reads are written in technical English, once, with the explicit order to answer you in your language. So there aren't six versions of the same instruction to keep in line.

Voice and the rest

When you dictate, your voice is transcribed by default on your server, by Whisper, in your account's language. The personal radio reads the news it picks up in your language, and an article you open is translated at that moment, only once. In the shared world, a message written to someone who speaks another language is only translated if you accept: translation has a cost, which is shown to you, and the original stays available.

The limits

  • The interface exists in these six languages only. If you write to LIA in another language, it will answer you in your interface's language.
  • The wake word “Dis LIA” only exists in French for now. In the other languages, you tap the badge to speak.
  • A few texts meant for the model are still written in French, or translated into all six languages when they could exist in English only. I'd rather measure the effect of such a change before bringing them into line.

Read more: Talking to LIA when typing is a pain; LIA's instructions, written and reviewed like code.

#i18n#multilingual#localization#6-languages