Element fbRootElement = doc.getElementById(FacebookRootElementID);
if (fbRootElement == null) {
fbRootElement = DOM.createDiv();
fbRootElement.setId(FacebookRootElementID);
BodyElement bodyElement = doc.getBody();
bodyElement.appendChild(fbRootElement);
}
String fbLocale = locale;
if (fbLocale == null) {
// todo: get default locale from user, accounting for list of Facebook-allowed locales, available from http://www.facebook.com/translations/FacebookLocales.xml