mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 14:05:59 +00:00
39 lines
771 B
C++
39 lines
771 B
C++
|
* \file messages.C
|
|||
|
* This file is part of LyX, the document processor.
|
|||
|
* Licence details can be found in the file COPYING.
|
|||
|
*
|
|||
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|||
|
*
|
|||
|
* Full author contact details are available in file CREDITS
|
|||
|
*/
|
|||
|
|
|||
|
#include <config.h>
|
|||
|
|
|||
|
#include "messages.h"
|
|||
|
#include "debug.h"
|
|||
|
|
|||
|
using std::endl;
|
|||
|
|
|||
|
|
|||
|
Messages::Messages(string const & l, string const & dir)
|
|||
|
: lang_(l), localedir_(dir),
|
|||
|
loc_gl(lang_.c_str()),
|
|||
|
mssg_gl(std::use_facet<std::messages<char> >(loc_gl))
|
|||
|
{
|
|||
|
lyxerr << "Messages: language(" << l << ") in dir(" << dir << ")" << endl;
|
|||
|
|
|||
|
cat_gl = mssg_gl.open("lyx", loc_gl, localedir_.c_str());
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
Messages::~Messages()
|
|||
|
{
|
|||
|
mssg_gl.close(cat_gl);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
string const Messages::get(string const & msg) const
|
|||
|
{
|
|||
|
return mssg_gl.get(cat_gl, 0, 0, msg);
|
|||
|
}
|