Server files
In both Mattermost Team and Enterprise editions, you have the freedom to alter how content is displayed by being able to change the contents of localized files and email templates.
Before proceeding with the steps below, make sure you have completed the mattermost-server and mattermost-webapp setup process.
i18n files
The i18n files define many of the contents seen in email notifications and responses from the server.
-
Edit contents of files in the
mattermost/server/i18ndirectory according to your requirements. -
Once you're ready, create a tarball or zip the files within the
i18ndirectory.cd i18ntar -cvf i18n.tar * -
Before replacing the files, stop your Mattermost instance if it's currently running.
sudo service mattermost stop -
In your Mattermost deployment, back up and remove the files inside
i18nthat will no longer be in use.cd ~/mattermost/i18ntar -cvf i18n-yyyy-MM-dd.tar *rm -f *.json -
Transfer your custom
i18n.tarfile to the deployment server and extract it in thei18ndirectory.mv i18n.tar mattermost/i18ncd ~/mattermost/i18ntar -xvf i18n.tar -
Restart your Mattermost instance.
sudo service mattermost start
Email templates
Similarly to the i18n files, email templates can be edited and applied onto a running Mattermost instance in the following manner:
-
Edit the
htmlfiles inside of thetemplatesdirectory. In this example we'll assume thepost_body_full.htmlfile has been customized. -
Stop your Mattermost instance if it's currently running.
sudo service mattermost stop -
(optional) Rename the template file to be replaced to keep it as a backup.
cd ~/mattermost/templatesmv post_body_full.html post_body_full_yyyy_MM_dd.html -
Transfer your custom
post_body_full.htmlfile to the deployment server and place it insidetemplates.mv ./post_body_full.html ~/mattermost/templates/ -
Restart your Mattermost instance.
sudo service mattermost start