Set Up Logic Based on Survey Language

Using our Text & Translations tool you can provide a complete translation of your survey including question titles, answer options, as well as, error messages and button text.

This is generally the best practice for providing translated versions of your survey. To learn more visit our Translate Your Survey Tutorial.


A unique situation can arise when questions or actions are relevant only to certain languages. Say, for example, you are collecting contact information and the necessary fields for respondents living in Spain are different than for those in the US or France. Let's imagine we've built a survey with a default language of English and we are providing French and Spanish translations. Let's imagine that the County field of a Contact Form question is necessary only for Spanish-speaking respondents. Using language-based logic you can display a specific field only when necessary.

The below example describes applying language-based logic to a question. This type of logic can also be used to fire specific actions. i.e. sending different email actions depending on language, or redirecting to different links/urls based on language.

Requirements for Setting Up Language-Based Logic

In order to set up language-based logic you must:

  1. [Recommended] Use the Language Bar to allow survey respondents to select their language.

    OR
  2. Use a dedicated share link for each language and set up the sglocale URL Variable. Learn how.

Setting Up Language Based Logic

  1. Edit the question you wish to conditionally display based on language and go to the Logic tab. Select the option to Only show this question based on answers to previous questions or other logic conditions.
  2. On the left of the logic builder, select URL Variable.

    • In the text field enter the URL Variable for language which is as follows: sglocale.
    • The operator in the middle should be is exactly equal to.
    • On the right-hand side, enter the language code (see reference) for which you wish the question to display. In our example, we entered es. It is important to use the language code exactly.Language Based Logic: Example Logic Rule

If you are using this method to fire different versions of Send Email Actions or URL Redirect Actions, you will need a separate action for each language version. Each separate action will then need its own unique logic condition to dictate when it needs to fire.

Check it out in this survey:

http://survey.alchemer.com/s3/1761690/Language-Logic

By default, the survey will display in English. Notice the "County" question does not display. Click the Language Bar up top and select Spanish. You'll now see the Condado question display!

Language Based Logic Example

Add a survey with this setup to your account!

Setting Up Language-Specific Links

While the Language Bar is the preferred method for sharing translated surveys you can also share dedicated links for each language.

  1. Go to your Share tab and click the option to Create New Tracking Link on the lower portion of the page.
  2. On the Advanced tab change the Language from Auto to one of your translated languages.
  3. In the URL Variables field set up the sglocale URL variable. You will need to enter the language code see reference for which you wish the question to display. For example sglocale=es.Tracking Link Language Settings
  4. As a best practice be sure to use the language as the Name of the link. You can also put this information in the URL via the edit this link option.
    Tracking Link Name & URL

Language Codes

Language
Code
Abkhazian
ab
Avestan
ae
Afrikaans
af
Akan
ak
Amharic
am
Aragonese
an
Arabic
ar
Assamese
as
Avaric
av
Aymara
ay
Azerbaijani
az
Bashkir
ba
Belarusian
be
Bulgarian
bg
Bihari
bh
Bislama
bi
Bambara
bm
Bengali
bn
Tibetan
bo
Breton
br
Bosnian
bs
Catalan
ca
Chechen
ce
Chamorro
ch
Corsican
co
Cree
cr
Czech
cs
Church Slavic
cu
Chuvash
cv
Welsh
cy
Danish
da
German
de
German (Austria)
de-at
German (Switzerland)
de-ch
Divehi
dv
Dzongkha
dz
Ewe
ee
Greek
el
English
en
English (Australia)
en-au
English (Canada)
en-ca
English (South Africa)
en-za
English (UK)
en-gb
Esperanto
eo
Spanish
es
Spanish (Mexico)
es-mx
Spanish (United States)
es-us
Estonian
et
Basque
eu
Persian
fa
Fulah
ff
Finnish
fi
Fijian
fj
Faroese
fo
French
fr
French (Canada)
fr-ca
French (Belgium)
fr-be
French (France)
fr-fr
French (Luxembourg)
fr-lu
French (Monaco)
fr-mc
French (Switzerland)
fr-ch
Western Frisian
fy
Irish
ga
Scottish Gaelic
gd
Galician
gl
Guarani
gn
Gujarati
gu
Manx
gv
Hausa
ha
Hebrew
he
Hindi
hi
Hiri Motu
ho
Croatian
hr
Haitian
ht
Hungarian
hu
Armenian
hy
Herero
hz
Interlingua
ia
Indonesian
id
Interlingue
ie
Igbo
ig
Sichuan Yi
ii
Inupiaq
ik
Ido
io
Icelandic
is
Italian
it
Italian (Switzerland)
it-ch
Inuktitut
iu
Japanese
ja
Javanese
jv
Georgian
ka
Kongo
kg
Kikuyu
ki
Kwanyama
kj
Kazakh
kk
Kalaallisut
kl
Khmer
km
Kannada
kn
Korean
ko
Kanuri
kr
Kashmiri
ks
Kurdish
ku
Komi
kv
Cornish
kw
Kirghiz
ky
Latin
la
Luxembourgish
lb
Ganda
lg
Limburgish
li
Lingala
ln
Lao
lo
Lithuanian
lt
Luba-Katanga
lu
Latvian
lv
Malagasy
mg
Marshallese
mh
Maori
mi
Macedonian
mk
Malayalam
ml
Mongolian
mn
Marathi
mr
Malay
ms
Maltese
mt
Burmese
my
Nauru
na
Norwegian Bokmal
nb
North Ndebele
nd
Nepali
ne
Ndonga
ng
Dutch
nl
Norwegian Nynorsk
nn
Norwegian
no
South Ndebele
nr
Navajo
nv
Chichewa
ny
Occitan
oc
Ojibwa
oj
Oromo
om
Oriya
or
Ossetian
os
Panjabi
pa
Pali
pi
Polish
pl
Pashto
ps
Portuguese
pt
Portuguese (Brazil)
pt-br
Quechua
qu
Raeto-Romance
rm
Kirundi
rn
Romanian
ro
Russian
ru
Kinyarwanda
rw
Sanskrit
sa
Sardinian
sc
Sindhi
sd
Northern Sami
se
Sango
sg
Sinhala
si
Slovak
sk
Slovenian
sl
Samoan
sm
Shona
sn
Somali
so
Albanian
sq
Serbian
sr
Swati
ss
Southern Sotho
st
Sundanese
su
Swedish
sv
Swahili
sw
Tamil
ta
Telugu
te
Tajik
tg
Thai
th
Tigrinya
ti
Turkmen
tk
Tagalog
tl
Tswana
tn
Tonga
to
Turkish
tr
Tsonga
ts
Tatar
tt
Twi
tw
Tahitian
ty
Uighur
ug
Ukrainian
uk
Urdu
ur
Uzbek
uz
Venda
ve
Vietnamese
vi
Volapuk
vo
Walloon
wa
Wolof
wo
Xhosa
xh
Yiddish
yi
Yoruba
yo
Zhuang
za
Chinese (simplified)
zh
Chinese (Hong Kong)
zh-hk
Chinese (Taiwan
zh-tw
Chinese (PRC)
zh-cn
Chinese (Singapore)
zh-sg
Zulu
zu

Basic Standard Market Research HR Professional Full Access Reporting
Free Individual Team & Enterprise
Feature Included In