QScript Translations
Jump to navigation
Jump to search
Translations
Allows you to modify the text used by Q when it generates tables and charts. e.g. Names of statistics, "NET".
allEnglishTexts
Returns the default English name for all translations. These can be used with get() and set().
Example: | project.translations.allEnglishTexts
|
englishToInternalName
Maps between English text and enum text for the enumerated types supported by TranslateOutputStrings. This saves the QScript writer from needing to understand the distinction.
equals()
Whether two objects are the same.
Returns: | true or false |
Example: | data_file.getQuestionByName('Q2').equals(data_file.questions()[0])
|
get(name_en)
Gets the user-overridden text for the output string given by the English text. If it has not been overridden then the default text under the current language settings will be returned.
name_en | English text that is normally output. |
Returns: | The text that will be used. If you have not changed this then it will be the original English text. |
Example: | log(item.translations.get('Column n'));
|
set(name_en, name_override)
Sets the user-overridden text for the output string given by the English text. If input for the user-overridden text is null, the user-overridden text is deleted.
name_en | English text that is normally output. |
name_override | The text to use instead of the original. |
Example: | item.translations.set('Column n', 'col n'));
|
type
Returns 'Translations'.