There are plenty of strings throughout the app that you may want to customize. This page will guide you to where you can go and edit them in the code. Don't forget to submit your change as a pull request!
We use a very simple strings.json
file for all the strings. We currently support English, Spanish and French. https://github.com/OpenCollective/opencollective-website/blob/master/frontend/src/ui/strings.json
To add a translation to a new language, copy paste the en.json from frontend/src/lang and rename the filename using the 2 or 4 letter code for your country/language (e.g. fr-BE.json
or fr.json
).
You will also need to copy paste the last line in frontend/scripts/translate.js
fs.writeFileSync(LANG_DIR + 'ja.json', JSON.stringify(translatedMessages('ja'), null, 2));
and replace ja
with your 2-4 letter locale code.
Then you can submit a pull request, like this one :-) opencollective/opencollective-frontend#119
https://github.com/OpenCollective/opencollective-api/tree/main/templates/emails