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;
29 /// What is the language associated with this translation?
30 std::string language() const;
31 /// Is an (at least partial) translation of language with code \p c available?
32 static bool available(std::string const & c);
40 typedef std::map<std::string, docstring> TranslationCache;
41 /// Internal cache for gettext translated strings.
42 /// This is needed for performance reason within \c updateBuffer()
44 mutable TranslationCache cache_;
47 /// Access to the unique Messages object for the passed \p language.
48 /// Implementation is in LyX.cpp.
49 extern Messages const & getMessages(std::string const & language);
50 /// Access to the unique Messages object used for GUI element.
51 /// Implementation is in LyX.cpp.
52 extern Messages const & getGuiMessages();
54 /// Remove the context suffix from \p trans
55 extern void cleanTranslation(docstring & trans);