Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:create:multilang [16.01.2015 09:56]
admin [How to create a multilingual survey project:]
en:create:multilang [18.04.2021 22:20] (current)
sophia.schauer
Line 97: Line 97:
 ===== How to change language dynamically ===== ===== How to change language dynamically =====
  
-If you want to change the language version during the survey process the PHP functions''[[:en:create:functions:getlanguage|getLanguage()]]'' and ''[[:en:create:functions:setlanguage|setLanguage()]]'' are at your disposal. You can ...+If you want to change the language version during the survey process the PHP functions ''[[:en:create:functions:getlanguage|getLanguage()]]'' and ''[[:en:create:functions:setlanguage|setLanguage()]]'' are at your disposal. You can ...
  
   * hide entire questions in the respective language versions dynamically.   * hide entire questions in the respective language versions dynamically.
   * 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 [[:en:create:layout|Questionnaire Layout]] for the fields //Default font size// and //Font for input fields// in the //General Settings//. For Simplified Chinese, the list of fonts could then look something like this:
 +
 +    Arial, Helvetica, tahoma, verdana, 宋体, SimSun, 华文细黑, STXihei, sans-serif
 +    
 +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. "Arial" for the German version and "Sim Sun" (宋体) for the Chinese language version.
 +
 +In this case, adjust the predefined text module //Layout: HTML-Code in <head>// under **Text modules u. Label**. Namely, you deposit the following HTML/CSS code for the Chinese language variant:
 +
 +<code html>
 +<style type="text/css">
 +body,
 +textarea,
 +input,
 +select {
 +  font-family: 宋体, SimSun, 华文细黑, STXihei, sans-serif;
 +}
 +</style>
 +</code>
 +
 +For other language versions you can of course store other definitions. If you do not specify anything, the definition from the layout is used.
en/create/multilang.1421398564.txt.gz · Last modified: 16.01.2015 09:56 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki