Collection of classes for localizing applications. More...
Files | |
file | Catalog.h |
Provides the BCatalog class. | |
file | Collator.h |
Provides the BCollator class. | |
file | Country.h |
BCountry class definition. | |
file | DateFormat.h |
Contains BDateFormat class, a date formatter and parser. | |
file | DateTimeFormat.h |
Contains BDateTimeFormat class, a datetime formatter and parser. | |
file | DurationFormat.h |
Contains BDurationFormat class, a time interval formatter and parser. | |
file | Locale.h |
Provides the BLocale class, the base class of the Locale Kit. | |
file | LocaleRoster.h |
Provides the BLocaleRoster class to access locale data. | |
file | NumberFormat.h |
Contains BNumberFormat class, a number formatter and parser. | |
file | TimeFormat.h |
Contains BTimeFormat class, a time formatter and parser. | |
file | TimeZone.h |
Provides the BTimeZone class. | |
file | UnicodeChar.h |
Provides the BUnicodeChar class. | |
Classes | |
class | BCatalog |
String localization handling. More... | |
class | BCollator |
Class for handling locale-aware collation (sorting) of strings. More... | |
class | BCountry |
Class representing a country. More... | |
class | BDateFormat |
Formatter for dates. More... | |
class | BDateTimeFormat |
Formatter for datetimes. More... | |
class | BDurationFormat |
Formatter for time intervals. More... | |
class | BLocale |
Class for representing a locale and its settings. More... | |
class | BLocaleRoster |
Main class for accessing the Locale Kit data. More... | |
class | BNumberFormat |
Formatter for numbers and monetary values. More... | |
class | BTimeFormat |
Formatter for times. More... | |
class | BTimeZone |
Defines the time zone API which specifies a time zone, allows you to display it to the user, and converts between GMT and local time. More... | |
class | BUnicodeChar |
Management of all information about characters. More... | |
Collection of classes for localizing applications.
The Locale Kit provides a set of tools for internationalizing, localizing and translating your software. This includes not only replacing string with their translations at runtime, but also more complex tasks such as formatting numbers, dates, and times in a way that match the locale preferences of the user.
The main way to access locale data is through the be_locale_roster. This is a global instance of the BLocaleRoster class, storing the data for localizing an application according to the user's preferred settings. The locale roster also acts as a factory to instantiate most of the other classes. However, there are some cases where you will need to instantiate another class by yourself, to use it with custom settings. For example, you may need to format a date with a fixed format in english for including in an e-mail header, as it is the only format accepted there.
Unlike the other kits in Haiku, the Locale kit does not live in libbe. When building a localized application, you have to link it to liblocale.so. If you want to use the catalog macros, you also have to link each of your images (that is, applications, libraries and add-ons) to liblocalestub.a.