Re: Stand-Alone lunar calendar



On Mon, Feb 07, 2000 at 11:07:54AM +0300, Ali Abdin wrote:
> > > XML can be internationalized, but I don't remember exactly how.  
> > > E-mail Daniel Veillard if you can't figure it out, I guess.
> > 
> >   XML has a xml:lang="..." attribute which is dedicated to tag
> > the language of that document subtree. The best way is then to
> > have sibling elements in ths structure carrying each a different
> > xml:lang attribute and with the proper localized content
> > 
> >   <info>
> >       <descr xml:lang="en">Some english text</descr>
> >       <descr xml:lang="fr_FR">Pareil en francais</descr>
> >       <descr xml:lang="fr_CA">Si ma tante avait des gosses ...</descr>
> >   </info>
> > 
> > 
> 
> Does libxml handle this natively - or do I have to handle it in my 
> parser. e.g. do i have to check the user's locale and g_print the correct 
> message or do I just g_print the message and it'll show up correctly?

  No, you will have to dig in the result tree to find those informations.
The xmlGetLang() function allows you to find out the xml:lang applicable
(if any) for a given node.

Daniel.

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel: +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax: +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe



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