This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:create:multilang [16.01.2015 09:56] – [How to change language dynamically] admin | en:create:multilang [09.02.2025 13:17] (current) – [Non-Western Languages] paula.dees | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Multilingual Surveys ====== | + | ====== Multilingual Surveys |
In a multilingual survey, you can easily deposit one or more translations for all visible texts (e.g. questions, text modules, scale labels, error messages). | In a multilingual survey, you can easily deposit one or more translations for all visible texts (e.g. questions, text modules, scale labels, error messages). | ||
Line 102: | Line 102: | ||
* control the order of items depending on the language. | * control the order of items depending on the language. | ||
* create your own language selection. | * create your own language selection. | ||
+ | |||
+ | ===== Non-Western Languages ===== | ||
+ | |||
+ | The standard Western fonts may not contain all the characters you need for Chinese, Japanese, Indian, Persian, Hebrew, etc. The best solution is to add fonts with the appropriate characters in [[: | ||
+ | |||
+ | Arial, Helvetica, tahoma, verdana, 宋体, SimSun, 华文细黑, | ||
+ | | ||
+ | In front in this example are additionally the western fonts. This __can__ be useful but does not have to be. It makes a difference especially when Western and non-Western characters are mixed in the questionnaire. | ||
+ | |||
+ | But you may also want to use a different font for the complete questionnaire (but only for a single language version). So e.g. " | ||
+ | |||
+ | In this case, adjust the predefined text module //Layout: HTML-Code in < | ||
+ | |||
+ | <code html> | ||
+ | <style type=" | ||
+ | body, | ||
+ | textarea, | ||
+ | input, | ||
+ | select { | ||
+ | font-family: | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | For other language versions you can of course store other definitions. If you do not specify anything, the definition from the layout is used. | ||
+ | |||
+ | |||
+ | ===== Language selection ===== | ||
+ | |||
+ | There are several ways to select a language for the interview: | ||
+ | |||
+ | * You can specify a language under **Compose questionnaire** in the // | ||
+ | * You can add a [[: | ||
+ | * If you work with serial mail, you can specify a language in the address field. | ||
+ | |||
+ | If the language is not specified by any of the above options, SoSci Survey will by default show a selection of available languages, symbolised by flags, when the questionnaire is started. | ||
+ | |||
+ | You can customise this selection under **Language versions** -> **Questionnaire language selection**. For each language there is a short HTML code with placeholders. | ||
+ | |||
+ | <code php> | ||
+ | <div class=" | ||
+ | <a href=" | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | The placeholder ‘’%link%‘’ ensures that the language selection works, ‘’%flag‘’ is replaced by a flag and ‘’%lang%‘’ by the name of the language in the respective language. | ||
+ | |||
+ | If you do not want to display any flags, you can simply remove the line with ‘’%flag%‘’, | ||
+ | |||
+ | <code php> | ||
+ | <div class=" | ||
+ | <a href=" | ||
+ | <div class=" | ||
+ | </a> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | If you want to display a different label, replace ‘’%lang%‘’, | ||
+ | |||
+ | <code php> | ||
+ | <div class=" | ||
+ | <a href=" | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | </a> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | If you want to use a different flag, upload it in **Images and media files** (do __not__ use the protected file storage) and add a ''< | ||
+ | |||
+ | <code php> | ||
+ | <div class=" | ||
+ | <a href=" | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | </a> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | To sort the languages in a different way, prefix a comment with the desired position. | ||
+ | |||
+ | <code php> | ||
+ | <!-- 2 --> | ||
+ | <div class=" | ||
+ | <a href=" | ||
+ | <div class=" | ||
+ | <div class=" | ||
+ | </a> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Optionally, you can also specify a text //above the language selection// that will be displayed above the flags. |