Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / intl / docs / locale_env.rst
blob7f9f2fc7547459512108973f5642af1b19ba0a9a
1 Environments
2 ============
4 While all the concepts described above apply to all programming languages and frameworks
5 used by Mozilla, there are differences in completeness of the implementation.
7 Below is the current list of APIs supported in each environment and examples of how to
8 use them:
10 C++
11 ---
13 In C++ the core API for Locale is :js:`mozilla::intl::Locale` and the service for locale
14 management is :js:`mozilla::intl::LocaleService`.
16 For any OSPreference operations there's :js:`mozilla::intl::OSPreferences`.
19 JavaScript
20 ----------
22 In JavaScript users can use :js:`mozilla.org/intl/mozILocaleService` XPCOM API to access
23 the LocaleService and :js:`mozilla.org/intl/mozIOSPreferences` for OS preferences.
25 The LocaleService API is exposed as :js:`Services.locale` object.
27 There's currently no API available for operations on language tags and Locale objects,
28 but `Intl.Locale`_ API is in the works.
30 Rust
31 ----
33 For Rust Mozilla provides a crate `fluent-locale`_ which implements the concepts described
34 above.
36 .. _Intl.Locale: https://bugzilla.mozilla.org/show_bug.cgi?id=1433303
37 .. _fluent-locale: https://docs.rs/fluent-locale/