// Create a Map for the language if one does not exist.
Properties translation = translations.get(language); if (translation == null) {
translation = new Properties();
translations.put(language, translation);
}
// Add the properties from this file to the combined file, prefixing the // key with the package name to ensure uniqueness. for (Object obj : props.keySet()) {
String key = (String) obj;
String value = props.getProperty(key);
translation.put(keyPrefix + key, value);
}
}
static String getKeyPrefix(File root, File f) throws IOException {
String prefix = f.getParentFile().getCanonicalPath();
prefix = prefix.substring(root.getCanonicalPath().length() + 1);
prefix = prefix.replace(File.separatorChar, '.');
prefix = prefix + Constants.END_PACKAGE_MARKER; // POEditor uses javax package names. // Renaming here is less work than renaming terms in POEditor
prefix = prefix.replace(Constants.JAKARTA_EE_SUBSTRING, Constants.JAVA_EE_SUBSTRING); return prefix;
}
staticvoid export(String language, Properties translation, File storageDir) {
File out = new File(storageDir, Constants.L10N_PREFIX + language + Constants.L10N_SUFFIX); try (FileOutputStream fos = new FileOutputStream(out);
Writer w = new OutputStreamWriter(fos, StandardCharsets.UTF_8)) {
String[] keys = translation.keySet().toArray(new String[0]);
Arrays.sort(keys); for (Object key : keys) {
w.write(key + "=" + formatValueExport(translation.getProperty((String) key)) + "\n");
}
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-10-04)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.