Copyright (c) Hyperion Entertainment and contributors.

Locale Library

From AmigaOS Documentation Wiki
Revision as of 16:00, 3 April 2015 by Daniel Jedlicka (talk | contribs) (Added text for Introduction.)
Jump to navigation Jump to search

Introduction

In today's globalized world, computer software is commonly sold and used in different countries. Each country represents a specific environment, in which certain aspects, features or behaviour of the software may not produce a desirable user experience. Therefore, modern computer applications need to be designed and adapted to respect various local conventions. Your product – free or commercial – can easily get rejected by users if you fail to do so.

The process of adapting software to the linguistic, cultural and technical requirements of a local market is called localization. This process typically entails:

  • translation of the application's user interface to the target language
  • translation of the application's documentation and help files to the target language
  • adaptation to specific writing conventions such as punctuation, number formatting, date and time format etc.
  • use of local units of measurement, currency etc.
  • use of language-specific sorting rules
  • adaptation of keyboard shortcuts (where mnemonics is desirable to be preserved)
  • etc.

In AmigaOS, the Locale Library is the component provided to software developers to help them localize their applications.

Function Reference

The following table gives a brief description of the Locale Library functions. See the SDK/Autodocs for details about each call.

Function Description
CloseCatalog() Close a message catalog.
CloseLocale() Close a locale.
ConvToLower() Convert a character to lower case.
ConvToUpper() Convert a character to upper case.
FormatDate() Generate a date string based on a date formatting template.
FormatString() Format data into a character stream, assume 16bit-aligned data.
FormatString32() Format data into a character stream, assume 32bit-aligned data.
GetCatalogStr() Get a string from a message catalog.
GetLocaleStr() Get a standard string from a locale.
IsXXXX() A set of similarly-named functions to determine whether a character is of a certain type.
OpenCatalog() Open a message catalog.
OpenLocale() Open a locale.
ParseDate() Interpret a string according to the date formatting template and convert it into a DateStamp.
StrConvert() Transform a string according to collation information.
StrnCmp() Localized string comparison.