[liblouis-liblouisxml] Re: Automatic Determination of Language or Country

  • From: Christian Egli <christian.egli@xxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Fri, 16 Jan 2009 14:05:25 +0100

Hi John

On Tue, 2009-01-13 at 11:37 -0600, John J. Boyer wrote:
> I think Christian asked about automatic determination of language using 
> he lang attribute. This 
> can be done, but it would probably be desirable to change some 
> configuration settings, such as for styles, rather than just the 
> translation table.
> 
> The best way to do this would be with new semantic actions. liblouisxml 
> traverses the tree produced by libxml2 twice. The first time, it 
> analyzes the tree to gather information for the translation. The 
> second time it actually does the translation. The new semantic actions 
> would take place during the first traversal. They would be:
> 
> configfile xxx operand
> configstring xxx operand

That sounds better than my approach as it would allow to specify the
behavior for each language, i.e. for this language I want uncontracted,
for that one grade 1, etc.

Thanks.
-- 
Christian Egli
Swiss Library for the Blind and Visually Impaired
Grubenstrasse 12, CH-8045 Zürich, Switzerland

For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts: