int SE_GetNumLanguages(void)
{
	if ( gvLanguagesAvailable.empty() )
	{
		string strResults;
		/*int iFilesFound = */SE_BuildFileList( 
												#ifdef _STRINGED
													va("C:\\Source\\Tools\\StringEd\\test_data\\%s",sSE_STRINGS_DIR)
												#else
													sSE_STRINGS_DIR
												#endif
												, strResults 
											);

		set<string> strUniqueStrings;	// laziness <g>
		LPCSTR p;
		while ((p=SE_GetFoundFile (strResults)) != NULL)
		{
			LPCSTR psLanguage = TheStringPackage.ExtractLanguageFromPath( p );

	//		__DEBUGOUT( p );
	//		__DEBUGOUT( "\n" );
	//		__DEBUGOUT( psLanguage );
	//		__DEBUGOUT( "\n" );

			if (!strUniqueStrings.count( psLanguage ))
			{
				strUniqueStrings.insert( psLanguage );

				// if english is available, it should always be first... ( I suppose )
				//
				if (!stricmp(psLanguage,"english"))
				{
					gvLanguagesAvailable.insert( gvLanguagesAvailable.begin(), psLanguage );
				}
				else
				{
					gvLanguagesAvailable.push_back( psLanguage );
				}
			}
		}
	}

	return gvLanguagesAvailable.size();
}
// returns error message else NULL for ok.
//
// Any errors that result from this should probably be treated as game-fatal, since an asset file is fuxored.
//
LPCSTR SE_LoadLanguage( LPCSTR psLanguage, SE_BOOL bLoadDebug /* = SE_TRUE */ )
{
	LPCSTR psErrorMessage = NULL;

	if (psLanguage && psLanguage[0])
	{
		SE_NewLanguage();

		string strResults;
		/*int iFilesFound = */SE_BuildFileList( 
												#ifdef _STRINGED
													va("C:\\Source\\Tools\\StringEd\\test_data\\%s",sSE_STRINGS_DIR)
												#else
													sSE_STRINGS_DIR
												#endif
												, strResults 
											);

		LPCSTR p;
		while ( (p=SE_GetFoundFile (strResults)) != NULL && !psErrorMessage )
		{
			LPCSTR psThisLang = TheStringPackage.ExtractLanguageFromPath( p );

			if ( !stricmp( psLanguage, psThisLang ) )
			{
				psErrorMessage = SE_Load( p, bLoadDebug );
			}
		}
	}
	else
	{
		__ASSERT( 0 && "SE_LoadLanguage(): Bad language name!" );
	}

	return psErrorMessage;
}