nsCOMPtr<nsILocaleFactory>	localeFactory;
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) printf("FindFactory nsILocaleFactory failed\n");  res = localeFactory->NewLocale(localeName, locale);  if (NS_FAILED(res) || locale == nsnull) printf("NewLocale failed\n");  return res;}