[ic] 4.6.1. Problems with localization introduced

Mike Heins mikeh@minivend.com
Sun, 17 Dec 2000 07:37:37 -0500


Quoting Ton Verhagen (ton@verhagen.net):
> Mike, I am under the impression that when a scan is called without a search 
> file directive, the ProductFiles will be searched. This is how it worked in 
> 4.6.0 and before. Has anything changed since? And if so, why?

Yes, of course. ProductFiles did, remember?

> What is the use of having ProductFiles dynamically changed when setting 
> another locale, while you still have to call a specific table. Also, in 
> this scenario, one can't use a range of (product) tables to be searched for 
> each locale.
> 
> IMHO the most elegant way is to have ProductFiles dynamically adapt to the 
> locale and have the scan/search use the 'active' ProductFiles directive. 
> What do you think?

No, there is no one best way. How are you going to control what text
is searched for? Do you have to generate separate scan values for each
locale, or do you search for one value and then return results from the
proper locale?

For a form-based search, it is obviously best to search the current
ProductFiles. But for a coded one, it is far from clear.

You can always, in a form-based search, put this in:

<INPUT	TYPE=hidden
	NAME=mv_search_file
	VALUE="[calc] join ',', @{$Config->{ProductFiles}}; [/calc]">

In a scan, do you want to always have to put your search strings in
[L] [/L]? I doubt it. If you don't, then they will fail when searching
something.

You can always put in an Autoload:

[calc]
	$Variable->{MV_DEFAULT_SEARCH_FILE} = @{$Config->{ProductFiles}};
[/calc]

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman