Skip to content

Language Specific Include Tag

Vincent Wochnik edited this page Nov 18, 2015 · 1 revision

This plugin includes the tinclude liquid tag which works in a similar fashion as the default include tag but using a language-specific include directory.

Syntax

{% tinclude filename %}

Arguments

The first argument, filename, specifies the file to include. tinclude will look for this file in the language-specific subdirectory of the language_includes_dir directory.

Example

The following statement includes the file lorem.txt specific for the language that is being rendered:

{% tinclude lorem.txt %}

For English (en), tinclude will include _i18n/en/lorem.txt provided that language_includes_dir is set to the default _i18n. For German, it will include _i18n/de/lorem.txt.