Satimage Previous | Next
Localizing a dialog
Home Documentation Smile Custom GUI Developing your own custom dialog Localizing a dialog  
To localize your new dialog, proceed as follows.
Fill your dialog in English
Provide the contents of the static texts, of the menus, of the list items, and the names of the items as strings in English.
In the scripts of the dialog, use localize
Your script may include strings which require to be localized. Here, too, provide them in English but use localize to have them translated. Note that the localize command must be sent to the dialog, since we are using translation dictionaries belonging to the dialog itself.
tell the_dialog to set the_message to localize "Everything fine - so far."
display dialog the_message
localize supports lists of strings.
tell the_dialog to set the_buttons to localize {"New drink", "Sandwich", "Nothing thanks"}
display dialog "Shall I fix you something?" buttons the_buttons
Enter the localization dictionaries
While your dialog is the active window and in edit mode, select Dialog ▸ Localize in the menu. This opens the Localize window. Use the Localize window to add and suppress languages (that is, localization dictionaries) to/from the dialog, and to make changes to the existing localization dictionaries.
To localize another dialog, open that other dialog then use the load dialog button in the Localize window. Pressing load dialog with the option key (⌥) pressed targets the Localize dialog itself.
Localize does its best to extract all the strings that your dialog uses. However, you should check that all of them are in the dictionaries.
For more information about how to fill localization dictionaries, click the link below.
Copyright ©2008 Paris, Satimage