LinguaCafe is a free self-hosted software that helps language learners acquire vocabulary by reading. It provides a set of tools to read, look up unknown words and review them later as effortlessly as possible.
You can read about all the features of LinguaCafe on the overview GitHub Page, and on the user manual GitHub Wiki page.
Supported languages: Chinese, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Italian, Japanese, Korean, Latin, Macedonian, Norwegian, Polish, Portuguese, Romanian, Russian, Slovenian, Spanish, Swedish, Thai, Turkish, Ukrainian, Welsh.
You can find a detailed list about what level of support different languages have on the GitHub Wiki page.
- x64, which includes most desktop computers made in the last decade.
- Mac users with Apple silicon must perform an additional step, see the 'Installation' section for details
Other Armv8 devices such as Raspberry Pis 3 and newer do not work at the moment.
LinguaCafe uses RAM based on how many and which languages do you use. If you use every language, the RAM usage can be over 2GB.
The installation process may seem a bit strange to some people. It is just a simple docker compose file, except that the git pull command pulls some empty folder structure, and some default files. You might understand it better, if you take a look at the deploy
branch.
Step 1: Install docker desktop and git.
Step 2: Run the following commands from the location where you want to store your files:
git clone -b deploy https://github.com/simjanos-dev/LinguaCafe.git linguacafe && cd linguacafe
If you want to change the default MySQL database and user, you can create a .env
file and add these lines to it before starting your servers for the first time:
DB_DATABASE="linguacafe"
DB_USERNAME="linguacafe"
DB_PASSWORD="linguacafe"
MacOs users with Apple silicon must also create a .env
file, and add the following line:
PLATFORM="linux/amd64"
Run the remaining commands:
chmod -R 777 ./ && docker compose up -d
Windows install commands are the same, except it does not need permission changes:
git clone -b deploy https://github.com/simjanos-dev/LinguaCafe.git linguacafe
cd linguacafe
docker compose up -d
Alternatively, for Windows, you can download this installation script and run it instead of running the commands yourself. Since this is a .bat file, Windows defender will warn you about it being potentially a malware.
Your server now should be running and accessible on http://localhost:9191.
Step 3: Follow the instructions on this page in the Importing dictionaries
section below to import dictionaries that you want to use.
Always check this section and the update's release notes before updating, any important changes will be here.
Please backup linguacafe before updating, otherwise you can lose your data if anything goes wrong. You can read more about backups in the user manual
If you are below v0.5.2, please use the migration guide provided here instead of this command.
If you are a Mac user with Apple silicon, and you had to uncomment a line in the docker-compose.yml
file before, please follow these instructions before you update:
Step 1: Comment the the line again at the end of the docker-compose.yml
file :
volumes:
- ./storage:/var/www/html/storage
networks:
- linguacafe
# platform: linux/amd64
Step 2: Create a .env
file in the linguacafe, and add the this line to it:
PLATFORM="linux/amd64"
This change will will simplify the update process, and prevent any possible conflict errors with the git pull command in the future.
git pull && docker compose pull && docker compose up -d --force-recreate
On Windows, you can run again the installation script to update to the latest version, or run the commands separately:
git pull
docker compose pull
docker compose up -d --force-recreate
Step 1: Download the dictionaries that you want to use from the provided links below.
Step 2: Copy the dictionary files to your linguacafe/storage/app/dictionaries
folder.
Step 3: Go to the Admin -> Dictionaries page in LinguaCafe. Click on the Import dictionary
button.
Step 4: This dialog will list all your importable dictionaries that are found in your dictionaries
folder. Click on the import
button for the dictionary that you want to import.
After the import process is finished, your dictionary should be working.
Languages: Japanese
Download: GitHub release
All these 4 files are required to import JMDict:
- jmdict_processed.txt
- kanjidic2.xml
- radical-strokes.txt
- radicals.txt
This dictionary contains kanji and radicals for the Japanese language. Some Japanese features do not work without importing this dictionary.
Languages: Chinese
Download: GitHub release
Languages: Chinese
Download: GitHub release
Languages: Korean
Download: GitHub release
Languages: Welsh
Download: GitHub release
Languages: Chinese, Czech, Finnish, French, German, Greek, Italian, Japanese, Korean, Latin, Norwegian, Russian, Spanish, Ukrainian, Welsh
Download: GitHub release
Languages: Czech, Dutch, English, Finnish, French, German, Greek, Italian, Norwegian, Russian, Spanish, Swedish
Download: dict.cc
This dictionary's license only allow personal use.
You can also import a custom dictionary file in the form of a .csv file.
DeepL is a machine translation service that let's you translate up to 500.000 characters/month for free and is supported by LinguaCafe. You can set your DeepL Translate API key in the admin API settings.
You must enable DeepL translate for each language on the Admin -> Dictionaries page.
You can use the network configuration from this example to connect Jellyfin's network with LinguaCafe. There are probably multiple ways to do it, the only requirement is that linguacafe-webserver should be able to reach Jellyfin's server to make API requests.
version: '3.5'
networks:
linguacafe_linguacafe:
external: true
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
user: 1000:1000
volumes:
- /path/to/config:/config
- /path/to/cache:/cache
- /path/to/media:/media:ro
restart: 'unless-stopped'
ports:
- 8096:8096
networks:
- linguacafe_linguacafe
You must name your subtitle files in a way that Jellyfin will recognize as languages. These worked for me:
Series Name - S01E01.ja.ass
Series Name - S01E01.de.ass
Movie name.es.ass
Language codes for subtitle filenames that Jellyfin recognizes: Chinese: zh
, Czech: cs
, Dutch: nl
, English: en
, Finnish: fi
, French: fr
, German: de
, Greek: el
, Italian: it
, Japanese: ja
, Korean: ko
, Latin: la
, Norwegian: no
, Russian: ru
, Spanish: es
, Swedish: sv
, Ukrainian: uk
, Welsh: cy
unsupported language code: spa
: This means that Jellyfin recognized the language of the subtitle, but it is not supported by LinguaCafe yet. If you find one of these, please open a GitHub Issue, this should be fixed.
unsupported language code: unrecognized by jellyfin: japaaaneseee
: This means that Jellyfin did not recognize japaaaneseee
as a language, and it can only be fixed by renaming the file following Jellyfin's naming conventions.
If you have file naming issues and renamed a file, make sure you refresh metadata in Jellyfin before reloading LinguaCafe.
Step 1: Create an API key in Jellyfin. You can do this on the Dashboard -> API Keys menu.
Step 2: Set the created API key in LinguaCafe on to the Admin->API menu.
Step 3: Set the Jellyfin host in LinguaCafe on to the Admin->API menu. If you used the pre-written configs, it should be the default http://jellyfin:8096.
Step 4: Save the settings.
Now you can import subtitles from Jellyfin.
Anki is supported, if your server and Anki run on the same PC (this will not be a requirement in the future) and have AnkiConnect plugin installed.
LinguaCafe is still in active development. There are missing features, and you might encounter some bugs while using the software. Please test it before you start actively using it, and make sure it is up to your expectations.
At this time only one user/server is supported.
Discord user: linguacafe_47757
Reddit user: /u/linguacafe
Subreddit: /r/linguacafe
LinguaCafe uses many public resources. I am very thankful for these projects and for all the people who were working on them. They helped me greatly to create LinguaCafe.
Spacy tokenizer
License: MIT license
Pykakasi
License: License: GNU General Public License 3
Pinyin
License: MIT license
Newspaper3k
License: MIT, Apache-2.0
EbookLib
License: GNU Affero General Public License v3.0
JMDict dictionary file
License: Creative Commons Attribution-ShareAlike 4.0 International
KANJIDIC2 kanji file
License: Creative Commons Attribution-ShareAlike 4.0 International
CC-CEDICT dictionary file
License: Creative Commons Attribution-Share Alike 3.0 License
CC-CEDICT website CC-CEDICT license
HanDeDict dictionary file
License: Creative Commons Attribution-ShareAlike 2.0 Germany License
HanDeDict website HanDeDict license
Kengdic dictionary file
License: GNU Library General Public License, version 2.0
Kengdic github Kengdic license
Eurfa dictionary file
License: The GNU General Public License 3
Eurfa download website Eurfa bitbucket Eurfa creator's website Eurfa license
Wiktionary
License: Creative Commons Attribution-ShareAlike 3.0 Unported License
The specific wiktionary files that LinguaCafe uses have been downloaded from this GitHub repository.
Dict.cc
LinguaCafe has no dict.cc dictionaries packaged in the software. It only provides a link to the dict.cc website.
RADKFILE/KRADFILE
License: Creative Commons Attribution-ShareAlike 4.0 International
DMAK kanji drawing library
License: MIT license
KanjiVG License: Creative Commons Attribution-ShareAlike 3.0 Unported