So I decided to learn Esperanto, which as an avid user of the SRS application Anki, meant I needed to either enter Esperanto’s special characters (Ä‰, Ä, Ä¥, Äµ, Å, Å) into my flash cards, which can’t easily be typed with the US International keyboard layout, or I could deal with the ugly “x method” workaround (cx, gx, hx, jx, sx, ux). At first, I was only creating Esperanto cards from my Linux computers at home, which let me use an Esperanto keyboard layout to type in the special characters. Pretty soon though, I found myself creating cards from my Windows machine at work during breaks. There is no Esperanto keyboard layout in Windows by default, so I tried to install some third party keyboard layouts without success. I eventually came across a program called Ek, which seemed to do the job of letting me type special characters, except in Anki where it would only type “Ä‰”. So I just dealt with the “x method” and was typing words like vojagxas instead of vojaÄas. I don’t know why, but after a while all the x’s began to really bother me. I didn’t want to see mangxi in my flash cards, it just doesn’t seem as natural as manÄi does. So I did what any other software developer would do….
I wrote some code.
Specifically, I wrote a plugin for Anki which converts all those terrible cx, gx, hx, jx, sx, and ux combinations into the aesthetically pleasing Ä‰, Ä, Ä¥, Äµ. Å. and Å characters. Prior to this I’ve never written a plugin for Anki, and even now I claim no expertise. Anki is written in Python, and so are its plugins. I found a plugin that adds some support for the German language to Anki and used that as a model to build my plugin.
To use the Esperanto plugin, open Anki, go to File -> Download -> Shared Plugin. Type “esperanto” into the search box. My plugin is the only one that matches that search, so it should be highlighted already. The plugin is called “Esperanto Support for Anki”. Click Ok and it should download and install for you. In your deck, when you want to add a card for Esperanto, make sure the card is using the “Esperanto” model rather than “Basic” model.
I’m open to suggestions and feedback, and if you are curious about the code at all, open up your Anki plugins folder and take it a look. The code is right there and it’s very simple.
5 responses to “Esperanto Support Plugin for Anki”
I have been using Anki with an Esperanto card deck from Baza Radikaro (with all the proper Eo characters). If you want I can send you the deck (it has over 5800 cards).
[…] Esperanto Support plugin for Anki – Simply install this plugin in Anki, configure your deck to use the Esperanto card model, […]
could u share your experience on how to write plugins for anki, i can’t find any resources of this sort on the internet. Thank you.
Alex: I had trouble finding resources too. I ended up just finding another plugin that did something similar and implementing my plugin in a similar manner. In my case I was looking at the German plugin.
Many thanks for doing this. I’m going now to download your plug-in and search for Esperanto decks in the list of shared decks.
FWIW, in Windows I’ve used Diacrit, an inexpensive little program that can provide diacritics for any language. More info here: http://www.sandrila.co.uk/diacrit/
I have no connection with the company other than as a customer.