+}
+
+void ContactDataObject::SaveLanguage(map<int, wxString> *LanguageList, map<int, wxString> *LanguageListAltID,
+ map<int, wxString> *LanguageListPID, map<int, wxString> *LanguageListType,
+ map<int, int> *LangaugeListPref, map<int, wxString> *LanguageListTokens,
+ wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator LanguageIter = LanguageList->begin();
+ LanguageIter != LanguageList->end(); LanguageIter++){
+
+ ProcessData.Append("LANG");
+
+ // Check if there is a value for TYPE.
+
+ if (DataType.size() > 0){
+
+ ProcessData.Append(";TYPE=");
+ ProcessData.Append(DataType);
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*LanguageListAltID)[LanguageIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*LanguageListAltID)[LanguageIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*LanguageListPID)[LanguageIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*LanguageListPID)[LanguageIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*LangaugeListPref)[LanguageIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*LangaugeListPref)[LanguageIter->first]));
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*LanguageListTokens)[LanguageIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*LanguageListTokens)[LanguageIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(LanguageIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+