xref: /haiku/docs/user/locale/LocaleRoster.dox (revision c80809a3ab0b0a2ce53ea861a2b00ace24ff452d)
1/*!
2\class BLocaleRoster
3\ingroup locale
4\brief Main class for accessing the locale kit data
5
6The Locale Roster is the central part of the locale kit.
7It is a global object (be_locale_roster) storing all the useful locale
8data. Other classes from the Locale Kit can be constructed on their own,
9but only the Locale Roster allows you to do so while taking account of
10the user's locale settings.
11*/
12
13/*!
14\fn status_t BLocaleRoster::GetDefaultCollator(BCollator* collator) const
15\brief Get the default collator.
16*/
17
18/*!
19\fn status_t BLocaleRoster::GetDefaultLocale(BLocale* locale) const
20\brief Get the default locale.
21*/
22
23/*!
24\fn status_t BLocaleRoster::GetDefaultCountry(BCountry* country) const
25\brief Get the default country.
26*/
27
28/*!
29\fn status_t BLocaleRoster::GetDefaultLanguage(BLanguage* language) const
30\brief Get the default language.
31*/
32
33/*!
34\fn status_t BLocaleRoster::GetDefaultTimeZone(BTimeZone* timezone) const
35\brief Get the default timezone.
36*/
37
38/*!
39\fn status_t BLocaleRoster::GetLanguage(const char* languagecode, BLanguage** _language) const
40\brief Instanciate a language from its code.
41*/
42
43/*!
44\fn status_t BLocaleRoster::GetAvailableLanguages(BMessage* message) const
45\brief List the available languages
46
47This function fills the passed BMessage with one or more 'language' string
48fields, containing the language(s) ID(s).
49
50*/
51
52/*!
53\fn status_t BLocaleRoster::GetAvailableCountries(BMessage* message) const
54\brief List the available countries
55
56This function filles the passed BMessage with one or more 'country' string
57fields, containing the (ISO-639) code of each country.
58
59*/
60
61/*!
62\fn status_t BLocaleRoster::GetInstalledCatalogs(BMessage* message, const char* sigPattern = NULL, const char* langPattern = NULL, int32 fingerprint = 0) const
63\brief Get the available locales and catalogs
64
65This function fills the passed BMessage with one or more 'locale' string
66fields, containing the locale names.
67
68The optional parameters can be used to filter the list and only get the
69locales for which a catalog is available for the given app (sigPattern, fingerprint),
70or the locales with a given language.
71*/
72
73/*!
74\fn BCatalog* BLocaleRoster::GetCatalog()
75\brief Get the current image catalog.
76
77This function returns the catalog for the calling image (application, add-on, or shared
78library). Note that it doesn't allow to specify a fingerprint. The language will be
79selected from the user preferences.
80
81\returns The catalog, if it was loaded successfully.
82\warning This function needs the image to be lined with liblocalestub.a
83*/
84
85/*!
86\fn status_t BLocaleRoster::GetPreferredLanguages(BMessage* message) const
87\brief Return the list of user preferred languages.
88
89This function fills in the given message with one or more language string
90fields. They constitute the ordered list of user-selected languages to use for
91string translation.
92*/
93