feat: Added example code for how to add translation to dev env. See #374
This commit is contained in:
parent
d5a052fb72
commit
c8c8bd9ff2
1 changed files with 8 additions and 1 deletions
|
@ -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}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue