viczaca / react-json-schema-builder

React based component to build a json schema.
17 stars 3 forks source link

Can I18n be added? #5

Closed juaismar closed 3 years ago

juaismar commented 3 years ago

Hi, the internacionalization can be very useful.

juaismar commented 3 years ago

I18n added with viczaca. To call: <JSONSchemaBuilder schema={schema} onChange={setSchema} /> or <JSONSchemaBuilder locale={"es"} schema={schema} onChange={setSchema} />

For add new languajes:

  1. Create a json on src/locales/new_lang.json with the new translations
  2. Import on src\utils\i18n.ts the new json and append it to resources