Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whyboris/json-i18n-editor
Translate your i18n JSONs for your website or app with this tool
https://github.com/whyboris/json-i18n-editor
angular i18n translation
Last synced: 24 days ago
JSON representation
Translate your i18n JSONs for your website or app with this tool
- Host: GitHub
- URL: https://github.com/whyboris/json-i18n-editor
- Owner: whyboris
- License: mit
- Created: 2019-11-27T01:05:50.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T20:23:52.000Z (12 months ago)
- Last Synced: 2024-10-03T12:38:23.433Z (about 1 month ago)
- Topics: angular, i18n, translation
- Language: TypeScript
- Homepage: https://json-i18n-editor.now.sh
- Size: 3.56 MB
- Stars: 36
- Watchers: 4
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JSON i18n Editor
**JSON i18n Editor** helps you translate your JSON language files. It's an interface for you or your team to add and edit translations for your application or website.
## Try it
_Save functionality is disabled_ for the demo: https://json-i18n-editor.now.sh/
- Login: `guest`
- Pass: `guest`## Features
- Shows three columns: original language, last-saved translation (if any), and editable text box.
- When you change the text in the editable box, you see the _diff_: any text you remove from the last-saved translation is highlighted in red and any text you add is highlighted in green.
- Original language and last-saved translation are independently searchable.
- You can view one category at a time; view only untranslated fields, or only those you currently modified.
- Clicking `REVIEW` shows only the text you have edited for a quick review.## How to use
It *requires* two input `JSON` files (currently hardcoded as an example: `en.json` & `de.json`) each of which must have a depth of 2, for example:
```JSON
{
"categoryName": {
"keyName": "some text",
"anotherKey": "some text",
...
},
"anotherCategory" :{
"keyName": "some text",
...
},
...
}
```
_The value of all the keys at depth 1 must always be objects containing only keys that have strings as values_The structure of `en.json` is taken as authority on which keys must be present.
## Server
The PHP folder has a rough-and-dirty set of files to serve as API endpoints for the front-end application.
## Recommended workflow
1. Create the source-of-truth original `en.json` file
2. Use an [automated system](https://www.npmjs.com/package/translate-json-object) to translate all text into `de.json`
3. Use **JSON i18n Editor** to fix the automated translation## Technology
**JSON i18n Editor** is built with:
- [Angular 13](https://angular.io/) (February 2022)
- [ngx-virtual-scroller](https://github.com/rintoj/ngx-virtual-scroller)
- [Quill](https://github.com/quilljs/quill)## Credits
Created for and used by [Health Impact Fund](https://healthimpactfund.org/)