[interchange-i18n] Dynamic Locale Directive Changes

Kirill Sapelkin znanie at rawbw.com
Wed Mar 5 00:19:00 UTC 2003


Thanks for your reply.

> That ain't going to work. You really added the Locale line to pages/results.h
> tml ?

Yeah, I really did :-)

What I was trying to get at was to be able to switch from printing out
products.description to printing out products.title conditinally. That
is to have a russian title in products.title and a transliterated
latin lettered title in products.description and change the
DescriptionField from the default description to title.  It seemed to
me that results prints up that on the screen so I stuck the locale
stuff in there to test out the Dynamic Locale Directive Changes, as
per chapter 1.5 of Interchange I18N Features.

Anyway, none of that worked, and I couldn't get:

Locale ru_RU  DescriptionField title
[setlocale ru_RU persist=1]
Locale ru_RU  DescriptionField title

to work either so I put:

[set russ]f[/set]

in pages/index.html and:

[set russ]t[/set]

in pages/inderu.html (top file for russian) and put in 2 ifs in
rusults.html. So if we go to  index.html (english version) file, russ
is f(alse) and results prints item-description out on screen, if we go
to inderu.html (russian version) russ is t(rue) and results.html
prints item-field title out on screen:


	  [if scratch russ ne "t"]
      <td>
	<INPUT TYPE=hidden  NAME="mv_order_item"  VALUE="[item-code]">
	<a href="[area [item-code]]">[item-description]</a>
      </td>
	  [/if]
	  [if scratch russ eq "t"]
      <td>
	<INPUT TYPE=hidden  NAME="mv_order_item"  VALUE="[item-code]">
	<a href="[area [item-code]]">[item-field title]</a>
      </td>
	  [/if]

> > Is There a CommentsField directive?
> > 
> No. With Interchange 4.8, you need to use a workaround for that. 
> Interchange 4.9 provides the shadow database, which would help you
> there.

What I thought of doing there is to make a new field:
products.rcomment.  That is russian comment.  So we would have our
latin letter transliterated comments in  product.comments and cyrillic
letter comments in products.rcomments.  Then try to pull a similar
stunt like those ifs in results.

Do you think we should go over to 4.9?  Our Web Host has it on some of
his machines.

Thanks again for your kind attention.

Kirill

> On Mon, 03 Mar 2003 21:55:45 -0800
> Kirill Sapelkin <znanie at rawbw.com> wrote:
> 
> > Hello,
> > 
> > Am trying to change the DescriptionField to title.  I added:
> > 
> > Locale ru_RU  DescriptionField title
> > [LC]
> > [ru_RU]
> > [/LC]
> > to the pages/results.html but it still prints the (default)
> > description field. 
> 
> That ain't going to work. You really added the Locale line to pages/results.h
tml ?
> To change the locale within a page, try the [setlocale] tag.
> 
> > 
> > We would like to have a bilingual interchange homepage and would
> > like results.html to select either description or title depending on whethe
r we
> > picked english (going through index.html) or russian (going through
> > inderu.html) conditionally.  Also perhaps create another field in
> > products like comments only in russian and have that also selected
> > instead of regular comments field if we picked russian.
> 
> Use setlocale with persist=1 to change the locale in the user's session.
> 
> > 
> > Is There a CommentsField directive?
> > 
> 
> No. With Interchange 4.8, you need to use a workaround for that. 
> Interchange 4.9 provides the shadow database, which would help you
> there.
> 
> Bye
>        Racke
> _______________________________________________
> interchange-i18n mailing list
> interchange-i18n at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-i18n

--Kirill Sapelkin znanie at rawbw.com



More information about the interchange-i18n mailing list