]> git.lyx.org Git - lyx.git/blobdiff - src/support/gettext.h
amend 6144bbfb
[lyx.git] / src / support / gettext.h
index bbec30a24ae6c073ff289d7f84a0809677d68a73..317feec82ec6ba5a78bb84a2ac172341baf3de37 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  * \author Jean-Marc Lasgouttes
  *
  * Full author contact details are available in file CREDITS.
@@ -37,6 +37,10 @@ namespace lyx {
  * Remember to mention each of these files in "po/POFILES.in"
  *
  * The main() needs a locale_init() and a gettext_init() in the beginning.
+ *
+ * The various *_() methods accept only ASCII input, so they must not be used
+ * if the input may come from user supplied  files.
+ * translateIfPossible() should be used in that case.
  */
 
 /*
@@ -62,15 +66,17 @@ docstring const _(std::string const &);
 #  define N_(str) (str)              // for detecting static strings
 
 /**
- * Translate \p name if it is possible.
+ * Translate \p name to the GUI language if it is possible.
  * This should be used to translate strings that come from configuration
  * files like .ui files. These strings could already be in the native
  * language if they come from a file in the personal directory. */
 docstring const translateIfPossible(docstring const & name);
-
-///
-void locale_init();
-
+/**
+ * Translate \p name to \p language if it is possible.
+ * This should be used to translate strings that come from configuration
+ * files like .ui files. These strings could already be in the native
+ * language if they come from a file in the personal directory. */
+docstring const translateIfPossible(docstring const & name, std::string const & language);
 
 } // namespace lyx