View Single Post
Old 10-28-2013, 12:44 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,463
Karma: 27757440
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I have added the infrastructure to calibre, https://github.com/kovidgoyal/calibr...23e32c4c627900

All you need to do is
1) Mark the strings with _()
2) Put the .mo files into the translations directory, for example translations/de.mo and translations/fr.mo
3) Add load_translations() to the top of the .py files that have translatable strings

Of course, this will only work with calibre 1.9 or if you are running from source. There may well be bugs, I have only tested it with a very rudimentary plugin.

The commit I linked to above, includes some documentation on how to add translations to plugins, feel free to comment if it can be improved, clarified.
kovidgoyal is offline   Reply With Quote