- list<shared_ptr<Font> >::const_iterator j = ref_fonts.begin ();
- list<shared_ptr<Font> >::const_iterator k = fonts.begin ();
+ if (c[i]->only_text()->language() != ref->language()) {
+ throw JoinError (_("Content to be joined must use the same text language."));
+ }
+
+ if (c[i]->only_text()->language_is_additional() != ref->language_is_additional()) {
+ throw JoinError (_("Content to be joined must both be main subtitle languages or both additional."));
+ }
+
+ auto j = ref_fonts.begin ();
+ auto k = fonts.begin ();