surveyjs / surveyjs_react_quickstart

SurveyJS + React Quickstart Template
http://surveyjs.io
140 stars 77 forks source link

change language #21

Open tabeshR opened 4 years ago

tabeshR commented 4 years ago

Hi, I want to change the language and I wrote this code class SurveyCreator extends Component { surveyCreator; componentDidMount() { let options = { showEmbededSurveyTab: true }; this.surveyCreator = new SurveyJSCreator.SurveyCreator( null, options, ); this.surveyCreator.survey.locale="fa";

but it changed only button text and the message after form submit and other things are in english what should I do ?

tsv2013 commented 4 years ago

Where do you want to change language - in SurveyJS Creator or in survey?

Here are the samples of multilanguage: survey: https://surveyjs.io/Examples/Library?id=survey-multilanguages&platform=jQuery&theme=modern creator: https://surveyjs.io/Examples/Survey-Creator?id=localization&theme=bootstrap , https://surveyjs.io/Examples/Survey-Creator?id=multiplelanguages&theme=bootstrap

tabeshR commented 4 years ago

In creator I saw this but I don't know where should I code I wrote this code this.surveyCreator.survey.locale="fa" but not complete changed "I use React"

tsv2013 commented 4 years ago

You are talking about the language in creator but in your code you setting language to the survey object instance inside creator. Have you cheked the samples I've shared?