Skip to main content
All CollectionsAuthor Help
How can I help translate my Leanpub landing page?
How can I help translate my Leanpub landing page?

Keywords: translate, language, localization, help, how

Leanpub Support avatar
Written by Leanpub Support
Updated over a year ago
How can I help translate my Leanpub landing page?

When you select a language for your book, that determines the language displayed on the Leanpub web page for your book, course, or bundle.

If we have a landing page translation for your selected language, then your book landing page will be displayed in that language.

You can find a list of the languages that currently have this feature here. (It's called "localization" for anyone familiar with the professional jargon!)

If you want to help us localize Leanpub book landing pages to your language, we really appreciate it! Most of our localization has been done by Leanpub authors.

We keep our localization files in a public GitHub repository here:
โ€‹https://github.com/leanpub/translations.
โ€‹

There are two parts to this article:

Thank you!


Editing a Localization File (for People Who Are Programmers!)

If you're a programmer and you're familiar with GitHub, you'll want to fork this repository https://github.com/leanpub/translations, edit the entries in the file you want to translate, commit and push your changes, and then make a pull request.

Every language we support has a 2 letter code YAML file for that language. We support English, plus languages that have been volunteer-translated to a good level by an interested author.

The files are named in accordance with the standardized two-letter abbreviation codes you can find here.


To localize Leanpub to a your language or to fix an issue with our existing localization to your language, here are the steps:

  1. If you are adding a new language, please create a new language file with a file extension of .yml. The best thing to do is to start either with the en.yml or a specific translation such as fr.yml or de.yml. The filename should be the two letter code at: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

  2. Make the changes you wish, and commit and push

  3. Submit a pull request

Thank you in advance!

Please email hello@leanpub.com if you have any questions!


Editing a Localization File (for People Who Aren't Programmers!)

If you're not a programmer and you're not familiar with Git and GitHub, the easiest way to help is to download the file for your language, edit the file, and then email the edited file to us at hello@leanpub.com.

The files are named in accordance with the standardized two-letter abbreviation codes you can find here.

If you want to edit one of our language files, please do the following:

Download the current files by clicking here.

Next, open the file you want to edit. Here is what an untranslated language file will look like:

Next, translate each entry by replacing the text between quotation marks, like "Author earns":

You will have to guess the context for some of the entries. Don't worry if you get it wrong! People who sees any wrong guesses will contact us to let us know.

If you want to add a new language, please do the following:

Download the current files by clicking here.

Rename the en.yml file with the first two letters of your language, checking the list here: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

For example, if you wanted to create a translation file for Azerbaijani, you would rename the en.yml file to az.yml.

Next, translate each entry by replacing the text between quotation marks, like "Author earns" in the example above.

Once you're done, just save your changes and send the file to us at hello@leanpub.com. Thank you!


If you have any feedback or questions about this article, please email the Leanpub team about it at hello@leanpub.com!

If you have any questions or thoughts on writing and self-publishing with Leanpub, please join our global community of authors in our Authors Forum here!

Interested in creating your first Leanpub book? Here are some quick tutorials for our most popular writing modes: http://help.leanpub.com/en/articles/3088382-quick-walkthroughs-for-getting-started-on-a-leanpub-book

Are you looking for great deals on Leanpub ebooks, ebook bundles, and courses? Sign up for our Weekly and Monthly newsletter sales here!

Did this answer your question?