#include "misc.h" #include #include #include "resources.h" wxString exchangeEscapeChars(char* temp) { wxString output(temp); output.Replace("\\\\", "\\"); output.Replace("\\n", "\n"); output.Replace("\\t", "\t"); output.Replace("\"\"", """"); output.Replace("\\\"", "\""); return output; } CustomLocale::CustomLocale() : wxLocale(), currentLanguage(wxLANGUAGE_ENGLISH) {} CustomLocale::~CustomLocale() { //write language to file ofstream output("lang.dat"); if (!output) { wxMessageBox(wxString(_("Could not write to ")) + "\"" + "lang.dat" + "\"", _("An exception occured!"), wxOK | wxICON_ERROR); return; } output<translation.c_str()); //fallback return (szOrigString); }