According to Peter Hanecak:
> On Mon, 18 Oct 1999, Geoff Hutchison wrote:
> > > Not quite sure.. but as I understand it, this can already be done 
> > > solely based upon the template feature.  All you have to do for it
> > > is to write one template and one config for each language - common
> > > parts of the config can be shared using the include directive.
> > > You can then switch languages by switching configuration files, which
> > > is possible by using "allow_in_form: config".
> > 
> > No, this can't be done solely based on templates, since error messages are
> > still in english. :-(
> 
> yes. and for now are not "localized" in my patch.

I took a look at the patch, and it doesn't deal with error messages at all.
All it seems to do is load in a different set of default configuration
attributes based on the language - all of these can already be redefined
in htdig.conf.

The error messages aren't a big problem, though, because they're only seen
by the person setting up and running ht://Dig.  All the messages that the
end-user sees, from the CGI output, can be changed by configuration
attributes.

> templates solve almost everything (if we forget error messages) but when
> you perform search (i.e. you see result page) there are $(METHOD),
> $(FORMAT) and $(SORT) variables in templates which vere filled with
> english words - this looks somehow strange in slovak page (some users then
> should get confused and/or angry). these can't be dome using config file
> not templates. or can be?

Yes.  See the following:

        http://www.htdig.org/attrs.html#method_names
        http://www.htdig.org/attrs.html#template_map
        http://www.htdig.org/attrs.html#sort_names

You redefine these attributes in LangSK.cc.  The same redefinitions could
be done in your config file.

> > One clarification: you *don't* need allow_in_form: config. Config is
> > part of the default form. (After all, you need the config file to read the
> > allow_in_form attribute, right?)
> 
> right. specifying config in your search.html is enought to "force" usage
> of alternate config.
> 
> i want to say, that even "you are dump", "you stupid", ... messages are
> welcome while maybe i overlooked somethink else which can handle the
> "multilanguage" thing. of course some more explanation is needed in such
> messages :) .

Well, I don't think you are stupid or dumb at all.  Your patch would work
fine, it seems to me, but I don't see it as necessary.  Any configuration
attribute can be changed in your config file.  You don't need to change them
in the C++ code.  I think that's all you overlooked.  An honest mistake,
really.  There's a lot of code to learn all at once, and the documentation
isn't always as clear as it could be, so it's not easy to figure out what
configuration options you need to tweek to do what you want.

There's another problem with your patch: if you do define the new "language"
attribute in htdig.conf as "sk", then the compiled-in values for these
attributes will override anything you use in your htdig.conf, so you won't
be able to change them:

    {"method_names",                   "and v�etky or ktor�ko�vek boolean 'logick� 
v�raz'"},
    {"no_excerpt_text",                "<em>(�iadne h�adan� slov� neboli n�jden� v 
�vodnej �asti tohto dokumentu.)</em>"},
    {"page_list_header",               "<hr noshade size=2>Strany:<br>"},
    {"sort_names",                     "score sk�re time �asu title titulku revscore 
'sk�re (obr�tene)' revtime '�asu (obr�tene)' revtitle 'titulku (obr�tene)'"},
    {"template_map",                   "dlh� builtin-long builtin-long kr�tky 
builtin-short builtin-short"},


-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to