Closed JaneSjs closed 12 months ago
This message is defined within a Form Library localization: emptySurvey. When a survey creator appears at design time, an empty survey content follows a survey creator localization and translates the empty survey message. However, when a user switches to the preview mode, a survey uses its own locale
property value.
You can handle a preview survey creation using the creator.onSurveyInstanceCreated
event. If a survey is empty, change it's locale
to the currently used creator locale.
creator.locale = "fr";
creator.onSurveyInstanceCreated.add((sender, options) => {
if (options.reason === "test" && options.survey.isEmpty) {
options.survey.locale = creator.locale;
}
});
@JaneSjs Yes, the user should set the survey locale to the needed locale.
Thank you, Andrew
User Issue: T15707 - Missing localization for Preview tab text - no pages or questions https://surveyjs.answerdesk.io/internal/ticket/details/T15707
When a survey is empty, it should use the same locale as it is defined for a Survey Creator. Otherwise, the 'a survey is empty' message appears untranslated: