I don't happen to have multi-locale Android or B2G builds set up, but
I need to know how they behave to avoid breaking them. Does anyone
happen to know if the following code would end up printing the locale
code for the active browser UI localization on Android and B2G despite
them not being XUL platforms?

#include "nsIChromeRegistry.h"
#include "mozilla/Services.h"

  nsAutoCString locale;
  nsCOMPtr<nsIXULChromeRegistry> registry =
    mozilla::services::GetXULChromeRegistryService();
  if (registry) {
    registry->GetSelectedLocale(NS_LITERAL_CSTRING("global"), locale);
  }

printf("LOCALE: %s\n", locale.get());

-- 
Henri Sivonen
[email protected]
http://hsivonen.iki.fi/
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to