-
Notifications
You must be signed in to change notification settings - Fork 45
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.
{% tinclude filename %}
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.
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
.