1
0
Fork 0

feat: Added example code for how to add translation to dev env. See #374

This commit is contained in:
Joost De Cock 2020-04-26 11:18:51 +02:00
parent d5a052fb72
commit c8c8bd9ff2

View file

@ -6,16 +6,23 @@ import '@freesewing/css-theme'
import Pattern from 'pattern'
const App = props => {
const App = (props) => {
let instance = new Pattern()
let config = instance.config
// You can use this to add transations
let translations = {
JSON: 'JSON',
someOtherString: 'Some other string that needs translation'
}
return (
<Workbench
freesewing={freesewing}
Pattern={Pattern}
config={config}
userLanguage="{{language}}"
translations={translations}
/>
)
}