public member function
<locale>

std::messages::open

catalog open (const string& name, const locale& loc) const;
Open message catalog
Opens the message catalog by name to access messages and returns an object that uniquely identifies the catalog when calling member messages::get.

Internally, this function simply calls the virtual protected member do_open, which returns the object described above.

Parameters

name
string identifying a message catalog.
Notice that this is an object of type string (i.e., basic_string<char>) no matter what character type is used as template parameter charT.
loc
locale object. It is only used for character set code conversions while retrieving messages.

Return value

An object of member type catalog (inherited from messages_base) that identifies the message catalog.
This value is only meant to be used by member get, to access the individual messages, and by member close, which closes the catalog and invalidates this value as a catalog identifier.

If the function cannot open the catalog, it returns a value which is less than zero.

See also