Question T11508
Visible to All Users

Remove localized strings from survey JSON (Survey Creator V1)

created 2 years ago (modified 2 years ago)

[Ticket cloned from T11480: Remove localized strings from survey JSON]

The recommended solution works in V2, but raises an an error in V1 knockout.

Clipboard-File-1.png

Please check on https://codesandbox.io/s/focused-waterfall-w0vopo?file=/src/index.js:120-152

Changing the survey mode property from edit to display (or vice versa) will trigger the code in index.js lines 25-32

Could you let me know how I can resolve this?

Answers approved by surveyjs Support

created 2 years ago

Hello Bas,
You need to change just one function for Creator V1:

JavaScript
function removeLocationsFromItem(item, locales) { locales.forEach((loc) => item.locString.setLocaleText(loc, undefined)); }

Here is the working example.

Thank you,
Andrew
SurveyJS Team