result = localeFactory->GetApplicationLocale(&locale);
result = localeService->GetApplicationLocale(&locale);
get_applocale(void){	nsresult			result;	nsILocaleFactory*	localeFactory;	nsILocale*			locale;	nsString*			category;	nsString*			value;	PRUnichar *lc_name_unichar;	result = nsComponentManager::FindFactory(kLocaleFactoryCID,										(nsIFactory**)&localeFactory);	NS_ASSERTION(localeFactory!=NULL,"nsLocaleTest: factory_create_interface failed.");	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_create_interface failed");	//	// test GetApplicationLocale	//	result = localeFactory->GetApplicationLocale(&locale);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");	NS_ASSERTION(locale!=NULL,"nsLocaleTest: factory_get_locale failed");	//	// test and make sure the locale is a valid Interface	//	locale->AddRef();	category = new nsString("NSILOCALE_MESSAGES");	value = new nsString();	result = locale->GetCategory(category->GetUnicode(),&lc_name_unichar);	value->Assign(lc_name_unichar);	NS_ASSERTION(NS_SUCCEEDED(result),"nsLocaleTest: factory_get_locale failed");	NS_ASSERTION(value->Length()>0,"nsLocaleTest: factory_get_locale failed");	locale->Release();	delete category;	delete value;	localeFactory->Release();    return locale;}