You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Scot Nielsen <sc...@yahoo.co.uk> on 2002/07/12 13:06:51 UTC

NLS Queries

Hello, I've got a couple of NLS issues in Xerces 2.0 I need to
understand/resolve, hope you can advise.

First of all, the task I have is to understand how we can provide Xerces
error message translation files for the various languages and platforms our
product is available on. I'm making the assumption that Japanese translation
files for instance, are not publicly available?

The problem I'm having is establishing for each platform just how the error
messages are being stored/compiled/accessed.

Looking at the Win32 build, there appears to be a VC++ resource file
containing the strings in hex format. Was this partially created using
tools/XLAT and the XMLErrList_EN_US.xml file? If so, its only compatible
with 1.7.  I noticed there also appears to be the option of an "InMemory"
string table, with the string definitions in a CPP file.  I  guess for the
Win32 case it's a matter of adding to the resource file (and InMemory .cpp)
a new set of strings for each language, which I believe the resource files
are quite capable of handling.

The other cases predominantly UNIX and Mainframe obviously use a different
scheme, which looks to be ICU? Is this the same for all the platforms?

I got a tonne more questions on this, but hopefully some pointers in the
right direction should set me straight and if this goes well, I don't see
why we can't offer the translated files back to Apache if they're wanted.

Ta very muchly,
Scot

PS
It was a monster update of code to get our app from 1.7 to 2.0 but it was
well worth it. Congratulations on a job very well


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: NLS Queries

Posted by Tinny Ng <tn...@ca.ibm.com>.
Scot,

I haven't tested any language other than English in my environment.  Please
correct me if I am wrong ....

Let take SAXCount as an example,

void SAXCountHandlers::fatalError(const SAXParseException& e)
{
    fSawErrors = true;
    cerr << "\nFatal Error at file " << StrX(e.getSystemId())
   << ", line " << e.getLineNumber()
   << ", char " << e.getColumnNumber()
         << "\n  Message: " << StrX(e.getMessage()) << endl;
}

The error message is retrieved from
          const XMLCh* SAXParseException::getMessage() const

All messages are encapsulated in Unicode, and send to application through
the Errorhandler.   Then it's up to the application to transcode this
unicode string (XMLCh* ) into local codepage (in this example, utility StrX
will do that).    So I don't think we need any translation files, right?

Tinny


----- Original Message -----
From: "Scot Nielsen" <sc...@yahoo.co.uk>
To: <xe...@xml.apache.org>
Sent: Friday, July 12, 2002 7:06 AM
Subject: NLS Queries


>
> Hello, I've got a couple of NLS issues in Xerces 2.0 I need to
> understand/resolve, hope you can advise.
>
> First of all, the task I have is to understand how we can provide Xerces
> error message translation files for the various languages and platforms
our
> product is available on. I'm making the assumption that Japanese
translation
> files for instance, are not publicly available?
>
> The problem I'm having is establishing for each platform just how the
error
> messages are being stored/compiled/accessed.
>
> Looking at the Win32 build, there appears to be a VC++ resource file
> containing the strings in hex format. Was this partially created using
> tools/XLAT and the XMLErrList_EN_US.xml file? If so, its only compatible
> with 1.7.  I noticed there also appears to be the option of an "InMemory"
> string table, with the string definitions in a CPP file.  I  guess for the
> Win32 case it's a matter of adding to the resource file (and InMemory
.cpp)
> a new set of strings for each language, which I believe the resource files
> are quite capable of handling.
>
> The other cases predominantly UNIX and Mainframe obviously use a different
> scheme, which looks to be ICU? Is this the same for all the platforms?
>
> I got a tonne more questions on this, but hopefully some pointers in the
> right direction should set me straight and if this goes well, I don't see
> why we can't offer the translated files back to Apache if they're wanted.
>
> Ta very muchly,
> Scot
>
> PS
> It was a monster update of code to get our app from 1.7 to 2.0 but it was
> well worth it. Congratulations on a job very well
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org