Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
25/10/2006 10:23:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
25/10/2006 09:35:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164360
Views:
11
But then if you do multilingual app, you can do this:
#If hLanguage="en"
#DEFINE ERR_MESS_NO_DISK "There is no disk in the selected drive.  Please ensure that there is a disk in the drive" + CHR(13) + ;
              "reselect the 'Save Changes' Checkbox and click 'Execute' again.  The process will continue" + CHR(13) + ;
              "from where you left off"
#define cap_no_disk "No Disk in Drive"
#elif hLanguage="sr"
#DEFINE ERR_MESS_NO_DISK "Nema diska u jedinici.  Turi bre neki disk u nju" + CHR(13) + ;
              "pa ponovo klikni kućicu 'Snimi' i dugme 'Izvrši'.  Proces će se nastaviti" + CHR(13) + ;
              "tamo gde smo stali."
#define cap_no_disk "Nema diska u jedinici"
#endif
#DEFINE MB_ICONSTOP, "16"

...

MESSAGEBOX( ERR_MESS_NO_DISK, MB_ICONSTOP, cap_no_disk)
Not that I like that too much - I was doing that in 2.6 for just two languages, and you simply can't keep something like that in code, you have to have a table with one column per language, and some code to generate .h files from it. Otherwise it becomes quite impossible to find your way around in an editor, once the number of strings surpasses a few screenfuls.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform