1Environments
2============
3
4While all the concepts described above apply to all programming languages and frameworks
5used by Mozilla, there are differences in completeness of the implementation.
6
7Below is the current list of APIs supported in each environment and examples of how to
8use them:
9
10C++
11---
12
13In C++ the core API for Locale is :js:`mozilla::intl::Locale` and the service for locale
14management is :js:`mozilla::intl::LocaleService`.
15
16For any OSPreference operations there's :js:`mozilla::intl::OSPreferences`.
17
18
19JavaScript
20----------
21
22In JavaScript users can use :js:`mozilla.org/intl/mozILocaleService` XPCOM API to access
23the LocaleService and :js:`mozilla.org/intl/mozIOSPreferences` for OS preferences.
24
25The LocaleService API is exposed as :js:`Services.locale` object.
26
27There's currently no API available for operations on language tags and Locale objects,
28but `Intl.Locale`_ API is in the works.
29
30Rust
31----
32
33For Rust Mozilla provides a crate `fluent-locale`_ which implements the concepts described
34above.
35
36.. _Intl.Locale: https://bugzilla.mozilla.org/show_bug.cgi?id=1433303
37.. _fluent-locale: https://docs.rs/fluent-locale/
38