Pierre d'Herbemont pdherbemont@free.fr writes:
I do remember now :) setlocale don't handle properly two letters language code like 'es' it expect a full locale name like 'es_ES' . And using the CFLocale API to obtain the full local from 'es' does not seem possible.
parse_locale_name() can handle that format though, so you can use that directly without going through setlocale. And if you really want setlocale you can rebuild a Unix locale name from parse_locale_name() results.