on 10-28-2019 7:42 AM
Dear All,
As the title,
How to distinguish between strings when English or Japanese via ABSL?
I tried to use regular expressions or ASCII values to judge, but none of them can be implemented.
Thanks and BR?
Jiang
Hi @Eason,
This is because user logged in English and maintained in JAPANESE or this field is maiteined via WS.
So basically the language code is something cant be used now 😞
I am afraid you need to check if u can use some APIs which can detect languages.
like : https://cloud.google.com/translate/docs/detecting-language
Since it's a REST service you'll be able to integrate it without issues in your C4C using the SAP Cloud Application Studio.
The documentation has an example like this one:
https://translation.googleapis.com/language/translate/v2/detect?key=YOUR_API_KEY&q=Hallo Welt
And the service will return something like:
{"data":{"detections":[[{"language":"de","isReliable":false,"confidence":0.18397073}]]}}
BR
Dhruvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jiang,
Depending on the field you got the string from, there might be a 'languageCode' sub-field which you can use.
Lewis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.