Skip to main content
Closed

Feedback widget language

Related products:Freshdesk
  • May 22, 2014 8:26 AM UTC
  • 13 replies
  • 83 views

It should be possible to define the feedback widget language.


Currently the feedback widget is only available in the default language of the portal.

We should be able to pass a language parameter to the widget.

For example:

FreshWidget.init("", {"lang":"fr","queryString": "&widgetType=popup", "widgetType": "popup", "buttonType": "text", "buttonText": "Support", "buttonColor": "black", "buttonBg": "#ffffff", "alignment": "4", "offset": "235px", "formHeight": "500px", "url": "http://demo.freshdesk.com"} );

 Our website is available in multiple languages and for now the feedback widget is always in the same language.

13 replies

  • Community Debut
  • Jun 18, 2014 8:24 PM UTC

This is a minimum for a solution sold as "multilingual"

2 solutions :

 - Specify language through parameter

 - Specify product portal through parameter and the widget is in the same language as the product portal is.


Regards


  • Author
  • Contributor
  • Sep 10, 2014 2:33 PM UTC

Any update possible for this issue?

The lack of an option to choose the language makes the feedback widget useless with a multilingual setup.


  • Community Debut
  • Sep 24, 2014 10:17 PM UTC

I'm also missing this feature like Sébastien. For multilingual solution it's must. I really like this widget, but localization through some parameter is needed.


A must indeed!


  • Community Debut
  • Nov 14, 2014 3:57 PM UTC

Definitely needed.


  • Community Debut
  • Sep 28, 2015 8:28 AM UTC

Waiting for this..


  • Community Debut
  • Nov 10, 2016 9:48 PM UTC

Any updates on this? it's a deal breaker! And super easy to program


  • Community Debut
  • Mar 8, 2017 6:48 PM UTC

Hi,


This topic has been started 3 years ago and not one response from freshdesk ?!?


I'm also missing this feature dearly. We are switching our own website to multilangage and were using the freshdesk widget very efficiently. We are going to need to take the widget off our website if there is no quick evolution on this topic. And might think about changing our ticketing solution to a more responsive one as well... Freshdesk can't sell a "multilanguage ticketing solution" and not provide code for a multilanguage ticketing widget !!!


The need is to give the possibility of passing a language (e.g lang: "FR") argument within the code of the widget. That was explained very clearly by Johannes De Ridder in the first post of this topic.



  • Author
  • Contributor
  • Mar 8, 2017 8:54 PM UTC

It's crazy that this still isn't implemented 3 years after my original request. This is an essential feature for multilingual support.

It doesn't matter for us anymore because we left Freshdesk for an other ticketing system a year ago. But this should really be implemented asap.


  • Community Debut
  • Feb 28, 2018 9:20 AM UTC

I assume nothing significant happend since the comment a year ago.
I do see possibility to translate the feedback widget button, the submit button, and the heading but how about form field placeholders? Two more configuration properties would resolve this discussion forever.


  • Community Debut
  • Jul 6, 2018 7:21 AM UTC

The feedback widget is useless in a multilingual environment.


  • Community Debut
  • Jul 16, 2020 6:58 PM UTC

Since I looked for a solution and couldn't find it, I coded my own. 
Here's using the widget in React.js

You can set the "locale" parameter, but it won't change the widget unless you remove the script tag and add it again

  

HelpWidget.js

import useScript from "lib/useScript"
import React, { useEffect } from "react"

const HelpWidget = ({ languageId }) => {
  const [loaded, error] = useScript(
    "https://widget.freshworks.com/widgets/19000000227.js"
  )

  useEffect(() => {
    if (loaded) {
      console.log("it loaded!")
    }
    if (typeof window !== undefined) {
      window.fwSettings = {
        widget_id: 19000000227,
        locale: languageId
      }

      !(function() {
        if ("function" != typeof window.FreshworksWidget) {
          var n = function() {
            n.q.push(arguments)
          }
          ;(n.q = []), (window.FreshworksWidget = n)
        }
      })()
    }
    return () => {}
  }, [loaded])

  useEffect(() => {
    if (typeof window !== undefined) {
      if ("function" == typeof window.FreshworksWidget) {
        window.FreshworksWidget("destroy")
        window.fwSettings = {
          widget_id: 19000000227,
          locale: languageId
        }
        const oldScript = document.querySelector(
          'script[src="https://widget.freshworks.com/widgets/19000000227.js"]'
        )
        if (oldScript) oldScript.remove()

        const script = document.createElement("script")
        script.async = true
        script.src = "https://widget.freshworks.com/widgets/19000000227.js"
        document.head.appendChild(script)
      }
    }
  }, [languageId])

  return <></>
}
export default HelpWidget 

  

useScript.js https://usehooks.com/useScript/


 

import { useEffect, useState } from "react"

// Hook
let cachedScripts = []
export default function useScript(src) {
  // Keeping track of script loaded and error state
  const [state, setState] = useState({
    loaded: false,
    error: false
  })

  useEffect(
    () => {
      // If cachedScripts array already includes src that means another instance ...
      // ... of this hook already loaded this script, so no need to load again.
      if (cachedScripts.includes(src)) {
        setState({
          loaded: true,
          error: false
        })
      } else {
        cachedScripts.push(src)

        // Create script
        let script = document.createElement("script")
        script.src = src
        script.async = true

        // Script event listener callbacks for load and error
        const onScriptLoad = () => {
          setState({
            loaded: true,
            error: false
          })
        }

        const onScriptError = () => {
          // Remove from cachedScripts we can try loading again
          const index = cachedScripts.indexOf(src)
          if (index >= 0) cachedScripts.splice(index, 1)
          script.remove()

          setState({
            loaded: true,
            error: true
          })
        }

        script.addEventListener("load", onScriptLoad)
        script.addEventListener("error", onScriptError)

        // Add script to document body
        document.body.appendChild(script)

        // Remove event listeners on cleanup
        return () => {
          script.removeEventListener("load", onScriptLoad)
          script.removeEventListener("error", onScriptError)
        }
      }
    },
    [src] // Only re-run effect if script src changes
  )

  return [state.loaded, state.error]
}

 



Hello there,

 

The new help widget is the modern version of the feedback widget. It’s customizable and fits into the branding on your website

Give it a spin and let us know.   


Links for the solution articles:


-https://support.freshdesk.com/en/support/solutions/articles/50000000074-supporting-customers-in-multiple-languages-with-the-help-widget


-https://support.freshdesk.com/en/support/solutions/folders/50000000009


Hope this helps.


Cheers!