int SetLangID( int langID ) { int nRet = 0; int curID = s_SysLang.GetLangID(); if ( curID != langID ) { nRet = s_SysLang.SetLangID( langID ); if ( nRet == 0 ) { char path[256]; const char *pLangFile = s_SysLang.GetLangFile( langID ); snprintf( path, sizeof(path), "%s/%s", SYS_CONFIG_LANG_PATH, pLangFile ); nRet = s_SysLang.LoadLangFile( path ); if ( nRet != 0 ) s_SysLang.SetLangID( curID ); } } return nRet; }
int LoadLangText( char *file ) { char path[256] = { 0 }; snprintf( path, sizeof(path), "%s/%s", SYS_CONFIG_LANG_PATH, file ); return s_SysLang.LoadLangFile( path ); }