if (NS_FAILED(res) || localeFactory == nsnull) cout << "FindFactory nsILocaleFactory failed\n";
if (NS_FAILED(res) || localeFactory == nsnull) printf("FindFactory nsILocaleFactory failed\n");
static nsresult NewLocale(const nsString* localeName, nsILocale** locale){  nsCOMPtr<nsILocaleFactory>	localeFactory;  nsresult res;  res = nsComponentManager::FindFactory(kLocaleFactoryCID, getter_AddRefs(localeFactory));   if (NS_FAILED(res) || localeFactory == nsnull) cout << "FindFactory nsILocaleFactory failed\n";  res = localeFactory->NewLocale(localeName, locale);  if (NS_FAILED(res) || locale == nsnull) cout << "NewLocale failed\n";  return res;}