Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 17 in printed book and digital formats -- plus a one-year subscription (beginning with 18.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 4.5

REVIEW

Lingua

Issue: 4.5 (May/June 2006)
Author: Toby Rush
Article Description: No description available.
Article Length (in bytes): 3,860
Starting Page Number: 9
Article Number: 4504
Related Web Link(s):

http://www.realsoftware.com/

Full text of article...

As part of the second 90-day release REALbasic 2006, Real Software announced an update to Lingua, a free utility first included as part of REALbasic 2006 Release 1 which simplifies the process of localizing software to different languages.

One of the most attractive characteristics of Lingua is that does not require re-compiling an application for each localization; once set up, Lingua facilitates the management of translated values and then allows you to save those values directly into a compiled application.

Of course, the application must be designed with localization in mind; localizable values must be stored as constants, and windows must be arranged to allow for text of varying size, depending on the language.

To take advantage of Lingua for an existing application, you need to go through your application and find any values that will need to be translated. These should include any text visible by the user: menu items, control captions, window titles, dialog box text, and so forth. For each element of text, create a constant. These constants can be stored throughout your program, or you may wish to create a single module to hold them all.

Each of these constants should then be named uniquely and given a default value that corresponds to what appears in the interface. The value in the interface can then be replaced with the unique constant name preceded by a pound sign ("#"). For example, for the "Save" button in your Save dialog box, you might create a constant called "saveDialogSaveButtonCaption" with a default value of "Save." In the properties list for the button, set the caption to "#saveDialogSaveButtonCaption".

To allow Lingua to do its magic, each of these constants must have the Dynamic checkbox checked in the Constants Editor. This allows Lingua to edit these values in the compiled application.

Once all of you constants have been created, Choose "Export Localizable Values..." from REALbasic's File menu to create a file containing your constants. Open this file in Lingua to begin entering translations.

Lingua's window is very simple; each localizable value appears on the left, and clicking on one of them shows the default value and allows you to enter a translated value. Once every translated value is entered, choosing "Export > To Application and Run" allows you to save the localized strings to your compiled application and immediately run the new, localized application.

The combination of REALbasic 2006 and Lingua allow you to easily localize four different types of values: Strings, Numbers, Booleans and Colors. More complicated data types -- like pictures -- are not supported. While this would be a nice addition to Lingua, text is always the lion's share of any localization project, and Lingua makes that portion a lot more convenient.

End of article.