2010-08-03 20:02:55 +04:00
|
|
|
/*!
|
2011-02-27 14:17:18 +03:00
|
|
|
\page locale_intro Introduction to the Locale Kit
|
2010-08-03 20:02:55 +04:00
|
|
|
|
|
|
|
The Locale Kit provides a set of tools for internationalizing, localizing and
|
|
|
|
translating your software. This includes not only replacing string with their
|
2011-02-27 14:17:18 +03:00
|
|
|
translations at runtime, but also more complex tasks such as formatting numbers,
|
2010-08-03 20:02:55 +04:00
|
|
|
dates, and times in a way that match the locale preferences of the user.
|
|
|
|
|
2010-08-04 16:01:38 +04:00
|
|
|
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
|
2011-10-29 23:56:05 +04:00
|
|
|
application according to the user's preferred settings. Most of the time, you
|
|
|
|
should be able to use the default BLocale object and its convenience methods to
|
|
|
|
get things formatted according to the user preferences. However, you can also
|
|
|
|
use the various formatter classes directly when you need a more advanced
|
|
|
|
formatting. 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.
|
|
|
|
|
|
|
|
Note that creating a new format is a costly operation. The idea is that you
|
|
|
|
create your format object once and reuse it accross your application to format
|
|
|
|
all the stuff that needs it.
|
2010-08-04 16:01:38 +04:00
|
|
|
|
2010-08-11 16:39:29 +04:00
|
|
|
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.
|
|
|
|
|
2010-08-03 20:02:55 +04:00
|
|
|
*/
|