Good afternoon! Tell me how can I connect a translation file for the rules?
As far as I know, that’s currently not possible. We’re open for contribution to improve the situation!
I figured it out. It uses the general bpmn js translation method
// this is a translation file
import translations from './ru/translate';
export default function customTranslate (template, replacements) {
replacements = replacements || {};
// Translate
template = translations[template] || template;
// Replace
return template.replace(/{([^}]+)}/g, function (_, key) {
return replacements[key] || `{${key}}`
})
};
const customTranslateModule = {
translate: ['value', customTranslate],
};
this.modeler = new Modeler({
container: '#canvas',
keyboard: { bindTo: document },
additionalModules: [customTranslateModule, lintModule]
});
1 Like
Hi is it worked!!! we need to change rule to use translate module