home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 December
/
PCWorld_2001-12_cd.bin
/
Software
/
Topware
/
Hackman
/
_SETUP.1
/
LPack.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-06-29
|
1KB
|
81 lines
/**********************************************************************************************
*Language Pack Support*
***********************
*
* New for DLL Deity ▀6.0
*
*
***********************************************************************************************/
#ifndef _LPACK_H
#define _LPACK_H
#include "ole2.h"
#include "verinfo.h"
#include "ltables.h"
struct SLANGPDATA
{
int numwords;
LPSTR words[numentries];
LPSTR language;
LPSTR author;
SLANGPDATA()
{
}
SLANGPDATA(LPSTR w[],int n) : numwords(n),language(w[0]), author(w[1])
{int i;
for(i=0;i<n;i++)
words[i]=w[i];
}
~SLANGPDATA()
{
}
};
class CLANGUAGEPACK
{
private:
SVERSIONS HM;
SLANGPDATA myLangPack;
public:
CLANGUAGEPACK();
CLANGUAGEPACK(LPSTR [],int);
~CLANGUAGEPACK();
SLANGPDATA* GetPackData();
LPSTR Translate(LPSTR);
};
CLANGUAGEPACK::CLANGUAGEPACK()
{
}
CLANGUAGEPACK::CLANGUAGEPACK(LPSTR w[],int sz) : myLangPack(w,sz)
{
}
CLANGUAGEPACK::~CLANGUAGEPACK()
{
}
SLANGPDATA* CLANGUAGEPACK::GetPackData()
{
return &myLangPack;
}
LPSTR CLANGUAGEPACK::Translate(LPSTR myWord)
{int i;
for(i=0;i<myLangPack.numwords;i++)
{
if(!strcmp(myWord,deflang[i]))
{
return myLangPack.words[i];
}
}
return NULL;
}
#endif