Southsoftware.com
.:Pricing
Home
Products
Libraries
Downloads
Support
Contacts
Site Map
.:AppLocalizer DLL
About product
Download trial
Online manual
Purchase license
FAQ & Support
.:Web links

Southsoftware.com - Power tools for home and business users.

WebTweakTools.NET - Web site tweaking software.

more links...

   
Multilanguage string table

Include file: xmllng.h.

Language constants
Language constants
enum {
    MULTILANG_AFRIKAANS, /* 0, Afrikaans */
    MULTILANG_ALBANIAN, /* 1, Albanian */
    MULTILANG_ARABIC, /* 2, Arabic */
    MULTILANG_ARMENIAN, /* 3, Armenian */
    MULTILANG_ASSAMESE, /* 4, Assamese */
    MULTILANG_AZERI, /* 5, Azeri */
    MULTILANG_BASQUE, /* 6, Basque */
    MULTILANG_BELARUSIAN, /* 7, Belarusian */
    MULTILANG_BENGALI, /* 8, Bengali */
    MULTILANG_BULGARIAN, /* 9, Bulgarian */
    MULTILANG_CATALAN, /* 10, Catalan */
    MULTILANG_CHINESE_SIMPLIFIED, /* 11, Chinese Simplified */
    MULTILANG_CHINESE_TRADITIONAL, /* 12, Chinese Traditional */
    MULTILANG_CROATIAN, /* 13, Croatian */
    MULTILANG_CZECH, /* 14, Czech */
    MULTILANG_DANISH, /* 15, Danish */
    MULTILANG_DUTCH, /* 16, Dutch */
    MULTILANG_ENGLISH_US, /* 17, English US */
    MULTILANG_ENGLISH_UK, /* 18, English UK */
    MULTILANG_ESTONIAN, /* 19, Estonian */
    MULTILANG_FAEROESE, /* 20, Faeroese */
    MULTILANG_FARSI, /* 21, Farsi */
    MULTILANG_FINNISH, /* 22, Finnish */
    MULTILANG_FRENCH, /* 23, French */
    MULTILANG_GEORGIAN, /* 24, Georgian */
    MULTILANG_GERMAN, /* 25, German */
    MULTILANG_GREEK, /* 26, Greek */
    MULTILANG_GUJARATI, /* 27, Gujarati */
    MULTILANG_HEBREW, /* 28, Hebrew */
    MULTILANG_HINDI, /* 29, Hindi */
    MULTILANG_HUNGARIAN, /* 30, Hungarian */
    MULTILANG_ICELANDIC, /* 31, Icelandic */
    MULTILANG_INDONESIAN, /* 32, Indonesian */
    MULTILANG_ITALIAN, /* 33, Italian */
    MULTILANG_JAPANESE, /* 34, Japanese */
    MULTILANG_KANNADA, /* 35, Kannada */
    MULTILANG_KASHMIRI, /* 36, Kashmiri */
    MULTILANG_KAZAK, /* 37, Kazak */
    MULTILANG_KONKANI, /* 38, Konkani */
    MULTILANG_KOREAN, /* 39, Korean */
    MULTILANG_LATVIAN, /* 40, Latvian */
    MULTILANG_LITHUANIAN, /* 41, Lithuanian */
    MULTILANG_MACEDONIAN, /* 42, Macedonian */
    MULTILANG_MALAY, /* 43, Malay */
    MULTILANG_MALAYALAM, /* 44, Malayalam */
    MULTILANG_MANIPURI, /* 45, Manipuri */
    MULTILANG_MARATHI, /* 46, Marathi */
    MULTILANG_NEPALI, /* 47, Nepali */
    MULTILANG_NORWEGIAN, /* 48, Norwegian */
    MULTILANG_ORIYA, /* 49, Oriya */
    MULTILANG_POLISH, /* 50, Polish */
    MULTILANG_PORTUGUESE, /* 51, Portuguese */
    MULTILANG_PUNJABI, /* 52, Punjabi */
    MULTILANG_ROMANIAN, /* 53, Romanian */
    MULTILANG_RUSSIAN, /* 54, Russian */
    MULTILANG_SANSKRIT, /* 55, Sanskrit */
    MULTILANG_SERBIAN, /* 56, Serbian */
    MULTILANG_SINDHI, /* 57, Sindhi */
    MULTILANG_SLOVAK, /* 58, Slovak */
    MULTILANG_SLOVENIAN, /* 59, Slovenian */
    MULTILANG_SPANISH, /* 60, Spanish */
    MULTILANG_SWAHILI, /* 61, Swahili */
    MULTILANG_SWEDISH, /* 62, Swedish */
    MULTILANG_TAMIL, /* 63, Tamil */
    MULTILANG_TATAR, /* 64, Tatar */
    MULTILANG_TELUGU, /* 65, Telugu */
    MULTILANG_THAI, /* 66, Thai */
    MULTILANG_TURKISH, /* 67, Turkish */
    MULTILANG_UKRAINIAN, /* 68, Ukrainian */
    MULTILANG_URDU, /* 69, Urdu */
    MULTILANG_UZBEK, /* 70, Uzbek */
    MULTILANG_VIETNAMESE, /* 71, Vietnamese */
    MULTILANG_MAXLANG /* 72, Number of supported languages. */
};

XMLLangSetKey
SUMARY:
Sets registration key.

ARGUMENTS:
lpszRegistrationKey - pointer to a string with your registration key.

DECLARATION:
APPLOC_EXTERN void __stdcall XMLLangSetKey(TCHAR *lpszRegistrationKey);

RETURN VALUE:
This function has no return value.

XMLLangGetVersion
SUMMARY:
Retrieves current version of the library.

DECLARATION:
APPLOC_EXTERN DWORD __stdcall XMLLangGetVersion(void);

RETURN VALUE:
MAKELONG(minor, major).

XMLLangGetFileName
SUMMARY:
Retrieves language name from a MULTILANG_ constant.

DECLARATION:
APPLOC_EXTERN bool __stdcall XMLLangGetFileName(int lang, TCHAR *lpszLangFile);

RETURN VALUE:
Returns TRUE if lpszLangFile buffer is filled with language name.

EXAMPLE:
TCHAR szLangFile[50];
bool err = GetLangFileName(MULTILANG_ENGLISH_US, szLangFile);

XMLLangId2Multilang
SUMMARY:
Converts a Windows LangId to a MULTILANG_ constant.

DECLARATION:
APPLOC_EXTERN int __stdcall XMLLangId2Multilang(unsigned int LangId);

RETURN VALUE:
Returns a MULTILANG_ constant corresponding to the LangId value.

EXAMPLE:
// get the user default language identifier.
int MultilangId = LangId2Multilang(GetUserDefaultLangID());

XMLTemplateString
SUMMARY:
Writes formatted data to a string.

DECLARATION:
APPLOC_EXTERN int __cdecl XMLTemplateString(TCHAR *buffer, int count, TCHAR *format, ...);

RETURN VALUE:
Returns the number of characters stored in buffer, not counting the null terminating character.

REMARKS:
This function acts like the sprintf function. The only differences are:
1) All the strings specified as %s and %S will be prepared for XML format (for example, quote character (") will be replaced to """ and so on).
2) To leave strings not XML formatted use the %su and %SU modifiers.
3) If the formatted string does not fit to the buffer, the function returns count-1.

XMLTemplateStringPtr
SUMMARY:
Writes formatted data to a string using a pointer to a list of arguments.

DECLARATION:
APPLOC_EXTERN int __stdcall XMLTemplateStringPtr(TCHAR *buffer, int count, TCHAR *format, va_list argptr);

RETURN VALUE:
Returns the number of characters stored in buffer, not counting the null terminating character.

REMARKS:
See Remarks section of the XMLTemplateString function.

XMLLangLoadStrings
SUMMARY:
Loads string table from a language file.

ARGUMENTS:
hInstance - Handle to resource module.
lpLoadStrings - Pointer to array of LOADSTRINGS structures.
nLoadStrings - Number of items in the lpLoadStrings.
lpLoadLangFile - Pointer to a LOADLANGFILESTRUCT structure. See Remarks section for more information.

DECLARATION:
APPLOC_EXTERN int __stdcall XMLLangLoadStrings(HINSTANCE hInstance, LPLOADSTRINGS lpLoadStrings, int nLoadStrings, LPLOADLANGFILESTRUCT lpLoadLangFile);

RETURN VALUE:
Returns the number of loaded strings.

REMARKS:
This function fills lpszValue field of items in the array of LOADSTRINGS structures. The LOADSTRINGS structure is declared as follows:
typedef struct tagLOADSTRINGS {
    TCHAR *lpszSection; // the name of the section in the language file
    TCHAR *lpszKeyName; // the name of the key whose value is to be retrieved
    TCHAR *lpszValidate; // the validation string
    TCHAR **lpszValue; // pointer to the retrieved and validated string
    LPARAM lParam; // application-defined value
} LOADSTRINGS, *LPLOADSTRINGS;

Language file can be a file, a resource object or a memory object. Type of the language file and its format is defined in the LOADLANGFILESTRUCT structure:
typedef enum {
    LANGFILETYPE_INI,
    LANGFILETYPE_XML
} LANGFILE_TYPE;

typedef enum {
    LANGFILESOURCE_NONE,
    LANGFILESOURCE_MEM,
    LANGFILESOURCE_RES,
    LANGFILESOURCE_FILE
} LANGFILE_SOURCE;

typedef struct tagLOADLANGFILESTRUCT {
    TCHAR *lpFile;
    LANGFILE_SOURCE FileSource;
    LANGFILE_TYPE FileType;
    union {
        DWORD cbFile;
        TCHAR *lpResType;
    } FileExtra;
    TCHAR *lpDefFile;
    LANGFILE_SOURCE DefFileSource;
    LANGFILE_TYPE DefFileType;
    union {
        DWORD cbDefFile;
        TCHAR *lpDefResType;
    } DefFileExtra;
} LOADLANGFILESTRUCT, FAR *LPLOADLANGFILESTRUCT;

Actually, XMLLangLoadStrings loads strings from two files. First it loads strings from a file specified in the lpFile parameter of the LOADLANGFILESTRUCT structure, then if not all strings are loaded, it tries to load strings which are not loaded in the first step from a file specified in the lpDefFile parameter of the LOADLANGFILESTRUCT structure.

To get extended error information, call the GetLastError() function.

XMLLangFreeStrings
SUMMARY:
Frees string table loaded by XMLLangLoadStrings.

ARGUMENTS:
lpLoadStrings - Pointer to array of LOADSTRINGS structures.
nLoadStrings - Number of items in the lpLoadStrings.

DECLARATION:
APPLOC_EXTERN int __stdcall XMLLangFreeStrings(LPLOADSTRINGS lpLoadStrings, int nLoadStrings);

RETURN VALUE:
Returns the number of freed strings.

REMARKS:
XMLLangFreeStrings must be called when program terminating and before calling XMLLangLoadStrings to reload the string table.

XMLLangDefMultilang
SUMMARY:
Executes operations which are useful to handle the list of supported languages.

ARGUMENTS:
LangList - Array of supported languages.
opcode - Operation code.
op - A MULTILANG_ constant.

DECLARATION:
APPLOC_EXTERN int __stdcall XMLLangDefMultilang(MULTILANGAVAILABLE LangList, int opcode, int op);

RETURN VALUE:
If opcode is MULTILANG_CHECKMULTILANG, returns TRUE, if the language specified by op is in the list specified by LangList, in all other cases returns FALSE.

REMARKS:
MULTILANGAVAILABLE is declared as follows:
typedef unsigned char MULTILANGAVAILABLE[16];

This function supports the following operations:
MULTILANG_ADDMULTILANG Adds the language specified by op to the list specified by LangList.
MULTILANG_DELETEMULTILANG Removes the language specified by op from the list specified by LangList.
MULTILANG_CHECKMULTILANG Returns TRUE, if the language specified by op is in the list specified by LangList, otherwise returns FALSE.

Back to contents

   
About us   Privacy policy   Terms of use   Link to us
Designed by Vibe
Current Version: 1.09
Buy AppLocalizer DLL now for only $ 199.95 USD.
We accept variety of payment options: Credit Cards, Checks, Wire Transfers, PayPal. Payments can be made Online, by PO, Fax, Mail or Phone.
.:Requirements
Computer: Minimum required by operating system you are running.
Disk Space: Under 4 MB
Operating System: AppLocalizer DLL requires a Microsoft Windows 9x/Me/NT/2000/XP/Server 2003/Server 2008/Vista/7 32 or 64 bit operating system.
.:Translate
Translate
(automatic translation by Google)