bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LANG and @documentlanguage


From: Alper Ersoy
Subject: Re: LANG and @documentlanguage
Date: Wed, 26 Nov 2003 14:26:41 +0200
User-agent: Mutt/1.4.1i

Hello!

Akim Demaille:
> It should depend on @documentlanguage only.

Once Karl mentioned he would like to improve language handling in
Texinfo too.  Though I doubt that will happen before the next release.

Anyway.  Here's my take:

@documentlanguage becomes a special version of @include, looking for
txi-??.tex files.  txi-??.tex files will have a bunch of @set commands
like these:

  @set I18NWordAppendix Annexe
  @set I18NWordChapter  Chapitre
  ...

Instead of _("Chapter") in makeinfo, we'll use @value{I18NWordChapter}
(or better insert the value directly without making use of @value{}.)

Also @today will be simplified to a standard Texinfo @macro, instead
of being \def, which is TeX specific.

  @macro today
  @value{I18NDateDay} @value{I18NDateMonth} @value{I18NDateYear}
  @end macro

I18NDateDay and I18NDateYear will be defined by @documentlanguage.

TeX:

  @set I18NDateDay \number\day
  @set I18NDateYear \number\year

makeinfo (based on current @today):

  time_t timer = time (0);
  struct tm *ts = localtime (&timer);
  execute_string ("@set I18NDateDay %s", ts->tm_mday);
  execute_string ("@set I18NDateYear %s", td->tm_year + 1900);

However, there seems to be more than word translations in txi-de.txi,
namely defining hyphenation exceptions.  I think those belong more to
the hyphen package.  After all, HTML/XML/Docbook outputs will not make
use of hyphenation, and I suppose neither Info.  (Though before making
assumptions about Info hyphenation, perhaps I should check to see how
groff handles it.)

Loading the related hyphen package should be handled by
@documentlanguage, and in TeX only for now.  We seem to need a way to
relate txi-??.tex files to hyphenation packages, so how about this:

  @set I18NHyphenationPackage frhyphen

and when we are done with txi-fr.tex, @documentlanguage should:

  @include @value{I18NHyphenationPackage}

I'm pretty sure I missed lots of finer details of multilingo
documents, so feel free to complement. :)

Thanks,

-- 
Alper Ersoy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]