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' import Pattern from 'pattern'
const App = props => { const App = (props) => {
let instance = new Pattern() let instance = new Pattern()
let config = instance.config let config = instance.config
// You can use this to add transations
let translations = {
JSON: 'JSON',
someOtherString: 'Some other string that needs translation'
}
return ( return (
<Workbench <Workbench
freesewing={freesewing} freesewing={freesewing}
Pattern={Pattern} Pattern={Pattern}
config={config} config={config}
userLanguage="{{language}}" userLanguage="{{language}}"
translations={translations}
/> />
) )
} }