00001 00032 #ifndef LL_TRANS_H 00033 #define LL_TRANS_H 00034 00035 #include <map> 00036 00040 class LLTransTemplate 00041 { 00042 public: 00043 LLTransTemplate(const LLString& name = "", const LLString& text = "") : mName(name), mText(text) {} 00044 00045 LLString mName; 00046 LLString mText; 00047 }; 00048 00055 class LLTrans 00056 { 00057 public: 00058 LLTrans(); 00059 00065 static bool parseStrings(const LLString& xml_filename); 00066 00073 static LLString getString(const LLString &xml_desc, const LLString::format_map_t& args); 00074 00080 static LLString getString(const LLString &xml_desc) 00081 { 00082 LLString::format_map_t empty; 00083 return getString(xml_desc, empty); 00084 } 00085 00086 00087 private: 00088 typedef std::map<LLString, LLTransTemplate > template_map_t; 00089 static template_map_t sStringTemplates; 00090 }; 00091 00092 #endif