2010-08-10 16:39:48 +04:00
|
|
|
/*!
|
|
|
|
\class BLocaleRoster
|
|
|
|
\ingroup locale
|
|
|
|
\brief Main class for accessingthe locale kit data
|
|
|
|
|
|
|
|
The Locale Roster is the central part of the locale roster.
|
2010-10-20 13:23:06 +04:00
|
|
|
It is a blobal object (be_locale_roster) storing all the useful locale
|
2010-08-10 16:39:48 +04:00
|
|
|
data. Other classes from the Locale Kit can be constructed on their own,
|
|
|
|
but only hte Locale Roster allows you to do so while taking account of
|
|
|
|
the user's locale settings.
|
|
|
|
|
|
|
|
The Locale Roster also provides convenient short-hands to the most used
|
|
|
|
methods of the Locale Kit.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BLocaleRoster::GetDefaultCollator(BCollator* collator) const
|
|
|
|
\brief Get the default collator.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BLocaleRoster::GetDefaultLocale(BLocale* locale) const
|
|
|
|
\brief Get the default locale.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BLocaleRoster::GetDefaultCountry(BCountry* country) const
|
|
|
|
\brief Get the default country.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BLocaleRoster::GetDefaultLanguage(BLanguage* language) const
|
|
|
|
\brief Get the default language.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BLocaleRoster::GetDefaultTimeZone(BTimeZone* timezone) const
|
|
|
|
\brief Get the default timezone.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
2010-08-11 12:09:12 +04:00
|
|
|
\fn status_t BLocaleRoster::GetLanguage(const char* languagecode, BLanguage** _language) const
|
2010-08-10 16:39:48 +04:00
|
|
|
\brief Instanciate a language from its code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
2010-10-20 13:23:06 +04:00
|
|
|
\fn status_t BLocaleRoster::GetAvailableLanguages(BMessage* message) const
|
2010-08-10 16:39:48 +04:00
|
|
|
\brief List the available languages
|
|
|
|
|
|
|
|
This function fills the passed BMessage with one or more 'language' string
|
2010-10-20 13:23:06 +04:00
|
|
|
fields, containing the language(s) ID(s).
|
2010-08-10 16:39:48 +04:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
2010-08-11 12:09:12 +04:00
|
|
|
\fn status_t BLocaleRoster::GetAvailableCountries(BMessage* message) const
|
2010-08-10 16:39:48 +04:00
|
|
|
\brief List the available countries
|
|
|
|
|
|
|
|
This function filles the passed BMessage with one or more 'country' string
|
2010-10-20 13:23:06 +04:00
|
|
|
fields, containing the (ISO-639) code of each country.
|
2010-08-10 16:39:48 +04:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BLocaleRoster::GetInstalledCatalogs(BMessage* message, const char* sigPattern = NULL, const char* langPattern = NULL, int32 fingerprint = 0) const
|
|
|
|
\brief Get the available locales and catalogs
|
|
|
|
|
|
|
|
This function fills the passed BMessage with one or more 'locale' string
|
|
|
|
fields, containing the locale names.
|
|
|
|
|
|
|
|
The optional parameters can be used to filter the list and only get the
|
|
|
|
locales for which a catalog is available for the given app (sigPattern, fingerprint),
|
|
|
|
or the locales with a given language.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BCatalog* BLocaleRoster::GetCatalog()
|
|
|
|
\brief Get the current image catalog.
|
|
|
|
|
|
|
|
This function returns the catalog for the calling image (application, add-on, or shared
|
|
|
|
library). Note that it doesn't allow to specify a fingerprint. The language will be
|
|
|
|
selected from the user preferences.
|
|
|
|
|
|
|
|
\returns The catalog, if it was loaded successfully.
|
|
|
|
\warning This function needs the image to be lined with liblocalestub.a
|
|
|
|
*/
|
2010-08-11 12:09:12 +04:00
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BLocaleRoster::GetPreferredLanguages(BMessage* message) const
|
|
|
|
\brief Return the list of user preferred languages.
|
|
|
|
|
|
|
|
This function fills in the given message with one or more language string
|
|
|
|
fields. They constitute the ordered list of user-selected languages to use for
|
|
|
|
string translation.
|
|
|
|
*/
|