bugGNU gettext - Bugs: bug #26483, RFE: Retrieve translation of a...


You are not allowed to post comments on this tracker with your current authentication level.

bug #26483: RFE: Retrieve translation of a specific locale without calling setlocale()

Submitted by:  None
Submitted on:  Thu 07 May 2009 01:37:14 PM UTC  
Category:  Programmer interface Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  Bruno Haible <haible>
Open/Closed:  Open

Thu 07 May 2009 10:43:58 PM UTC, comment #1:

You are right. But it's hard to find an API that is at the
same time close to glibc APIs and easy to implement portably.

For something close to glibc APIs, there is the rejected
proposal in

If only the glibc platforms are targeted, uselocale and gettext
do the trick:

If portability is desired, we tried to port the locale_t type
to all platforms here, but abandoned it:

What is the right way to proceed on this issue?

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Thu 07 May 2009 01:37:14 PM UTC, original submission:

A very useful enhancement to gettext would be the availability of an interface such as:
char lgettext(const char locale, const char *msg_id)

This would allow the caller to specify, just for the duration of this call to gettext, which locale to use.

Being able to avoid the use of setlocale() would significantly reduce the risk of synchronization bugs in threaded programs.



No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone => Programmer interface
    2009-05-07 haible Assigned toNone => haible
    2009-05-07 haible StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.3