 
 let fileManager = FileManager.default
 
-for code in languages
+for code in languages.sorted()
 {
 	print("Exporting " + code + "...", terminator:"")
-
-	let outputFileURL = exportFolderURL.appendingPathComponent(code + ".json")
-	let outputFolderURL = exportFolderURL.appendingPathComponent(code + ".lproj", isDirectory: true)
+	
+	var xcode = code
+	
+	if xcode == "zh-CN"
+	{
+		xcode = "zh-Hans"
+	}
+	else if xcode == "zh-TW"
+	{
+		xcode = "zh-Hant"
+	}
+	else if xcode == "en-us"
+	{
+		xcode = "en"
+	}
+	else if xcode == "pt-br"
+	{
+		xcode = "pt-BR"
+	}
+
+	let outputFileURL = exportFolderURL.appendingPathComponent(xcode + ".json")
+	let outputFolderURL = exportFolderURL.appendingPathComponent(xcode + ".lproj", isDirectory: true)
 	
 	do
 	{

			var pluralsDict = [String: Any]()

			pluralsDict["NSStringFormatSpecTypeKey"] = "NSStringPluralRuleType"
			
			for key in translation.plurals!.keys.sorted()
			{

				do
				{
					let data = try Data(contentsOf: url)
					//try data.write(to: outputFileURL)
					
					// code json
					let translations = try JSONSerialization.jsonObject(with: data, options: []) as? [JSONDictionary]
