Quote:
Originally Posted by Korodny
so it's a little more complex because like all scripts in the package it has German and English strings included.
|
Well, multi-language support is quite ambitious, and it is a nightmare if you start to support more than 2 languages when doing it your way.
Rewriting the code block again and again with lots of - if - then - select -when - constructs isn't fun at all.
Code:
pseudo code:
lang = 50
select
when francais then lang=lang
when espanol then lang=lang+25
when italiano then lang=lang+50
when deutsch then lang=lang+75
otherwise lang=lang+100
welcome.msg = sourceline(lang)
abort.msg = sourceline(lang + 1)
check.msg = sourceline(lang + 2)
.... your code runs here ...
Exit /* and exits before language section*/
/* line 50 is next line*/
bienvenue
oui
non
/*75 is next*/
bienvenida
si
no
/* 100 is next*/
accoglienza
---
---
/* 125*/
willkommen
...
...
...
/* 150*/
welcome
...
...
changing "lang" at top of code to the line where the languages start will be enough .