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'
|
||||
|
||||
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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue