summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mg_actions.c3
-rw-r--r--mg_db.c4
-rw-r--r--mg_db.h4
3 files changed, 11 insertions, 0 deletions
diff --git a/mg_actions.c b/mg_actions.c
index 1f80325..95f821c 100644
--- a/mg_actions.c
+++ b/mg_actions.c
@@ -10,6 +10,7 @@
*/
#include <stdio.h>
+#include <libintl.h>
#include <typeinfo>
#include <string>
@@ -329,6 +330,8 @@ mgEntry::MenuName(const unsigned int idx,const string value)
}
else if (selection()->inCollection())
asprintf(&result,"%4d %s%s",idx,value.c_str(),ct);
+ else if (selection()->isLanguagelist())
+ asprintf(&result,"%s%s",dgettext("iso_639",value.c_str()),ct);
else
asprintf(&result,"%s%s",value.c_str(),ct);
return result;
diff --git a/mg_db.c b/mg_db.c
index 7971b7a..d196b6c 100644
--- a/mg_db.c
+++ b/mg_db.c
@@ -1259,6 +1259,10 @@ mgSelection::UsedBefore(mgOrder *o,const mgKeyTypes kt,unsigned int level) const
return false;
}
+bool mgSelection::isLanguagelist() const
+{
+ return (order.getKeyType(0) == keyLanguage);
+}
bool mgSelection::isCollectionlist () const
{
diff --git a/mg_db.h b/mg_db.h
index fd61422..a053757 100644
--- a/mg_db.h
+++ b/mg_db.h
@@ -476,6 +476,10 @@ class mgSelection
*/
bool isCollectionlist () const;
+/*! \brief true if this selection currently selects a list of languages
+ */
+ bool isLanguagelist () const;
+
//! \brief true if we have entered a collection
bool inCollection(const string Name="") const;