When I started building it for Japanese, I knew a little (half-forgotten hiragana and katakana, also many kanji because I speak Mandarin), but most of the language-specific features come from existing tools I've just glued together.

I have two main sources of example sentences: 52114 from Tatoeba https://tatoeba.org , most of which have translations, and 114591 extracted from public-domain ebooks from Aozora Bunko https://www.aozora.gr.jp/ , some of which use rather archaic language.

I process each sentence using Kuromoji https://github.com/atilika/kuromoji to segment it into individual words and get details like part-of-speech tags, dictionary forms (lemmas) and pronunciation for each one. Then I add them to a SQLite database.

Some sentences on Tatoeba have audio recordings contributed by native speakers, but there aren't so many for Japanese, so I also use Open JTalk http://open-jtalk.sourceforge.net/ to get a robotic pronunciation. That pronunciation may differ from the one determined by Kuromoji, which I use as a consistency check.

I have tried various criteria for determining what to learn next. One that worked well is to keep track of the least frequent unknown detail of each sentence (e.g. the spelling of a particular word) and pick the sentence where that frequency is highest. That way, sentences with common words come first. Lately I've modified it a bit to also consider how many other sentences have the same least frequent unknown detail, so I always have multiple different examples available to help me generalize.

Reviews are scheduled for each detail based on the time since the last review and the time when I last had to relearn it. I've been collecting data to later tune the review schedule, but right now it just doubles the interval between reviews every time I remember correctly.

I used to just pick a random sentence for each detail with a scheduled review, but that would sometimes randomly schedule the same sentence often enough to be noticeable, so I've changed it to prefer sentences I've never seen or not seen in a long time.

The two kinds of review are dictation, where I listen to the recording and write it down on paper, and reading, where I read the sentence aloud. In each case, I manually check whether I made any mistakes and indicate them by unticking a checkbox (as mentioned in my previous comment). Those details will then be scheduled for review more frequently.

After a year of daily use, there are now 35611 sentences in my database which could potentially be scheduled for review (which means that, theoretically, I should be able to understand them), 21.3% of the total. The ebook which I should understand the best (35% of all sentences) is the Japanese translation of Karel Čapek's play "Rossum's Universal Robots" https://www.aozora.gr.jp/cards/001236/files/46345_23174.html 35% understanding is ... not enough to allow me to read it from beginning to end, but occasionally I get a nice sentence e.g. about the worldwide robot uprising.

I think it should be possible to adapt the system to work for other languages, but it would require significant refactoring to remove the assumption that everything is in Japanese.