General HydroStatics
Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)

LANGUAGE
(Requires GHS version 15.36 or later)

When creating dialog boxes in GHS run files, you can write text in languages other than English. If you want to have alternate languages available in the same dialog without writing another template, you can do that too.

The LANGUAGE command switches between languages. Below is the run-file script for a very simple dialog box. The template is executed three times, first in the default English then in two other languages.



Here are the results:


The advantage here is that the dialogs can be translated into any language without having to modify the source: you do not need to know in advance what languages will be required.

The following example shows an easy way to include a language selector drop-down menu in your template.


And the result:


The English version of the language definition file GHSWORDS.DAT is supplied with the program. In order to introduce another language, you make a copy of the English file and add to it another column representing the translation. If a translation of a word is missing, the English word or phrase is used.

Below is an excerpt from GHSWORDS3.DAT that was used in the example above.



Finally, here is an example of a real dialog in English and Chinese.


See the LANGUAGE bulletin for more complete information on the LANGUAGE command and its uses.
Questions, comments, or requests?
Contact Creative Systems, Inc.

support@ghsport.com

USA phone: 360-385-6212 Fax: 360-385-6213
Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday

Mailing address:
PO Box 1910
Port Townsend, WA 98368 USA

www.ghsport.com

Click here for an index to this and previous COWs