File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -117,23 +117,26 @@ handleCustomSubmit = () => {
117
117
New languages support can be added or replace the existing ones
118
118
[ Existing translations] ( ./src/translations/TranslatedText.tsx#defaultMessages )
119
119
120
+
121
+ [ ![ Edit react-quizzesExample RU locale] ( https://codesandbox.io/static/img/play-codesandbox.svg )] ( https://codesandbox.io/s/react-quizzesexample-ru-locale-wx50m?fontsize=14&hidenavigation=1&theme=dark )
122
+
120
123
``` javascript
121
124
import { QuizzBuilder } from " react-quizzes"
122
- import { defaultMessages } from " react-quizzes/translations/TranslatedText" ;
125
+ import { defaultMessages } from " react-quizzes/lib/ translations/TranslatedText" ;
123
126
124
127
// existing keys can be found on above link
125
- defaultMessages[" pt-PT " ]= {
126
- " toolbox.textinput.name" : " Text Input " ,
127
- " confirm.action" : " Are you sure? " ,
128
- " btn.yes" : " Yes " ,
129
- " btn.no" : " No " ,
130
- " btn.add" : " Add " ,
128
+ defaultMessages[" pt" ]= {
129
+ " toolbox.textinput.name" : " Caixa de Texto " ,
130
+ " confirm.action" : " Tem a certeza? " ,
131
+ " btn.yes" : " Sim " ,
132
+ " btn.no" : " Não " ,
133
+ " btn.add" : " Adicionar " ,
131
134
...
132
135
}
133
136
function App () {
134
137
return < QuizzBuilder
135
138
onChange= {(form ) => console .log (form)}
136
- language= " pt-PT "
139
+ language= " pt"
137
140
messages= {toolBoxItems}
138
141
/ >
139
142
}
You can’t perform that action at this time.
0 commit comments