|
|
Internationalized FMLI applications are applications whose language dependent output is not hard-coded in the frame definition files. The output (messages, menu items, frame titles, and so on) are encoded in a language-independent way in the definition file. At run-time, that is, when interpreting the respective file, FMLI retrieves the language-dependent output from a message catalogue which contains the output of the application in the language to which the system locale is set. If no message catalogue exists, FMLI tries to output a default message encoded in the frame definition file. If a default message does not exist either, you get the following message:
Message not found!Writing an internationalized application requires that all strings that are to be presented on the screen must be described using the special syntax:
"$$<catalogue_name>:<message_no.>:<default_message>"
menu="$$uxmyapp:1:TOP MENU"name="$$uxmyapp:2:date" action=`date | message`nop
name="$$uxmyapp:3:welcome" action=open Text.welcome
name="$$uxmyapp:4:exit" action=exit
Menu.sample: a simple international menu definition file
If you want your menu to be sorted automatically in any locale, you must indicate this by using the descriptor autosort. If it is set to autosort=true, the menu items will be presented in alphabetical order in any language. This would be independent from the order in the actual frame definition file.
The second menu item in ``Menu.sample: a simple international menu definition file'' would invoke an opening action on the file Text.welcome. It is stored in the current directory. If the application is to open a textfile that is translated to another language than the default, this textfile must be stored in the directory ./$LANG/<file>. If the file Text.welcome was translated to German and if the application was to open that file, it would have to be stored in the directory ./De_DE.88591 carrying the same name. FMLI automatically checks the locale before opening a textfile.