CannaTinker runs in two languages:

  • English is the default for everyone;
  • Polish is a complete second translation, given to accounts invited in Polish.

Both are kept in step by the type system and by tests, not by memory.

Who sees which language

WhoInterfaceConversations
Visitors and signed-out readersEnglish—
Accounts invited in EnglishEnglish, no switchEnglish
Accounts invited in PolishPolish, for good, no switchPolish
The site's administratorEnglish or Polish, with a switchEnglish, Polish or automatic
  • The public site is English. There is no language switch for visitors, and the 18+ window is always in English.
  • The one exception is sign-up. A Polish invite opens a Polish sign-up page, and its 18+ statements are in Polish too.
  • The language is fixed at sign-up. It is stored with the account and cannot be switched afterwards.

The interface language is remembered in a cookie that is tied to the session. An old cookie, a signed-out browser or a different session all read as English. The server sets this cookie itself: at sign-up, at sign-in and at sign-out. Nobody can get the Polish interface by editing a cookie.

Conversation language

Replies follow the account's language. For the administrator there is also an automatic setting: the reply comes in the language of the question, and Polish wins a tie.

The instructions the AI models read are written in English, because that is what the models handle best. A separate rule tells the model which language to answer in. The planner and the web scout follow the same rule.

The built-in rules that answer when no AI is available exist in both languages. The English set also recognises Polish keywords.

Interface text

Every label, button and message comes from two dictionaries, one per language. The Polish dictionary defines the shape. The English one must match it key for key, or the code does not compile, so a missing translation cannot reach the site.

Text is never written directly into components. A new interface string goes into both dictionaries in the same change.

Content in two languages

Everything a grower reads has an English and a Polish version:

ContentHow the two versions are kept together
The 7-stage grow guidetwo parallel data files
The rules answerstwo parallel rule sets
Evidence cardsone folder per card, with en and pl files
Articlesone folder per article, with en and pl files; a missing translation falls back with a note
The legal centrethe Polish files keep the English ids, slugs, sources and structure, and the tests check it
The scanner's labels and verdictsparallel tables, checked by tests
The home pageeach text field holds an English and an optional Polish value, and an empty Polish field shows the English
The handbookEnglish and Polish pages under the same table of contents

The two exceptions are both deliberate:

  • these technical docs are English only, like the code they describe;
  • the encyclopedia is being written in English first, and its storage already has room for Polish.

Searching in two languages

The ⌘K search index is built for the reader's language, and it runs in the browser. Matching ignores Polish diacritics, so "wilgotnosc" finds "wilgotność". The shop scanner translates Polish gear words into English before it asks the shops, because the shops' catalogues are in English.

Adding a language

The code is ready for more languages, but adding one is real work:

  • a new entry in the list of locales;
  • a full dictionary;
  • translations of the content listed above.

The compiler points out every missing dictionary key. A content checklist names each file with parallel text.

Related: Articles, legal centre and encyclopedia, Accounts and privacy.