Skip to content

Commit 34c4fbb

Browse files
committed
fixes #672 add multiple language doc
1 parent a6a5403 commit 34c4fbb

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ For the latest version, please check the [release](https://github.com/networknt/
125125

126126
## [Custom Message](doc/cust-msg.md)
127127

128+
## [Multiple Language](doc/multiple-language.md)
129+
130+
128131
## Known issues
129132

130133
I have just updated the test suites from the [official website](https://github.com/json-schema-org/JSON-Schema-Test-Suite) as the old ones were copied from another Java validator. Now there are several issues that need to be addressed. All of them are edge cases, in my opinion, but need to be investigated. As my old test suites were inherited from another Java JSON Schema Validator, I guess other Java Validator would have the same issues as these issues are in the Java language itself.

doc/multiple-language.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
The error messages have been translated to several languages by contributors. Here is the code to use German.
2+
3+
```
4+
Locale.setDefault(Locale.GERMAN);
5+
JsonSchemaFactory jsonFactoryInstance = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V202012);
6+
JsonSchemaFactory schemaFactory = JsonSchemaFactory.builder(jsonFactoryInstance).build();
7+
```
8+
9+
To add other languages, we need to add properties file under this folder.
10+
11+
https://github.com/networknt/json-schema-validator/tree/master/src/main/resources
12+

0 commit comments

Comments
 (0)