Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Langauge changer makes exception for english

  • julianrob77
  • julianrob77's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #215956 by julianrob77
HI.

we have surveys with a base langugage of english. it appears that the lanugage changer renders this label in the language switcher, and only this one, when the lanugage is swtiched (i.e. it does not render it to native language of english). I suspect this is a bug to do with google translate skipping the base langauge for some reason.

on the admin page however it works as expected, but in this instance it renders both the native languages for each label, AND the current one selected. Which is ideal- if someone can help us to apply this to our main surveys (in the theme?) this would be best. 

I have checked the themes and cant seem to find any difference in the relevant code.
It appears to be called from the same files, so I cant see why they are different.

main survey link:  survey.coronasurveys.org/
admin survey link:  admin.coronasurveys.org/

 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #215957 by Joffm
Hi, 
sorry to say that.
I could not see an issue.

I changed to German
 

then to Italian
 

next to Dutch
 

and finally back to English
 

The only things I found, were:
it took about 10-12 seconds to change the language
the first question isn't translated to Dutch.

Maybe I misunderstood your problem.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • julianrob77
  • julianrob77's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #215958 by julianrob77
Replied by julianrob77 on topic Langauge changer makes exception for english
the language translation itself is fine.

But look at the lanugage switcher menu. The label for english is always translated to the selected language, and NOT as native. this is very odd.

I would like the main survey menu to be the same as the admin one (ie. both native lanuage and the translation)

J
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #215960 by Joffm
As I thought, I misunderstood.

Well, in the "subviews/navigation/language_changer.twig" you find these lines.
Code:
            {# List of available languages.  #}
            {% for value, lang in aLCD.aListLang %}
                <li class="{{ aSurveyInfo.class.lctdropdownli }}" {{ aSurveyInfo.attr.lctdropdownli }}>
                    <a href='#' data-limesurvey-lang='{{ value }}' class="{{ aSurveyInfo.class.lctdropdownlia }} animate" {{ aSurveyInfo.attr.lctdropdownlia }}>
                        {{gT( lang )}}
                    </a>
                </li>
            {% endfor %}

Maybe you can adapt to your wishes.
Something like this?
{{lang}} - {{gT( lang )}}
or
{{gT( lang )}} - {{lang}}

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • julianrob77
  • julianrob77's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #215962 by julianrob77
Replied by julianrob77 on topic Langauge changer makes exception for english
Thanks,

it works how we want if you substitute {{gT( lang )}} for JUST {{lang}}

the codes above seem to show the exact same items, except for english then you get the labels as per the admin page. I still cant find the source file for that, it should be in the vanilla theme (in the views folder), but its not. must be located somewhere else?

if I can find that maybe is is customised somehow to show both translated and untranslated- your code should however work I can see the reasoning. very stanrge. either way front end wise it is fixed for now. Thanks very much.
J
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose