#Quick Start See FacebookLocalesSimple.json. Note that FacebookLocalesSimple.json may be outdated. To generate the latest data, read on.
Node scripts to convert FacebookLocales.xml to simplified JSON for consumption in JS & HTML.
Facebook's XML source is unwieldy: https://www.facebook.com/translations/FacebookLocales.xml
curl -L -o data/FacebookLocales.json 'https://www.facebook.com/translations/FacebookLocales.xml'
Note: you can put the output files anywhere. There are no hard path dependencies in the scripts.
node FacebookLocalesXMLToJSON.js xml/FacebookLocales.xml > json/FacebookLocales.json
node LocaleToRepresentation.js data/FacebookLocales.json > FacebookLocalesSimple.json