00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #if !defined(AFX_FSLANGMGR_H__24624383_B5E1_4CAA_8F76_0F435FBAFE45__INCLUDED_) 00007 #define AFX_FSLANGMGR_H__24624383_B5E1_4CAA_8F76_0F435FBAFE45__INCLUDED_ 00008 00009 #if _MSC_VER > 1000 00010 #pragma once 00011 #endif 00012 00013 #include "list.h" 00014 00015 #define LS(i) _LngMgr.GetString (i) 00016 #define LSNP(i) _LngMgr.GetStringNP (i) 00017 00018 struct fsLngFileInfo 00019 { 00020 CString strFileName; 00021 CString strLngName; 00022 }; 00023 00024 class fsLangMgr 00025 { 00026 public: 00027 00028 BOOL Initialize (); 00029 00030 int GetLngCount(); 00031 00032 LPCSTR GetLngName (int iIndex); 00033 00034 int FindLngByName (LPCSTR pszName); 00035 00036 BOOL LoadLng (int iIndex); 00037 00038 int GetStringCount(); 00039 00040 int GetCurLng(); 00041 00042 LPCSTR GetString (int iIndex); 00043 00044 CString GetStringNP (int iIndex); 00045 00046 fsLangMgr(); 00047 virtual ~fsLangMgr(); 00048 00049 protected: 00050 void PreprocessLanguageString (CString& str); 00051 00052 void LoadBuiltInLngStrings(); 00053 00054 void AddLngFileInfo (fsLngFileInfo& info); 00055 int m_iCurLng; 00056 fs::list <fsLngFileInfo> m_vLngFiles; 00057 fs::list <CString> m_vStrings; 00058 fs::list <CString> m_vBuiltInStrings; 00059 CString m_strLngFolder; 00060 }; 00061 00062 #endif
1.5.6