- growthmindsetAsked on May 19, 2017 at 02:39 PM
Hi,I see JotForm has the multilingual dropdown for different languages, (translations under "form settings"). My company needs the ability to set the default based on what language the user speaks. This means they won't have to use the dropdown to choose their language.
I was thinking that maybe there is a way for pass a param to the script's "src" attribute like https://form.jotform.us/jsform/93092023343?lang=french... and then this could default the language dropdown to French, using that passed param.
- JotForm SupportKiranAnswered on May 19, 2017 at 03:09 PM
You may add the parameters ?language=fr&dropdown=hidden to your web page URL so that the dropdown will not be displayed on the page and language is set to French.
For example, http://www.yourwebsite.com/page/form.html?language=fr&dropdown=hidden
is the web page URL to set the language to French and hidden dropdown.
Hope this information helps!
- growthmindsetAnswered on May 19, 2017 at 04:39 PM
I went ahead and made these changes, but these params don't do anything by simply passing them in. Is there something I need to do in JotForm to accept these params an control the forms?
- JotForm SupportKiranAnswered on May 19, 2017 at 04:44 PM
There are no specific and built-in settings to achieve this requirement. Could you share the URL of the web page where the form is embedded so that we can take a look and provide you with necessary assistance?
- growthmindsetAnswered on May 19, 2017 at 04:50 PM
Unfortunately I can't release it into production right now. It's a pretty straightforward form, but has the language dropdown that get added when Translations are added under "Form Settings".
One thing that may be possible is I can populate a hidden "language" field with the User's language... then using a conditional, it would be nice if I could toggle the language dropdown to that language. It doesn't seem like the language drop down can be targeted with conditionals.
Is there a better way to do this? Perhaps a translating plugin that isn' the one built in under form settings.
- growthmindsetAnswered on May 19, 2017 at 04:53 PM
Actually.... it looks like the language dropdown can be populated! I may be able to make this work, but please let me know if anything else comes to mind.
One thing I'm worried about is there being a second or two where the form switches from English to the user's language.
- growthmindsetAnswered on May 19, 2017 at 05:00 PM
So it appears this won't work because conditionals let you use the Language drop down as a "if", but doesn't let you manipulate it as a "do to"
- JotForm SupportjonathanAnswered on May 19, 2017 at 06:07 PM
In the Language tool, there is option to detect the user's browser language used.
This option will make the form detect the current language of the browser and will then auto translate the form language to the browser language. So this basically does what your initial requirement was about -- it will load the form base on the user's own browser language.
I understand it may not work properly sometimes because it is a plugin that exist on the user's browser. If the user disabled or cancelled the language plugin on their browser, this feature will not work.
- growthmindsetAnswered on May 19, 2017 at 06:12 PM
Hi Jonathan, I noticed this being a thing between now and when me and Kiran last spoke. This does seem like it would satisfy our needs... but to be clear:
This will autodetect and then load the translations we specify in JotForm, right? This wouldn't just use Google translate on our forms.
- JotForm SupportjonathanAnswered on May 19, 2017 at 06:25 PM
This will autodetect and then load the translations we specify in JotForm, right?
From what I have noticed, it does work like this.
As long as the browser's language is available also in your form language tool, the language tool will take priority over the browser's language plugin.
The browser's language plugin will only take effect if the form doesn't have the same language available.
- growthmindsetAnswered on May 22, 2017 at 05:23 PM
So we're going to need to be able to tell JotForm which translation to render, rather than autodetect it. I've made a JSFiddle of a sample form:
It sounds like you had said we could programmatically tell JotForm to render the French translation by doing something like: src="https://form.jotform.us/jsform/71416813099157?language=fr"
But as you can see, that's not working.
Also, strangely, for translations on this sample form... I don't see the "edit texts" option anymore. Has the functionality changed or could this be a bug?
- JotForm SupportEltonCrisAnswered on May 22, 2017 at 09:01 PM
It is not working in your form due to the conflict with detect language option that is also enabled. Turn it off and the language parameter should work.
The edit texts can be seen in the language settings too. See screenshot below.
Here's a cloned version of your form with detect language disabled.
Hope this helps!
- growthmindsetAnswered on May 23, 2017 at 02:59 PM
Hi, I'm very happy this can work, but it doesn't appear to be working for me: https://jsfiddle.net/vr7cozv8/5/ . This form has "Detect Language" off and a French translation by using "Edit Texts".
- JotForm SupportEltonCrisAnswered on May 23, 2017 at 03:49 PM
You're right. It is not working this time and I was able to reproduce the problem when I created a new form.
I have now raised this to our developers for further investigation.
Once this is fixed, you'll be informed via this thread.
- growthmindsetAnswered on May 23, 2017 at 04:44 PM
Thanks Elton! I know my company is very excited about using JotForm. Please let me know if you find a solution to this problem.
- ivswebAnswered on June 07, 2017 at 03:23 AM
- CharlieAnswered on June 07, 2017 at 05:50 AM
Thank you for sharing your observations here. To better assist you, I went ahead and opened a separate thread for you. Please refer to this link instead: https://www.jotform.com/answers/1165888. We will address it shortly.
- JotForm SupportNeilVicenteAnswered on July 11, 2017 at 03:15 PM
Sorry for the late update, but we'd like to inform you that this bug has been fixed.