It's necessary to create React JS plugin, using only Typescript and React Context, that will return copies in certain language.
Keep away from unnecessary dependecies, keep it simple.
- Start plugin using
yarn serve:start
- Start client for example from example folder using
yarn serve:client
- Get list of copies (translates) passed through props and save them in context.
- Add possibility to change current language.
- Add possibility to find out current language.
- Add possibility to get translate for current language using keyword of copy.
- Add possibility to use templates For example 'Hello, {name}' copy will return 'Hello, ...' and text that will be passed using arguments.
I want to notice that it should be plugin solution, it should work indeferent the type of project, it has to recieve copies, and serve necessary copy.