
Hi to all! I am writing some application that uses program_options. This application interacts with user using non-english language. Is there any way to translate "what" messages from exceptions to another language? At now I found only one way (rather hack :) ): static void store(const basic_parsed_options<char> &options, variables_map &variables) { try { program_options::store(options, variables); } catch(unknown_option &error) { const char *what = error.what(); static const char prefix[] = "unknown option "; if(!strncmp(what, prefix, sizeof(prefix) - 1)) throw logic_error("Неизвестная опция: " + string(what + sizeof(prefix) - 1)); throw logic_error("Неверный формат командной строки"); } } Another way is to redefine function invalid_command_line_syntax::error_message(), but in such case we can translate only some messages.