3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
14 #include "frnt_lang.h"
25 bool operator()(frnt::LanguagePair const & lhs,
26 frnt::LanguagePair const & rhs) const {
27 return lhs.first < rhs.first;
35 vector<LanguagePair> const getLanguageData(bool character_dlg)
37 vector<LanguagePair>::size_type const size = character_dlg ?
38 languages.size() + 2 : languages.size();
40 vector<LanguagePair> langs(size);
43 langs[0].first = _("No change");
44 langs[0].second = "ignore";
45 langs[1].first = _("Reset");
46 langs[1].second = "reset";
49 vector<string>::size_type i = character_dlg ? 2 : 0;
50 for (Languages::const_iterator cit = languages.begin();
51 cit != languages.end(); ++cit) {
52 langs[i].first = _(cit->second.display());
53 langs[i].second = cit->second.lang();
57 // Don't sort "ignore" and "reset"
58 vector<LanguagePair>::iterator begin = character_dlg ?
59 langs.begin() + 2 : langs.begin();
61 std::sort(begin, langs.end(), Sorter());