Question T1268
Visible to All Users

Language of designer survey

created 6 years ago

Hi,

I want to change the language of the designer survey so that dropdown questions show the localized string instead of "Choose…". So I did it this way right now: https://plnkr.co/edit/ZGYzNUSdO0Wiwb3mNVie?p=preview

But if you add a dropdown question in this example, there is still the "Choose…" string on this question. The localized string appears for example after switching to the JSON Editor tab and then switch back to the designer.

Also, if I add some answer text now, it shows up like this in the survey JSON:

JavaScript
"choices": [ { "value": "item1", "text": { "de": "asd" } }, "item2", "item3" ]

But I don't want to add german answer text here. I just want the designer survey to show up in german. And if I edit any element text in the survey, I still want it to be for the default language until we implemented our own localization tool and just switch the strings in our backend.

Any suggestions how to achieve that?

Thanks!

Show previous comments (7)
HH HH
Hendrik Hansmeier 6 years ago

    Great, I will look forward to that! Thank you!

      Hello Hendrik,
      I have decided to work on refactoring this code and found that your task can be solved with one line of code. In fact we already have unit test on this scenario.

      JavaScript
      Survey.surveyLocalization.defaultLocale = "de";

      I am sorry for being sloppy on this issue.

      Thank you,
      Andrew
      SurveyJS Team

      HH HH
      Hendrik Hansmeier 6 years ago

        Great, that helps! Thanks a lot :)