/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cstr::cstr; use nsstring::{nsACString, nsCString}; use std::marker::PhantomData; use thin_vec::ThinVec; use xpcom::{
get_service, getter_addrefs,
interfaces::{
mozILocaleService, nsICategoryEntry, nsICategoryManager, nsISimpleEnumerator, nsIXULRuntime,
},
RefPtr, XpCom,
};
pubfn set_available_locales(locales: &ThinVec<nsCString>) { let locale_service =
get_service::<mozILocaleService>(cstr!("@mozilla.org/intl/localeservice;1"))
.expect("Failed to get a service."); unsafe {
locale_service
.SetAvailableLocales(locales)
.to_result()
.expect("Failed to set locales.");
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.