You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by "Sharma, Gaurav" <Ga...@Safenet-inc.com> on 2010/10/25 11:21:21 UTC

localization help

Hi All,

Does anyone has any idea about whether or not xerces provides infrastructure for the localized error messages. What my need is that if I set the locale by any mean to "Chinese" while initializing xerces then the error message returned from xerces should be Chinese.

With Regards
Gaurav Sharma

The information contained in this electronic mail transmission 
may be privileged and confidential, and therefore, protected 
from disclosure. If you have received this communication in 
error, please notify us immediately by replying to this 
message and deleting it from your computer without copying 
or disclosing it.



RE: localization help

Posted by "Sharma, Gaurav" <Ga...@Safenet-inc.com>.
Hi Boris and All,

Could you please elaborate a bit more on it? Form your message it looks like I need to build the xerces c++ libraries myself and configure it as per my needs. Is it the case? Currently I am using downloaded libs/dll.

Thanks and Regards
Gaurav Sharma


-----Original Message-----
From: Boris Kolpackov [mailto:boris@codesynthesis.com] 
Sent: Tuesday, October 26, 2010 7:27 PM
To: c-users@xerces.apache.org
Subject: Re: localization help

Hi Gaurav,

Sharma, Gaurav <Ga...@Safenet-inc.com> writes:

> Does anyone has any idea about whether or not xerces provides 
> infrastructure for the localized error messages. What my need is that 
> if I set the locale by any mean to "Chinese" while initializing xerces
> then the error message returned from xerces should be Chinese.

Yes, you can configure Xerces-C++ with one of the more advanced message
loaders (e.g., ICU or MsgCatalog) which will allow you to load different
message catalogs depending on the locale/language. You will need to
study the interface/source code for the message loader of your choice
to figure out how to do this.

Boris

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Compiler-based ORM system for C++      http://codesynthesis.com/products/odb
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde
The information contained in this electronic mail transmission 
may be privileged and confidential, and therefore, protected 
from disclosure. If you have received this communication in 
error, please notify us immediately by replying to this 
message and deleting it from your computer without copying 
or disclosing it.



Re: localization help

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Gaurav,

Sharma, Gaurav <Ga...@Safenet-inc.com> writes:

> Does anyone has any idea about whether or not xerces provides 
> infrastructure for the localized error messages. What my need is that 
> if I set the locale by any mean to "Chinese" while initializing xerces
> then the error message returned from xerces should be Chinese.

Yes, you can configure Xerces-C++ with one of the more advanced message
loaders (e.g., ICU or MsgCatalog) which will allow you to load different
message catalogs depending on the locale/language. You will need to
study the interface/source code for the message loader of your choice
to figure out how to do this.

Boris

-- 
Boris Kolpackov, Code Synthesis        http://codesynthesis.com/~boris/blog
Compiler-based ORM system for C++      http://codesynthesis.com/products/odb
Open-source XML data binding for C++   http://codesynthesis.com/products/xsd
XML data binding for embedded systems  http://codesynthesis.com/products/xsde