Skip to content

Commit 915a913

Browse files
committed
add tr function
1 parent 29e0de8 commit 915a913

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/translate/Trans.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ public Trans (String path) throws IOException, FileNotFoundException {
2020
rf.close();
2121
object = JSONObject.parseObject(content.toString(), Feature.OrderedField);
2222
}
23+
24+
public String tr(String key) {
25+
return object.getString(key);
26+
}
27+
2328
public static void main(String[] args) throws IOException, FileNotFoundException {
2429
Trans trans = new Trans("in.json");
2530
}

0 commit comments

Comments
 (0)