Last active
December 30, 2015 16:57
-
-
Save talha131/199e875e790a82fd6eac to your computer and use it in GitHub Desktop.
How to translate Pelican-Elegant theme to other languages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Edit file at path `pelican-elegant/templates/_includes/_defaults.html` | |
https://github.com/talha131/pelican-elegant/blob/master/templates/_includes/_defaults.html | |
Replace strings with translated strings. | |
For example, | |
{# Placeholder text for Email field #} | |
{% if not EMAIL_FIELD_PLACEHOLDER %} | |
{% set EMAIL_FIELD_PLACEHOLDER = 'Enter your email...' %} | |
{% else %} | |
{% set EMAIL_FIELD_PLACEHOLDER = EMAIL_FIELD_PLACEHOLDER %} | |
{% endif %} | |
Google translated 'Enter your email...' to 'Digite seu e-mail...' in Portuguese. So the above snippet becomes | |
{# Placeholder text for Email field #} | |
{% if not EMAIL_FIELD_PLACEHOLDER %} | |
{% set EMAIL_FIELD_PLACEHOLDER = 'Digite seu e-mail...' %} | |
{% else %} | |
{% set EMAIL_FIELD_PLACEHOLDER = EMAIL_FIELD_PLACEHOLDER %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment