Question T14185
Visible to All Users

Can't Fully Delete Title of Question in a Localized Survey

created a year ago

Hello,

When working with a translated survey, I can't delete the title of a question in all languages using the creator.
Here are the steps to reproduce this behavior:

  • Start off with the following survey, it has a single question with a translated title and its' locale is set to a non-default value. The goal is to fully delete the title of the question.
JSON
{  "locale": "de",  "pages": [   {    "name": "page1",    "elements": [     {      "type": "text",      "name": "question1",      "title": {       "de": "Versuch",       "default": "Experiment"      }     }    ]   }  ] }
  • Select the question in the creator and delete the title "Versuch".
  • Unselect the question.
  • The question now displays the default language title "Experiment".

Deleting this title is not synchronised to the json definition of the survey - this applies to both the middle editor as well as the property grid. It is only possible after removing the survey language (root locale property), but I don't feel like I can expect users to first go to the main settings of the survey and use the eraser button on the locale dropdown…

Looking forward to your thoughts on this.

Thanks,

Lucas

Show previous comments (4)

    Hi Lucas,
    Thank you for the additional clarification. I understand your point. Unfortunately, in a localized survey, there is no option to reset a question title to its initial state and force the title to copy a question name.

    A localized survey always uses a default locale (English, in this case) as a fallback locale. This means that if strings are undefined in a custom locale (e.g., fr), default locale strings (e.g., English) will be used.

    If English is not your default language, you can change the default language using the following setting:

    JavaScript
    import { surveyLocalization } from "survey-core" surveyLocalization.defaultLocale = 'it';

    View Demo
    Now, users can specify strings for English and other custom locales.

    By the way, I'm curious about the actual usage scenario behind this requirement. Do I correctly understand that users may want to use question names as question titles? To my understanding, a question title should be a meaningful word/phrase rather than a question name which is more like a unique identifier value.

    I look forward to your reply.

    LF LF
    Lucas Forster a year ago

      Hello Jane,

      One of the use cases is moving a title from the question itself to another element such as a panel. For this, the user copies the title to that other element, than comes back to the question to set the title hidden. What is left is the original copy of the title which can be deleted in the UI, but than that change is never saved. This is perceived as a bug and has the additional problem that there are now two copies of the same title in the survey, both in the JSON as well as the property grid.

      But thank you for taking the time to investigate and confirm that this is indeed not possible, I'll pass it on.

      Thanks,

      Lucas

        Hi Lucas,
        Thank you for the update. The main idea here is that in a localized survey, strings defined within a default locale become fallback strings to which all strings are reset when they are not defined in a custom locale.

        I appreciate your understanding. Please feel free to reach out if you have any further questions.