]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/locale.hxx
Reset, fix Nasal timers added on shutdown.
[flightgear.git] / src / Main / locale.hxx
index 8ccd2d218fd40aefea9accb4d96473b01bca5667..7119e9ee6701599d6c8c169f3a77cd85b71614e2 100644 (file)
@@ -22,6 +22,7 @@
 #define __FGLOCALE_HXX
 
 #include <string>
+#include <cstdarg> // for va_start/_end
 
 #include <simgear/props/props.hxx>
 
@@ -67,15 +68,20 @@ public:
      */
     const char* getDefaultFont      (const char* fallbackFont);
 
+    /**
+     * Obtain a message string, from a localized resource ID, and use it as
+     * a printf format string.
+     */
+    std::string localizedPrintf(const char* id, const char* resource, ... );
+    
+    std::string vlocalizedPrintf(const char* id, const char* resource, va_list args);
+    
     /**
      * Simple UTF8 to Latin1 encoder.
      */
     static void utf8toLatin1        (std::string& s);
 
-    /**
-     * Obtain user's default language setting.
-     */
-    const char* getUserLanguage();
+
 
 protected:
     /**
@@ -98,9 +104,20 @@ protected:
      */
     simgear::PropertyList getLocalizedStrings(SGPropertyNode *localeNode, const char* id, const char* context);
 
+    /**
+     * Obtain user's default language setting.
+     */
+    string_list getUserLanguage();
+    
     SGPropertyNode_ptr _intl;
     SGPropertyNode_ptr _currentLocale;
     SGPropertyNode_ptr _defaultLocale;
 };
 
+// global translation wrappers
+
+const char* fgTrMsg(const char* key);
+std::string fgTrPrintfMsg(const char* key, ...);
+
+
 #endif // __FGLOCALE_HXX