i18n implementation (#55)

This commit is contained in:
Athou
2013-05-12 12:38:56 +02:00
parent ca47270db1
commit 98aeccbb66
23 changed files with 353 additions and 124 deletions

View File

@@ -28,13 +28,13 @@ public class HTMLConcat {
}
sb.append("</div>");
String dest = destination.substring(0, destination.lastIndexOf(".")) + "." + i18n.getName().split("\\.")[0] + ".html";
FileUtils.writeStringToFile(new File(dest), sb.toString());
FileUtils.writeStringToFile(new File(dest), sb.toString(), "UTF-8");
}
}
public String translate(String content, File i18n) {
Properties props = new Properties();
props.load(new FileInputStream(i18n));
props.load(new InputStreamReader(new FileInputStream(i18n), "UTF-8"));
return replace(content, props);
}