]> git.lyx.org Git - features.git/commitdiff
Fix i18n for InsetBibtex.
authorRichard Heck <rgheck@comcast.net>
Wed, 15 Sep 2010 13:28:55 +0000 (13:28 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 15 Sep 2010 13:28:55 +0000 (13:28 +0000)
It would be better to get the paragraph language here. How to do that?

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35386 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetBibtex.cpp

index a83068201b430fbb74df4eda0f3039dd4d3658c0..4f1e53c2a037adaf1fecb28458fe57eec617578d 100644 (file)
@@ -20,6 +20,7 @@
 #include "Format.h"
 #include "FuncRequest.h"
 #include "FuncStatus.h"
+#include "Language.h"
 #include "LaTeXFeatures.h"
 #include "output_xhtml.h"
 #include "OutputParams.h"
@@ -922,8 +923,13 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const
        bool const numbers = 
                (engine == ENGINE_BASIC || engine == ENGINE_NATBIB_NUMERICAL);
 
+       docstring reflabel = from_ascii("References");
+       Language const * l = buffer().params().language;
+       if (l)
+               reflabel = translateIfPossible(reflabel, l->code());
+               
        xs << html::StartTag("h2", "class='bibtex'")
-               << _("References")
+               << reflabel
                << html::EndTag("h2")
                << html::StartTag("div", "class='bibtex'");