• Resolved vivalis

    (@vivalis)


    I have a website with Google Language Translator (on the fly translation) and a Forminator form. By adding ‘notranslate’ as a class to a field or div of a website, you can prevent GLT from translating that particular part. I added ‘notranslate’ in ‘Additional CSS classes’ of the Forminator settings of a select field. The class gets output in the classes of the container of the select field:

    <div id=”select-7″ class=”forminator-col forminator-col-12 notranslate”>
    <div class=”forminator-field”>
    <label for=”forminator-form-938__field–select-7_635c0c96e8626-label” class=”forminator-label”>Data usage <span class=”forminator-required”>*</span>
    </label><select id=”forminator-form-938__field–select-7_635c0c96e8626″ class=”forminator-select–field forminator-select2″ data-required=”1″ name=”select-7″ data-default-value=”” data-placeholder=”Please choose an option” data-search=”false”>
    <option value=””>Please choose an option</option>
    <option value=”All” data-calculation=”0″>All</option>
    <option value=”Selected” data-calculation=”0″>Only selected manufacturers</option>
    <option value=”None” data-calculation=”0″>None</option>
    </select>
    </div>
    </div>`

    However, when clicking on the dropdown/select field, the options still get translated on the fly, but I do not want them to be translated. Any idea how I could stop GLT from translating the options of this field?

    I know this question rather belongs into the GLT forum, but I thought the cause of this issue might be in Select2 which is used by Forminator for select fields.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @vivalis

    I hope you are doing well.

    I am afraid it would be a question for the translation plugin support yes, I can see there is a similar issue on Select2 Github:

    https://github.com/select2/select2-bootstrap-theme/issues/69

    But I also went deeper and tried to apply the notranslate class to the entire form class but it still get translated.

    If they have any documentation where the class need to be added for Select2 feel free to let us know so we can see if there is any available hook to inject the class or use a JS.

    Best Regards
    Patrick Freitas

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @vivalis ,

    We haven’t heard from you for over a week now, so it looks like you don’t need our assistance anymore.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google Language Translator translates despite ‘notranslate’ class’ is closed to new replies.