|
|
|
|
|
|
|
|
|
|
|
|
|
|
A beginners guide to developing localized applications (continued)
Traditionally, C code uses a character pointer or byte counter to iterate through a string character by character. On systems with multi-byte characters, however, such code won't work properly. There are text manager functions that you'll need to use instead.
Dynamically determining a string's contents
You should never hard code strings in a localized application. Rather, you should store them in a resource and use the resource to display the text. In order to create the contents of the string at runtime, you should store a template for the string as a resource. Then you can substitute values as needed.
Dates If dates and times are used in your application, it will need to abide by the values set in the system preference by the user. Keep in mind that the default date and time preferences at startup are different for different languages. However, they can be overridden.
Numbers Another thing to be careful of is that if your application displays large numbers or floating-point numbers, such as currency figures, you have to make sure you're using the appropriate thousands separator and decimal separator for the country in which the device is being used.
Using overlays to localize resources There's added support for localizing resource databases through overlays in version 3.5 and above of the Palm OS. With localization, you can localize a software module without a recompile or modification of the software. Each overlay database is a separate resource database, providing a localized set of resources for a single software module (the PRC [Palm Resource File], or base database) and a single target locale (language and country). A single locale is supported by each Palm OS device.
When a PRC file is opened, the overlay manager determines what the locale is for this device and looks for an overlay matching the base database and the locale. According to the information provided on Palm's localized applications page, "The overlay database's name must match the base database's name, its suffix must match the locale's suffix, and it must have an 'ovly'=1000 resource that matches the base database." It goes on to say that the overlay is opened in addition to the PRC file if the name, suffix, and overlay resource are all correct. The overlay is closed when the PRC file is closed.
Opened in read-only mode, the overlay is hidden from the programmer. You'll receive a pointer to the base database, not the overlay, when you request a database pointer. Make resource manager calls like you normally would, and the resource manager will access the overlay where appropriate.
For more information on the overlay manager, visit http://oasis.palm.com/dev/kb/manuals/1760.cfm.
Japanese implementation Currently, Japanese users must enter Japanese text into their Palm devices using Latin ASCII characters. An FEP (Front-End Processor) then transliterates this text into Hiragana or Katakana characters. The user can then use the FEP to phonetically convert Hiragana characters into a mixture of Hiragana and Kanji (Kana-Kanji conversion).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
ONLINE GROUP CALENDAR - FOR UP TO 100 OF YOUR CLOSEST FRIENDS
Stay organized and in control with 24/7 access to all of your important events, projects and files --whether you're at work, at home or on the road.
You can share your calendar, projects and files so everyone in your office is up to date. Plus, search your entire group to find times when everyone is available to meet, manage company resources and much more.
Organize your entire team for as low as $9.95 per year (and yes, that's where the decimal place is supposed to be!)
Tap here to get started right away. |
-- Advertisement --
Printing emails and attachments has never been simpler
When it comes to printing emails or attachments, you can be confident that our Auto-Print add-in can do what Outlook lacks - print the emails and/or attachments as soon as they arrive.
Discover this professional tool today. |
|
|
|
|
|
|
|
|
|
|