On Wed, May 29, 2013 at 11:50:39PM +0100, Pete Batard wrote: > On 2013.05.29 23:25, Hans de Goede wrote: > > Hi, > > > > On 05/30/2013 12:17 AM, Sean McBride wrote: > >> On Thu, 30 May 2013 00:17:11 +0200, Hans de Goede said: > >> > >>>> IMHO you should use LC_MESSAGES in the usual way instead > >>>> of inventing your own API. I.e. libusb_strerror() internally > >>>> calls setlocale(LC_MESSAGES, NULL) to query the locale. > > Which is expected to work fine on POSIX but *may* not on Windows [1]. > > I do remember spending quite a lot of time trying to get gettext and > POSIX like localization going on Windows, but, with Windows being > Windows, it didn't work that well (then again, we were trying to use the > GNU localization tools).
OK, setlocale() is not POSIX, it is ISO C. But it seems LC_MESSAGES is only in POSIX and Windows doesn't support it. I can't comment on gettext on Windows, only that a quick search shows there are several projects using it. Anyway, I trust you to do the right decision for Windows, but it feels wrong to not use gettext on Linux and BSD. But you and Hans do the work, so you get to choose... My primary concern is the libusb_set_strerror_locale() API, which smells funny. Isn't there some Win32 API or registry lookup you can use as a replacement for LC_MESSAGES? How do native Windows programs handle thandle translations? Johannes ------------------------------------------------------------------------------ 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