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