Search PalmPower Enterprise Edition's 188 Palm-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
A beginners guide to developing localized applications (continued)

Text manager and international manager
There are two managers provided with the Palm OS, the text manager and the international manager. They're both designed to help you with localized strings and characters. The text manager lets you work with text, strings, and characters independent of the character encoding. The international manager detects the character coding being used by the particular Palm OS device and initializes the corresponding version of the text manager.

Both managers are supported starting in Palm OS version 3.1. If your application needs to work on older systems, you need to test for the presence of these managers before using text manager calls.

Strings
The Latin alphabet used by most European languages is relatively small. Therefore, its characters can be represented with a single-byte encoding ranging from 32 to 255. Asian languages, on the other hand, have their own alphabets, which tend to be quite large. Thus, these character sets are represented by a combination of single-byte and double-byte numeric codes ranging from 32 to 65,535.

On systems supporting the international and text managers, strings are made up of characters up to four bytes. Character variables are always two bytes long, but low ASCII (American Standard Code for Information Interchange) characters might be shrunken to a single byte by the operating system when you add them to a string.

Here are a few localization guidelines the Palm Web site recommends:

  • If you use the English language version of the software as a guide when designing the layout of the screen, try to allow extra space for strings and larger dialogs than the English version requires;

  • Don't put language-dependent strings in code. If you have to display text directly on the screen, remember that a one-line warning or message in one language may need more than one line in another language;

  • Don't depend on the physical characteristics of a string, such as the number of characters, the fact that it contains a particular substring, or any other attribute that might disappear in translation;

  • Use as many parameters as possible to give localizers greater flexibility;

  • Avoid building sentences by concatenating substrings together, as this often causes translation problems;

  • Abbreviations may be the best way to accommodate the particularly scarce screen real estate on the Palm OS device;

  • Remember that user interface elements such as lists, fields, and tips scroll if you need more space.

For more interface guidelines, visit http://oasis.palm.com/dev/kb/manuals/1726.cfm.

Manipulating strings
Be careful not to point to an intra-character boundary (a middle or end byte of a multi-byte character) whenever you want to work with character pointers. Any time you want to set the insertion point position in a text field or set the text field's selection, you need to use byte offsets that point to inter-character boundaries (the start of one character and the end of the previous character, except when the offset points to the very beginning or very end of a string).


« Previous  ·  1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Phones and PDAs > Palm and Treo > Programming (24 articles)
   How PDA software is born
   Program with Simplicity
   Kinectivity 2.0 brings enterprise application developers new tools
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
More from the ZATZ journals
Computing Unplugged: Smartphone smarts for a mobile world
David Gewirtz Online: CNN commentary and analysis
DominoPower: It's time for Lotus to double-down on Linux and open source
OutlookPower: The strange case of Outlook losing notes and requiring passwords
-- Advertisement --

BLOGGING AND PODCASTING WITH ONE EASY-TO-USE TOOL
Now you can publish your thoughts, opinions, and comments in your own blog or podcast.<p />

  • Supports multiple authors and multiple blogs or podcasts.
  • Generate and publish RSS feeds for iTunes and other directories.
  • Post photos, images or animations.
  • Get feedback and have conversations with visitors to your site. <p />

Personalize your blog or podcast with your own unique domain name -- or integrate it with your existing site by setting it up as a subdomain.

Tap here and get blogging or podcasting within minutes.

-- Advertisement --

SECURE YOUR SITE WITH AN IRONCLAD SSL CERTIFICATE
An IronClad SSL Certificate helps you build an impenetrable fortress around your customer's credit card information. IronClad SSL Certificates are:

  • Fully validated
  • Up to 256-bit encryption
  • Up to 10 years validity
  • Stringent authentication
  • Around-the-clock customer support

Build trust. Protect your customers. Grow your online business.

Tap here now and be IronClad with SSL tonight.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2000-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login