Translating into other languages?

Translating into other languages?

I am looking into translating our software into different laguages - i.e. Franch, German etc. and I am looking for advice.

At present all the text is in menus, dialog boxes and in the code.
I assume the recommended way is to place all your text in a string table and use a different string table for each language - is this correct?

Any advice would be appreciated.

Thanks,

David

5 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Jugoslav www.xeffort.com

Jugoslav,
Thanks, approach a) inserting a copy of the dialog and changing the language is simple and works well.

How do you cope with text in message boxes, status bar etc.? Is that when you use approach c) ?

Regards,
David

Not necessarily; it's applicable in all a) b) and c). A string table (ST) (one per each language) has to be used; (with approach a system picks appropriate one based on ST locale, with approach c I pick the one by loading appropriate dll via LoadLibrary). No string literal should appear in the code, but strings should be referred to by ID and loaded by LoadString.

Attached is the wrapper module I talked about; Sorry for lack of comments. Briefly, operator .C. loads C string from ST, operator .S. (or assignment char_variable = ID) loads it in Fortran form. Operator / concatenates ID charvar, charvar charvar or charvar ID with a blank between, while operator // concatenates ID ID, ID charvar or charver ID without a blank between. hLangLib is public and should be set to hInstance in approach a. For example:

i = MessageBox(.C.IDS_WARNING_NODATA, .C.IDS_WARNING, MB_OK MB_ICONASTERISK)

. Note that for very complex string expressions you can even store a F90 format-string into string table and use that format to output the string:

sForm=IDS_RESVAR_ABC
WRITE(sTitle, sForm, IOSTAT=iSt) TRIM(sTemp1), CHAR(13), TRIM(sVar), TRIM(sTemp)
CALL MyMsgBox(sTitle, .S.IDS_RES_INFO, IDI_ICON_ABC)

where

IDS_RESVAR_ABC="('It is possible to separate faulted
 feeder to zones ',A,' B and C.',A,'There is ',A,' 
variant',A,' of zone C supply.')" 

.
Note that routines from the module return 256-long strings so you have to take care about trimming. Also, take care about operator precedence/evaluation direction in complex expressions.

Jugoslav

Jugoslav www.xeffort.com

...and the attachment

Jugoslav www.xeffort.com

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen