[docs] xmldocs - docelic modified 22 files

docs at icdevgroup.org docs at icdevgroup.org
Sat Jun 11 04:29:00 EDT 2005


User:      docelic
Date:      2005-06-11 08:29:00 GMT
Modified:  .        Makefile TODO
Modified:  glossary locale
Modified:  refs     CodeDef DescriptionField HTMLsuffix Locale PageDir
Modified:           PriceCommas PriceDivide PriceField UseModifier
Modified:           setlocale.tag
Added:     files/locales letters.txt
Added:     glossary cookie internationalization
Added:     refs     CookieLogin ImageDir L.tag PriceAdjustment
Added:              ScratchDefault mv_no_session_id
Log:
- Some new stuff, some placeholders, some updates/fixes to existing files

Revision  Changes    Path
1.64      +3 -0      xmldocs/Makefile


rev 1.64, prev_rev 1.63
Index: Makefile
===================================================================
RCS file: /var/cvs/xmldocs/Makefile,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Makefile	9 Jun 2005 12:02:43 -0000	1.63
+++ Makefile	11 Jun 2005 08:28:59 -0000	1.64
@@ -190,6 +190,9 @@
 	-rm -rf docbook/auto{refs,glossary,howtos}.ent
 look-clean:
 	-mv $T $T.temporary 2>/dev/null
+commit:
+	make look-clean
+	cvs commit
 
 
 



1.71      +14 -0     xmldocs/TODO


rev 1.71, prev_rev 1.70
Index: TODO
===================================================================
RCS file: /var/cvs/xmldocs/TODO,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- TODO	9 Jun 2005 12:02:43 -0000	1.70
+++ TODO	11 Jun 2005 08:28:59 -0000	1.71
@@ -1,6 +1,8 @@
 Outstanding:
 =======
+- across glossary entries, insert <section>s
 - At least in filters, <<EOR messes up the thing, only < is printed and stops
+s/0-1/No-Yes/
 On config directives, include parse_<> function in source context
 - See that if 'crypt' is put in see also, all symbols of that name appear
   in see also line and their type is distinguished visually.
@@ -80,6 +82,9 @@
 explain version naming.. stable/unstable and how 5.3.0 implies next stable
 Documentation on how to create replicated catalog online and at your
 desktop machine for ultimate convenience.
+- Whereever we count things, (like, valid Locale keys are decimal_point, 
+  mon_grouping, price_picture,n_cs_precedes etc.) make that information
+  derived by scripting in stattree, not manually counting
 
 
 Notes:
@@ -138,3 +143,12 @@
 - Suppress inline docs (in source)  for items that have xmldocs docs
 - In source contexts, for tags, highlight tagCanon and provide <acronym> with
   short explanation and example
+
+
+
+In IC source:
+
+- No $Vend::XTrailer on <input>, etc..
+- missing </p>s
+- lowercase SELECTED/CHECKED ? 
+



1.1                  xmldocs/files/locales/letters.txt


rev 1.1, prev_rev 1.0
Index: letters.txt
===================================================================
code	letter
00-0011	f
99-102	é
19-202	a



1.3       +157 -0    xmldocs/glossary/locale


rev 1.3, prev_rev 1.2
Index: locale
===================================================================
RCS file: /var/cvs/xmldocs/glossary/locale,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- locale	15 Dec 2004 14:24:00 -0000	1.2
+++ locale	11 Jun 2005 08:29:00 -0000	1.3
@@ -0,0 +1,157 @@
+See &glos-internationalization; (I18N) glossary entry for a general
+introduction.
+</para><para>
+Localization (or "I10N") is a process of making an I18N-enabled application
+to use specific locale definition (messages, currency format, etc.).
+</para><para>
+The important thing to have in mind is that &IC; allows customers to access
+the same catalog in an unlimited number of languages, currencies and regional
+settings. What's more, you can switch locales at will, at any time!
+</para><para>
+The simplest and recommended way to set the <emphasis>default</emphasis>
+catalog locale is to define a starting value for <mv>mv_locale</mv> in
+&ccf;:
+<programlisting>
+ScratchDefault mv_locale de_DE
+</programlisting>
+</para><para>
+The <emphasis>per-user</emphasis> locale change can be made permanent
+(for the duration of the user
+session, of course), or temporary (if you're, say, displaying pricing 
+information in multiple currencies). See &tag-setlocale; for more discussion
+and examples.
+</para><para>
+Besides using actual "programmatic" methods to set locales, you can achieve
+the same effect by using one terrific feature of the <literal>process</literal>
+&glos-ActionMap;; to display page named "<literal>pricelist</literal>" in
+locale <literal>fr_FR</literal> and currency <literal>en_US</literal>, simply
+call &glos-ITL; tag
+<code>[page process/locale/fr_FR/currency/en_US/page/pricelist]</code>.
+</para><para>
+The localized messages you want to display must previously be defined, of
+course.
+The simplest way to define localized messages is to use
+the &conf-Locale; directive in any of the ways shown:
+<programlisting><![CDATA[
+Locale de_DE "Value setting" Werteinstellung
+Locale de_DE "Search"        Suchen
+
+Locale fr_FR <<EOF
+{
+  "Value setting",
+  "Configuration de valeur",
+  
+  "Search",
+  "Recherche"
+}
+EOF
+]]></programlisting>
+This method, however, is not practical when you have a lot of messages;
+for robust setups use &conf-LocaleDatabase;.
+</para><para>
+With the above, to display an appropriate translation of "Value setting",
+you would call "<literal>[L]Value setting[/L]</literal>", which would display as
+"<literal>Configuration de valeur</literal>" in
+locale <literal>fr_FR</literal>, 
+"<literal>Werteinstellung</literal>" in locale <literal>de_DE</literal>, and as
+a fallback, it would be displayed unmodified as "Value setting" &mdash; if the
+locale is neither 
+<literal>fr_FR</literal> not <literal>de_DE</literal>, or no localized string
+for the message was found at all.
+Keep in mind that the "<literal>[L]</literal>" tags must be capitalized &mdash;
+this is done for both processing speed and easy visual distinction within 
+pages.
+</para>
+<note>
+  <title>A word on localization tag [L]</title>
+  <para>
+	&IC; tries to substitute text for its localized variant very early in the
+	page serving process &mdash; even before &glos-variable;s are expanded or
+	tags interpolated.
+	</para><para>
+	On one hand, this means you can use variables and tags in localized strings
+	as they will be handled properly.
+	</para><para>
+	On the other hand, it means code constructs like 
+	<code>[L][item-data table field][/L]</code> will fail, as &IC; would try to
+	translate "<literal>[item-data table field]</literal>" literally.
+	There's a &tag-loc; tag available which is functionally identical to 
+	&tag-L;, but is parsed in normal order and therefore solves the problem.
+  </para>
+</note>
+<para>
+Another way to display localized messages is to supply localization text
+directly within &IC; pages, inside &tag-LC; tag; have a look at this
+intuitive example:
+<programlisting>
+[LC]
+  This is the default text.
+  [fr_FR] Text for the fr_FR locale. [/fr_FR]
+  [de_DE] Text for the de_DE locale. [/de_DE]
+[/LC]
+</programlisting>
+</para><para>
+It's also possible to display completely different pages, based on the
+locale in effect. You probably know the default &conf-HTMLsuffix; in
+&IC; is "<literal>.html</literal>", but you probably do not know it is 
+locale-sensitive. With a request for page named "index"
+(<code>[page index]</code>), <literal>fr_FR</literal> locale in effect, and a
+&ccf; directive of
+<programlisting>
+Locale fr_FR HTMLsuffix .fr_FR
+</programlisting>
+&IC; would first look for <filename>pages/index.fr_FR</filename>, and only if 
+it's not found go to the usual <filename>pages/index.html</filename>.
+</para>
+
+<note>
+	<title>A general note on locale-sensitivity of config directives</title>
+	<para>
+	We've said &conf-HTMLsuffix; is locale-sensitive, but the story gets 
+	much better. In reality, any &conf-Locale; key that matches the name of a
+	config directive, causes the directive to be re-set on locale change &mdash;
+	in other words, all config directives are locale-sensitive! (And now I
+	know you know I am no fan of exclamation marks, but can you say this feature
+	isn't just ingenious?!).
+	</para>
+</note>
+
+
+<section>
+	<title>Effect of locales on sorting</title>
+	<para>
+	&IC; sorting features (such as &mdash; but not only &mdash; the
+	&tag-sort; tag)
+	will honor a setting of <literal>LC_COLLATE</literal>, provided that
+	the operating system and C compiler support locales for POSIX,
+	have the locale definitions set, and the locale chosen matches one of
+	locales available.
+	</para>
+	<para>
+	Suppose we have a
+	<ulink url="files/locales/letters.txt">letters</ulink> database, containing
+	some of the letters of the alphabet.
+	<!--
+	<xi:include parse='text'  href='../files/locales/letters.txt'/>
+	-->
+	A code of:
+
+<programlisting><![CDATA[
+[loop 19-202 00-0011 99-102]
+  [sort letters:letter]
+  [loop-data letters letter]   [loop-code] <br/>
+[/loop]
+]]></programlisting>
+	would provide different order for locale <literal>C</literal> than
+	<literal>fr_FR</literal>.
+	</para>
+</section>
+
+<para>
+
+<!-- TODO mention script/localize.PL 
+A C<localize> script is included with Interchange. It will parse files included on the command line and produce output that can be easily edited to produce localized information. Given an existing file, it will merge new information where appropriate.
+-->
+
+
+



1.1                  xmldocs/glossary/cookie


rev 1.1, prev_rev 1.0
Index: cookie
===================================================================
Cookies are typically short
<literal><replaceable>key</replaceable>/<replaceable>value</replaceable></literal> parts supported by the HTTP protocol. Their importance is in the fact that
the server can send them to clients, and read and modify their value.
In addition, cookies have their expiry time, which can be set, also by the 
server, to any intended value.
</para><para>
Clients can control whether they reject or accept cookies from all or 
some sites, and can enforce their expiry time.
</para><para>
Requests arriving from users
are "anonymous" and unrelated to each other, even of course if they are
coming from the same user, because the server can't conclude that for sure,
based on just IP addresses it sees.
Therefore, cookies are a crucial mechanism for preserving state
information in programs with web-based interfaces. By reading the session ID
value (stored in a cookie on client's computer), the server can now recognize
and differentiate users and ongoing, active sessions.
</para>

<note>
	<title>Interchange and its non-dependence on client cookies</title>
	<para>
	Large majority of any state-dependent software out there simply 
	<emphasis role='bold'>requires</emphasis> that the clients accept 
	storage and retrieval of cookies. Even solutions put forth eBay require
	cookies, let alone any much weaker competitors such as Microsoft, or the
	wanna-be rival "shopping carts".
	</para><para>
	&IC;, on the other side, does not require client support for cookies.
	If the storage of cookies is denied by the client, &IC; appends session
	information in generated URLs and uses them to continue keeping track of
	user sessions. (An example session ID "embedded" in an URl looks like
	<literal>?id=YjiSdrek</literal>).
	</para><para>
	One possibly confusing thing is that, by default, &IC; always appends
	session ID information to the URLs it generates &mdash; even if clients
	have no cookie-handing problems. For ultimate elegance, you sometimes
	wish &IC; to stop appending session IDs to non-problematic clients, and we
	can just say this is possible, as you'll learn from further discussion.
	</para>
</note>

<para>
When a new client accesses its first page from the &IC; catalog, &IC; gives
it both the requested page and a cookie in return. At that point, &IC; can't
know whether the client accepted the cookie or not &mdash; it has to wait for
the client to initiate the next page request.
If the user sends a cookie back to &IC; (which, as you see, can happen no
sooner than on second request), &IC; knows the client is cookie-capable and
there's no <emphasis>need</emphasis> to embed session ID in URLs.
</para><para>
Having said the above,
if the &glos-scratch; variable <mv>mv_no_session_id</mv> is set in their
session, the session ID will not be appended to the URL. Furthermore,
on a somewhat related note (the elegance of generated URLs), if the scratch
value <mv>mv_no_count</mv> is set, then the page count
(<literal>mv_pc=<replaceable>random</replaceable></literal>) will not be
appended either (page counter otherwise serves to prevent client browsers
from caching pages).

<!--
.No session ID or count will be shown. That makes the URL shown above to be http://machine.company.com/cgi-bin/vlink/shirts.html. Once again, this is on the second page the user accesses, if they are taking and sending cookies. If the user has a pre-existing C<MV_SESSION_ID> or C<MV_USERNAME> cookie from a prior session, the effect will be immediate.

.The C<argument> will be passed to Interchange and placed in the C<mv_arg> session parameter. This allows programming of a conditional page display based on where the link came from. The argument is then available with the tag [data session arg], or the embedded Perl session variable $Session->{arg}. Spaces and some other characters will be escaped with the %NN URL-style notation and unescaped when the argument is read back into the session.

.A bit of magic occurs if Interchange has built a static plain HTML page for the target page. Instead of generating a normal Interchange-parsed page reference, a static page reference will be inserted if the user has accepted and sent back a cookie with the session ID.
-->





1.1                  xmldocs/glossary/internationalization


rev 1.1, prev_rev 1.0
Index: internationalization
===================================================================
Internationalization (or "I18N") features are those being in relation to 
program's ability to support localized messages (see &glos-locale;),
currencies, and other region-specific settings.
</para><para>
&IC; has a rich set of I18N features that allow conditional message display,
differing price formats, different currency definitions, price factoring,
sorting, and other settings. Currently, those features are implemented as
&IC;-specific, and do not rely on &PERL;'s I18N/L10N features, except for
the built-in POSIX support (<code>use locale</code>,
<function>getlocale()</function> and <function>setlocale()</function>).
</para><para>
The definitions are maintained in the &ccf; file, through the use of 
Interchange's &conf-Locale; directive. All settings are
independent for each catalog <emphasis role='bold'>and</emphasis> each user
visiting that catalog; in other words, customers can access the same catalog
in an unlimited number of languages, currencies and regional settings.
</para><para>
See &glos-locale; glossary entry for more specific information.



1.2       +1 -1      xmldocs/refs/CodeDef


rev 1.2, prev_rev 1.1
Index: CodeDef
===================================================================
RCS file: /var/cvs/xmldocs/refs/CodeDef,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CodeDef	9 Jun 2005 12:02:43 -0000	1.1
+++ CodeDef	11 Jun 2005 08:29:00 -0000	1.2
@@ -19,7 +19,7 @@
 A generic &PERL; subroutine mapper which allows mapping of subroutines to
 &glos-ActionMap;s,
 CoreTags, &conf-UserTag;s,
-&glos-Filter;s,
+&glos-filter;s,
 &glos-form-action;s,
 &conf-GlobalSub;s,
 ItemActions,



1.2       +17 -0     xmldocs/refs/DescriptionField


rev 1.2, prev_rev 1.1
Index: DescriptionField
===================================================================
RCS file: /var/cvs/xmldocs/refs/DescriptionField,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DescriptionField	21 Feb 2005 01:16:51 -0000	1.1
+++ DescriptionField	11 Jun 2005 08:29:00 -0000	1.2
@@ -23,6 +23,8 @@
 __NAME__ notes
 The existence of the field is not exactly crucial, but it's important
 for say, &glos-flypage;s.
+</para><para>
+It's also useful to set the directive value based on &glos-locale;.
 __END__
 
 TODO: Clarify this? "If there is an
@@ -36,4 +38,19 @@
 </programlisting>
 "Opis", for example, is a croatian equivalent of "description".
 __END__
+
+__NAME__ example: Setting DecriptionField depending on current locale
+<programlisting>
+# Establish the default at startup
+DecriptionField    description
+
+# Establish locale-specific description field
+Locale fr_FR  DecriptionField  desc_fr
+</programlisting>
+To fully understand the example and implicitly presented &IC; features, make
+sure you're familiar with &glos-internationalization; and &glos-locale;
+glossary
+entries.
+__END__
+
 



1.3       +10 -0     xmldocs/refs/HTMLsuffix


rev 1.3, prev_rev 1.2
Index: HTMLsuffix
===================================================================
RCS file: /var/cvs/xmldocs/refs/HTMLsuffix,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HTMLsuffix	2 Feb 2005 11:35:58 -0000	1.2
+++ HTMLsuffix	11 Jun 2005 08:29:00 -0000	1.3
@@ -15,9 +15,19 @@
 file in the <filename class='directory'>pages/</filename> directory.
 __END__
 
+
+__NAME__ notes
+The way &IC; looks for pages is &glos-locale;-sensitive. Besides the default
+HTML suffix which is set using this &conf-HTMLsuffix; directive, you can 
+set locale-dependent suffixes using &conf-Locale;.
+__END__
+
 __NAME__ example: Setting HTMLsuffix
 <programlisting>
 HTMLsuffix .htm
 </programlisting>
 __END__
 
+__NAME__ see also
+Locale
+__END__



1.4       +88 -0     xmldocs/refs/Locale


rev 1.4, prev_rev 1.3
Index: Locale
===================================================================
RCS file: /var/cvs/xmldocs/refs/Locale,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Locale	29 May 2005 11:19:33 -0000	1.3
+++ Locale	11 Jun 2005 08:29:00 -0000	1.4
@@ -29,5 +29,93 @@
 __END__
 
 __NAME__ missing
+purpose and description is wrong completely
 The description doesnt seem to match the description of the same variable when set in catalog.cfg
 __END__
+
+
+
+
+LI1: price_picture
+
+.Interchange will format a currency number based on a "picture" given to it. The basic form is:
+
+!block example; listitem=2
+    Locale en_US price_picture "$ ###,###,###.##"
+!endblock
+
+.The C<en_US> locale, for the United States, would display C<4452.3> as C<$ 4,452.30>. The same display can be achieved with:
+
+!block example; listitem=2
+     Locale en_US mon_thousands_sep ,
+     Locale en_US mon_decimal_point .
+     Locale en_US p_cs_precedes     1
+     Locale en_US currency_symbol   $
+!endblock
+
+.A common price_picture for European countries would be C<###.###.###,##>, which would display that same number as C<4.452,30>. To add a franc notation at the end for the locale C<fr_FR>, use the setting:
+
+!block example; listitem=2
+    Locale fr_FR price_picture "##.###,## fr"
+!endblock
+
+Note[label='IMPORTANT NOTE: '] The decimal point in use, set by C<mon_decimal_point>, and the thousands separator, set by C<mon_thousands_sep> must match the settings in the price_picture. The C<frac_digits> setting is not used in this case. It is derived from the location of the decimal (if any).
+
+.The same setting for C<fr_FR> above can be achieved with:
+
+!block example; listitem=2
+     Locale fr_FR mon_thousands_sep .
+     Locale fr_FR mon_decimal_point ,
+     Locale fr_FR p_cs_precedes     0
+     Locale fr_FR currency_symbol   fr
+!endblock
+
+.If the number of digits is greater than the # locations in the price_picture, the digits will be changed to asterisks. An overflow number above would show as C<**.***,** fr>.
+
+LI1: picture
+
+.Same as C<price_picture>, but sets the value returned if the C<[currency]> tag is not used. If the number of digits is greater than the # locations in the picture, the digits will be changed to asterisks, displaying something like C<**,***.**>.
+
+
+
+
+
+
+H2: Placing Locale Information in a Database
+
+Interchange has the capability to read its locale information from a database, named with the C<LocaleDatabase> directive. The database can be of any valid Interchange type. The locales are in columns, and the keys are in rows. For example, to set up price information:
+
+!block example
+   key                 en_US   fr_FR   de_DE
+   PriceDivide         1       .1590   .58
+   mon_decimal_point   .       ,       ,
+   mon_thousands_sep   ,       .
+   currency_symbol     $        frs    DM
+   ps_cs_precedes      1       0       0
+!endblock
+
+This would translate to the following:
+
+!block example
+   Locale en_US PriceDivide         1
+   Locale en_US mon_decimal_point   .
+   Locale en_US mon_thousands_sep   ,
+   Locale en_US currency_symbol     $
+   Locale en_US ps_cs_precedes      1
+
+   Locale fr_FR PriceDivide         .1590
+   Locale fr_FR mon_decimal_point   ,
+   Locale fr_FR mon_thousands_sep   .
+   Locale fr_FR currency_symbol     " frs"
+   Locale fr_FR ps_cs_precedes      0
+
+   Locale de_DE PriceDivide         .58
+   Locale de_DE mon_decimal_point   ,
+   Locale de_DE mon_thousands_sep   " "
+   Locale de_DE currency_symbol     "DM "
+   Locale de_DE ps_cs_precedes      1
+!endblock
+
+These settings append and overwrite any that are set in the catalog configuration files, including any include files. 
+
+Important note: This information is only read during catalog configuration. It is not reasonable to access a database for translation or currency conversion in the normal course of events.



1.4       +25 -3     xmldocs/refs/PageDir


rev 1.4, prev_rev 1.3
Index: PageDir
===================================================================
RCS file: /var/cvs/xmldocs/refs/PageDir,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PageDir	21 Feb 2005 01:16:51 -0000	1.3
+++ PageDir	11 Jun 2005 08:29:00 -0000	1.4
@@ -13,8 +13,9 @@
 __NAME__ description
 Specify the directory containing catalog pages.
 </para><para>
-This directive can be set in &glos-locale; settings to allow different page
-sets for different locales.
+Speaking of &glos-internationalization;, it can be useful to set this
+directive to
+different values, depending on current &glos-locale;.
 __END__
 
 __NAME__ notes
@@ -23,7 +24,28 @@
 
 __NAME__ example: Setting PageDir
 <programlisting>
-PageDir /html
+PageDir html
 </programlisting>
 __END__
 
+__NAME__ example: Setting PageDir depending on current locale
+To use a different page directory for different locales, say French and 
+English, help yourself with the robust &conf-Locale; directive:
+<programlisting>
+# Establish the default at startup
+PageDir   english
+
+# Establish locale-dependent directories
+Locale fr_FR  PageDir  francais
+Locale en_US  PageDir  english
+</programlisting>
+To fully understand the example and implicitly presented &IC; features, make
+sure you're familiar with &glos-internationalization; and &glos-locale;
+glossary
+entries.
+__END__
+
+
+__NAME__ see also
+Locale
+__END__



1.2       +21 -0     xmldocs/refs/PriceCommas


rev 1.2, prev_rev 1.1
Index: PriceCommas
===================================================================
RCS file: /var/cvs/xmldocs/refs/PriceCommas,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PriceCommas	25 May 2005 09:36:50 -0000	1.1
+++ PriceCommas	11 Jun 2005 08:29:00 -0000	1.2
@@ -12,6 +12,10 @@
 
 
 __NAME__ description
+The directive specifies whether <literal>mon_thousands_sep</literal> 
+(specified as part of &conf-Locale;) will be used in currency formatting
+for display.
+</para><para>
 If no commas are desired in price numbers (for the &tag-item-price; tag etc.),
 disable this directive. 
 </para><para>
@@ -35,6 +39,23 @@
 <programlisting>
 PriceCommas 0
 </programlisting>
+__END__
+
+
+
+__NAME__ example: Setting PriceCommas depending on current locale
+<programlisting>
+# Establish a default
+PriceCommas    1
+
+# Establish locale-specific price commas
+Locale fr_FR  PriceCommas  0
+Locale en_US  PriceCommas  1
+</programlisting>
+To fully understand the example and implicitly presented &IC; features, make
+sure you're familiar with &glos-internationalization; and &glos-locale;
+glossary
+entries.
 __END__
 
 



1.2       +18 -0     xmldocs/refs/PriceDivide


rev 1.2, prev_rev 1.1
Index: PriceDivide
===================================================================
RCS file: /var/cvs/xmldocs/refs/PriceDivide,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PriceDivide	25 May 2005 09:36:50 -0000	1.1
+++ PriceDivide	11 Jun 2005 08:29:00 -0000	1.2
@@ -38,4 +38,22 @@
 __END__
 
 
+__NAME__ example: Setting PriceDivide depending on current locale
+<programlisting>
+# (Default is PriceDivide 1, so no special setting required)
+#PriceDivide    1
+
+# Establish locale-specific price division
+Locale fr_FR  PriceDivide  .20
+</programlisting>
+The following would make prices expressed in French francs five times
+higher than corresponding dollar amounts.
+</para><para>
+To fully understand the example and implicitly presented &IC; features, make
+sure you're familiar with &glos-internationalization; and &glos-locale;
+glossary
+entries.
+__END__
+
+
 



1.2       +23 -1     xmldocs/refs/PriceField


rev 1.2, prev_rev 1.1
Index: PriceField
===================================================================
RCS file: /var/cvs/xmldocs/refs/PriceField,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PriceField	21 Feb 2005 01:16:51 -0000	1.1
+++ PriceField	11 Jun 2005 08:29:00 -0000	1.2
@@ -24,7 +24,7 @@
 The existence of the field is not exactly crucial, but it's important
 for say, &glos-flypage;s.
 </para><para>
-The field can also be set according to a &conf-Locale;.
+It's also useful to set the directive based on current &glos-locale;.
 __END__
 
 __NAME__ example: Redefining PriceField
@@ -34,3 +34,25 @@
 "Cijena", for example, is a croatian equivalent of "price".
 __END__
 
+__NAME__ example: Setting PriceField depending on current locale
+<programlisting>
+# Establish the default at startup
+PriceField    price
+
+# Establish locale-specific price field
+Locale fr_FR  PriceField  prix
+</programlisting>
+Just by the way, if &conf-PriceBreaks; is enabled, the
+<database class='field'>prix</database> field from the
+<database>pricing</database> database will be used to develop quantity-based
+pricing.
+</para><para>
+To fully understand the example and implicitly presented &IC; features, make
+sure you're familiar with &glos-internationalization; and &glos-locale;
+glossary
+entries.
+__END__
+
+__NAME__ see also
+PriceDivide,PriceCommas
+__END__



1.2       +21 -0     xmldocs/refs/UseModifier


rev 1.2, prev_rev 1.1
Index: UseModifier
===================================================================
RCS file: /var/cvs/xmldocs/refs/UseModifier,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UseModifier	22 Feb 2005 12:50:43 -0000	1.1
+++ UseModifier	11 Jun 2005 08:29:00 -0000	1.2
@@ -38,3 +38,24 @@
 </programlisting>
 __END__
 
+
+
+
+
+
+
+
+
+LI1: UseModifier
+
+.Changes the fields from the set shopping cart options.
+
+!block example; listitem=2
+    # Default at startup is 1 if not set
+    # Franc is strong these days!
+    UseModifier format
+    Locale fr_FR  UseModifier formats
+!endblock
+
+.If a previous setting was made for an item based on another locale, it will be maintained.
+



1.2       +39 -1     xmldocs/refs/setlocale.tag


rev 1.2, prev_rev 1.1
Index: setlocale.tag
===================================================================
RCS file: /var/cvs/xmldocs/refs/setlocale.tag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- setlocale.tag	17 Feb 2005 23:25:39 -0000	1.1
+++ setlocale.tag	11 Jun 2005 08:29:00 -0000	1.2
@@ -39,4 +39,42 @@
 </row> 
 &ROW_INTERPOLATE_0;
 &ROW_REPARSE_1;
-__END__
\ No newline at end of file
+__END__
+
+
+
+LI1: [setlocale locale=locale* currency=locale* persist=1*]
+Immediately sets the locale to C<locale>, and will cause it to persist in future user pages if the C<persist> is set to a non-zero, non-blank value. If the C<currency> attribute is set, the pricing and currency-specific locale keys and Interchange configuration directives are modified to that locale. If there are no arguments, it sets it back to the user's default locale as defined in the scratch variables C<mv_locale> and C<mv_currency>.
+
+.This allows:
+
+!block example; listitem=2
+Dollar Pricing:
+
+[setlocale en_US]
+[item-list]
+[item-code]: [item-price]<BR>
+[/item-list]
+
+Franc Pricing:
+
+[setlocale fr_FR]
+[item-list]
+[item-code]: [item-price]<BR>
+[/item-list]
+
+[comment] Return to the user's default locale [/comment]
+[setlocale]
+!endblock
+
+
+ Here's a general example for 
+ locale <literal>fr_FR</literal>:
+ <programlisting>
+ [setlocale locale=fr_FR currency=fr_FR persist=1]
+ </programlisting>
+ The above would immediately switch locale to <literal>fr_FR</literal>, and 
+ persist for the duration of the user session. A call to &tag-setlocale; without
+ arguments would switch back to the default locale (settings of
+ <mv>mv_locale</mv> and <mv>mv_currency</mv>).
+



1.1                  xmldocs/refs/CookieLogin


rev 1.1, prev_rev 1.0
Index: CookieLogin
===================================================================
__NAME__ purpose
allow autologin based on username and password stored in a client cookie
__END__


__NAME__ synopsis
<group choice='req'>
	<arg choice='plain'>No</arg>
	<arg choice='plain'>Yes</arg>
</group>
__END__


__NAME__ description
When disabled (set to <literal>No</literal>), 
configuration meta-directives such as 
<literal>#include</literal>,
<literal>#ifdef</literal> and
<literal>#ifndef</literal>,
are treated as pure comments with no specific meaning.
</para><para>
However, since those were originally borrowed from the C preprocessor,
and true to their C heritage - they started with an '#' (hash) character
in &IC; versions up to and including 4.6.
</para><para>
This was inconvenient for newcomers who were easily misguided by thinking
those were just comments, so Interchange versions 4.7 and up support
meta-directives without the hash prefix.
</para><para>
To preserve compatibility, the default is still <literal>Yes</literal>,
but you should omit the '#' (hash) in new configuration files.
__END__


__NAME__ example: Config parser behavior with ConfigParseComments disabled
<programlisting>
ConfigParseComments No

#include comment
# This, and the above line, are pure comments.

# You better prepare the file named 'comment' for the following one:
include comment
</programlisting>
__END__




1.1                  xmldocs/refs/ImageDir


rev 1.1, prev_rev 1.0
Index: ImageDir
===================================================================

__NAME__ example: Setting PageDir depending on current locale
To use a different page directory for different locales, say French and
English, help yourself with the robust &conf-Locale; directive:
<programlisting>
# Establish the default at startup
PageDir   english

# Establish locale-dependent directories
Locale fr_FR  PageDir  francais
Locale en_US  PageDir  english
</programlisting>
To fully understand the example and implicitly presented &IC; features, make
sure you're familiar with &glos-internationalization; and &glos-locale;
glossary
entries.
__END__



LI1: ImageDir

.To use a different image directory for different locales, set the C<ImageDir> key. To have two separate language button sets, French and English, set:

!block example; listitem=2
# Establish the default at startup
ImageDir   /images/english/
Locale fr_FR  ImageDir   /images/francais/
Locale en_US  ImageDir   /images/english/
!endblock




1.1                  xmldocs/refs/L.tag


rev 1.1, prev_rev 1.0
Index: L.tag
===================================================================

Note:Be careful when editing pages containing localization information. Even changing one character of the message can  change the key value and invalidate the message for other languages. To prevent this, use:

!block example
   [L key]The default.[/L]
	 !endblock


	 The key C<msg_key> will then be used to index the message. This may be preferable for many applications.





1.1                  xmldocs/refs/PriceAdjustment


rev 1.1, prev_rev 1.0
Index: PriceAdjustment
===================================================================

LI1: PriceAdjustment

.Changes the fields set by C<UseModifier> that will be used to adjust pricing for an automatic conversion factor based on locale. For example:

!block example; listitem=2
    # Default at startup
    PriceAdjustment  format
    Locale fr_FR  PriceAdjustment  formats
!endblock



1.1                  xmldocs/refs/ScratchDefault


rev 1.1, prev_rev 1.0
Index: ScratchDefault
===================================================================
It is recommended to use the C<ScratchDefault> directive for setting the
catalog's default locale:

!block example
   ScratchDefault mv_locale de_DE
	 !endblock





1.1                  xmldocs/refs/mv_no_session_id


rev 1.1, prev_rev 1.0
Index: mv_no_session_id
===================================================================

!block example; listitem=2
[set mv_no_session_id]1[/set]
[set mv_no_count]1[/set]
[set mv_add_dot_html]1[/set]
!endblock

.or put in C<catalog.cfg>:

!block example; listitem=2
ScratchDefault  mv_no_session_id  1
ScratchDefault  mv_no_count       1
ScratchDefault  mv_add_dot_html   1
!endblock








More information about the docs mailing list