----- "Sean Flanigan" sflaniga@redhat.com wrote:
Ulrich Drepper wrote:
Sean Flanigan wrote:
Would there be any interest in getting something like this into
glibc?
Hell, no. There is no room for testing code in the runtime.
<snip>
Is the implementation of "fetch translations from MO files under /usr/share/locale/" hard-coded? If there's already a nice programmatic hook I could use, even better. If I could register locale-specific overrides of gettext(), I could add any number of dynamically generated locales.
It is set by bindtextdomain().
Somewhat related, look at a previous discussion relating to Ubuntu's patched glibc for supporting language-packs: http://sources.redhat.com/ml/libc-alpha/2005-03/msg00105.html
A gettext() hook could also be used to fetch translations from other sources, such as a shared, up-to-date, translation database. I think that has the potential to be useful to a lot of people, not just developers and testers.
It doesn't really make sense to generate thousands of pseudo PO files, and compile them into static MOs, when all the required data (ie English text) is available at runtime.
Let me change my question then. How would people feel about having a hook to override the behaviour of gettext() in a system-wide fashion?
I guess you could experiment with LD_PRELOAD for this. Tim Foster experimented with this a while a go. http://blogs.sun.com/timf/entry/how_much_translation_do_you
cheers, asgeir
Asgeir Frimannsson wrote:
----- "Sean Flanigan" sflaniga@redhat.com wrote:
A gettext() hook could also be used to fetch translations from other sources, such as a shared, up-to-date, translation database. I think that has the potential to be useful to a lot of people, not just developers and testers.
It doesn't really make sense to generate thousands of pseudo PO files, and compile them into static MOs, when all the required data (ie English text) is available at runtime.
Let me change my question then. How would people feel about having a hook to override the behaviour of gettext() in a system-wide fashion?
I guess you could experiment with LD_PRELOAD for this. Tim Foster experimented with this a while a go. http://blogs.sun.com/timf/entry/how_much_translation_do_you
Thank you, Asgeir, that's just the information I needed. Looks like LD_PRELOAD won't work on suid binaries, but it should be possible to pseudo-localise 95% of packages without touching their build processes.