File f=fileChooser.getSelectedFile();
if (f!=null) {
if (f.getName().indexOf('.') == -1) {
f = new File(f.getAbsolutePath() + filter.getExtension());
}
ZipUtil zip = new ZipUtil();
StringBuilder dir = new StringBuilder(Settings.getUserSettingsDirName())
.append(File.separatorChar).append("lang").append(
File.separatorChar);
try {
zip.zipDirectory(f, new File(dir.toString()));
JOptionPane.showMessageDialog(this, mLocalizer.msg("exportDone", "Export Done!"));
} catch (IOException e) {
e.printStackTrace();
ErrorHandler.handle(mLocalizer.msg("exportFailure", "Error while saving zip file."), e);
}