dbc4ce388209cc7fc0de8deb7d3ddc5879c603b1
[koha-ffzg.git] / t / LangInstaller / templates / simple.tt
1 [% USE raw %]
2 [% PROCESS 'i18n.inc' %]
3 [% t('hello') | $raw %]
4 [% tx('hello {name}', { name = 'Bob' }) | $raw %]
5 [% tn('item', 'items', count) | $raw %]
6 [% tnx('{count} item', '{count} items', count, { count = count }) | $raw %]
7 [% tp('context', 'hello') | $raw %]
8 [% tpx('context', 'hello {name}', { name = 'Bob' }) | $raw %]
9 [% tnp('context', 'item', 'items', count) | $raw %]
10 [% tnpx('context', '{count} item', '{count} items', count, { count = count }) | $raw %]
11
12 [% # it also works on multiple lines
13     tnpx (
14         'context',
15         '{count} item',
16         '{count} items',
17         count,
18         {
19             count = count,
20         }
21     ) | $raw
22 %]
23
24 [% # and t* calls can be nested
25     tx('status is {status}', {
26         status = active ? t('active') : t('inactive')
27     }) | $raw
28 %]
29
30 [%# but a TT comment won't get picked
31     t('not translatable')
32 %]
33
34 [% BLOCK %]
35     [% t('Inside block') | $raw %]
36 [% END %]