[cups.development] Localized messages from cups API
Michael Sweet
msweet at apple.com
Wed Mar 17 11:24:46 PDT 2010
On Mar 17, 2010, at 11:13 AM, Daniel Nicoletti wrote:
>> CUPS only provides localized versions of messages it generates.
>>
>> For error messages use cupsLastErrorString() to get the localized message.
>
> Yes, that's the function I use, does it rely on LANGUAGE or LANG to be set?
CUPS looks for the LANG and LC_MESSAGES environment variables to get the localization that is needed. If you use any of the convenience functions or ippNewRequest() then the attributes-natural-language value is filled in for you, otherwise you should call cupsLangDefault() to get the default language and proceed from there.
> Thanks.
>
>>
>> On Mar 17, 2010, at 7:04 AM, Daniel Nicoletti wrote:
>>
>>> I tried to dig into cups sources but could not
>>> find how can a client application using cups API
>>> can get localized messages.
>>> At least when I'm using localhost:631 most of
>>> the messages are localized like forbidden, but
>>> I could not do that in my client application.
>>>
>>> Is there a way to get localized messages? Like
>>> ippAddString("lang", lang); or it only works
>>> for localhost:631 ?
>>>
>>> Thanks.
>>> _______________________________________________
>>> cups-dev mailing list
>>> cups-dev at easysw.com
>>> http://lists.easysw.com/mailman/listinfo/cups-dev
>>
>> ________________________________________________________________________
>> Michael Sweet, Senior Printing System Engineer, PWG Chair
>>
>>
>>
>>
>
> _______________________________________________
> cups-dev mailing list
> cups-dev at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups-dev
________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
More information about the cups
mailing list