Hi, On 05/30/2013 12:50 AM, Pete Batard wrote:
<snip> > PS: I also think that if we go for adding a stelocale, it should be > called libusb_setlocale() rather than libusb_set_strerror_locale(). Or > do we plan to have different setlocale for different API calls? Sound reasonable, I will fix this in the next version of my RFC-patch. > [1] > http://www.kipras.com/blog/getting-gettext-to-work-in-apache-on-windows/96: > "LC_MESSAGES is an undefined constant on windows machines, and defining > it to contain the same value as it does on Linux machines, doesn’t do > any good" Oh, darn, you're right windows does not have LC_MESSAGES, grumble. I still believe that having a separate libusb_setlocale() is best, so new API proposal: int libusb_setlocale(const char *locale); const char *libusb_strerror(enum libusb_error errcode); Where libusb_strerror will default to English on all platforms if libusb_setlocale has not been called before. This means apps that want localized strerror results *must* call libusb_setlocale. I've contemplated to default to the setlocale(LC_MESSAGES, NULL) result on all but Windows, but that means that apps which rely on this will loose localization when ported to windows, so it seems better (more consistent) to just make libusb_setlocale mandatory everywhere. And this should also make all the people who just want English messages happy. This also means that we can get rid of the large windows setlocale string table and just rely on ISO-639-1 2 letter codes: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes So I'll wait a bit for some feedback on this new proposal (not only critique. if you like it, please also say so) and then do a new version of my patch. Regards, Hans ------------------------------------------------------------------------------ Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with <2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel