Professional > Interview scripting > Writing interview scripts > Displaying information on a page > Navigation buttons > Labels on navigation buttons
 
Labels on navigation buttons
The interviewing program uses default texts for the navigation buttons that it displays on each page. You can change these texts so that, for example, the Previous button is labelled Back or << instead. You can also translate these texts so that the button labels appear in the same language as the rest of the questionnaire.
For all projects
The default button names are defined in the StandardTexts.mdd file in C:\Program Files\Common Files\IBM\SPSS\DataCollection\<version> IOM, and translations are available in a number of languages. You can change these default texts using MDM Label Manager, or you can use Translation Utility to add translations in other languages. If you want to change button labels for certain projects only, you may define the new names in the metadata section of the script as described below.
Note If you change StandardTexts.mdd in any way, you must stop and restart IIS to have the changes recognized. If you are running Windows 2003, you can stop and restart the UNICOM Intelligence Interviewer - Server application pool rather than restarting IIS if you prefer; this has the advantage of not affecting any other applications that may be using IIS.
For all pages in a script
To define replacement labels for navigation buttons throughout a single project, put the following statement in the metadata section of the interview script:
StandardTexts block fields
(
  Navigations block fields
  (
ButtonName1 "Text 1" info;
    ButtonName2 "Text 2" info; ...
  );
);
where:
ButtonName is the name of the navigation button, and is one of: Next, Prev, First, Last, GoTo, and Stop.
Text is the replacement text.
You can define any number of replacement texts just by listing them one after the other inside the Navigations block. For example:
StandardTexts block fields
(
Navigations block fields
  ( Next "Forward" info;
    Prev "Back" info;
  );
);
changes the labels for the Next and Previous buttons but leaves the labels of the others unchanged.
For individual questions
If you want to use different navigation labels for just one question in a script, you define them in the metadata section as a helper text related to the question. Write the question’s definition as normal and then insert the helperfields block at the end of the definition:
Qname "QText" Definition
  helperfields
  (
    StandardTexts block fields
    (
      Navigations block fields
      (
        ButtonName "ButtonText" info;
      );
    );
  );
where:
Qname is the question name.
QText is the question text.
Definition is the remainder of the usual question definition, including the question type, length, and so on.
ButtonName is the name of the navigation button, and is one of: Next, Prev, First, Last, GoTo, and Stop.
ButtonText is the replacement text.
For groups of questions
If you want to make the same changes to a set of consecutive questions, you can use inserts: see Programmatically inserting text into labels. Inserts are normally used for text substitution in question and response texts but they work equally well with navigation buttons. Start by adding a StandardTexts block to the metadata section defining the buttons whose labels you want to change and specifying a unique insert name for each one. For example:
StandardTexts "StandardTexts" block fields ( Navigations "Navigations" block fields ( Next "{Ins}" info; ); );
Then, in the routing section, add statements at the appropriate points that define the values of the insert labels:
IOM.Navigations[NavigationTypes.ButtonName].Label.Inserts["InsertName"] = "ButtonText"
where:
ButtonName is the name of the navigation button, and is one of: nvNext, nvPrev, nvFirst, nvLast, nvGoto, and nvStop.
InsertName is the name of the variable that represents the button’s text in the Navigations block in the metadata section.
ButtonText is the replacement text.
For example:
IOM.Navigations[NavigationTypes.nvNext].Label.Inserts["Ins"] = ">>>"
This example defines a Next navigation button that has >>> as its label, instead of the word “Next”.
Whenever you want to alter the button labels, just write another of these statements at the appropriate point in the routing section.
See also
Navigation buttons