Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Wanted: Document how to use custom i18n translations in a webapp plugin #1070

Open
mm-cloud-bot opened this issue May 20, 2022 · 0 comments

Comments

@mm-cloud-bot
Copy link

Mattermost user michael.kochell from https://community-daily.mattermost.com has requested the following be documented:

We should have this documented somewhere, but you will need to do two things to get webapp plugin translations working:

- Call [registerTranslations](https://developers.mattermost.com/integrate/plugins/webapp/reference/#registerTranslations) to register your translation strings
- Use webpack externals to make sure the plugin uses the same instance of `react-intl` 
[mattermost/mattermost-plugin-playbooks/webapp/webpack.config.js](https://github.com/mattermost/mattermost-plugin-playbooks/blob/136d62f9278d31f9f1223771a655490c8360ef92/webapp/webpack.config.js#L127)
```js
        'prop-types': 'PropTypes',
        'react-bootstrap': 'ReactBootstrap',
        'react-router-dom': 'ReactRouterDom',
        'react-intl': 'ReactIntl',
    },

See the original post [here](https://community-daily.mattermost.com/_redirect/pl/4xcqiwsppbnzzn8p38ad5iuhio).

_This issue was generated from [Mattermost](https://mattermost.com) using the [Doc Up](https://github.com/jwilander/mattermost-plugin-docup) plugin._
@cwarnermm cwarnermm changed the title Request for Documentation: Document how to use custom i18n translations in a webapp plugin Help Wanted: Document how to use custom i18n translations in a webapp plugin Feb 1, 2023
@cwarnermm cwarnermm added Help Wanted Community help wanted Up For Grabs labels Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants