| Title: | Translate 'iatgen' Generated QSF Files |
|---|---|
| Description: | Automates translating the instructions of 'iatgen' generated qsf (Qualtrics survey files) to other languages using either officially supported or user-supplied translations (see Santos et al., 2026 <doi:10.1371/journal.pone.0342742> |
| Authors: | Michal Kouril [aut, cre] (ORCID: <https://orcid.org/0000-0002-4786-7934>), João O. Santos [aut] (ORCID: <https://orcid.org/0000-0001-6640-126X>) |
| Maintainer: | Michal Kouril <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.1.4 |
| Built: | 2026-06-04 11:11:02 UTC |
| Source: | https://github.com/iatgen/tr.iatgen |
Return the list of available languages for iatgen translation
available.languages()available.languages()
Returns data.frame listing the supported languages.
Translation identifier
Verbose translation description
available.languages()available.languages()
Export blank translation template
export.template(src_lang = "en")export.template(src_lang = "en")
src_lang |
Source language – "en" for english is the only supported one. |
The path to the template file (class: character).
export.template()export.template()
This starts R shiny web based application to facilitate iatgen-generated QSF translation. It is a pass through function to shiny::runApp.
runApp(...)runApp(...)
... |
All parameters are passed to Shiny runApp function |
No return value, called for side effects (running the shiny App UI)
# this will start the shiny UI tr.iatgen::runApp()# this will start the shiny UI tr.iatgen::runApp()
Read-in iatgen generated QSF file and translated it to a target language specified by user either from the list of available languages included in tr.iatgen package or using the custom supplied translation file.
translate.qsf(file, lang, lang_file = NULL, src_lang = "en", dst_file = NULL)translate.qsf(file, lang, lang_file = NULL, src_lang = "en", dst_file = NULL)
file |
qsf file |
lang |
Target language (abbreviation). |
lang_file |
CSV file containing custom translation. |
src_lang |
Source language – "en" for english is the only supported one. |
dst_file |
save the translated file as. If NULL temporary file will be created. |
Translated file path/location (class: character)
# example code my_qsf_file <- system.file("examples/iat-flowins.qsf", package = "tr.iatgen") translate.qsf(file = my_qsf_file, lang = "pt-pt")# example code my_qsf_file <- system.file("examples/iat-flowins.qsf", package = "tr.iatgen") translate.qsf(file = my_qsf_file, lang = "pt-pt")
This function allows you to translate an iatgen QSF file by visually selecting the files and settings for the translation.
It's a wrapper around 'translate.qsf()', meant to be make it more user-friendly for less technical users.
See the official iatgen website for a web based alternative.
translate.qsf.gui()translate.qsf.gui()
Translated file path/location (class: character)
translate.qsf.gui()translate.qsf.gui()
The validate.language function reads in csv file which is expected to contain 2 columns and 28 rows:
the first column contains the english language text (as compared to the template file)
the second column contains the translation of the first column in a target language The first rows contains heading – heading of the first column is "en" for English and the heading of the second colum is iana formatted target langugage specifier.
validate.language(file, src_lang = "en")validate.language(file, src_lang = "en")
file |
Source CSV file to validate |
src_lang |
Source language – "en" for english is the only supported one. |
Heading of the second column (language identifier, class: character) if successful, NULL if error
my_csv_file <- system.file("langs/en_jp.csv", package = "tr.iatgen") validate.language(file = my_csv_file)my_csv_file <- system.file("langs/en_jp.csv", package = "tr.iatgen") validate.language(file = my_csv_file)