Languages and Letter Accents

Setting the Main Language Used in the Book

In the General Settings page in your book tools, you can set the main language used in the book.

When you create a book, to set the language, click on “Writing” in the menu on the left and then click on “General Settings”. There, you will see a dropdown where you can set the main language used in the book. Once you’ve selected a language, click the blue “Update Book” button at the bottom of the page.

By default, the main language is English.

This helps us to set up the fonts that we use in your book. If you are writing with a mixture of languages that includes Chinese, Japanese or Korean, then you should check out the language switcher section (right below here). If you have troubles with characters not showing up properly, please let us know at hello@leanpub.com.

Overriding Leanpub Language Defaults

You can tell Leanpub what encoding a file is in via a snippet of text that you put at the top of the file:

1 {:: encoding="utf-8" /}

This will let you over-ride our encoding guessing.

Switching back and forth between language fonts

You can switch back and forth between language fonts by indicating the font in curly brackets.

For example, you can switch to a Chinese font by typing {chinesefont} and back to latin characters again by typing {latinfont}.

Here’s an example:

Here is some Chinese text 办事去了 and here’s some English.

Here is some Chinese text {chinesefont}办事去了{latinfont} and here's some English.

There are also equivalent switches for Japanese {japanesefont}, Korean {koreanfont} and Thai {thaifont}.

A note about writing Leanpub books in Japanese, Korean and Chinese

If you are writing with a mixture of languages that includes Chinese, Japanese or Korean, then you should select Chinese, Japanese or Korean as the main language for your book.

A note about writing Leanpub books in right-to-left (RTL) languages

If you are writing in a right-to-left language such as Arabic or Hebrew, please use Markua. Our right-to-left language support is not perfect, but we will not be fixing any more bugs in Leanpub Flavoured Markdown mode with it. So, if you want to have any chance of being happy with Leanpub’s right-to-left language support, use Markua.