JSON, React, Routing, Umeå • + 1umeå UMÉMA, Frontend developer
We need help implementing language support in our application MHA Reacts Internationalization (i18n) Routing And create translation files for Swedish and English.We estimate that the work takes approx.1.5-2 months.
Translation files are in the form JSON and contain keys that link to words or sentences.The work involves going through all pages and components of SenseWorks applications and replacing the static texts by tieing a key in the translation file and retrieving the value via a function.For example.
Before:
const MyComponent = () => { Return <div> static text </div }
const MyComponent = () => {
Return <div> static text </div
}
After:
// sv.json { Foo: "Statical text" } // en.json { foo: "Static text" } const MyComponent = () => { const text = useTranslation("foo") return <div>{text}</div }
// sv.json
{
Foo: "Statical text"
// en.json
foo: "Static text"
const text = useTranslation("foo")
return <div>{text}</div