From c16e671d36616b440bcd4cfc97d59cde6052524e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 5 Apr 2012 10:37:46 -0400 Subject: [PATCH] more i18n examples, vim modeline Signed-off-by: Bill Erickson --- eg2012_tpac.txt | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/eg2012_tpac.txt b/eg2012_tpac.txt index 143bb9a93..33d6f262a 100644 --- a/eg2012_tpac.txt +++ b/eg2012_tpac.txt @@ -50,21 +50,39 @@ http://template-toolkit.org Template Toolkit Syntax: I18N ----------------------------- +Bad +~~~ [source, html] ------------------------------------------------------------------------------ - -
Hello, [% world_string %]!
+

Hello, [% world_string %]!

------------------------------------------------------------------------------ +Good +~~~~ [source, html] ------------------------------------------------------------------------------ - -
[% l('Hello, [_1]!', world_string) %]
+

[% l('Hello, [_1]!', world_string) %]

------------------------------------------------------------------------------ +Plural +~~~~~~ [source, html] ------------------------------------------------------------------------------ - [% l("I would like [quant,_1,apple,apples], please.", num_apples); %] ------------------------------------------------------------------------------ +Paragraph +~~~~~~~~~ +[source, html] +------------------------------------------------------------------------------ +[% |l(num_apples) %] +I would like [quant,_1,apple,apples] and a bag of peaches, please. Also, +four score and seven years ago (minus four score plus 1 year), Evergreen +went live in Georgia. It is a period of civil war. Rebel spaceships, +striking from a hidden base, have won... +[% END %] +------------------------------------------------------------------------------ + +//////////////////////// +vim:set syntax=asciidoc: +//////////////////////// -- 2.11.0