I want to know Saleforce got any api for detect a sentence or a word language. I just want to know the the language but not the translation.

  • goto to settings->advanced user details->locale sf will translate fields based on this selection Jul 14, 2016 at 5:24
  • Hi Ilya, my case is I need to create a social post in apex, and route to proper agent who spoke in different language based on the social post content. So, I need to know what is the language of social post content first. you got any solution for this?
    – Jen
    Jul 14, 2016 at 5:55

2 Answers 2


Apex provides this method to detect and return the current user's language.


This is a full list of languages supported in Salesforce. If you want to auto-detect the language of any word, you can use any 3rd party language detection API as well.

  • Hi Gaurav, I know Salesforce got translation API, is it possible I adopt these APIs to achieve my goal? My goal is auto-detect the language of any specific word.
    – Jen
    Jul 14, 2016 at 6:02
  • Yes, what exactly do you want to detect and translate within Salesforce? Jul 14, 2016 at 6:03
  • I need to create a social post by adopted apex, these social posts maybe include difference type of language like, en, zh, it and so forth. Then how I know what is the language of the social post before I assign this social post to en, zh or it queue.
    – Jen
    Jul 14, 2016 at 6:08
  • Hi Gaurav, You got any idea
    – Jen
    Jul 14, 2016 at 7:51
  • You can just as well use any language translation API for that, why do you need this to be done specifically using Apex API? Jul 14, 2016 at 8:13

Salesforce got no any native API for recognize a sentence language. But I just found Social Post object got a "Language" field which can recognize a sentence language from social media and push to Salesforce as a Social Post record

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.