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.



5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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) ?


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:


. 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:

WRITE(sTitle, sForm, IOSTAT=iSt) TRIM(sTemp1), CHAR(13), TRIM(sVar), TRIM(sTemp)


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.


...and the attachment

Leave a Comment

Please sign in to add a comment. Not a member? Join today