aboutsummaryrefslogtreecommitdiff
path: root/common/translation.h
diff options
context:
space:
mode:
authorJohannes Schickel2010-06-15 17:34:07 +0000
committerJohannes Schickel2010-06-15 17:34:07 +0000
commitf607fc59dbdeecedb3151a7532be7e170812cb38 (patch)
tree78129892a57db4e1cebbcafb6a17ff787362af95 /common/translation.h
parent0bff5c29fe8d7d0c4edaabee576289ea3cb21d4c (diff)
downloadscummvm-rg350-f607fc59dbdeecedb3151a7532be7e170812cb38.tar.gz
scummvm-rg350-f607fc59dbdeecedb3151a7532be7e170812cb38.tar.bz2
scummvm-rg350-f607fc59dbdeecedb3151a7532be7e170812cb38.zip
Extend (and along with it add) some doxygen comments.
svn-id: r49872
Diffstat (limited to 'common/translation.h')
-rw-r--r--common/translation.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/common/translation.h b/common/translation.h
index a844c1f438..772e96fe58 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -79,18 +79,40 @@ public:
TranslationManager();
~TranslationManager();
+ /**
+ * Retrieves the language string to the given id.
+ *
+ * @param id Id of the language
+ * @return the matching string description of the language
+ */
const char *getLangById(int id);
/**
* Sets the current translation language to the one specified in the
* parameter. If the parameter is an empty string, it sets the default
* system language.
+ *
+ * @param lang Language to setup.
+ */
+ void setLanguage(const char *lang);
+
+ /**
+ * Sets the current translation language to the one specified by the
+ * id parameter.
+ *
+ * @param id The id of the language.
*/
- void setLanguage(const char *);
void setLanguage(int id) {
setLanguage(getLangById(id));
}
+ /**
+ * Parses a language string and returns an id instead.
+ *
+ * @param lang Language string
+ * @return id of the language or kTranslationBuiltinId in case the
+ * language could not be found.
+ */
int parseLanguage(const String lang);
/**
@@ -100,6 +122,11 @@ public:
*/
const char *getTranslation(const char *message);
+ /**
+ * Returns the translation into the current language of the parameter
+ * message. In case the message isn't found in the translation catalog,
+ * it returns the original untranslated message.
+ */
String getTranslation(const String &message);
/**
@@ -108,6 +135,11 @@ public:
*/
const char *convertTerm(const char *message);
+ /**
+ * Returns a list of supported languages.
+ *
+ * @return The list of supported languages.
+ */
const TLangArray getSupportedLanguages() const;
};