From d88930d23f712f9b9da279f32ee689e6d719f13b Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 15 Feb 2008 01:09:36 +0000 Subject: update docs on TChoiceFormat --- .../quickstart/protected/pages/Advanced/I18N.page | 40 +++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'demos/quickstart/protected/pages/Advanced') diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page index 32dd8ac6..73ff1d04 100644 --- a/demos/quickstart/protected/pages/Advanced/I18N.page +++ b/demos/quickstart/protected/pages/Advanced/I18N.page @@ -356,5 +356,43 @@ is "One Apple". If the Value was "2", then it will show "Two Apples".Any non-empty combinations of the delimiters of square and round brackets are acceptable. The string chosen for display depends on the Value property. The Value is evaluated for each set until the Value is found to belong to a particular set.

+ + Since version 3.1.1 the following set notation is also possible.

+ + +

Where set is defined by the expression after n:. In particular, the expression +accepts the following mathematical/logical operators to form a set of logical conditions +on the value given by n:

+ +

Additional round brackets can also be used to perform grouping. The following example +represents ordinal values in English such as: "0th", "1st", "2nd", "3rd", "4th", "11th", "21st", "22nd", etc.

+ + +<com:TChoiceFormat Value="21"> + {n: (n > 0) && (n < 10 || n > 20) && n % 10 == 1} {Value}st +|{n: (n > 0) && (n < 10 || n > 20) && n % 10 == 2} {Value}nd +|{n: (n > 0) && (n < 10 || n > 20) && n % 10 == 3} {Value}rd +|{n: n > -1 } {Value}th +|(-Inf, 0) {Value} +</com:TChoiceFormat> + + + -
$Id$
\ No newline at end of file +
$Id$
-- cgit v1.2.3