Skip to content

Instantly share code, notes, and snippets.

@talha131
Last active December 30, 2015 16:57
Show Gist options
  • Save talha131/199e875e790a82fd6eac to your computer and use it in GitHub Desktop.
Save talha131/199e875e790a82fd6eac to your computer and use it in GitHub Desktop.
How to translate Pelican-Elegant theme to other languages
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