A bpmn-js extension for translating BPMN diagrams using the BPMN 2.0 extension for internationalization (I18n).
Install via npm.
npm install @philippfromme/bpmn-js-i18n
Add as additional module to bpmn-js.
import BpmnModeler from 'bpmn-js/lib/Modeler';
import BpmnInternationalizationModule from 'bpmn-js-i18n';
import BpmnI18nSchema from 'bpmn-i18n-moddle/resources/bpmn-i18n.json';
const modeler = new BpmnModeler({
container: '#canvas',
additionalModules: [
BpmnInternationalizationModule
],
moddleExtensions: {
i18n: BpmnI18nSchema
}
});
import BpmnViewer from 'bpmn-js/lib/NavigatedViewer';
import BpmnInternationalizationModule from 'bpmn-js-i18n/lib/viewer';
import BpmnI18nSchema from 'bpmn-i18n-moddle/resources/bpmn-i18n.json';
const viewer = new BpmnViewer({
container: '#canvas',
additionalModules: [
BpmnInternationalizationModule
],
moddleExtensions: {
i18n: BpmnI18nSchema
}
});
Prepare the project by installing all dependencies:
npm install
Then, depending on your use-case you may run any of the following commands:
# build and test
npm run all
# start example
npm start
# run tests in watch mode
npm run dev
MIT