Developer
Q1. Common suggestions
- keep the list of translators and their e-mails
- put EN_US to .nls so translators will use it as template for own dialect
- If a line of text changed significantly
then never remove this translated line!
The translator invested many efforts to process it. REM the line.
- Write the name of translators inside .ini files
(this is important for translator, other translators see who is responsible
for this file). Write line: translator=Bob
Q2. Where to place .nls file?
Where to keep .nls file?
Every application should search .nls resources by itself.
- System applications should load the .nls from %OSDIR%\lang\ directory (usually: x:\ecs\lang).
- Separate applications - in the directory of program
(System utilities) use this code:
PSZ pszOSDirectory;
char szNlsPath[256];
#define OSDIR_VAR_NAME "OSDIR"
if (DosScanEnv(OSDIR_VAR_NAME, (const char**)&pszOSDirectory))
pszOSDirectory=NULL;
strcpy(szNlsPath, pszOSDirectory);
strcat(szNlsPath, "\\lang\\Mamba.nls");
Q3. How to create dialect file?
You have Mamba.nls (= .zip file) which contains files: RU_RU, DE_DE, DA_DK, ..
Every such files contains simple lines:
USB Dock=USB Dock (Zeigt USB Ger└te, welche am PC angeschlossen sind)
Device name=Name des Ger└tes
Unknown device=Unbekanntes Ger└t
Example of .nls file
Q4: How to use LANGE library?
Example:
include "lange.h"
LANGE MambaLange;
// it automatically selects dialect:
LangeLoadLanguage("Mamba.nls", 0, &MambaLange);
// ask the library english keyword, it returns static pointer to buffer
UCHAR Title[128];
LangeGetString(MambaLange, "USB Dock", (char*)Title, sizeof(Title));
WinSetWindowText (hwndFrame, (char*)Title);
// you get in Title = USB Dock (Zeigt USB Ger└te, welche am PC angeschlossen sind)
// Free memory when application is finished
LngCloseDialect(MambaLange);
Q5: How to load .hlp/inf?
A: Keep the name of hlp file inside the dialect files
EN_US
helpfile=myprog-eng.hlp
DE_DE
helpfile=myprog-de.hlp
Q6: Is LANGE ready for multi-processor computers?
A: To prevent OS crash use separate buffers in different threads.
Q7: I have created a library which is more powerful than LANGE
A: LANGE is not the best multilanguage, it's the optimal for
eComStation developers.
Q8: How to load multi-line text?
A: Divide the text on separate lines. Unite the lines in your program.
Q9: Max.length of lines in .ini file (inside .nls)?
Max.length: 255 characters.
Q10: Language codes?
- DE_DE: German/Germany
- EN_US: English/United States
- ES_ES: Spanish/Spain
- FR_FR: French/France
- IT_IT: Italian/Italy
- JA_JP: Japanese/Japan
- NL_NL: Dutch/Netherlands
- RU_RU: Russian/Russia
- SV_SE: Swedish/Sweden
- ZH_CN: Simplified Chinese/People's Republic of China
- ZH_TW: Traditional Chinese/Taiwan
read more
|