]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetCaption.cpp
Make sure that the new caching mechanism for flattened labels respects languages.
[features.git] / src / insets / InsetCaption.cpp
index 09254d133f9351ca368cc6565c3265e50ac8fa03..f3dbc5808a9ac55b0a1f53c6fb357313860ce689 100644 (file)
@@ -25,6 +25,7 @@
 #include "FuncRequest.h"
 #include "FuncStatus.h"
 #include "InsetList.h"
+#include "Language.h"
 #include "MetricsInfo.h"
 #include "output_latex.h"
 #include "OutputParams.h"
@@ -301,6 +302,7 @@ void InsetCaption::updateLabels(ParIterator const & it)
 {
        Buffer const & master = *buffer().masterBuffer();
        DocumentClass const & tclass = master.params().documentClass();
+       string const & lang = it.paragraph().getParLanguage(master.params())->code();
        Counters & cnts = tclass.counters();
        string const & type = cnts.current_float();
        // Memorize type for addToToc().
@@ -325,7 +327,7 @@ void InsetCaption::updateLabels(ParIterator const & it)
                        cnts.step(counter);
                        full_label_ = bformat(from_ascii("%1$s %2$s:"), 
                                              name,
-                                             cnts.theCounter(counter));
+                                             cnts.theCounter(counter, lang));
                } else
                        full_label_ = bformat(from_ascii("%1$s #:"), name);     
        }