Internationalization and text configuration
We need to introduce a helper, either here or in @pubsweet/client
, that can take care of text configuration.
ie. you should be able to change the text that is displayed in the app via language settings or because you don't like the defaults
This has both client-side and server-side implications, but let's stick to the client-side in this issue.
First step would be compare the pros and cons of using react-intl
, react-i18next
or a custom setup client-side.
In all scenarios we'd wrap the base app with a react context provider and expose a single helper (eg. t
) to the apps.
This means that on the application side it would like this, no matter what we choose to use:
import { t } from '@coko/client'
const Component = () => {
return <span>{t('componentText')}</span>
}