// Save the name of the loaded file so we can delete it later.
                $origFile = $sourceFile->getSourceFile();

                // Change the language code to the new format.
                $sourceFile->setLanguageId($languageCode);

                // Save in the new format.
                $sourceFile->saveAsXml();

                // Verify that the saved file is the same as the original.
                $copyLanguage = new LocalizerLanguage($prefix, $languageCode);
                $loadSuccess = $copyLanguage->loadXmlFile();

                echo $pathname."\n";
                if (!$copyLanguage->equal($sourceFile) || ($copyLanguage->getNumStrings() <= 0) || !$loadSuccess) {
                	echo "FAIL";
                }
                else {
                	echo "SUCCESS";
                	@unlink($origFile);
                }
            }
        }
    }
}

// Save the languages to the languages.xml file.
//$xmlSerializer = new XML_Serializer();
//$xmlSerializer->serialize($allLanguageIds);
//$data = $xmlSerializer->getSerializedData();