MCPcopy Create free account
hub / github.com/BaseXdb/basex / read

Method read

basex-core/src/main/java/org/basex/core/Lang.java:38–50  ·  view source on GitHub ↗

Reads the specified language file. @param lang language

(final String lang)

Source from the content-addressed store, hash-verified

36 * @param lang language
37 */
38 private static synchronized void read(final String lang) {
39 TEXTS.clear();
40 CHECK.clear();
41 final String path = SUFFIX + '/' + lang + '.' + SUFFIX;
42 final TokenObjectMap<byte[]> map = Util.properties(path);
43 for(final byte[] key : map) {
44 final String name = Token.string(key), val = Token.string(map.get(key));
45 if(TEXTS.put(name, val.replace("\n", Prop.NL)) != null) {
46 Util.errln("%." + SUFFIX + ": '%' is declared twice", lang, name);
47 }
48 CHECK.put(name, true);
49 }
50 }
51
52 /**
53 * Returns the specified string.

Callers 2

LangClass · 0.95
checkMethod · 0.95

Calls 7

propertiesMethod · 0.95
stringMethod · 0.95
errlnMethod · 0.95
getMethod · 0.65
clearMethod · 0.45
putMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected