3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
14 #include "support/docstring.h"
24 /// messages in the language \p l.
25 /// If \p l is empty, the language will be defined by the environment.
26 Messages(std::string const & l = std::string());
28 docstring const get(std::string const & msg) const;
32 static std::string const & defaultLanguage() { return main_lang_; }
36 static void setDefaultLanguage();
38 static std::string main_lang_;
41 /// Did we warn about unavailable locale already?
44 typedef std::map<std::string, docstring> TranslationCache;
45 /// Internal cache for gettext translated strings.
46 /// This is needed for performance reason within \c updateLabels()
48 mutable TranslationCache cache_;
51 /// Access to the unique Messages object for the passed \p language.
52 /// Implementation is in LyX.cpp.
53 extern Messages & getMessages(std::string const & language);
54 /// Access to the unique Messages object used for GUI element.
55 /// Implementation is in LyX.cpp.
56 extern Messages & getGuiMessages();