Nunjucks Syntax Free
ByAwesome CrowdinVerified Author

Syntax highlighting and placeholders validation for Nunjucks

Install

Nunjucks Templates Translation

Copy link

Syntax highlighting and placeholders validation for Nunjucks. Install the add-on to prevent the translators from working with untranslatable code parts.


Note: It's recommended to internationalize your templates and extract texts into resource files. If internationalization is not the case for your project (for example you need to translate email templates), please check the rest of this guide.

How to translate Nunjucks templates

Copy link
  • Install this application. (the app won't appear anywhere in Crowdin, this app creates necessary placeholders to highlight the code)
  • Go to your project settings and assign custom Nunjucks placeholders to your project (if you see multiple placeholders related to this file format - add them all).
  • Upload your files with any of the following extensions: html,txt (choose the extension according to the content you have)

Make sure you don't have translatable texts inside your Nunjucks expressions, translators won't be able to edit them.

Sample file

Copy link
{% extends "base.html" %}

{% block header %}
<h1>{{ title }}</h1>
{% endblock %}

{% block content %}
<ul>
  {% for name, item in items %}
  <li>{{ name }}: {{ item }}</li>
  {% endfor %}
</ul>
{% endblock %}

Localize your product with Crowdin

Automate content updates, boost team collaboration, and reach new markets faster.

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
File Formats
Works with
  • Crowdin Enterprise
Details

Released on May 30, 2022

Updated on Feb 9, 2023

Published by Awesome Crowdin

Identifier:nunjucks