[ic] Template Locale & page edit on 4.7

Mike Heins mikeh@minivend.com
Thu, 26 Apr 2001 00:49:50 -0400


Quoting matjones@mickey.korksoft.com (matjones@mickey.korksoft.com):
> Hi,
> 
> I am currently setting up a catalog on 4.7 which will allow me to have my
> store
> in several languages. I have read the docs and managed to get the images
> and pages loaded from seperate 'english,german, french' directories. 
> My only problem now is with the template files. Is there a key I can use
> in the locale DB similar to: 
> PageDir english
> Locale fr_FR PageDir francais
> Locale en_US PageDir english
> 
> Surely there must be a way for me to have seperate language directories
> for my templates, since I cant use the [L][/L] tag within the
> 'components'.
> 

You can use the [L] [/L] within components; all you have to do is 
set:

	Locale   en_US   readfile  1
	Locale   de_DE   readfile  1
	Locale   fr_FR   readfile  1

That might not be the best way, though. You can easily do in the page:

[LC]
		@_NOLEFT_TOP_@
	[en_UK] @_NOLEFT_TOP_UK_@ [/en_UK]
	[de_DE] @_NOLEFT_TOP_DE_@ [/de_DE]
	[fr_FR] @_NOLEFT_TOP_FR_@ [/fr_FR]
[/LC]

I might even take a look at supporting that within the new page editor.

Since the locale substitution is done before the Variable substitution,
it doesn't even impact performance to any real degree.

In addition, if you are up to date on 4.7.x via CVS you will find that
Variable definititions can be dynamic from a database, and that there
are some things you can do there.

-- 
Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>

Unix version of an Outlook-style virus:
It works on the honor system. Please forward this message to everyone
you know, and delete a bunch of your files at random.