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()

Submitter:  None
Submitted:  Thu 07 May 2009 01:37:14 PM UTC
Votes: 1
Category:  Programmer interface Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  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>
Group administrator
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.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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 egallager (Voted in favor of this item)
  • -email is unavailable- added by haible (Posted a comment)

    There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-07 egallager Carbon-Copy- Added egallager
    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.13-b921.
    Corresponding source code