helpGNU gettext - Support: sr #102913, Wishlist: multilanguage support


sr #102913: Wishlist: multilanguage support

Submitted by:  None
Submitted on:  Sun 14 Mar 2004 05:51:22 PM UTC  
Votes:  2  
Category: NonePriority: 5 - Normal
Severity: 1 - WishStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 28 Feb 2013 10:45:24 AM UTC, comment #3:

Actually, this is the main point for thread-specific setlocale(). You could run a thread for each user and set the locale to the selected one, while the main thread retains the system locale, but I think this should be done at Libc level.

Miguel Ángel Arruga Vivas <m1gu3l>
Project Member
Wed 24 Jan 2007 08:18:34 PM UTC, comment #2:

The problem with these language-swapping approaches - without really changing the locale with setlocale - is that you can produce inconsistent error messages:

fprintf (STDERR, _"open failed: %s\n", strerror (errno));

The string "open failed: %s\n" will be translated into a string of a language and encoding selected by the application. The interpolated string will be translated into a locale-dependent language and encoding. The mixing of languages is only mildly repulsive to the end user, the mixing of encodings can be fatal.

If you can live with that, write a hack like you described. If you can't live with it, there is no other way than really switching the locale with setlocale().


Wed 31 May 2006 07:36:49 AM UTC, comment #1:

Could the problem perhaps be solved (or circumvented) by storing the .mo's in locale specific subdirectories?


Other than that, I've longed for on-the-fly language swapping in KDE, Gnome and other software for a long time. As far as I can understand, this would/might open the door for such a thing (?).

Gudmund Areskoug <gudmund>
Sun 14 Mar 2004 05:51:22 PM UTC, original submission:

I writing a multilanguage server application. The user can select
the language of interface. If I want to use gnu gettext, I have to make
fake domain for all languages (messages_it.po, messages_fr.po, ...)
and select them using bindtextdomain and dc

Please, you could add some multilanguage functions like

dclgettext(id, domain, category, language)





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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by m1gu3l (Posted a comment)

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 31 May 2006 07:36:50 AM UTCgudmundCarbon-Copy-=>Added gudmund

    Back to the top

    Powered by Savane 3.1-cleanup1